/* =================================================================
   Sabbaq Fannan Al Riyadh — Main Stylesheet
   -----------------------------------------------------------------
   Structure of this file (search these headings to jump around):
     1. DESIGN TOKENS      — colours, fonts, spacing variables
     2. RESET & BASE       — sensible defaults for all elements
     3. TYPOGRAPHY         — headings, paragraphs, type scale
     4. LAYOUT HELPERS     — container, section spacing, grid
     5. BUTTONS            — primary / outline / call-to-action
     6. HEADER & NAV       — top bar, logo, menu, language toggle
     7. FOOTER             — bottom bar
     8. FLOATING WHATSAPP  — fixed corner button
     9. HERO               — big top banner on each page
    10. HOME PAGE SECTIONS — services grid, why-us, areas, reviews
    11. SERVICE PAGE       — sub-service list, FAQ
    12. CONTACT PAGE       — form, info cards, map
    13. ANIMATIONS         — scroll reveal, hover motion
    14. RTL (ARABIC)       — right-to-left overrides
    15. RESPONSIVE         — tablet & mobile breakpoints
   ================================================================= */


/* =================================================================
   1. DESIGN TOKENS
   Change a value here and it updates everywhere.
   ================================================================= */
:root {
  /* --- Brand greys (from client palette) --- */
  --c-primary:    #313E50;  /* darkest — headers, footer, headings   */
  --c-secondary:  #3A435E;  /* deep slate                            */
  --c-slate:      #455561;  /* mid slate                             */
  --c-steel:      #5C6672;  /* lighter steel                         */
  --c-grey:       #6C6F7F;  /* body/muted text                       */

  /* --- Accent (copper/amber) — used ONLY for CTAs & highlights --- */
  --c-accent:      #C0824A; /* warm copper — buttons, links, accents */
  --c-accent-dark: #A66C38; /* hover state for accent                */

  /* --- Neutrals / backgrounds --- */
  --c-white:   #FFFFFF;
  --c-bg:      #F7F8F9;      /* very light grey page background       */
  --c-bg-soft: #EEF0F2;      /* soft grey for alternating sections    */
  --c-border:  #E1E4E8;      /* hairline borders                      */

  /* --- WhatsApp brand green (floating button only) --- */
  --c-whatsapp: #25D366;

  /* --- Typography --- */
  --font-display: 'Poppins', 'Segoe UI', sans-serif; /* headings     */
  --font-body:    'Inter', 'Segoe UI', sans-serif;   /* body text    */

  /* --- Spacing scale --- */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;

  /* --- Misc --- */
  --radius:   10px;         /* default rounded corners               */
  --radius-sm: 6px;
  --shadow:   0 4px 20px rgba(49, 62, 80, 0.08);
  --shadow-lg: 0 12px 40px rgba(49, 62, 80, 0.14);
  --maxwidth: 1200px;       /* content max width                     */
  --transition: 0.28s ease;
}


/* =================================================================
   2. RESET & BASE
   ================================================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* html + body both need this. Note: overflow-x:hidden alone does NOT stop
   a fixed element (like the WhatsApp button) drifting off-screen — the real
   fix is stopping any child from being wider than the screen in the first
   place (see .footer__contact and the media queries at the bottom). */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  color: var(--c-grey);
  background: var(--c-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { text-decoration: none; color: inherit; }

ul { list-style: none; }


/* =================================================================
   3. TYPOGRAPHY
   ================================================================= */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--c-primary);
  line-height: 1.25;
  font-weight: 600;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

p { margin-bottom: var(--space-sm); }

/* Small uppercase label above headings ("eyebrow") */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: var(--space-xs);
}


/* =================================================================
   4. LAYOUT HELPERS
   ================================================================= */
.container {
  width: 90%;
  max-width: var(--maxwidth);
  margin: 0 auto;
}

/* Vertical rhythm for page sections */
.section { padding: var(--space-xl) 0; }
.section--soft { background: var(--c-bg-soft); }
.section--dark { background: var(--c-primary); }
.section--dark h2,
.section--dark h3 { color: var(--c-white); }
.section--dark p { color: #C5CBD3; }

/* Centered section header block */
.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-lg);
}
.section-head p { color: var(--c-grey); }


/* =================================================================
   5. BUTTONS
   ================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

/* Primary = copper accent */
.btn--primary {
  background: var(--c-accent);
  color: var(--c-white);
}
.btn--primary:hover {
  background: var(--c-accent-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* Outline = for use on light backgrounds */
.btn--outline {
  background: transparent;
  color: var(--c-primary);
  border-color: var(--c-border);
}
.btn--outline:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
}

/* Ghost light = for use on dark hero backgrounds */
.btn--light {
  background: var(--c-white);
  color: var(--c-primary);
}
.btn--light:hover {
  background: var(--c-bg-soft);
  transform: translateY(-2px);
}


/* =================================================================
   6. HEADER & NAV
   ================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--c-border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

/* --- Logo (pure CSS text wordmark + icon) --- */
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.logo__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}
.logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
/* Main brand name — compact so it fits mobile headers */
.logo__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--c-primary);
  white-space: nowrap;
}
/* "AL RIYADH" sub-line under the name */
.logo__sub {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-top: 3px;
}

/* --- Primary navigation menu --- */
.nav__menu {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}
.nav__link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--c-slate);
  position: relative;
  padding: 0.3rem 0;
  transition: color var(--transition);
}
/* animated underline on hover / active */
.nav__link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--c-accent);
  transition: width var(--transition);
}
.nav__link:hover,
.nav__link.is-active { color: var(--c-primary); }
.nav__link:hover::after,
.nav__link.is-active::after { width: 100%; }

/* --- Right-side actions (lang toggle + CTA) --- */
.nav__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Language toggle button */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--c-bg-soft);
  border: 1px solid var(--c-border);
  border-radius: 20px;
  padding: 0.4rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-slate);
  cursor: pointer;
  transition: var(--transition);
}
.lang-toggle:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
}

/* Hamburger (hidden on desktop) */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav__toggle span {
  width: 26px;
  height: 2px;
  background: var(--c-primary);
  transition: var(--transition);
}


/* =================================================================
   7. FOOTER
   ================================================================= */
.site-footer {
  background: var(--c-primary);
  color: #B9C0CB;
  padding: var(--space-xl) 0 var(--space-md);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}
.footer__col h4 {
  color: var(--c-white);
  font-size: 1rem;
  margin-bottom: var(--space-sm);
}
.footer__col ul li { margin-bottom: 0.6rem; }
.footer__col a {
  color: #B9C0CB;
  font-size: 0.92rem;
  transition: color var(--transition);
}
.footer__col a:hover { color: var(--c-accent); }

.footer__about p {
  color: #A9B1BD;
  font-size: 0.92rem;
  margin-top: var(--space-sm);
}
/* Footer logo reuses .logo but recolours for dark bg */
.site-footer .logo__name { color: var(--c-white); }
.site-footer .logo__sub  { color: #EAD9C4; }

.footer__contact li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.92rem;
  margin-bottom: 0.7rem;
  /* min-width:0 lets a flex child actually shrink below its content size.
     Without this, the long email address forces the column wider than the
     screen and causes horizontal scrolling on mobile. */
  min-width: 0;
}
.footer__contact svg { flex-shrink: 0; color: var(--c-accent); }
/* Long, unbroken strings (like the email) must be allowed to wrap */
.footer__contact a,
.footer__contact span {
  min-width: 0;
  overflow-wrap: anywhere;   /* break the email if there is no room */
  word-break: break-word;    /* fallback for older browsers          */
}

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-md);
  text-align: center;
  font-size: 0.85rem;
  color: #8B93A0;
}


/* =================================================================
   8. FLOATING BUTTONS  (WhatsApp + Call, stacked)
   ================================================================= */

/* --- WhatsApp (bottom) --- */
.wa-float {
  position: fixed;
  /* env(safe-area-inset-*) keeps the button clear of the iPhone home bar
     and any rounded screen corners. The calc() falls back to 24px normally. */
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  right:  calc(24px + env(safe-area-inset-right, 0px));
  z-index: 200;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--c-whatsapp);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
  transition: transform var(--transition);
  animation: wa-pulse 2.5s infinite;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 32px; height: 32px; }

/* --- Call (sits directly ABOVE the WhatsApp button) --- */
.call-float {
  position: fixed;
  /* 58px button height + 16px gap + 24px base = 98px above the bottom */
  bottom: calc(98px + env(safe-area-inset-bottom, 0px));
  right:  calc(24px + env(safe-area-inset-right, 0px));
  z-index: 200;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  /* Brand copper accent so it matches the site and stands apart from WhatsApp green */
  background: var(--c-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(192, 130, 74, 0.45);
  transition: transform var(--transition);
  animation: call-pulse 2.5s infinite;
}
.call-float:hover { transform: scale(1.08); background: var(--c-accent-dark); }
.call-float svg { width: 28px; height: 28px; }

/* gentle pulse ring for WhatsApp */
@keyframes wa-pulse {
  0%   { box-shadow: 0 6px 20px rgba(37,211,102,0.45), 0 0 0 0 rgba(37,211,102,0.4); }
  70%  { box-shadow: 0 6px 20px rgba(37,211,102,0.45), 0 0 0 16px rgba(37,211,102,0); }
  100% { box-shadow: 0 6px 20px rgba(37,211,102,0.45), 0 0 0 0 rgba(37,211,102,0); }
}
/* gentle pulse ring for Call (copper) */
@keyframes call-pulse {
  0%   { box-shadow: 0 6px 20px rgba(192,130,74,0.45), 0 0 0 0 rgba(192,130,74,0.4); }
  70%  { box-shadow: 0 6px 20px rgba(192,130,74,0.45), 0 0 0 16px rgba(192,130,74,0); }
  100% { box-shadow: 0 6px 20px rgba(192,130,74,0.45), 0 0 0 0 rgba(192,130,74,0); }
}


/* =================================================================
   9. HERO
   ================================================================= */
.hero {
  position: relative;
  background: linear-gradient(rgba(49,62,80,0.82), rgba(49,62,80,0.9)),
              url('https://images.unsplash.com/photo-1607472586893-edb57bdc0e39?auto=format&fit=crop&w=1600&q=80')
              center/cover no-repeat;
  color: var(--c-white);
  padding: var(--space-xl) 0;
  text-align: center;
}
.hero__inner { max-width: 780px; margin: 0 auto; }
.hero h1 { color: var(--c-white); margin-bottom: var(--space-sm); }
.hero p {
  color: #D6DBE1;
  font-size: 1.15rem;
  margin-bottom: var(--space-md);
}
.hero__cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Trust strip under hero */
.trust-strip {
  background: var(--c-white);
  border-bottom: 1px solid var(--c-border);
}
.trust-strip__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  padding: var(--space-md) 0;
  text-align: center;
}
.trust-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--c-primary);
}
.trust-item span { font-size: 0.85rem; color: var(--c-grey); }


/* =================================================================
   10. HOME PAGE SECTIONS
   ================================================================= */

/* --- Services grid --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-md);
}
.service-card {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: var(--space-md);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.service-card__icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-sm);
  background: var(--c-bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-sm);
  color: var(--c-accent);
}
.service-card:hover .service-card__icon {
  background: var(--c-accent);
  color: var(--c-white);
}
.service-card h3 { margin-bottom: 0.5rem; }
.service-card p { font-size: 0.92rem; flex-grow: 1; }
.service-card__link {
  margin-top: var(--space-sm);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--c-accent);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.service-card__link::after { content: '→'; transition: transform var(--transition); }
.service-card:hover .service-card__link::after { transform: translateX(4px); }

/* --- Why-us split (image + points) --- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}
.split__img {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.split__img img { width: 100%; height: 100%; object-fit: cover; }

.feature-list li {
  display: flex;
  gap: 1rem;
  margin-bottom: var(--space-md);
}
.feature-list__mark {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--c-bg-soft);
  color: var(--c-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-list h4 { margin-bottom: 0.2rem; }
.feature-list p { font-size: 0.92rem; margin-bottom: 0; }

/* --- Areas served chips --- */
.areas-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
}
.area-chip {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: 30px;
  padding: 0.6rem 1.4rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--c-slate);
  transition: var(--transition);
}
.area-chip:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
  transform: translateY(-2px);
}

/* --- Testimonials --- */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
}
.review-card {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: var(--space-md);
}
.review-card__stars { color: var(--c-accent); margin-bottom: var(--space-sm); letter-spacing: 2px; }
.review-card__text { font-style: italic; color: var(--c-slate); }
.review-card__author {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: var(--space-sm);
}
.review-card__avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--c-primary);
  color: var(--c-white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
  font-family: var(--font-display);
}
.review-card__name { font-weight: 600; color: var(--c-primary); font-size: 0.95rem; }
.review-card__loc { font-size: 0.82rem; color: var(--c-grey); }

/* --- Big CTA band --- */
.cta-band {
  background: var(--c-primary);
  color: var(--c-white);
  text-align: center;
  padding: var(--space-lg) 0;
}
.cta-band h2 { color: var(--c-white); margin-bottom: var(--space-sm); }
.cta-band p { color: #C5CBD3; margin-bottom: var(--space-md); }
.cta-band__buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }


/* =================================================================
   11. SERVICE PAGE
   ================================================================= */

/* Page hero (shorter than home hero) */
.page-hero {
  background: linear-gradient(rgba(49,62,80,0.85), rgba(49,62,80,0.92)),
              var(--hero-img, none) center/cover no-repeat;
  background-color: var(--c-primary);
  color: var(--c-white);
  padding: var(--space-lg) 0;
  text-align: center;
}
.page-hero h1 { color: var(--c-white); margin-bottom: 0.5rem; }
.page-hero p { color: #D6DBE1; max-width: 620px; margin: 0 auto; }

/* Breadcrumb */
.breadcrumb {
  font-size: 0.85rem;
  color: #C5CBD3;
  margin-bottom: var(--space-sm);
}
.breadcrumb a { color: var(--c-accent); }

/* Sub-service list rows */
.subservice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
  margin-bottom: var(--space-lg);
}
.subservice:last-child { margin-bottom: 0; }
/* alternate image side on even rows */
.subservice--reverse .subservice__media { order: 2; }
.subservice__media {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.subservice__media img { width: 100%; height: 320px; object-fit: cover; }
.subservice__body .eyebrow { margin-bottom: 0.4rem; }
.subservice__body ul { margin-top: var(--space-sm); }
.subservice__body ul li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
  color: var(--c-slate);
}
.subservice__body ul li::before {
  content: '✓';
  color: var(--c-accent);
  font-weight: 700;
}

/* FAQ accordion */
.faq { max-width: 820px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--c-border);
}
.faq-item__q {
  width: 100%;
  text-align: inherit;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm) 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--c-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-item__q .faq-icon { color: var(--c-accent); transition: transform var(--transition); flex-shrink: 0; }
.faq-item.is-open .faq-icon { transform: rotate(45deg); }
.faq-item__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition);
}
.faq-item__a p { padding-bottom: var(--space-sm); margin: 0; }


/* =================================================================
   12. CONTACT PAGE
   ================================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

/* Info cards column */
.contact-info__card {
  display: flex;
  gap: 1rem;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--c-border);
}
.contact-info__card:last-child { border-bottom: none; }
.contact-info__icon {
  flex-shrink: 0;
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  background: var(--c-bg-soft);
  color: var(--c-accent);
  display: flex; align-items: center; justify-content: center;
}
.contact-info__card h4 { margin-bottom: 0.2rem; font-size: 1.05rem; }
.contact-info__card a,
.contact-info__card p { color: var(--c-grey); font-size: 0.95rem; margin: 0; }
.contact-info__card a:hover { color: var(--c-accent); }

/* Form */
.contact-form { display: flex; flex-direction: column; gap: var(--space-sm); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-sm); }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-slate);
  margin-bottom: 0.4rem;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--c-primary);
  background: var(--c-white);
  transition: border-color var(--transition);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--c-accent);
}
.field textarea { resize: vertical; min-height: 120px; }

/* Map embed */
.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-top: var(--space-lg);
}
.map-embed iframe { width: 100%; height: 380px; border: 0; display: block; }


/* =================================================================
   13. ANIMATIONS (scroll reveal)
   Elements with .reveal start hidden, then .is-visible (added by JS)
   fades + slides them in.
   ================================================================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Respect users who prefer no motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}


/* =================================================================
   14. RTL (ARABIC) OVERRIDES
   Applied when <html dir="rtl"> is set by the language toggle.
   ================================================================= */
[dir="rtl"] { text-align: right; }
[dir="rtl"] body { font-family: 'Tajawal', var(--font-body); }
[dir="rtl"] .nav__link::after { left: auto; right: 0; }
[dir="rtl"] .service-card__link::after { content: '←'; }
[dir="rtl"] .service-card:hover .service-card__link::after { transform: translateX(-4px); }
[dir="rtl"] .subservice__body ul li,
[dir="rtl"] .footer__contact li,
[dir="rtl"] .contact-info__card { flex-direction: row-reverse; }
[dir="rtl"] .wa-float {
  right: auto;
  left: calc(24px + env(safe-area-inset-left, 0px));
}
[dir="rtl"] .call-float {
  right: auto;
  left: calc(24px + env(safe-area-inset-left, 0px));
}
[dir="rtl"] .subservice--reverse .subservice__media { order: 0; }


/* =================================================================
   15. RESPONSIVE
   ================================================================= */

/* --- Tablet --- */
@media (max-width: 900px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .split,
  .subservice,
  .subservice--reverse .subservice__media { grid-template-columns: 1fr; }
  .subservice__media { order: 0 !important; }
  .contact-grid { grid-template-columns: 1fr; }
  .trust-strip__grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-md) var(--space-sm); }
}

/* --- Mobile: collapse nav into slide-down menu --- */
@media (max-width: 720px) {
  .nav__toggle { display: flex; }

  .nav__menu {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--c-white);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: var(--space-sm) 5%;
    border-bottom: 1px solid var(--c-border);
    box-shadow: var(--shadow);
    /* hidden by default, shown when .is-open added by JS */
    max-height: 0;
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
    transition: max-height var(--transition), padding var(--transition);
  }
  .nav__menu.is-open {
    max-height: 420px;
    padding-top: var(--space-sm);
    padding-bottom: var(--space-sm);
  }
  .nav__menu li { width: 100%; }
  .nav__link { display: block; padding: 0.8rem 0; width: 100%; }

  /* hamburger → X when open */
  .nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .form-row { grid-template-columns: 1fr; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { justify-content: center; }

  /* FOOTER: stack into ONE column on phones.
     At 2 columns the long email could not fit in half a phone screen,
     which pushed the whole page wider and caused sideways scrolling. */
  .footer__grid { grid-template-columns: 1fr; gap: var(--space-md); }
  .footer__contact li { font-size: 0.88rem; }
}

/* --- Small mobile --- */
@media (max-width: 420px) {
  .trust-strip__grid { grid-template-columns: 1fr 1fr; }
  /* Shrink the wordmark slightly so icon + name + toggle + menu all fit */
  .logo__name { font-size: 0.92rem; }
  .logo__sub  { font-size: 0.55rem; letter-spacing: 0.2em; }
  .logo__icon { width: 36px; height: 36px; }
  .nav { gap: 0.5rem; }
  .logo { gap: 0.45rem; }
  .nav__actions { gap: 0.5rem; }
}

/* Very small screens (e.g. 320px) — trim further so nothing crowds */
@media (max-width: 340px) {
  .logo__name { font-size: 0.82rem; letter-spacing: 0; }
  .logo__sub  { font-size: 0.5rem; letter-spacing: 0.15em; }
  .logo__icon { width: 32px; height: 32px; }
  .lang-toggle { padding: 0.35rem 0.6rem; font-size: 0.78rem; }
}


/* =================================================================
   16. GALLERY  (added in Phase 2)
   ================================================================= */
.gallery-grid {
  display: grid;
  /* auto-fill = the grid adapts to ANY number of images automatically.
     Add or remove .gallery-item blocks and the layout stays even.
     minmax(240px, 1fr): each image is at least 240px, columns flex to fit. */
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-sm);
}
.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  /* Fixed 4:3 ratio + object-fit:cover below means any image size or
     orientation (portrait or landscape) fills the tile uniformly. */
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.06); }
/* subtle dark overlay + zoom icon on hover */
.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(49, 62, 80, 0);
  transition: background var(--transition);
}
.gallery-item:hover::after { background: rgba(49, 62, 80, 0.25); }

/* Lightbox overlay */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(20, 26, 34, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: 90%;
  max-height: 85vh;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.lightbox__close {
  position: absolute;
  top: 24px; right: 32px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  transition: transform var(--transition);
}
.lightbox__close:hover { transform: rotate(90deg); }
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  width: 52px; height: 52px;
  border-radius: 50%;
  font-size: 1.6rem;
  cursor: pointer;
  transition: background var(--transition);
}
.lightbox__nav:hover { background: rgba(255,255,255,0.25); }
.lightbox__nav--prev { left: 24px; }
.lightbox__nav--next { right: 24px; }

[dir="rtl"] .lightbox__nav--prev { left: auto; right: 24px; }
[dir="rtl"] .lightbox__nav--next { right: auto; left: 24px; }

/* On tablet: force exactly 2 columns (overrides auto-fill for tidy rows) */
@media (max-width: 720px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .lightbox__nav { width: 42px; height: 42px; }
}
/* On phones: 2 columns stays clean and mobile-friendly for any image count.
   Every tile is the same 4:3 shape, so odd numbers still look neat. */
@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
}


/* =================================================================
   17. 30-DAY GUARANTEE  (added — highlighted offer)
   ================================================================= */

/* Top ribbon inside the hero — high contrast, animated shine */
.guarantee-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--c-accent);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.7rem 1.6rem;
  border-radius: 40px;
  margin-bottom: var(--space-md);
  box-shadow: 0 8px 24px rgba(192, 130, 74, 0.4);
  position: relative;
  overflow: hidden;
  animation: guarantee-glow 2.8s ease-in-out infinite;
}
.guarantee-ribbon svg { width: 22px; height: 22px; flex-shrink: 0; }
.guarantee-ribbon strong { font-weight: 700; }
/* subtle attention pulse */
@keyframes guarantee-glow {
  0%,100% { box-shadow: 0 8px 24px rgba(192,130,74,0.35); transform: translateY(0); }
  50%     { box-shadow: 0 12px 32px rgba(192,130,74,0.6); transform: translateY(-2px); }
}

/* Full-width highlighted guarantee band (placed under hero) */
.guarantee-band {
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-secondary) 100%);
  color: #fff;
  border-top: 3px solid var(--c-accent);
  border-bottom: 3px solid var(--c-accent);
}
.guarantee-band__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  text-align: center;
  flex-wrap: wrap;
}
.guarantee-band__badge {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--c-accent);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 6px 18px rgba(192,130,74,0.5);
}
.guarantee-band__badge strong { font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; }
.guarantee-band__badge span { font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; margin-top: 2px; }
.guarantee-band__text { text-align: left; max-width: 560px; }
.guarantee-band__text h3 { color: #fff; margin-bottom: 0.3rem; font-size: 1.35rem; }
.guarantee-band__text p { color: #D6DBE1; margin: 0; font-size: 0.98rem; }

[dir="rtl"] .guarantee-band__text { text-align: right; }

@media (max-width: 720px) {
  .guarantee-band__inner { flex-direction: column; gap: var(--space-sm); }
  .guarantee-band__text { text-align: center; }
  [dir="rtl"] .guarantee-band__text { text-align: center; }
  .guarantee-ribbon { font-size: 0.85rem; padding: 0.6rem 1.1rem; gap: 0.5rem; }
  .guarantee-ribbon svg { width: 18px; height: 18px; }
}
