:root {
  --bg: #f2f4ee;
  --paper: #FFFFFF;
  --ink: #142033;
  --muted: #556372;
  --line: #d7e0ec;
  --deep: #17375e;
  --accent: #4F81BD;
  --accent2: #4BACC6;
  --accent3: #F79646;
  --danger: #C0504D;
  --success: #9BBB59;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Calibri, Arial, "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #fbfcfb 0%, var(--bg) 100%);
  line-height: 1.75;
}
.container { width: min(1140px, 92%); margin-inline: auto; }

.hero {
  min-height: 88vh;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(23,55,94,.94), rgba(79,129,189,.78)),
    url("../images/optimized/img-11.jpg") center/cover no-repeat;
  position: relative;
}
.hero::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 8px;
  background: linear-gradient(90deg, var(--accent3), var(--accent2));
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(23, 55, 94, .88);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255,255,255,.15);
  transition: padding .22s ease, background-color .22s ease, box-shadow .22s ease;
}
.brand {
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: .2px;
  max-width: calc(100% - 72px);
}
.menu { display: flex; gap: 1.1rem; list-style: none; margin: 0; padding: 0; }
.menu a { color: #fff; text-decoration: none; opacity: .95; font-weight: 600; }
.menu a:hover { opacity: 1; }
.menu a.is-active { opacity: 1; border-bottom: 2px solid #ffd68b; padding-bottom: .15rem; }
.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.55rem;
  flex: 0 0 auto;
}
.lang-switch { border: 1px solid rgba(255,255,255,.65); padding: .18rem .58rem; border-radius: 999px; font-weight: 700; }
.nav.is-scrolled {
  padding: .55rem 0;
  background: rgba(20, 47, 80, .94);
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
}
.nav.is-scrolled .brand { font-size: 1.08rem; }

.hero-content { padding: calc(10vh + 72px) 0 10vh; max-width: 760px; position: relative; z-index: 2; }
.tag { display: inline-block; background: var(--accent3); color: #fff; padding: .2rem .75rem; border-radius: 999px; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.7rem); margin: .65rem 0; line-height: 1.2; }
.hero-content p:not(.tag) { max-width: 62ch; font-size: 1.08rem; }
.hero-actions { display: flex; gap: .7rem; flex-wrap: wrap; }
.btn {
  display: inline-block;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: #fff;
  text-decoration: none;
  border: none;
  border-radius: .7rem;
  padding: .76rem 1.2rem;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
  box-shadow: 0 10px 22px rgba(0,0,0,.14);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 26px rgba(0,0,0,.17); }
.btn-outline { background: transparent; border: 1px solid rgba(255,255,255,.7); box-shadow: none; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #ffd68b;
  outline-offset: 2px;
}

.section { padding: 4.5rem 0; position: relative; scroll-margin-top: 88px; }
.section h2 {
  margin: 0 0 .85rem;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  color: var(--deep);
  padding-bottom: .35rem;
  border-bottom: 3px solid #d3deef;
  display: inline-block;
}
.section > p,
.section .container > p { color: var(--muted); max-width: 78ch; }
.section-action { margin-top: 1rem; }
.section-alt { background: linear-gradient(180deg, #ffffff, #f5f8fc); border-block: 1px solid var(--line); }
.center-page {
  min-height: 70vh;
  display: grid;
  place-content: center;
  text-align: center;
}

.stats, .cards { display: grid; gap: 1rem; }
.stats { grid-template-columns: repeat(3, 1fr); margin-top: 1rem; }
.cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats article, .card {
  background: var(--paper);
  border-radius: .5rem;
  border: 1px solid var(--line);
  padding: 1.05rem;
  box-shadow: 0 10px 24px rgba(31,73,125,.08);
  position: relative;
  overflow: hidden;
}
.card p { color: var(--muted); margin-bottom: 0; }
.stats article::before, .card::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}
.stats h3 { font-size: 2rem; color: var(--accent); margin: 0; }
.card h3 { margin-top: 0; color: var(--deep); }
.cards article { height: 100%; }
.sector-cards .card { min-height: 190px; }

.structure-map {
  position: relative;
  margin-top: 1.1rem;
  display: grid;
  grid-template-columns: .9fr 1.6fr;
  gap: 1.2rem;
  align-items: stretch;
}
.structure-core,
.structure-unit {
  position: relative;
  border-radius: .5rem;
  border: 1px solid var(--line);
  overflow: hidden;
}
.structure-core {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  padding: 1.35rem;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(31,73,125,.96), rgba(75,172,198,.84)),
    radial-gradient(circle at 20% 0%, rgba(255,255,255,.25), transparent 38%);
  box-shadow: 0 16px 34px rgba(31,73,125,.16);
}
.structure-core::after {
  content: "";
  position: absolute;
  inset-inline-end: -34px;
  top: 50%;
  width: 68px;
  height: 2px;
  background: linear-gradient(90deg, rgba(79,129,189,.2), rgba(79,129,189,.8));
}
.rtl .structure-core::after { transform: scaleX(-1); }
.structure-core span,
.structure-unit span {
  width: max-content;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.structure-core span {
  margin-bottom: .85rem;
  padding: .32rem .72rem;
  color: #17375e;
  background: rgba(255,255,255,.88);
}
.structure-core h3 {
  margin: 0 0 .65rem;
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  color: #fff;
}
.structure-core p {
  margin: 0;
  color: rgba(255,255,255,.88);
}
.structure-units {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
}
.structure-unit {
  min-height: 170px;
  padding: 1.05rem;
  background: linear-gradient(180deg, #fff, #f7fafd);
  box-shadow: 0 10px 24px rgba(31,73,125,.08);
}
.structure-unit::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent), var(--accent2));
}
.structure-unit span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  margin-bottom: .8rem;
  color: #fff;
  background: var(--deep);
}
.structure-unit h3 {
  margin: 0 0 .45rem;
  color: var(--deep);
}
.structure-unit p {
  margin: 0;
  color: var(--muted);
}

.pills { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1rem; }
.pills span {
  background: linear-gradient(180deg, #ffffff, #f2f6fc);
  border: 1px solid #cfdcf0;
  border-radius: 999px;
  padding: .42rem .9rem;
  font-size: .95rem;
  font-weight: 600;
}

.gallery .grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; margin-top: .9rem; }
.gallery img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: .5rem;
  border: 1px solid #cfdcf0;
  box-shadow: 0 6px 16px rgba(31,73,125,.15);
}

.branch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
}

.branch-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: .8rem;
  overflow: hidden;
  box-shadow: 0 16px 34px rgba(31,73,125,.12);
}

.branch-card img {
  display: block;
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.branch-card__body {
  padding: 1rem 1.05rem 1.15rem;
}

.branch-card__body h3 {
  margin: 0 0 .35rem;
  color: var(--deep);
}

.branch-card__body p {
  margin: 0;
  color: var(--muted);
}

.branch-notes {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}

.contact {
  background: linear-gradient(135deg, #1F497D, #2f5f96);
  color: #e8f0f5;
}
.contact h2 { color: #fff; border-color: rgba(255,255,255,.35); }
.contact a { color: #a9ddff; }
.contact-wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 1.2rem; }
.contact-form { position: relative; background: rgba(255,255,255,.08); padding: 1.1rem; border-radius: .5rem; border: 1px solid rgba(255,255,255,.2); }
.contact-form label { display: block; margin-bottom: .8rem; }
input, textarea {
  width: 100%;
  margin-top: .35rem;
  border-radius: .55rem;
  border: 1px solid #8da8cf;
  background: #183b64;
  color: #fff;
  padding: .65rem;
}
.form-status { margin-top: .65rem; font-size: .95rem; color: #ffd68b; min-height: 1.4em; }
button[disabled] { opacity: .75; cursor: not-allowed; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

footer { background: #17375e; color: #dce8f8; text-align: center; padding: 1.15rem 0; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.show { opacity: 1; transform: none; }
.hero-actions .btn { margin-bottom: .35rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 4%;
    width: min(92vw, 320px);
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    background: rgba(31,73,125,.98);
    padding: .95rem;
    border-radius: .9rem;
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 18px 42px rgba(0,0,0,.28);
    flex-direction: column;
    gap: .2rem;
    text-align: start;
  }
  .ltr .menu { left: 4%; right: auto; }
  .menu a {
    display: block;
    padding: .72rem .15rem;
    border-bottom: 1px solid rgba(255,255,255,.12);
  }
  .menu li:last-child a { border-bottom: 0; }
  .lang-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
  }
  .menu.open { display: flex; }
  .stats, .cards, .gallery .grid, .contact-wrap, .branch-grid, .branch-notes { grid-template-columns: 1fr; }
  .structure-map, .structure-units { grid-template-columns: 1fr; }
  .structure-core::after { display: none; }
  .hero { min-height: 82vh; }
  .hero-content { padding-top: calc(12vh + 72px); }
  .section { padding: 3.25rem 0; }
}

@media (min-width: 701px) and (max-width: 1100px) {
  .cards, .gallery .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn { text-align: center; }
  .gallery img { height: 210px; }
  .branch-card img { height: 230px; }
}
