/* Bagnard Sans (SIL OFL 1.1, © 2015 Sebastien Sanfilippo — licence in assets/fonts/bagnard-sans/OFL.txt).
   Single regular weight, used for display text only; missing glyphs (e.g. "+") fall back to Roboto. */
@font-face { font-family: "Bagnard Sans"; src: url("../fonts/bagnard-sans/BagnardSans.woff2") format("woff2"); font-display: swap; }

/* Patwa Group brand layer over Material Kit 2. Mobile-first: base styles = phone, min-width queries scale up. */
:root {
  --brand-navy: #0f2557;
  --brand-navy-deep: #0a1a3d;
  --brand-red: #d81818;
  --brand-orange: #f09000;
  --brand-blue: #006bc2;   /* darkened from logo blue #0078d8 for 4.5:1 link text */
  --ink: #1f2a44;          /* body text: 12.9:1 on white */
  --ink-soft: #4a5672;     /* secondary text: 7.2:1 on white */
  --surface: #f4f6fa;
  --accent: var(--brand-red);
  --accent-ink: #fff;
  --radius: 1rem;
  --header-h: 4rem;      /* sticky navbar height; used for scroll offsets and sticky sub-menus */
  --bs-primary: var(--brand-navy);
  --bs-primary-rgb: 15, 37, 87;
  /* Material Kit's body/label grey (#7b809a) fails 4.5:1 on white. */
  --bs-body-color: var(--ink);
  --bs-body-color-rgb: 31, 42, 68;
  --bs-link-color: var(--brand-blue);
  --bs-link-hover-color: var(--brand-navy);
}
.theme-sap { --accent: var(--brand-orange); --accent-ink: var(--brand-navy-deep); }

html { scroll-padding-top: calc(var(--header-h) + 1rem); -webkit-tap-highlight-color: rgba(15,37,87,.15); }
body { color: var(--ink); font-family: "Roboto", system-ui, sans-serif; font-size: 1rem; touch-action: manipulation; }
h1, h2, h3, h4, .navbar-brand, .hero__title, .stats strong { color: var(--brand-navy); text-wrap: balance; font-weight: 400; font-synthesis: none; }
/* Display letter-spacing: visible gap between letters 50% of the original .04em tracking
   (gap = Bagnard Sans' ~.11em built-in sidebearings + tracking; 0.5 × (.11em + .04em) − .11em = −.035em). */
h1, h2, .hero__title, .navbar-brand, .stats strong { font-family: "Bagnard Sans", "Roboto", sans-serif; letter-spacing: -.035em; }
h3, h4 { font-family: "Roboto", system-ui, sans-serif; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.75rem); line-height: 1.15; }
h3 { font-size: clamp(1.15rem, 1.05rem + .4vw, 1.35rem); line-height: 1.3; }
main p, main li, main address { color: var(--ink); }
main p { font-weight: 400; line-height: 1.7; }
a { color: var(--brand-blue); text-underline-offset: .2em; }
a:hover { color: var(--brand-navy); }
:focus-visible { outline: 3px solid var(--brand-blue); outline-offset: 3px; border-radius: 4px; }
#main:focus { outline: none; }
.material-symbols-rounded { font-size: 1.25em; line-height: 1; vertical-align: -.2em; }

.skip-link { position: absolute; left: -999px; top: 0; z-index: 2000; background: #fff; color: var(--brand-navy); padding: .75rem 1rem; font-weight: 600; }
.skip-link:focus { left: 1rem; top: 1rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons: min 44px tap target; Material Kit uses `transition: all`, list properties instead. */
.btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border-radius: .75rem; text-transform: none; font-size: .95rem; letter-spacing: 0; font-weight: 600;
  transition: background-color .15s ease-in, border-color .15s ease-in, box-shadow .15s ease-in, color .15s ease-in; }
.btn-lg { min-height: 52px; padding: .8rem 1.6rem; font-size: 1rem; }
/* Colours go through Bootstrap's button variables: Material Kit's `.btn:hover` reads --bs-btn-hover-*,
   so a class that only sets `background` turns transparent on hover. Every hover is a clearly different, solid colour. */
.btn-primary { --bs-btn-bg: var(--brand-navy); --bs-btn-border-color: var(--brand-navy); --bs-btn-color: #fff;
  --bs-btn-hover-bg: #1d3f8f; --bs-btn-hover-border-color: #1d3f8f; --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--brand-navy-deep); --bs-btn-active-border-color: var(--brand-navy-deep); --bs-btn-active-color: #fff; }
.btn-accent { --bs-btn-bg: var(--brand-red); --bs-btn-border-color: var(--brand-red); --bs-btn-color: #fff;
  --bs-btn-hover-bg: #a81212; --bs-btn-hover-border-color: #a81212; --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: #8c0f0f; --bs-btn-active-border-color: #8c0f0f; --bs-btn-active-color: #fff; }
.theme-sap .btn-accent { --bs-btn-bg: var(--brand-orange); --bs-btn-border-color: var(--brand-orange); --bs-btn-color: var(--brand-navy-deep);
  --bs-btn-hover-bg: #ffb547; --bs-btn-hover-border-color: #ffb547; --bs-btn-hover-color: var(--brand-navy-deep);
  --bs-btn-active-bg: #d97f00; --bs-btn-active-border-color: #d97f00; --bs-btn-active-color: var(--brand-navy-deep); }
.btn-success { --bs-btn-bg: #1e7e34; --bs-btn-border-color: #1e7e34; --bs-btn-color: #fff; /* darker than WhatsApp green for 4.5:1 */
  --bs-btn-hover-bg: #14571f; --bs-btn-hover-border-color: #14571f; --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: #0f4418; --bs-btn-active-border-color: #0f4418; --bs-btn-active-color: #fff; }
.btn-outline-white { --bs-btn-bg: transparent; --bs-btn-border-color: #fff; --bs-btn-color: #fff;
  --bs-btn-hover-bg: #fff; --bs-btn-hover-border-color: #fff; --bs-btn-hover-color: var(--brand-navy);
  --bs-btn-active-bg: #e8edf8; --bs-btn-active-border-color: #e8edf8; --bs-btn-active-color: var(--brand-navy); border-width: 2px; }
/* Material Kit fades outline-white to 75% transparent on hover (selector specificity 0,3,0); match it to undo. */
.btn.btn-outline-white:hover:not(.active) { opacity: 1; background-color: var(--bs-btn-hover-bg); color: var(--bs-btn-hover-color); }
.btn-primary, .btn-accent, .btn-success, .btn-outline-white { background-color: var(--bs-btn-bg); border-color: var(--bs-btn-border-color); color: var(--bs-btn-color); }
.btn-primary:hover, .btn-accent:hover, .btn-success:hover, .btn-outline-white:hover,
.btn-primary:focus-visible, .btn-accent:focus-visible, .btn-success:focus-visible, .btn-outline-white:focus-visible {
  background-color: var(--bs-btn-hover-bg); border-color: var(--bs-btn-hover-border-color); color: var(--bs-btn-hover-color);
  box-shadow: 0 8px 18px -6px rgba(10,26,61,.45); }

/* Header: sticky white navbar */
.site-header { position: sticky; top: 0; z-index: 1030; box-shadow: 0 2px 12px rgba(15,37,87,.08); }
.navbar { padding: .5rem 0; }
/* Brand: 1.5× Material Kit's .875rem. Selector matches Material Kit's `.navbar .navbar-brand` (0,2,0), which otherwise wins. */
.navbar .navbar-brand { display: inline-flex; align-items: center; gap: .6rem; font-size: 1.3125rem; line-height: 1; margin: 0; text-transform: uppercase; color: var(--brand-navy); }
.navbar-brand__mark { width: 44px; height: 44px; border-radius: .6rem; flex: none; }
/* "PATWA GROUP" wordmark image (Algeria font by A. Carr, freeware), rendered from assets/img/logo-wordmark.png.
   18px under 360px, 20px on phones, 24px small tablets, 28px desktop — mark + wordmark + menu button stay on one line. */
.navbar-brand__word { height: 20px; width: auto; }
@media (max-width: 359.98px) { .navbar-brand__word { height: 18px; } } /* keeps the menu button on the same line at 320px */
@media (min-width: 576px) { .navbar-brand__word { height: 24px; } }
@media (min-width: 992px) { .navbar-brand__word { height: 28px; } }
.navbar .nav-link { color: var(--ink); font-weight: 500; min-height: 44px; display: flex; align-items: center; padding: .5rem .6rem !important; white-space: nowrap; }
.navbar .nav-link:hover, .navbar .nav-link.active { color: var(--brand-navy); }
.navbar .nav-link.active { box-shadow: inset 0 -3px 0 var(--brand-red); }
.navbar-toggler { min-width: 44px; min-height: 44px; border: 0; }
.navbar-toggler:focus-visible { outline: 3px solid var(--brand-blue); outline-offset: 2px; }
.navbar-toggler .navbar-toggler-icon .navbar-toggler-bar { height: 2px; background: var(--brand-navy); }
@media (max-width: 1199.98px) { /* collapsed (hamburger) menu: matches navbar-expand-xl */
  .navbar-collapse { border-top: 1px solid #e6eaf2; margin-top: .5rem; padding: .5rem 0 1rem; max-height: calc(100dvh - var(--header-h) - 1rem); overflow-y: auto; overscroll-behavior: contain; }
  .navbar .nav-link { font-size: 1.05rem; border-bottom: 1px solid #eef1f6; }
  .navbar .nav-link.active { box-shadow: inset 3px 0 0 var(--brand-red); }
}

/* Hero: photo + navy overlay; overlay keeps white text >= 7:1 regardless of photo. */
.hero { position: relative; isolation: isolate; color: #fff; display: flex; align-items: flex-end; min-height: 16rem; padding: 3.5rem 0 2.5rem; overflow: hidden; background: var(--brand-navy); }
.hero--tall { min-height: min(78svh, 46rem); align-items: center; padding: 4rem 0; }
.hero__media, .cta-band__media { position: absolute; inset: 0; z-index: -2; }
.hero__img { width: 100%; height: 100%; object-fit: cover; }
/* Overlay keeps text >= 4.5:1 even over a white photo: uniform .85 on phones (text spans full width);
   on desktop .88 under the text column, fading only where there is no text. */
.hero::before, .cta-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(10,26,61,.85); }
@media (min-width: 992px) { .hero::before { background: linear-gradient(100deg, rgba(10,26,61,.92) 0%, rgba(10,26,61,.88) 58%, rgba(10,26,61,.5) 100%); } }
.hero__body > * { max-width: 46rem; }
.hero__eyebrow { color: #ffd59a; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: .8rem; margin-bottom: .5rem; }
.hero__title { color: #fff; font-size: clamp(2.2rem, 1.5rem + 3.2vw, 4.25rem); line-height: 1.1; margin-bottom: 1rem; }
.hero:not(.hero--tall) .hero__title { font-size: clamp(1.8rem, 1.4rem + 2vw, 2.75rem); }
.hero__lead { color: #e8edf8; font-size: clamp(1.05rem, 1rem + .4vw, 1.3rem); max-width: 40rem; margin-bottom: 0; }
.hero__actions { display: flex; flex-direction: column; gap: .75rem; margin-top: 1.75rem; }
@media (min-width: 576px) { .hero__actions { flex-direction: row; } }
.accent-bar { width: 3.5rem; height: 4px; background: var(--accent); border-radius: 2px; margin-bottom: 1rem; }

/* Stats strip overlapping the hero */
.stats { position: relative; z-index: 2; margin-top: -2.5rem; }
.stats__list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: #e3e8f2; border-radius: var(--radius); overflow: hidden; box-shadow: 0 12px 30px rgba(15,37,87,.12); margin: 0; }
.stats__list li { background: #fff; padding: 1.25rem 1rem; text-align: center; }
.stats strong { display: block; font-size: clamp(1.9rem, 1.5rem + 1.4vw, 2.75rem); font-variant-numeric: lining-nums tabular-nums; }
.stats span { color: var(--ink-soft); font-size: .9rem; }
@media (min-width: 768px) { .stats__list { grid-template-columns: repeat(4, 1fr); } }

/* Sections */
.section { padding-top: clamp(3rem, 2rem + 4vw, 5.5rem); padding-bottom: clamp(3rem, 2rem + 4vw, 5.5rem); } /* vertical only: .section often shares an element with .container */
.section-head { max-width: 44rem; margin: 0 auto 2.5rem; }
.eyebrow { color: var(--brand-red); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; margin-bottom: .5rem; }
.theme-sap .eyebrow { color: #b45f00; } /* darker orange for 4.5:1 text */
.section-head h2::after { content: ""; display: block; width: 3.5rem; height: 4px; border-radius: 2px; background: var(--accent); margin: 1rem auto 0; }

/* What we offer */
.offer { background: var(--brand-navy); }
.offer h2, .offer .eyebrow { color: #fff; }
.offer .eyebrow { color: #ffd59a; }
.offer__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin: 0; } /* minmax(0,…): long words must not widen the grid past the screen */
@media (min-width: 768px) { .offer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; } }
@media (min-width: 1200px) { .offer__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.offer__item { display: flex; flex-direction: column; gap: .35rem; height: 100%; padding: 1.25rem 1rem; border-radius: var(--radius); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); color: #fff; text-decoration: none; transition: background-color .2s, transform .2s, border-color .2s; }
.offer__item:hover, .offer__item:focus-visible { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.35); color: #fff; transform: translateY(-2px); }
.offer__icon { font-size: 2.25rem; color: #ffb547; }
.offer__title { font-weight: 600; font-size: 1rem; line-height: 1.3; overflow-wrap: break-word; hyphens: auto; }
.offer__text { color: #cdd6ea; font-size: .875rem; line-height: 1.45; }

/* Alternating photo/text splits: photo on top on phones */
.split { display: grid; gap: 1.5rem; align-items: center; margin-bottom: 3.5rem; }
.split:last-child { margin-bottom: 0; }
.split__img, .why__img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: 0 16px 40px rgba(15,37,87,.18); }
.split__logo { height: 56px; width: auto; margin-bottom: 1rem; }
@media (min-width: 992px) {
  .split { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .split--reverse .split__media { order: 2; }
}
.checklist li, .features li { display: flex; gap: .75rem; align-items: flex-start; }
.checklist { margin: 1rem 0 1.5rem; }
.checklist li { margin-bottom: .5rem; }
.checklist .material-symbols-rounded { color: #1e7e34; }

/* Why choose us */
.why { background: var(--surface); }
.features { margin: 1.5rem 0 0; display: grid; gap: 1.25rem; }
@media (min-width: 576px) { .features { grid-template-columns: 1fr 1fr; } }
.features .material-symbols-rounded { flex: none; width: 3rem; height: 3rem; border-radius: .75rem; display: grid; place-items: center; background: #fff; color: var(--brand-red); font-size: 1.6rem; box-shadow: 0 6px 16px rgba(15,37,87,.08); }
.features h3 { font-size: 1.05rem; margin-bottom: .25rem; }
.features p { margin: 0; font-size: .95rem; line-height: 1.55; color: var(--ink-soft); }

/* Clients */
/* Client gallery: one-row-tall tiles whose width follows the logo (--span set in _includes/client-grid.html).
   Flex-wrap so tiles grow in proportion to --span and every row (last one included) is filled edge to edge;
   space-between distributes any leftover space if a row cannot grow. Hover flips the tile to show the client name. */
.client-band { background: linear-gradient(160deg, #f8f9fc 0%, #eceff5 55%, #e2e6ee 100%); } /* full-width band */
.client-gallery { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin: 0; }
.client-tile { --tile-h: 88px; flex: var(--span) 1 calc(var(--span) * 48px); height: var(--tile-h); min-width: 0; } /* phones: two medium logos per row */
/* Desktop: each tile is at least 1/5 of the row (minus four 12px gaps), so a row never holds more than 5 logos. */
@media (min-width: 768px) { .client-tile { --tile-h: 120px; flex-basis: max(calc(var(--span) * 72px), calc((100% - 48px) / 5)); } }
/* Flip card: front = logo, back = client name. Hover turns the card 180° around its vertical axis. */
.client-tile { perspective: 900px; }
.client-card { position: relative; height: 100%; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.4, .2, .2, 1); }
.client-tile:hover .client-card { transform: rotateY(180deg); }
.client-face { position: absolute; inset: 0; display: grid; place-items: center; padding: 0 12px; border-radius: 12px; background: #fff; border: 1px solid #e6eaf2;
  box-shadow: 0 1px 2px rgba(15,37,87,.06), 0 6px 16px -6px rgba(15,37,87,.14); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.client-face--back { transform: rotateY(180deg); background: var(--brand-navy); border-color: var(--brand-navy); color: #fff; text-align: center;
  font-family: "Bagnard Sans", "Roboto", sans-serif; font-size: clamp(.95rem, .85rem + .4vw, 1.2rem); line-height: 1.2; text-wrap: balance; }
/* Logo box is 70% of the tile height in px (a % height has no definite parent here and was ignored, letting tall logos overflow).
   Width is capped at the tile and at 2× the file's size; object-fit keeps the logo undistorted inside that box. */
.client-face img { height: calc(var(--tile-h) * .7); width: auto; max-width: min(100%, var(--max-w, 100%)); object-fit: contain; }

/* CTA band */
.cta-band { position: relative; isolation: isolate; overflow: hidden; padding: clamp(3rem, 2rem + 4vw, 5rem) 0; color: #fff; background: var(--brand-navy); }
.cta-band::before { background: rgba(10,26,61,.85); }
.cta-band h2 { color: #fff; }
.cta-band p { color: #e8edf8; margin-bottom: 1.5rem; }

/* Inner pages */
.prose { font-size: 1.05rem; }
.prose > h2 { margin-top: 2.5rem; padding-top: .5rem; }
.prose > h2:first-child, .prose > h3:first-child { margin-top: 0; }
.prose > h3 { margin-top: 2rem; padding-left: .9rem; border-left: 4px solid var(--accent); }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: .35rem; }
.prose li::marker { color: var(--accent); }
.company-aside { position: sticky; top: calc(var(--header-h) + 1.5rem); }
.company-aside__logo { max-width: 100%; height: auto; margin-bottom: 1.5rem; }
.subnav .nav-link { color: var(--ink); min-height: 44px; display: flex; align-items: center; border-left: 3px solid transparent; }
.subnav .nav-link[aria-current="page"] { color: var(--brand-navy); font-weight: 600; border-left-color: var(--accent); background: var(--surface); }
@media (max-width: 991.98px) {
  .company-aside { position: sticky; top: var(--header-h); z-index: 5; background: #fff; margin: -1rem -12px 0; padding: 0 12px; border-bottom: 1px solid #e6eaf2; }
  .subnav .nav { flex-direction: row !important; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .subnav .nav-link { border-left: 0; border-bottom: 3px solid transparent; white-space: nowrap; }
  .subnav .nav-link[aria-current="page"] { border-bottom-color: var(--accent); background: none; }
}
.spec-table th[scope="row"] { position: sticky; left: 0; background: #fff; z-index: 1; }
.spec-table thead th:first-child { position: sticky; left: 0; z-index: 2; }
/* High-contrast headers: white on navy (14.8:1); group rows navy on light blue-grey (12:1). */
.spec-table thead th { white-space: normal; vertical-align: bottom; background: var(--brand-navy); color: #fff; border-color: #2a4278; }
.spec-table th[scope="row"] { font-weight: 500; min-width: 8.5rem; }
.spec-table .spec-group th { text-align: center; background: #dbe3f1; color: var(--brand-navy-deep); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: .75rem; padding-top: .5rem; }
.spec-table caption { caption-side: bottom; font-size: .8rem; color: var(--ink-soft); }
/* Bordered grid on all sides; small type so both tables fit without scrolling from 1400px up. */
.spec-table { font-size: .9rem; --bs-table-border-color: #d5dbe7; border-color: #d5dbe7; }
.spec-table > :not(caption) > * > * { padding: .4rem .3rem; }
.table { --bs-table-color: var(--ink); --bs-table-striped-color: var(--ink); }
.form-label { color: var(--ink); font-weight: 500; }
.form-control, .form-select { min-height: 48px; border-color: #8a94ab !important; } /* 3:1 field border */
.card { border-radius: var(--radius); }

/* Footer */
.site-footer { background: var(--brand-navy-deep); color: #c9d3ea; padding: 3.5rem 0 calc(1.5rem + env(safe-area-inset-bottom)); }
.site-footer a { color: #fff; }
.site-footer h2 { color: #fff; font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.site-footer li { margin-bottom: 0; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.site-footer__brand { margin-bottom: .75rem; }
.site-footer__brand img { height: 30px; width: auto; display: block; } /* white copy of the navbar wordmark */
.site-footer__logo { background: #fff; border-radius: .6rem; padding: .4rem .6rem; display: inline-block; }
.site-footer__logo img { height: 40px; width: auto; }
.site-footer__base { border-top: 1px solid rgba(255,255,255,.15); margin-top: 2.5rem; padding-top: 1.25rem; display: flex; flex-wrap: wrap; gap: .5rem 2rem; justify-content: space-between; font-size: .875rem; }

/* Floating WhatsApp: clears iPhone home bar */
.wa-float { position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 1040; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #1e7e34; color: #fff; box-shadow: 0 8px 20px rgba(0,0,0,.25); transition: transform .2s; }
.wa-float:hover, .wa-float:focus-visible { color: #fff; transform: scale(1.06); }
.site-footer { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); } /* room so the float never covers footer links */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .offer__item:hover, .wa-float:hover { transform: none; }
}



/* Page titles (hero h1) in capitals. CSS-only, so screen readers and search engines still get normal-case text. */
#page-title { text-transform: uppercase; }

/* Menu bar uses (almost) the full width on laptops instead of the narrower page container. */
.navbar-inner { max-width: 1320px; padding-inline: clamp(12px, 2vw, 24px); }
