/* =========================================================
   SNR Academy / SNR Egypt — site stylesheet
   Brand colors sampled from the official SNR logo artwork:
   navy #0b1f3a, gold #c9a227
   ========================================================= */

:root {
  --navy: #0b1f3a;
  --navy-deep: #071527;
  --navy-mid: #14304f;
  --gold: #c9a227;
  --gold-light: #e2c665;
  --ink: #1c2530;
  --slate: #55647a;
  --slate-light: #8291a3;
  --bg: #f6f7f9;
  --bg-alt: #eef1f5;
  --white: #ffffff;
  --border: #e1e5eb;
  --border-dark: #263a55;
  --shadow: 0 10px 30px rgba(11, 31, 58, 0.08);
  --radius: 10px;
  --maxw: 1180px;
  --font-body: "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
  --font-head: "Libre Franklin", "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 .6em;
  color: var(--navy);
}
h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.1em; color: var(--slate); }
ul { margin: 0 0 1.1em; padding-left: 1.2em; color: var(--slate); }
li { margin-bottom: .4em; }
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .8em 1.6em;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .18s ease;
}
.btn-gold {
  background: var(--gold);
  color: var(--navy-deep);
}
.btn-gold:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,.55);
  color: var(--white);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold-light); }
.btn-navy {
  background: var(--navy);
  color: var(--white);
}
.btn-navy:hover { background: var(--navy-mid); }

/* ---------- Header ---------- */
.site-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 500;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: .7em;
  color: var(--white);
}
.brand .mark {
  width: 40px; height: 40px;
  background: var(--white);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--navy);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.brand .word { display: flex; flex-direction: column; line-height: 1.05; }
.brand .word b {
  font-family: var(--font-head);
  font-size: 1.15rem;
  letter-spacing: .02em;
}
.brand .word span {
  font-size: .68rem;
  letter-spacing: .22em;
  color: var(--gold-light);
  border-top: 2px solid var(--gold);
  padding-top: 3px;
  margin-top: 3px;
  text-transform: uppercase;
}

.main-nav { display: flex; }
.main-nav > ul {
  display: flex;
  list-style: none;
  margin: 0; padding: 0;
  gap: 4px;
}
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a {
  display: block;
  padding: 1.6em .85em;
  color: rgba(255,255,255,.88);
  font-weight: 600;
  font-size: .92rem;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li.active > a {
  color: var(--white);
  border-bottom-color: var(--gold);
}
.caret {
  display: inline-block;
  width: 7px; height: 7px;
  margin-left: 5px; margin-bottom: 2px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: .7;
}
.dropdown {
  position: absolute;
  top: 100%; left: 0;
  min-width: 300px;
  background: var(--navy-deep);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 0 0 8px 8px;
  padding: .6em 0;
  box-shadow: 0 20px 40px rgba(0,0,0,.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all .15s ease;
  list-style: none;
  margin: 0;
}
.main-nav > ul > li:hover .dropdown,
.main-nav > ul > li:focus-within .dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown li a {
  display: block;
  padding: .65em 1.3em;
  color: rgba(255,255,255,.78);
  font-size: .9rem;
  border-left: 3px solid transparent;
}
.dropdown li a:hover {
  background: rgba(255,255,255,.05);
  border-left-color: var(--gold);
  color: var(--white);
}
.header-actions { display: flex; align-items: center; gap: .8em; }
.nav-toggle {
  display: none;
  background: none; border: none; color: var(--white);
  font-size: 1.6rem; cursor: pointer; padding: .2em .3em;
}
.header-actions .btn span.short { display: none; }

@media (max-width: 980px) {
  .main-nav {
    position: fixed;
    inset: 76px 0 0 0;
    background: var(--navy-deep);
    display: none;
    overflow-y: auto;
    padding: 1em 0 3em;
  }
  .main-nav.open { display: block; }
  .main-nav > ul { flex-direction: column; gap: 0; }
  .main-nav > ul > li > a { padding: .95em 1.4em; border-bottom: 1px solid rgba(255,255,255,.06); }
  .dropdown {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none; border-radius: 0;
    background: rgba(255,255,255,.03);
    display: none;
  }
  .main-nav > ul > li.open .dropdown { display: block; }
  .nav-toggle { display: block; }
  .header-actions .btn span.long { display: none; }
  .header-actions .btn span.short { display: inline; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: var(--white);
  background: linear-gradient(120deg, rgba(7,21,39,.92), rgba(11,31,58,.78)), var(--navy);
  background-size: cover;
  background-position: center;
  padding: 110px 0 90px;
}
.hero.small { padding: 70px 0 60px; }
.hero .eyebrow {
  color: var(--gold-light);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .8rem;
  margin-bottom: .9em;
}
.hero h1 { color: var(--white); max-width: 780px; }
.hero .lead {
  color: rgba(255,255,255,.82);
  font-size: 1.15rem;
  max-width: 640px;
  margin-bottom: 1.6em;
}
.breadcrumb {
  font-size: .85rem;
  color: rgba(255,255,255,.6);
  margin-bottom: 1.4em;
}
.breadcrumb a { color: rgba(255,255,255,.85); }
.breadcrumb a:hover { color: var(--gold-light); }
.hero-cta { display: flex; gap: 1em; flex-wrap: wrap; }

/* Photo panel shown at (near) native resolution instead of a
   full-bleed stretched background, so small source photos stay sharp. */
.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 44px;
  align-items: center;
}
.hero-photo {
  aspect-ratio: 4/3;
  background-size: cover;
  background-position: center;
  border-radius: 14px;
  box-shadow: 0 20px 45px rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.14);
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo, .hero-icon-panel { display: none; }
}

/* Large decorative icon (no card/background) for heroes that have no
   topic photo — utility pages, and services without a source image. */
.hero-icon-panel {
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 45%, rgba(201,162,39,.14), rgba(201,162,39,0) 65%);
}
.hero-icon-panel svg {
  width: 190px;
  height: 190px;
  stroke: rgba(255,255,255,.9);
  stroke-width: .9;
  filter: drop-shadow(0 12px 30px rgba(0,0,0,.35));
}

/* ---------- Motion: entrance + hover transitions ---------- */
.hero-photo, .photo, .card .thumb { opacity: 1; }
.reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: no-preference) {
  .hero-photo, .hero-icon-panel {
    animation: snr-photo-in .8s cubic-bezier(.2,.7,.3,1) both;
  }
  .photo {
    animation: snr-photo-in .8s cubic-bezier(.2,.7,.3,1) both;
  }
  @keyframes snr-photo-in {
    from { opacity: 0; transform: scale(1.05); }
    to   { opacity: 1; transform: scale(1); }
  }

  /* Scroll-reveal fade-up, applied by main.js to cards, stat tiles,
     offer items, etc. so content eases in as you scroll to it. */
  .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .6s ease, transform .6s ease;
  }
  .reveal.is-visible { opacity: 1; transform: translateY(0); }

  /* Gentle zoom-and-crossfade on card thumbnails and photo panels. */
  .card .thumb {
    transition: transform .6s cubic-bezier(.2,.7,.3,1);
  }
  .card:hover .thumb { transform: scale(1.07); }
  .card .thumb::after { transition: opacity .4s ease; }
  .card:hover .thumb::after { opacity: .75; }

  .hero-photo, .hero-icon-panel, .split .photo {
    transition: transform .6s cubic-bezier(.2,.7,.3,1);
  }
  .hero-photo:hover, .hero-icon-panel:hover, .split .photo:hover { transform: scale(1.02); }
}

/* ---------- Sections ---------- */
section { padding: 76px 0; }
section.alt { background: var(--bg); }
section.navy {
  background: var(--navy);
  color: rgba(255,255,255,.85);
}
section.navy h2, section.navy h3 { color: var(--white); }
section.navy p, section.navy li { color: rgba(255,255,255,.72); }
.section-head { max-width: 720px; margin-bottom: 2.4em; }
.section-head .eyebrow {
  color: var(--gold);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: .78rem;
  margin-bottom: .7em;
  display: block;
}

/* ---------- Grids / Cards ---------- */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .thumb {
  aspect-ratio: 16/10;
  background-size: cover;
  background-position: center;
  position: relative;
}
.card .thumb::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,31,58,0) 40%, rgba(11,31,58,.55));
}
.card .body { padding: 1.3em 1.4em 1.5em; flex: 1; display: flex; flex-direction: column; }
.card .body h3 { margin-bottom: .4em; font-size: 1.08rem; }
.card .body p { font-size: .92rem; margin-bottom: 1em; flex: 1; }
.card .tag {
  align-self: flex-start;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .5em;
}
.card .more {
  font-size: .85rem;
  font-weight: 700;
  color: var(--navy);
}
.card .more::after { content: " \2192"; color: var(--gold); }

.icon-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8em 1.6em;
}
.icon-badge {
  display: inline-flex;
  width: 42px; height: 42px;
  flex-shrink: 0;
  align-items: center; justify-content: center;
  background: var(--navy);
  color: var(--gold-light);
  border-radius: 8px;
  margin-bottom: 1em;
  transition: background .2s ease, color .2s ease;
}
.icon-badge svg { width: 21px; height: 21px; }
.icon-card .icon-badge,
.card .icon-badge { margin-bottom: 1em; }
.icon-card h3 { font-size: 1.05rem; margin-bottom: .5em; }
.icon-card p { font-size: .92rem; margin: 0; }
.card:hover .icon-badge { background: var(--gold); color: var(--navy-deep); }

/* Stat strip */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat b {
  display: block;
  font-family: var(--font-head);
  font-size: 2.2rem;
  color: var(--gold);
}
.stat span { font-size: .85rem; color: rgba(255,255,255,.65); }

/* ---------- Two column layout ---------- */
.split {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 50px;
  align-items: center;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.split img, .split .photo { border-radius: var(--radius); box-shadow: var(--shadow); }
.photo { aspect-ratio: 4/3; background-size: cover; background-position: center; }

/* ---------- Anchored sub-sections (Our Firm) ---------- */
.subnav {
  position: sticky;
  top: 76px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}
.subnav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 6px; overflow-x: auto;
}
.subnav a {
  display: block;
  padding: 1em 1.1em;
  font-size: .88rem;
  font-weight: 700;
  color: var(--slate);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.subnav a:hover, .subnav a.active { color: var(--navy); border-bottom-color: var(--gold); }
.anchor-offset { scroll-margin-top: 140px; }

/* ---------- Service detail blocks ---------- */
.offer-list {
  display: grid;
  gap: 18px;
}
.offer-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 1.6em 0;
  border-top: 1px solid var(--border);
}
.offer-item:first-child { border-top: none; }
.offer-item h3 { margin-bottom: .3em; font-size: 1.05rem; }
@media (max-width: 700px) { .offer-item { grid-template-columns: 1fr; gap: 6px; } }

.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li {
  position: relative;
  padding-left: 1.7em;
  margin-bottom: .7em;
}
.check-list li::before {
  content: "";
  position: absolute; left: 0; top: .35em;
  width: 10px; height: 10px;
  border-radius: 3px;
  background: var(--gold);
}

/* Client logos / references strip */
.clients {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.clients span {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--navy);
  font-size: .82rem;
  font-weight: 600;
  padding: .5em .9em;
  border-radius: 999px;
}

/* CTA banner */
.cta-banner {
  background: var(--navy);
  border-radius: 16px;
  padding: 3em 2.4em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2em;
  flex-wrap: wrap;
  color: var(--white);
}
.cta-banner h2 { color: var(--white); margin-bottom: .3em; }
.cta-banner p { color: rgba(255,255,255,.72); margin: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255,255,255,.6);
  padding: 60px 0 0;
  font-size: .9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 46px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 {
  color: var(--white);
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 1.1em;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .65em; }
.site-footer a:hover { color: var(--gold-light); }
.footer-brand .word b { color: var(--white); }
.footer-brand p { max-width: 320px; margin-top: 1em; font-size: .88rem; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 0; flex-wrap: wrap; gap: 10px;
  font-size: .8rem;
}
.footer-bottom .legal-links { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- Generic content page ---------- */
.prose h2 { margin-top: 1.4em; }
.prose ul { margin-bottom: 1.4em; }
.back-link { display: inline-block; margin-bottom: 1.4em; font-weight: 700; color: var(--navy); }
.back-link:hover { color: var(--gold); }

/* Forms */
.form-grid { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-size: .85rem; font-weight: 700; color: var(--navy); margin-bottom: .4em; }
input, textarea, select {
  width: 100%;
  padding: .8em .9em;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: .95rem;
  background: var(--white);
  color: var(--ink);
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.notice {
  padding: 1em 1.2em;
  border-radius: 8px;
  margin-bottom: 1.6em;
  font-size: .92rem;
}
.notice.success { background: #e6f4ea; color: #1e5b34; border: 1px solid #b7dfc4; }
.notice.error { background: #fbeaea; color: #7a2020; border: 1px solid #f1c1c1; }
