:root {
  --brand: #006bb3;
  --brand-dark: #004f86;
  --brand-deeper: #00365c;
  --brand-soft: #e7f3fb;
  --brand-mist: #f3f8fc;
  --ink: #102033;
  --muted: #5a6b7d;
  --line: rgba(16, 32, 51, 0.1);
  --surface: #ffffff;
  --shadow: 0 14px 36px rgba(0, 54, 92, 0.1);
  --radius: 14px;
  --max: 1180px;
  --font: "Estedad", Tahoma, "Iranian Sans", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.85;
  background:
    linear-gradient(180deg, #f4f7fa 0%, #eef3f8 40%, #e9eef4 100%);
  min-height: 100vh;
}

/* Browsers often force system UI fonts on form controls — force Estedad. */
button,
input,
select,
textarea,
.btn,
.wp-block-button__link {
  font-family: var(--font);
}

select option,
select optgroup {
  font-family: var(--font);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--brand-dark); }

.shell { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
.muted { color: var(--muted); margin: 0.3rem 0; }

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
}

.skip-link:focus {
  position: fixed;
  top: 0.75rem;
  inset-inline-start: 0.75rem;
  z-index: 1000;
  width: auto;
  height: auto;
  clip: auto;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  background: var(--brand-deeper);
  color: #fff;
  font-weight: 700;
  box-shadow: var(--shadow);
}

:focus-visible {
  outline: 3px solid rgba(0, 107, 179, 0.55);
  outline-offset: 2px;
}

.breadcrumbs {
  padding: 0.65rem 0 0;
  border-bottom: 1px solid transparent;
}

.breadcrumbs__list {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.45rem;
  font-size: 0.86rem;
  color: var(--muted);
}

.breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.breadcrumbs__item:not(:last-child)::after {
  content: "/";
  opacity: 0.45;
}

.breadcrumbs a {
  color: var(--brand-dark);
  font-weight: 600;
}

.breadcrumbs [aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
}

#content:focus {
  outline: none;
}

/* Header — 3-tier official Iranian portal (scrolls away with page) */
.site-header {
  position: relative;
  z-index: 50;
  background: #fff;
  box-shadow: 0 8px 24px rgba(16, 32, 51, 0.08);
}

.site-header__top {
  background: var(--brand-deeper);
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.98rem;
  border-bottom: 3px solid #c9a227;
}

.site-header__top-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.55rem 0;
  flex-wrap: wrap;
}

.site-header__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem 0.9rem;
  font-weight: 600;
}

.site-header__clock {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #f0d78c;
}

.site-header__sep {
  width: 1px;
  height: 1rem;
  background: rgba(255, 255, 255, 0.28);
}

.site-header__tel {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  color: #fff;
  font-size: 1rem;
}

.site-header__tel:hover {
  color: #f0d78c;
}

.site-header__tel span {
  opacity: 0.8;
  font-size: 0.92rem;
}

.site-header__tel strong {
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 1.05rem;
}

.site-header__main {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
  border-bottom: 1px solid var(--line);
}

.site-header__flag {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  width: clamp(260px, 52vw, 620px);
  max-width: 62%;
  pointer-events: none;
  opacity: 0.34;
  overflow: hidden;
  /* Fade only toward logo — no vertical letterboxing */
  -webkit-mask-image: linear-gradient(to inline-start, #000 68%, transparent 100%);
  mask-image: linear-gradient(to inline-start, #000 68%, transparent 100%);
}

.site-header__flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: saturate(1.05) contrast(1.04);
  animation: flagDrift 16s ease-in-out infinite alternate;
}

@keyframes flagDrift {
  from { transform: scale(1.01); }
  to { transform: scale(1.05); }
}

.site-header__brand-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(0.95rem, 2.2vw, 1.45rem) 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  color: inherit;
  min-width: 0;
}

.brand__logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow:
    0 0 0 2px rgba(0, 107, 179, 0.35),
    0 10px 22px rgba(0, 54, 92, 0.18);
  background: #000;
  flex-shrink: 0;
}

.brand__text strong {
  display: block;
  font-size: clamp(1.12rem, 2.4vw, 1.45rem);
  color: var(--brand-deeper);
  line-height: 1.35;
  font-weight: 800;
}

.brand__org {
  display: block;
  margin: 0.2rem 0 0;
  font-style: normal;
  font-size: 0.95rem;
  font-weight: 700;
  color: #8a7340;
  letter-spacing: 0.01em;
}

.brand__text span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 0.15rem;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid rgba(0, 107, 179, 0.28);
  background: #fff;
  color: var(--brand-dark);
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.nav-toggle__bars {
  width: 1.15rem;
  height: 0.85rem;
  position: relative;
  display: inline-block;
  background: linear-gradient(#004f86, #004f86) center / 100% 2px no-repeat;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  height: 2px;
  background: #004f86;
}

.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after { bottom: 0; }

.site-header__navwrap {
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-dark) 100%);
  position: relative;
}

.site-header__navwrap::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background:
    repeating-linear-gradient(
      90deg,
      #c9a227 0 10px,
      transparent 10px 18px,
      rgba(255, 255, 255, 0.35) 18px 20px,
      transparent 20px 28px
    );
  opacity: 0.9;
  /* Must not steal hover between parent link and dropdown. */
  pointer-events: none;
}

.primary-nav__list,
.primary-nav > ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}

.primary-nav > ul > li,
.primary-nav__list > .menu-item {
  position: relative;
}

.primary-nav > ul > li > a,
.primary-nav__list > .menu-item > a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.85rem 1rem;
  color: #fff;
  font-weight: 700;
  font-size: 0.94rem;
  border-inline-start: 1px solid rgba(255, 255, 255, 0.12);
  min-height: 3rem;
}

.primary-nav > ul > li:first-child > a,
.primary-nav__list > .menu-item:first-child > a {
  border-inline-start: 0;
}

.primary-nav > ul > li > a:hover,
.primary-nav__list > .menu-item > a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a {
  background: rgba(0, 0, 0, 0.16);
  color: #fff;
}

.primary-nav .menu-item-has-children > a::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-inline-end: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-top: -0.2rem;
  opacity: 0.85;
}

.primary-nav .sub-menu {
  list-style: none;
  margin: 0;
  padding: 0.45rem 0;
  position: absolute;
  /* Overlap parent slightly so the mouse never leaves the hover area. */
  top: calc(100% - 4px);
  inset-inline-start: 0;
  min-width: 13.5rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0 0 10px 10px;
  box-shadow: 0 16px 32px rgba(16, 32, 51, 0.14);
  display: none;
  z-index: 60;
}

/* Invisible bridge above the panel (covers any 1–8px gap). */
.primary-nav .sub-menu::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 100%;
  height: 10px;
}

.primary-nav .menu-item-has-children:hover > .sub-menu,
.primary-nav .menu-item-has-children:focus-within > .sub-menu,
.primary-nav .menu-item-has-children.is-open > .sub-menu {
  display: block;
}

.primary-nav .sub-menu a {
  display: block;
  padding: 0.65rem 1rem;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
  border: 0;
  min-height: 0;
}

.primary-nav .sub-menu a:hover {
  background: var(--brand-soft);
  color: var(--brand-deeper);
}

/* Hero — full-bleed institutional composition */
.hero {
  position: relative;
  overflow: hidden;
  min-height: clamp(420px, 68vh, 620px);
  display: grid;
  align-items: center;
  color: #fff;
}

.hero--home {
  isolation: isolate;
}

.hero__stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #00365c;
}

.hero__stage picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero__bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.03);
  animation: heroKen 22s ease-in-out infinite alternate;
  will-change: transform;
}

.hero__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 18% 40%, rgba(201, 162, 39, 0.14), transparent 42%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), transparent 35%, rgba(0, 24, 48, 0.28));
  border-bottom: 3px solid rgba(201, 162, 39, 0.55);
}

@keyframes heroKen {
  from { transform: scale(1.03) translate3d(0, 0, 0); }
  to { transform: scale(1.08) translate3d(-1.2%, 0.8%, 0); }
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: clamp(2.2rem, 6vw, 4.4rem) 0;
  display: grid;
  gap: 0.75rem;
  /* max-width: 70rem; */
}

.hero__logo {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: #000;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  margin-bottom: 0.2rem;
}

.hero__kicker {
  margin: 0;
  color: #f0d78c;
  font-size: 1rem;
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5.6vw, 3.6rem);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.hero__lead {
  margin: 0;
  max-width: 34ch;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.12rem;
  line-height: 1.75;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.45rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.35rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.78rem 1.3rem;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: #fff;
  color: var(--brand-dark);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.btn-primary:hover { color: var(--brand-deeper); }

.btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.06);
}

.btn-ghost:hover { color: #fff; background: rgba(255, 255, 255, 0.14); }

.btn-brand {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 107, 179, 0.22);
}

.btn-brand:hover { background: var(--brand-dark); color: #fff; }

.btn-outline {
  background: #fff;
  color: var(--brand-dark);
  border-color: rgba(0, 107, 179, 0.35);
}

.btn-outline:hover {
  background: var(--brand-soft);
  color: var(--brand-deeper);
  border-color: var(--brand);
}

/* Sections */
.section { padding: 2.4rem 0; }

.section__head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.section__head h2 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--brand-deeper);
}

.section__head a {
  font-weight: 700;
  white-space: nowrap;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(16, 32, 51, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(0, 107, 179, 0.22);
}

.card--pad,
.post-card { padding: 1.2rem 1.25rem; }

.post-card--media {
  padding: 0;
  overflow: hidden;
}

.post-card--text {
  border-top: 4px solid var(--brand);
}

.post-card__media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #d9e6f1;
}

.post-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.post-card--media:hover .post-card__media img {
  transform: scale(1.04);
}

.post-card__body {
  padding: 1rem 1.15rem 1.2rem;
}

.post-card--text .post-card__body {
  padding: 0;
}

.post-card h3,
.member-card__title {
  margin: 0.35rem 0 0.4rem;
  font-size: 1.08rem;
  color: var(--brand-deeper);
}

/* Service desk — links, not article cards */
.section--desk {
  background: linear-gradient(180deg, #f3f8fc, transparent 80%);
}

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

.service-desk__item {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 0.75rem;
  align-items: center;
  padding: 1rem 1.15rem;
  background: #fff;
  border: 1px solid var(--line);
  border-right: 4px solid var(--brand);
  border-radius: 10px;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.service-desk__item:hover {
  border-color: rgba(0, 107, 179, 0.35);
  box-shadow: 0 10px 24px rgba(16, 32, 51, 0.06);
  transform: translateY(-2px);
  color: inherit;
}

.service-desk__title {
  grid-column: 1;
  grid-row: 1;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--brand-deeper);
}

.service-desk__excerpt {
  grid-column: 1;
  grid-row: 2;
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

.service-desk__go {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-size: 1.25rem;
  color: var(--brand);
  font-weight: 700;
}

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

.board-card {
  margin: 0;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 0.75rem 1.1rem;
}

.board-card img,
.board-card__avatar {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 0.75rem;
  display: grid;
  place-items: center;
  background: #e8eef4;
}

.board-card img {
  display: block;
}

.board-card__avatar {
  color: var(--brand-deeper);
  font-weight: 800;
  font-size: 1.6rem;
}

.board-card figcaption {
  display: grid;
  gap: 0.25rem;
}

.board-card strong {
  color: var(--brand-deeper);
  font-size: 0.95rem;
  line-height: 1.45;
}

.board-card .muted {
  font-size: 0.85rem;
}

/*
 * About / editorial pages: Gutenberg Columns used as board cards.
 * Edit visually in the block editor — add/remove a column = add/remove a person.
 */
.content-box .wp-block-columns {
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

.content-box .wp-block-column {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 0.75rem 1.1rem;
  text-align: center;
}

.content-box .wp-block-column .wp-block-image,
.content-box .wp-block-column figure {
  margin: 0 0 0.75rem;
}

.content-box .wp-block-column img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  margin-inline: auto;
  display: block;
  background: #e8eef4;
}

.content-box .wp-block-column p {
  margin: 0.2rem 0 0;
  line-height: 1.45;
}

.content-box .wp-block-column strong {
  color: var(--brand-deeper);
  font-size: 0.95rem;
}

/* Tariffs */
.section--tariff {
  background:
    linear-gradient(180deg, rgba(0, 107, 179, 0.06), transparent 70%);
}

.tariff-preview {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 1.25rem;
  align-items: stretch;
}

.tariff-preview__visual {
  border-radius: var(--radius);
  overflow: hidden;
  background: #0b1c2c;
  min-height: 280px;
  box-shadow: var(--shadow);
}

.tariff-preview__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tariff-preview__table {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem;
  box-shadow: 0 12px 30px rgba(16, 32, 51, 0.05);
}

.tariff-preview__more {
  margin: 0.75rem 0 0.25rem;
  text-align: left;
  font-weight: 700;
}

.tariff__note {
  margin: 0 0 1rem;
  color: var(--muted);
}

.tariff-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.tariff-table th,
.tariff-table td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--line);
  text-align: right;
  vertical-align: top;
}

.tariff-table th {
  background: var(--brand-deeper);
  color: #fff;
  font-weight: 700;
}

.tariff-table th:first-child { border-radius: 10px 0 0 0; }
.tariff-table th:last-child { border-radius: 0 10px 0 0; }

.tariff-table tbody tr:nth-child(even) { background: #f5f9fc; }
.tariff-table tbody tr:hover { background: var(--brand-soft); }

.tariff-table td:last-child {
  font-weight: 800;
  color: var(--brand-dark);
  white-space: nowrap;
}

.btn-link {
  font-weight: 800;
  white-space: nowrap;
}

.member-card__link {
  display: block;
  padding: 1.15rem 1.15rem 0.55rem;
  color: inherit;
}

.member-card__link:hover { color: inherit; }

.member-list {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.member-list__empty {
  margin: 0;
  padding: 1.5rem 1.15rem;
}

.member-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--line);
  margin: 0;
}

.member-row:last-child { border-bottom: 0; }

.member-row:hover {
  background: rgba(0, 107, 179, 0.04);
}

.member-row__main {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
  color: inherit;
}

.member-row__main:hover { color: inherit; }

.member-row__title {
  font-weight: 800;
  color: var(--brand-deeper);
  font-size: 1.02rem;
  line-height: 1.35;
}

.member-row__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.35rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.member-row__sep { opacity: 0.55; }

.member-icon-links {
  list-style: none;
  margin: 0;
  padding: 0 1.15rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-start;
}

.member-row .member-icon-links {
  padding: 0;
  justify-content: flex-end;
}

.member-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--brand-dark);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.member-icon svg {
  width: 1.05rem;
  height: 1.05rem;
  display: block;
}

.member-icon:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
}

.member-icon--instagram:hover { color: #c13584; border-color: #c13584; }
.member-icon--whatsapp:hover { color: #128c7e; border-color: #128c7e; }
.member-icon--telegram:hover { color: #229ed9; border-color: #229ed9; }

.page-hero {
  padding: 2.4rem 0 1rem;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(0, 107, 179, 0.08), transparent 70%);
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(1.65rem, 3.5vw, 2.45rem);
  color: var(--brand-deeper);
}

.page-hero .muted { max-width: 48ch; }

.content-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.1rem, 3vw, 2rem);
  box-shadow: 0 12px 30px rgba(16, 32, 51, 0.04);
}

.content-box--narrow {
  max-width: 420px;
  margin-inline: auto;
  padding: clamp(1.4rem, 4vw, 2rem);
}

.content-box :where(h2, h3) { color: var(--brand-deeper); }

/* OTP login — strictly one step visible */
.esf-auth {
  display: grid;
  gap: 1rem;
  width: 100%;
  max-width: 22rem;
  margin-inline: auto;
}

.esf-auth [hidden] {
  display: none !important;
}

/* Step visibility driven by data attribute (beats display:grid override). */
.esf-auth[data-esf-auth-view="mobile"] .esf-auth__panel--code,
.esf-auth[data-esf-auth-view="code"] .esf-auth__panel--mobile {
  display: none !important;
}

.esf-auth[data-esf-auth-view="mobile"] .esf-auth__panel--mobile,
.esf-auth[data-esf-auth-view="code"] .esf-auth__panel--code {
  display: grid;
  gap: 1rem;
  animation: authIn 0.3s ease both;
}

@keyframes authIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.esf-auth__lead {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.98rem;
  text-align: center;
}

.esf-auth__lead strong {
  display: inline-block;
  color: var(--brand-deeper);
  font-weight: 800;
  letter-spacing: 0.02em;
  direction: ltr;
}

.esf-auth__alert {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.95rem;
  text-align: center;
}

.esf-auth__alert.is-error {
  background: #fdecea;
  color: #b42318;
  border: 1px solid #f3c1bb;
}

.esf-auth__alert.is-ok {
  background: #e8f7ee;
  color: #1b7a3d;
  border: 1px solid #b7e4c7;
}

.esf-auth__field {
  display: grid;
  gap: 0.45rem;
  font-weight: 600;
  color: var(--brand-deeper);
}

.esf-auth__field input {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  background: #fff;
}

.esf-auth__field input:focus {
  outline: 2px solid rgba(0, 107, 179, 0.25);
  border-color: var(--brand);
}

.esf-auth__otp {
  text-align: center;
  font-size: 1.45rem !important;
  font-weight: 800;
  letter-spacing: 0.28em !important;
  padding-inline: 0.6rem !important;
  direction: ltr;
}

.esf-auth__timer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: var(--brand-mist);
  border: 1px solid rgba(0, 107, 179, 0.12);
}

.esf-auth__timer-label {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--muted);
}

.esf-auth__timer-value {
  font-variant-numeric: tabular-nums;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--brand-deeper);
  letter-spacing: 0.04em;
  direction: ltr;
}

.esf-auth__timer.is-expired {
  background: #f7f7f8;
  border-color: var(--line);
}

.esf-auth__timer.is-expired .esf-auth__timer-value {
  color: #8a97a6;
}

.esf-auth__submit {
  width: 100%;
  justify-content: center;
}

.esf-auth__footer-actions {
  display: grid;
  gap: 0.65rem;
  justify-items: stretch;
}

.esf-auth__resend {
  width: 100%;
  justify-content: center;
}

.esf-auth__change {
  background: none;
  border: 0;
  color: var(--brand);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  padding: 0.45rem;
  text-align: center;
}

.esf-auth__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
}

.esf-auth--logged {
  text-align: center;
}

.site-footer__contact {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
}

.site-footer__contact li + li {
  margin-top: 0.35rem;
}

.search-bar {
  display: flex;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.search-bar input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.78rem 1.1rem;
  font: inherit;
  background: #fff;
}

.search-bar input:focus {
  outline: 2px solid rgba(0, 107, 179, 0.25);
  border-color: var(--brand);
}

.search-bar button {
  border: 0;
  border-radius: 999px;
  padding: 0.78rem 1.2rem;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.search-bar button:hover { background: var(--brand-dark); }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.filters a {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  color: var(--ink);
  font-weight: 600;
}

.filters a.is-active,
.filters a:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.member-details {
  margin: 0;
}

.member-details__row {
  display: grid;
  grid-template-columns: minmax(7rem, 11rem) 1fr;
  gap: 0.65rem 1.1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

.member-details__row:last-child { border-bottom: 0; }

.member-details dt {
  margin: 0;
  font-weight: 700;
  color: var(--brand-deeper);
}

.member-details dd {
  margin: 0;
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--brand);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 0.92rem;
}

.about-layout {
  display: grid;
  grid-template-columns: 1.55fr 0.85fr;
  gap: 1.25rem;
  align-items: start;
}

.about-layout__aside {
  display: grid;
  gap: 0.75rem;
}

.about-stat {
  background:
    linear-gradient(145deg, var(--brand) 0%, var(--brand-deeper) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem;
  box-shadow: var(--shadow);
}

.about-stat strong {
  display: block;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1;
  margin-bottom: 0.45rem;
}

.about-stat span { opacity: 0.92; }

.contact-cards {
  display: grid;
  gap: 0.85rem;
}

.contact-cards--solo {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 860px;
}

.contact-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  box-shadow: 0 10px 28px rgba(16, 32, 51, 0.04);
}

.contact-card__label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 0.35rem;
}

.contact-card p { margin: 0; }

.contact-card--cta .btn { margin-top: 0.75rem; }

.contact-card--cta {
  grid-column: 1 / -1;
}

.member-profile {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: 1.15rem;
  align-items: start;
}

.member-profile__links h2 {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
  color: var(--brand-deeper);
}

.member-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.member-link {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--brand-mist);
  color: var(--ink);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.member-link:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.member-link__icon {
  display: inline-flex;
  width: 1.35rem;
  height: 1.35rem;
  flex: 0 0 auto;
  color: var(--brand);
}

.member-link__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.member-link__text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.member-link__label { font-weight: 700; }

.mag-intro { margin-bottom: 1.25rem; }

.mag-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.mag-feature {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
  margin-bottom: 0.25rem;
}

.mag-feature--media .mag-feature__media {
  display: block;
  min-height: 280px;
  background: #0b1c2c;
}

.mag-feature__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mag-feature__body {
  padding: clamp(1.1rem, 3vw, 1.75rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mag-feature h2 {
  margin: 0.2rem 0 0.55rem;
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  line-height: 1.45;
}

.mag-feature h2 a { color: var(--brand-deeper); }

.article-layout { max-width: 860px; }

.article-hero-media {
  margin: 0 0 1.1rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.article-hero-media img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
}

.article-body {
  font-size: 1.05rem;
}

.article-back { margin-top: 1.1rem; }

.mag-grid + .page-numbers,
.shell > .page-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}

.shell > .page-numbers li { margin: 0; }

.shell > .page-numbers a,
.shell > .page-numbers span {
  display: inline-flex;
  min-width: 2.4rem;
  justify-content: center;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.shell > .page-numbers .current,
.shell > .page-numbers a:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* Footer */
.site-footer {
  margin-top: 3rem;
  color: #e8f3fb;
  background:
    linear-gradient(180deg, rgba(0, 54, 92, 0.97), rgba(0, 79, 134, 0.98)),
    url("../img/pattern.svg");
  background-size: cover, 120px;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr;
  gap: 1.5rem;
  padding: 2.6rem 0 1.6rem;
}

.site-footer h3 {
  margin: 0 0 0.8rem;
  font-size: 1.02rem;
  color: #fff;
}

.site-footer p,
.site-footer li,
.site-footer .copy { color: rgba(232, 243, 251, 0.82); }

.site-footer ul,
.site-footer .footer-menu { list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-top: 0.35rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #cfe8f8; }
.site-footer .menu-empty-hint { margin: 0; font-size: 0.9rem; }
.site-footer .menu-empty-hint a { text-decoration: underline; }

.site-footer__brand {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  margin-bottom: 0.7rem;
}

.site-footer__brand img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #000;
}

.site-footer__tagline {
  margin: 0;
}

.site-footer__bar {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.18);
}

.site-footer__bar-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem 1.25rem;
  padding: 1rem 0 1.35rem;
}

.copy {
  margin: 0;
  font-size: 0.9rem;
}

.site-footer__credit {
  margin: 0;
  font-size: 0.92rem;
  color: rgba(232, 243, 251, 0.88);
}

.site-footer__credit a {
  color: #f0d78c;
  font-weight: 700;
  border-bottom: 1px solid rgba(240, 215, 140, 0.35);
}

.site-footer__credit a:hover {
  color: #fff;
  border-bottom-color: #fff;
}

/* 404 */
.error-404 {
  padding: clamp(3rem, 8vw, 5.5rem) 0;
  background:
    radial-gradient(circle at 80% 10%, rgba(0, 107, 179, 0.12), transparent 40%),
    linear-gradient(180deg, rgba(0, 107, 179, 0.06), transparent 55%);
}

.error-404__inner {
  max-width: 40rem;
  text-align: center;
  margin-inline: auto;
}

.error-404__code {
  margin: 0;
  font-size: clamp(4.5rem, 14vw, 7.5rem);
  line-height: 0.9;
  font-weight: 800;
  color: var(--brand);
  opacity: 0.18;
  letter-spacing: -0.04em;
}

.error-404 h1 {
  margin: -1.2rem 0 0.55rem;
  color: var(--brand-deeper);
  font-size: clamp(1.7rem, 3.5vw, 2.35rem);
}

.error-404__lead {
  max-width: 36ch;
  margin-inline: auto;
}

.error-404__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin: 1.35rem 0 1.5rem;
}

.error-404__search {
  display: flex;
  gap: 0.55rem;
  max-width: 28rem;
  margin-inline: auto;
}

.error-404__search input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.78rem 1.1rem;
  font: inherit;
  background: #fff;
}

.error-404__search input:focus {
  outline: 2px solid rgba(0, 107, 179, 0.25);
  border-color: var(--brand);
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.service-desk__item,
.card,
.board-card,
.contact-card,
.member-link {
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.28s ease,
    background 0.28s ease,
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.service-desk__item:hover,
.card:hover,
.board-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(0, 54, 92, 0.12);
}

.btn {
  transition:
    transform 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease,
    color 0.22s ease,
    border-color 0.22s ease;
}

.hero__logo {
  animation: logoIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero__kicker {
  animation: riseSoft 0.7s ease both 0.08s;
}

.hero h1 {
  animation: riseSoft 0.75s ease both 0.16s;
}

.hero__lead {
  animation: riseSoft 0.75s ease both 0.24s;
}

.hero__actions {
  animation: riseSoft 0.75s ease both 0.32s;
}

@keyframes logoIn {
  from { opacity: 0; transform: scale(0.88) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes riseSoft {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.navigation.pagination {
  margin-top: 1.5rem;
}

.navigation.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.navigation.pagination a,
.navigation.pagination span {
  display: inline-flex;
  min-width: 2.4rem;
  justify-content: center;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.navigation.pagination .current,
.navigation.pagination a:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* Motion */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__bg,
  .site-header__flag img,
  .hero__logo,
  .hero__kicker,
  .hero h1,
  .hero__lead,
  .hero__actions,
  .reveal { animation: none !important; transition: none !important; }
  .hero__bg { transform: none; }
  .reveal { opacity: 1; transform: none; }
  .card:hover,
  .service-desk__item:hover,
  .board-card:hover,
  .btn:hover { transform: none; }
}

/* Responsive */
@media (max-width: 1100px) {
  .site-header__flag {
    width: clamp(220px, 48vw, 480px);
    opacity: 0.32;
  }
}

@media (max-width: 960px) {
  .grid,
  .site-footer__grid,
  .tariff-preview,
  .service-desk,
  .board-grid,
  .about-layout,
  .contact-layout,
  .member-profile,
  .mag-feature,
  .mag-grid,
  .contact-cards--solo { grid-template-columns: 1fr 1fr; }

  .member-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .member-row .member-icon-links {
    justify-content: flex-start;
  }
  .site-header__flag {
    width: clamp(200px, 50vw, 380px);
    max-width: 55%;
  }
}

@media (max-width: 980px) {
  .btn-header--ghost { display: none; }
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .site-header__brand-row { align-items: center; }
  .brand__logo { width: 58px; height: 58px; }
  .brand__text span { display: none; }
  /* .site-header__main { min-height: 112px; } */
  .site-header__flag {
    width: clamp(170px, 62vw, 300px);
    max-width: 58%;
    opacity: 0.3;
    -webkit-mask-image: linear-gradient(to inline-start, #000 60%, transparent 100%);
    mask-image: linear-gradient(to inline-start, #000 60%, transparent 100%);
  }
  .contact-cards--solo { grid-template-columns: 1fr; }
  .site-header__top-inner {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.35rem;
    padding: 0.65rem 0;
  }
  .site-header__meta {
    justify-content: center;
    width: 100%;
  }
  .site-header__hours,
  .site-header__sep { display: none; }
  .site-header__clock {
    width: 100%;
    text-align: center;
    font-size: 0.98rem;
  }
  .site-header__tel {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
  .site-header__navwrap { padding-bottom: 0; }
  .site-footer__bar-inner {
    flex-direction: column;
    text-align: center;
  }
  .error-404__search {
    flex-direction: column;
  }
  .error-404__search .btn { width: 100%; }
  .primary-nav {
    display: none;
    width: 100%;
    padding: 0.35rem 0 0.75rem;
  }
  .primary-nav.is-open { display: block; }
  .primary-nav__list,
  .primary-nav > ul {
    flex-direction: column;
  }
  .primary-nav > ul > li > a,
  .primary-nav__list > .menu-item > a {
    width: 100%;
    border-inline-start: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.85rem 0.35rem;
  }
  .primary-nav .sub-menu {
    position: static;
    display: none;
    min-width: 0;
    border: 0;
    border-radius: 0;
    background: rgba(0, 0, 0, 0.14);
    box-shadow: none;
    margin: 0 0 0.35rem;
  }
  .primary-nav .menu-item-has-children.is-open > .sub-menu {
    display: block;
  }
  .primary-nav .sub-menu a {
    color: #fff;
    padding-inline-start: 1.1rem;
  }
  .primary-nav .sub-menu a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
  }
  .grid,
  .site-footer__grid,
  .tariff-preview,
  .service-desk,
  .board-grid,
  .about-layout,
  .contact-layout,
  .member-profile,
  .mag-feature,
  .mag-grid,
  .member-details__row { grid-template-columns: 1fr; }
  .hero { min-height: 78vh; }
  .mag-feature__media { min-height: 200px; }
  .actions { width: 100%; }
  .btn { flex: 1; min-width: 9rem; }
  .tariff-table td:last-child { white-space: normal; }
}
