/* ==========================================================================
   NileMedical — redesign stylesheet
   Prosthetics & Orthotics Center, Cairo, Egypt
   ========================================================================== */

:root {
  /* Brand palette — rooted in the original NileMedical teal/navy identity */
  --teal-deep:    #0B6B70;
  --teal:         #12969B;
  --teal-bright:  #22C2C2;
  --navy:         #101B34;
  --navy-soft:    #1B2C50;
  --blue:         #2D5AA0;
  --paper:        #F7F4EC;
  --paper-dim:    #EFEAE0;
  --ink:          #16233E;
  --ink-soft:     #4A5670;
  --coral:        #E2472B;
  --coral-deep:   #B93A22;
  --white:        #FFFFFF;
  --line:         rgba(16, 27, 52, 0.10);

  --font-display: 'Fraunces', 'Georgia', serif;
  --font-body:    'Work Sans', -apple-system, sans-serif;
  --font-arabic:  'Cairo', 'Tahoma', sans-serif;

  --container: 1180px;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow-soft: 0 24px 60px -30px rgba(16, 27, 52, 0.35);
  --shadow-card: 0 14px 34px -18px rgba(16, 27, 52, 0.28);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[dir="rtl"] body { font-family: var(--font-arabic); }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  margin: 0 0 0.5em;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
}
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 {
  font-family: var(--font-arabic);
  font-weight: 700;
  letter-spacing: 0;
}
p { line-height: 1.7; color: var(--ink-soft); margin: 0 0 1em; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--coral);
  display: inline-block;
}
[dir="rtl"] .eyebrow { letter-spacing: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1.5px solid transparent;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s, background .35s, color .35s;
}
.btn--primary { background: var(--coral); color: var(--white); box-shadow: 0 14px 28px -12px rgba(226,71,43,.55); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -12px rgba(226,71,43,.6); }
.btn--ghost { border-color: rgba(255,255,255,.55); color: var(--white); }
.btn--ghost:hover { background: rgba(255,255,255,.12); transform: translateY(-2px); }
.btn--outline { border-color: var(--teal); color: var(--teal-deep); }
.btn--outline:hover { background: var(--teal); color: var(--white); transform: translateY(-2px); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(120deg, var(--teal-deep), var(--teal) 55%, var(--teal-bright));
  box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 12px 30px -18px rgba(11,107,112,.6);
  transition: padding .35s ease;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 54px; width: auto; filter: drop-shadow(0 4px 10px rgba(0,0,0,.18)); }
.brand-word { display: none; }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  padding: 10px 16px;
  font-weight: 600;
  font-size: 14.5px;
  color: rgba(255,255,255,.88);
  border-radius: 999px;
  transition: background .3s, color .3s;
  white-space: nowrap;
}
.site-nav a:hover { background: rgba(255,255,255,.14); color: var(--white); }
.site-nav a.is-active { background: rgba(255,255,255,.94); color: var(--teal-deep); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  border: 1.5px solid rgba(255,255,255,.55);
  border-radius: 999px;
  color: var(--white);
  font-weight: 700;
  font-size: 13.5px;
  transition: background .3s, transform .3s;
}
.lang-pill:hover { background: rgba(255,255,255,.16); transform: translateY(-1px); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1.5px solid rgba(255,255,255,.5);
  background: rgba(255,255,255,.08);
  color: var(--white);
  align-items: center; justify-content: center;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  background: radial-gradient(120% 160% at 15% 0%, #3E74C6 0%, #1F3E75 46%, #0F213F 100%);
  color: var(--white);
  padding: 96px 0 150px;
  overflow: hidden;
  isolation: isolate;
}
.hero-waves {
  position: absolute; inset: 0;
  z-index: -1;
  opacity: .55;
}
.hero-waves svg { width: 100%; height: 100%; }
.hero-waves path { fill: none; stroke: rgba(255,255,255,.35); stroke-width: 1.4; }

.hero .container { position: relative; z-index: 2; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.8fr;
  gap: 56px;
  align-items: center;
}
.hero h1 {
  color: var(--white);
  font-size: clamp(2.4rem, 4.6vw, 3.6rem);
  margin-bottom: 22px;
}
.hero h1 em { color: var(--teal-bright); font-style: italic; }
.hero p.lead {
  color: rgba(255,255,255,.82);
  font-size: 18px;
  max-width: 46ch;
  margin-bottom: 34px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-figure {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transform: rotate(1.4deg);
  border: 6px solid rgba(255,255,255,.14);
}
.hero-figure img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3.1; }
.hero-badge {
  position: absolute;
  bottom: -22px; left: -22px;
  background: var(--white);
  color: var(--navy);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14.5px;
  max-width: 210px;
  transform: rotate(-2deg);
}
[dir="rtl"] .hero-badge { left: auto; right: -22px; transform: rotate(2deg); }
.hero-badge b { display:block; font-size: 22px; color: var(--teal-deep); }

.page-hero { padding: 78px 0 118px; text-align: center; }
.page-hero .eyebrow { justify-content: center; }
.page-hero .eyebrow::before { display:none; }
.page-hero h1 { color: var(--white); font-size: clamp(2.2rem, 5vw, 3.1rem); }
.page-hero p.lead { margin: 0 auto; text-align: center; }

/* wave divider between hero and content */
.wave-divider {
  position: relative;
  line-height: 0;
  margin-top: -90px;
}
.wave-divider svg { width: 100%; height: 90px; display: block; }
.wave-divider path { fill: var(--paper); }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: 96px 0; }
.section--tint { background: var(--paper-dim); }
.section--navy { background: var(--navy); color: rgba(255,255,255,.85); }
.section--navy h2, .section--navy h3 { color: var(--white); }
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head p { text-align: center; margin-left:auto; margin-right:auto; }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.5rem); }

/* alternating media/text rows */
.media-row {
  display: grid;
  grid-template-columns: 0.9fr 1fr;
  gap: 64px;
  align-items: center;
}
.media-row + .media-row { margin-top: 100px; }
.media-row--reverse { grid-template-columns: 1fr 0.9fr; }
.media-row--reverse .media-row-figure { order: 2; }
[dir="rtl"] .media-row--reverse .media-row-figure { order: 0; }
[dir="rtl"] .media-row { grid-template-columns: 1fr 0.9fr; }
[dir="rtl"] .media-row--reverse { grid-template-columns: 0.9fr 1fr; }

.media-row-figure { position: relative; }
.media-row-figure img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  width: 100%;
  object-fit: cover;
  aspect-ratio: 5/4;
  border: 6px solid var(--white);
}
.media-row-figure::after {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 2px solid var(--teal);
  border-radius: var(--radius);
  z-index: -1;
}
[dir="rtl"] .media-row-figure::after { inset: 18px 18px -18px -18px; }

.media-row h3 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); }
.media-row .num {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--coral);
  letter-spacing: .08em;
}

/* pull quote / mission statement */
.quote-block {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  padding: 10px 20px;
}
.quote-block p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.5rem, 3.2vw, 2.15rem);
  color: var(--navy);
  line-height: 1.5;
}
[dir="rtl"] .quote-block p { font-style: normal; font-family: var(--font-arabic); font-weight: 600; }
.quote-block .mark { color: var(--teal-bright); font-size: 3rem; display:block; font-family: var(--font-display); }
.section--navy .quote-block p { color: var(--white); }

/* info / commitment cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
}
.info-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow-card);
  border-top: 3px solid var(--teal);
  transition: transform .35s ease, box-shadow .35s ease;
}
.info-card:hover { transform: translateY(-6px); box-shadow: 0 24px 46px -20px rgba(16,27,52,.32); }
.info-card .ic {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--teal), var(--teal-deep));
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  margin-bottom: 18px;
}
.info-card h4 { font-size: 18px; margin-bottom: 8px; }
.info-card p { font-size: 14.5px; margin-bottom: 0; }

/* services grid (Overview page) */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 18px;
}
.service-chip {
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 20px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 600;
  color: var(--navy);
  font-size: 15px;
  transition: border-color .3s, transform .3s, background .3s;
}
.service-chip:hover { border-color: var(--teal); transform: translateY(-3px); background: #F1FBFB; }
.service-chip .ic { color: var(--teal-deep); flex-shrink: 0; }

/* welcome / about strip with side card */
.about-strip {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}
[dir="rtl"] .about-strip { grid-template-columns: 340px 1fr; }
.about-side {
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-card);
  border-inline-start: 4px solid var(--coral);
}
.about-side img { border-radius: var(--radius-sm); margin-bottom: 16px; aspect-ratio: 16/11; object-fit: cover; }
.about-side h4 { font-size: 17px; margin-bottom: 8px; }
.about-side p { font-size: 14.5px; margin-bottom: 14px; }

/* video */
.video-frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  aspect-ratio: 16/9;
  border: 6px solid var(--white);
}
.video-frame iframe { width: 100%; height: 100%; border: 0; }

/* CTA banner */
.cta-banner {
  background: linear-gradient(120deg, var(--navy), var(--navy-soft));
  border-radius: 26px;
  padding: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content:"";
  position:absolute; inset:0;
  background: radial-gradient(60% 120% at 90% 0%, rgba(34,194,194,.28), transparent 60%);
}
.cta-banner h3 { color: var(--white); font-size: clamp(1.5rem,3vw,2rem); margin-bottom: 6px; position:relative; }
.cta-banner p { color: rgba(255,255,255,.78); margin: 0; position:relative; }
.cta-banner .cta-text { position: relative; max-width: 520px; }

/* language callout (echoes the original red Arabic banner) */
.lang-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  background: var(--white);
  border: 1.5px solid var(--coral);
  border-radius: 16px;
  padding: 22px 28px;
  box-shadow: var(--shadow-card);
}
.lang-callout strong { font-family: var(--font-display); font-size: 19px; color: var(--coral-deep); }
[dir="rtl"] .lang-callout strong { font-family: var(--font-arabic); }

/* accordion (Arabic products / care guide)
   Built on native <details>/<summary> so every section is readable and
   expandable with zero JavaScript; GSAP (when it loads) only adds polish
   elsewhere on the page, never gates access to this content. */
.accordion { border-top: 1px solid var(--line); }
.acc-item { border-bottom: 1px solid var(--line); }
.acc-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: none;
  border: 0;
  padding: 22px 4px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--navy);
}
.acc-trigger::-webkit-details-marker,
.acc-trigger::marker { display: none; content: ""; }
[dir="rtl"] .acc-trigger { font-family: var(--font-arabic); }
.acc-trigger .plus {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--teal);
  color: var(--teal-deep);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  transition: transform .35s ease, background .35s ease;
}
.acc-trigger .plus::before, .acc-trigger .plus::after {
  content: "";
  position: absolute;
  background: currentColor;
}
.acc-trigger .plus::before { width: 12px; height: 1.6px; }
.acc-trigger .plus::after { width: 1.6px; height: 12px; transition: transform .3s ease; }
.acc-item[open] > .acc-trigger .plus { background: var(--teal); color: var(--white); }
.acc-item[open] > .acc-trigger .plus::after { transform: scaleY(0); }
.acc-panel-inner { padding: 2px 4px 28px; }
.acc-cols { columns: 2; column-gap: 34px; }
.acc-cols li { break-inside: avoid; padding: 7px 0; font-size: 15px; color: var(--ink-soft); border-bottom: 1px dashed var(--line); }
.acc-panel p { font-size: 15px; }
.acc-panel ol { padding-inline-start: 20px; }
.acc-panel ol li { padding: 5px 0; color: var(--ink-soft); }
.acc-sub { font-weight: 700; color: var(--teal-deep); margin: 14px 0 6px; font-size: 14px; }

/* footer */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,.72);
  padding-top: 70px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 46px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.footer-brand img { height: 46px; margin-bottom: 16px; }
.footer-grid h5 { color: var(--white); font-family: var(--font-display); font-size: 15px; letter-spacing: .04em; margin-bottom: 16px; }
.footer-grid ul li { margin-bottom: 10px; }
.footer-grid a:hover { color: var(--teal-bright); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
  padding: 26px 0 34px;
  font-size: 13.5px;
}
.footer-bottom a { color: var(--teal-bright); font-weight: 600; }

/* reveal animation — visible by default; JS (if available) animates the
   entrance via gsap.from(), so content never depends on JS to be seen */
.reveal { opacity: 1; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure { order: -1; max-width: 420px; }
  .media-row, [dir="rtl"] .media-row, .media-row--reverse, [dir="rtl"] .media-row--reverse { grid-template-columns: 1fr; }
  .media-row-figure, .media-row--reverse .media-row-figure, [dir="rtl"] .media-row--reverse .media-row-figure { order: -1; }
  .about-strip, [dir="rtl"] .about-strip { grid-template-columns: 1fr; }
  .about-side { max-width: 380px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .acc-cols { columns: 1; }
}

@media (max-width: 760px) {
  .site-nav { position: fixed; inset: 78px 16px auto 16px; background: var(--white); border-radius: 18px; box-shadow: var(--shadow-soft); flex-direction: column; align-items: stretch; padding: 10px; gap: 2px; transform: translateY(-14px); opacity: 0; pointer-events: none; transition: transform .3s ease, opacity .3s ease; }
  .site-nav a { color: var(--navy); }
  .site-nav a:hover { background: var(--paper-dim); }
  .nav-open .site-nav { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-toggle { display: flex; }
  .header-actions .lang-pill span.full { display:none; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-banner { padding: 36px; flex-direction: column; text-align: center; }
  .cta-banner .cta-text { max-width: none; }
}

@media (max-width: 520px) {
  .hero { padding: 76px 0 130px; }
  .section { padding: 70px 0; }
}
