/* =========================================================================
   Urokids — premium dark design system (dark-only)
   Component layer for the static site. Base resets live in @layer base so
   Tailwind utilities (live-site.css) keep winning where the markup uses them.
   ========================================================================= */

:root {
  --bg: #060912;
  --bg-elev: #0b1120;
  --surface: rgba(18, 27, 48, 0.62);
  --surface-strong: #101a31;
  --surface-soft: #0c1426;
  --surface-2: #16223e;
  --text: #eef3fb;
  --text-soft: #b4c1da;
  --muted: #8492af;

  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  --primary: #2f93ff;
  --primary-strong: #1f6fe0;
  --accent: #22d3ee;

  --radius: 18px;
  --radius-md: 22px;
  --radius-sm: 14px;

  --shadow: 0 32px 80px rgba(2, 6, 18, 0.62);
  --shadow-soft: 0 18px 48px rgba(2, 6, 18, 0.42);
  --glow: 0 18px 42px rgba(47, 147, 255, 0.32);

  --field-bg: rgba(255, 255, 255, 0.06);
  --field-border: rgba(255, 255, 255, 0.22);
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Primary stays the blue brand colour (Tailwind --v1) in every section, so its
   foreground must read white — dark mode would otherwise flip it to dark text. */
html.dark {
  --primary-foreground: #ffffff;
}

/* ---------------------------------------------------------------- base ---- */
@layer base {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
  }

  body {
    margin: 0;
    min-width: 320px;
    font-family: var(--font-sans);
    line-height: 1.65;
    color: var(--text);
    background:
      radial-gradient(1100px 640px at 84% -10%, rgba(47, 147, 255, 0.12), transparent 60%),
      radial-gradient(900px 620px at -12% 8%, rgba(34, 211, 238, 0.07), transparent 55%),
      var(--bg);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  body.menu-open,
  body.modal-open {
    overflow: hidden;
  }

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

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

  button,
  input,
  textarea {
    font: inherit;
  }

  button {
    cursor: pointer;
    border: 0;
    background: transparent;
    color: inherit;
  }

  input,
  textarea {
    width: 100%;
    color: var(--text);
    background: var(--field-bg);
    border: 1px solid var(--field-border);
    border-radius: 14px;
    padding: 0.9rem 1.05rem;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  }

  input::placeholder,
  textarea::placeholder {
    color: rgba(226, 234, 247, 0.55);
    opacity: 1;
  }

  input:hover,
  textarea:hover {
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.06);
  }

  input:focus,
  textarea:focus {
    border-color: var(--primary);
    background: rgba(47, 147, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(47, 147, 255, 0.18);
  }

  input[type="checkbox"] {
    accent-color: var(--primary);
  }

  textarea {
    resize: vertical;
    min-height: 120px;
  }

  ::selection {
    background: rgba(47, 147, 255, 0.34);
    color: #fff;
  }

  * {
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
  }

  ::-webkit-scrollbar {
    width: 11px;
    height: 11px;
  }

  ::-webkit-scrollbar-thumb {
    background: var(--line-strong);
    border-radius: 999px;
    border: 3px solid transparent;
    background-clip: content-box;
  }

  ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.28);
    background-clip: content-box;
  }
}

/* --------------------------------------------------------- primitives ---- */
.icon-frame {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-frame > svg {
  width: 100%;
  height: 100%;
}

.nav-caret svg,
.phone-chip svg,
.review-nav svg,
.hero-nav svg,
.lightbox-nav svg,
.dialog-close svg,
.mobile-close svg,
.mobile-menu-button svg,
.button svg {
  width: 18px;
  height: 18px;
}

.section {
  padding: clamp(3.5rem, 6vw, 5rem) 0;
}

.section-heading {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 2.4rem;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.85rem, 3vw, 2.85rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 800;
}

.section-heading p {
  margin: 0;
  max-width: 720px;
  color: var(--text-soft);
}

.section-heading--center {
  justify-items: center;
  text-align: center;
}

.section-heading--light h2,
.section-heading--light p {
  color: #fff;
}

.section-line {
  width: 72px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.section-line--light {
  background: rgba(255, 255, 255, 0.92);
}

/* buttons (CSS-driven dialog / review actions) */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 52px;
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: var(--glow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 48px rgba(47, 147, 255, 0.42);
}

.button:active {
  transform: translateY(0);
}

.button--ghost {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}

.button--ghost:hover {
  background: var(--surface-strong);
  box-shadow: none;
}

.button--accent {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(16px);
  box-shadow: none;
}

.button--accent:hover {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

.loading-state,
.error-card {
  width: min(760px, calc(100% - 2rem));
  margin: 9rem auto 0;
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-soft);
}

.loading-state {
  text-align: center;
  color: var(--text-soft);
}

.error-card h1,
.error-card p {
  margin: 0 0 0.9rem;
}

/* -------------------------------------------------------------- header ---- */
.site-header__bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding: 1.4rem 0;
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header__bar.is-scrolled {
  padding: 0.85rem 0;
  background: color-mix(in srgb, var(--bg-elev) 78%, transparent);
  backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 18px 44px rgba(2, 6, 18, 0.5);
}

.site-header__bar.is-scrolled::after {
  content: "";
  position: absolute;
  left: 1.5rem;
  right: 1.5rem;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
}

.header-row {
  /* CSS Grid: logo / nav (fills middle) / right-cluster.
     Pure flexbox with justify-content:space-between leaves the middle child
     wherever its natural width lands; grid guarantees the nav truly occupies
     the optical centre between the two outer columns. */
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.2rem;
}

/* Horizontal logo — restrained white pill, ~44px desktop, no inflated padding. */
.logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 4px 12px;
  border-radius: 11px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 2px 6px rgba(2, 6, 18, 0.22),
    0 8px 22px rgba(2, 6, 18, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.2s ease;
}

.logo-link img {
  display: block;
  height: 100%;
  width: auto;
  max-height: 34px;
  object-fit: contain;
}

.logo-link:hover {
  transform: translateY(-1px);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow:
    0 2px 6px rgba(2, 6, 18, 0.22),
    0 12px 28px rgba(59, 130, 246, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  /* Grid column already provides width — fill it and centre children. */
  width: 100%;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link--button[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.nav-link.is-active {
  color: var(--text);
  background: rgba(47, 147, 255, 0.14);
}

.nav-caret {
  display: inline-flex;
  transition: transform 0.25s ease;
}

.nav-link--button[aria-expanded="true"] .nav-caret {
  transform: rotate(180deg);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.phone-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 42px;
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.phone-chip:hover {
  border-color: color-mix(in srgb, var(--primary) 55%, transparent);
  background: rgba(47, 147, 255, 0.12);
  transform: translateY(-1px);
}

.phone-chip svg {
  color: var(--primary);
}

.phone-chip--mobile {
  width: 100%;
  justify-content: center;
}

.tool-cluster {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface-strong);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lang-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.lang-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mobile-menu-button {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface-strong);
  color: var(--text);
}

/* ----------------------------------------------------------- dropdowns ---- */
.nav-dropdown,
.popover-wrap,
.floating-share {
  position: relative;
}

.dropdown-panel,
.popover-panel,
.floating-menu {
  position: absolute;
  top: calc(100% + 0.7rem);
  right: 0;
  min-width: 220px;
  padding: 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface-strong) 92%, transparent);
  backdrop-filter: blur(22px) saturate(140%);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.22s ease;
}

.dropdown-panel.is-open,
.popover-panel.is-open,
.floating-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.operations-panel {
  display: grid;
  gap: 0.6rem;
  width: min(620px, calc(100vw - 2rem));
  grid-template-columns: repeat(3, minmax(0, 1fr));
  left: 50%;
  right: auto;
  transform: translate(-50%, 10px);
}

.operations-panel.is-open {
  transform: translate(-50%, 0);
}

.operations-card {
  display: grid;
  gap: 0.45rem;
  padding: 0.95rem;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid transparent;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.operations-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--primary) 45%, transparent);
  background: var(--surface-2);
}

.operations-card__title {
  font-weight: 800;
  color: var(--text);
}

.operations-card__desc {
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.55;
}

.popover-panel {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.option-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text-soft);
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.option-chip:hover {
  background: var(--surface-2);
  color: var(--text);
}

.option-chip.is-active {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #fff;
  border-color: transparent;
  box-shadow: var(--glow);
}

.option-chip--lang {
  justify-content: flex-start;
  min-width: 170px;
}

.option-chip--lang img {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
}

/* ------------------------------------------------------- mobile drawer ---- */
.mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.7);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  /* Must sit ABOVE the fixed header (.site-header__bar = z-index: 50). */
  z-index: 1000;
}

.mobile-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

/* ======================================================================
   MOBILE DRAWER — premium dark redesign
   ====================================================================== */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(92vw, 360px);
  height: 100dvh;
  padding: 1rem;
  background: linear-gradient(180deg, #0c1424 0%, #0a1120 100%);
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.6);
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  /* Must sit ABOVE the fixed header (.site-header__bar = z-index: 50). */
  z-index: 1001;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0.75rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.mobile-drawer.is-open {
  transform: translateX(0);
}

.mobile-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.25rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mobile-drawer__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.mobile-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.85);
  transition: background 0.2s, border-color 0.2s;
}
.mobile-close:hover,
.mobile-close:active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.mobile-nav {
  display: grid;
  gap: 0.35rem;
  align-content: start;
  padding: 0.25rem 0;
}

/* All link rows share consistent surface */
.mobile-nav__link,
.mobile-sub-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
  /* Kill mobile tap-highlight halo */
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.mobile-nav__link:hover,
.mobile-sub-link:hover {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.2);
  color: #fff;
}

.mobile-nav__link.is-active,
.mobile-sub-link.is-active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(6, 182, 212, 0.12));
  border-color: rgba(59, 130, 246, 0.3);
  color: #fff;
}

.mobile-nav__link:active,
.mobile-sub-link:active {
  transform: scale(0.985);
  background: rgba(59, 130, 246, 0.12);
}

/* Submenu group (legacy non-collapsible — kept for backwards compatibility) */
.mobile-group {
  display: grid;
  gap: 0.3rem;
  padding: 0.5rem 0 0.25rem;
  margin-top: 0.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.mobile-group__title,
.mobile-settings__title {
  padding: 0.25rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 0.15rem;
}

/* React-parity collapsible mobile group — closed by default, click chevron to open */
.mobile-collapsible__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.mobile-collapsible__trigger[aria-expanded="true"] .mobile-chevron {
  transform: rotate(180deg);
}

.mobile-collapsible__panel {
  display: grid;
  gap: 0.3rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.32s ease, padding 0.32s ease, margin 0.32s ease;
  padding-left: 0.5rem;
}

.mobile-collapsible.is-open .mobile-collapsible__panel {
  max-height: 600px; /* large enough to fit 3-5 sub-links */
  margin-top: 0.4rem;
  padding-top: 0.1rem;
}

/* Submenu links — slightly indented & lighter style */
.mobile-sub-link {
  padding: 0.75rem 1rem 0.75rem 1.4rem;
  position: relative;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
}
.mobile-sub-link::before {
  content: '';
  position: absolute;
  left: 0.7rem;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.6);
  transform: translateY(-50%);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

.mobile-drawer__footer {
  display: grid;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.mobile-settings {
  display: grid;
  gap: 0.5rem;
}

.inline-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Phone chip in drawer footer */
.phone-chip--mobile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(6, 182, 212, 0.1));
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.phone-chip--mobile svg {
  color: #60a5fa;
}

/* ---------------------------------------------------------- hero slider ---- */
/* Sizing/positioning comes from Tailwind utilities in markup; only paint here. */
.hero-slider {
  position: relative;
  overflow: hidden;
  background: #05080f;
}

/* Responsive hero — tall 9:16 portrait on mobile (matches reference design),
   landscape on desktop. */
.hero-slider--responsive {
  aspect-ratio: 9 / 16;
  height: auto;
  max-height: 90vh;
  min-height: 520px;
}
@media (min-width: 768px) {
  .hero-slider--responsive {
    aspect-ratio: auto;
    height: 620px;
    max-height: none;
    min-height: 0;
  }
}

/* Per-slide object-position lives inline on the <img> via PHP. Fallback below. */
.hero-img {
  object-position: center 20%;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.45);
  transition: width 0.3s ease, background 0.3s ease;
}

.hero-dot.is-active {
  width: 28px;
  background: #fff;
}

/* ------------------------------------------------- home: direction tiles --- */
.dir-tile {
  background:
    linear-gradient(180deg, rgba(22, 33, 60, 0.66), rgba(11, 18, 34, 0.66));
  backdrop-filter: blur(12px);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.dir-tile:hover {
  transform: translateY(-6px);
  background: linear-gradient(180deg, rgba(28, 42, 76, 0.72), rgba(13, 22, 42, 0.72));
}

/* -------------------------------------------------------------- gallery ---- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.85rem;
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(47, 147, 255, 0.28));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--primary) 50%, transparent);
  box-shadow: var(--glow);
}

.gallery-item:hover::after {
  opacity: 1;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

/* -------------------------------------------------------------- reviews ---- */
.reviews-section {
  position: relative;
  overflow: hidden;
}

.reviews-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 520px at 14% 8%, rgba(47, 147, 255, 0.34), transparent 60%),
    radial-gradient(720px 520px at 92% 92%, rgba(34, 211, 238, 0.26), transparent 60%),
    linear-gradient(135deg, #0a1730, #0d2a47 55%, #0a1f3f);
}

.reviews-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.4;
  mask-image: radial-gradient(circle at 50% 40%, #000, transparent 75%);
}

.reviews-shell {
  position: relative;
  z-index: 1;
}

.reviews-marquee {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  max-height: min(70vh, 560px);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 11%, #000 86%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 11%, #000 86%, transparent);
}

.reviews-track {
  display: block;
  animation: reviews-scroll 42s linear infinite;
}

.reviews-marquee:hover .reviews-track {
  animation-play-state: paused;
}

.review-card {
  display: grid;
  gap: 1rem;
  margin: 0 0 1rem;
  padding: clamp(1.4rem, 2.6vw, 2rem);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(16px);
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.review-card__quote {
  width: 54px;
  height: 54px;
  color: rgba(255, 255, 255, 0.45);
}

.review-card__quote svg {
  width: 100%;
  height: 100%;
}

.review-card__text {
  margin: 0;
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  line-height: 1.85;
}

.review-card__footer strong,
.review-card__footer span {
  display: block;
}

.review-card__footer strong {
  font-size: 1.05rem;
}

.review-card__footer span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  color: #fff;
  box-shadow: var(--shadow-soft);
  transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.22);
}

.lightbox-nav--prev {
  left: 0.75rem;
}

.lightbox-nav--next {
  right: 0.75rem;
}

.reviews-actions {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

/* ------------------------------------------------- operations (op-page) ---- */
.op-page {
  padding: 1.5rem 0 0;
}

.op-shell {
  width: min(1200px, calc(100% - 2rem));
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 3.25rem) 0;
}

.op-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  align-items: start;
}

.op-card {
  padding: clamp(1.3rem, 3vw, 2.1rem);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
}

.op-card__head {
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.op-card__title {
  margin: 0;
  font-size: clamp(1.55rem, 2.6vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.op-card__desc {
  margin: 0.7rem 0 0;
  color: var(--text-soft);
}

.op-list {
  display: grid;
  gap: 0.85rem;
}

.op-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
  padding: 1.05rem 1.15rem 1.05rem 1.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(47, 147, 255, 0.18);
  background: var(--surface-soft);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(47, 147, 255, 0.06), 0 6px 20px rgba(2, 6, 18, 0.28);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.op-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  opacity: 0.85;
  box-shadow: 0 0 14px rgba(47, 147, 255, 0.75);
  transition: opacity 0.25s ease, box-shadow 0.25s ease;
}

.op-item:hover {
  transform: translateX(4px);
  border-color: color-mix(in srgb, var(--primary) 60%, transparent);
  background: var(--surface-2);
  box-shadow: 0 0 0 1px rgba(47, 147, 255, 0.45), 0 16px 38px rgba(47, 147, 255, 0.22);
}

.op-item:hover::before {
  opacity: 1;
  box-shadow: 0 0 20px rgba(47, 147, 255, 0.95);
}

.op-item__head {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.op-item__dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 0.5rem;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 10px 2px rgba(47, 147, 255, 0.6), 0 0 0 4px rgba(47, 147, 255, 0.14);
}

.op-item__title {
  margin: 0;
  font-weight: 700;
  color: var(--text);
  line-height: 1.5;
}

.op-item__desc {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.7;
}

.op-media {
  position: sticky;
  top: 6.5rem;
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.op-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 768px) {
  .op-item {
    grid-template-columns: 2fr 3fr;
    gap: 1.25rem;
    align-items: start;
  }
}

@media (max-width: 1024px) {
  .op-grid {
    grid-template-columns: 1fr;
  }

  .op-media {
    position: static;
  }
}

/* ----------------------------------------------------- about page bits ---- */
.about-item {
  padding: 0.95rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.about-item:hover {
  border-color: color-mix(in srgb, var(--primary) 38%, transparent);
  background: rgba(47, 147, 255, 0.07);
  box-shadow: 0 10px 26px rgba(2, 6, 18, 0.3);
  transform: translateX(4px);
}

.stat-icon {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-icon:hover {
  transform: translateY(-3px) scale(1.05);
}

/* ------------------------------------------------------ cases (sliders) ---- */
.case-card__image {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  /* Reset button defaults without using `all:unset` (which would also blow
     away our opacity rule above and stop the carousel from animating). */
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  appearance: none;
  cursor: zoom-in;
  font: inherit;
  color: inherit;
  display: block;
}

.case-card__image.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* Cases gallery tile (one card per case) — React ImageCarusel parity */
.case-tile {
  display: flex;
  flex-direction: column;
}

/* Carousel container — fixed responsive heights instead of object-cover stretch */
.case-tile__carousel {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #0a1224;
  height: 220px;
}
@media (min-width: 640px) {
  .case-tile__carousel { height: 280px; }
}
@media (min-width: 768px) {
  .case-tile__carousel { height: 320px; }
}
@media (min-width: 1280px) {
  .case-tile__carousel { height: 340px; }
}

/* Blurred backdrop image — same image, scaled + heavy blur */
.case-tile__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.12);
  filter: blur(28px);
  pointer-events: none;
}

/* Dark overlay over the backdrop to soften */
.case-tile__veil {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  pointer-events: none;
}

/* Foreground image — keeps natural ratio, contained */
.case-tile__fg {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}
@media (min-width: 768px) {
  .case-tile__fg { padding: 14px; }
}

.case-tile__arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(15, 23, 42, 0.45);
  color: #fff;
  backdrop-filter: blur(8px);
  transition: background 0.2s, transform 0.2s;
}

.case-tile__arrow:hover {
  background: rgba(15, 23, 42, 0.7);
}

.case-tile__arrow--prev { left: 8px; }
.case-tile__arrow--next { right: 8px; }

.case-tile__dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  z-index: 5;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
}

.case-tile__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(59, 130, 246, 0.4);
}

/* content gate: blur sensitive medical images until confirmed */
.cases-wrap {
  position: relative;
}

.case-card__image img {
  transition: filter 0.45s ease, transform 0.45s ease;
}

.cases-wrap.is-locked .case-card__image img {
  filter: blur(24px);
  transform: scale(1.08);
}

.cases-gate {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(5, 9, 18, 0.82);
  backdrop-filter: blur(10px);
  transition: opacity 0.3s ease;
}

.cases-gate.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.cases-gate__card {
  width: min(460px, 100%);
  display: grid;
  justify-items: center;
  gap: 1rem;
  padding: 2.25rem 1.75rem;
  text-align: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-strong);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.cases-gate__icon {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border-radius: 999px;
  background: rgba(47, 147, 255, 0.14);
  border: 1px solid rgba(47, 147, 255, 0.4);
  color: var(--primary);
  box-shadow: 0 0 28px rgba(47, 147, 255, 0.35);
}

.cases-gate__icon svg {
  width: 30px;
  height: 30px;
}

.cases-gate__card h3 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cases-gate__card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.7;
}

.cases-gate__card .button {
  margin-top: 0.4rem;
}

.case-card__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.5);
  transition: width 0.3s ease, background 0.3s ease;
}

.case-card__dot.is-active {
  width: 24px;
  background: #fff;
}

/* -------------------------------------------------- social icon buttons ---- */
footer a svg,
.social-btn svg {
  width: 20px;
  height: 20px;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(47, 147, 255, 0.38);
  background: rgba(47, 147, 255, 0.1);
  color: var(--primary);
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.social-btn:hover {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  border-color: transparent;
  color: #fff;
  transform: translateY(-3px);
  box-shadow: var(--glow);
}

/* ------------------------------------------------------- contact form ---- */
.contact-form-card {
  padding: clamp(1.4rem, 3vw, 2.1rem);
  border-radius: var(--radius-md);
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(22, 33, 60, 0.5), rgba(11, 18, 34, 0.55));
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
}

.contact-form-card__title {
  margin: 0 0 0.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* ----------------------------------------------------- consent / legal ---- */
.consent-row {
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.5;
}

.consent-check {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 6px;
  cursor: pointer;
  accent-color: var(--primary);
}

.privacy-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.privacy-link:hover {
  color: #fff;
}

.legal-page {
  width: min(900px, calc(100% - 2rem));
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(3rem, 6vw, 5rem);
}

.legal-card {
  padding: clamp(1.5rem, 4vw, 2.75rem);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
}

.legal-lead {
  margin: 0 0 1.75rem;
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  line-height: 1.8;
  color: var(--text-soft);
}

.legal-section {
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.legal-section h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.legal-section p {
  margin: 0 0 0.65rem;
  color: var(--text-soft);
  line-height: 1.8;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

/* ------------------------------------------------------ floating actions ---- */
.floating-stack {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 42;
  display: grid;
  gap: 0.85rem;
  justify-items: end;
}

body.menu-open .floating-stack {
  display: none;
}

.floating-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  color: #fff;
  box-shadow: 0 16px 34px rgba(2, 6, 18, 0.5);
  transition: transform 0.2s ease;
}

.floating-button:hover {
  transform: translateY(-2px) scale(1.04);
}

.floating-button svg {
  width: 24px;
  height: 24px;
}

.floating-button::before,
.floating-button::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid rgba(255, 255, 255, 0.28);
  animation: pulse 2.4s infinite;
}

.floating-button::after {
  animation-delay: 1.2s;
}

.floating-button--chat {
  background: linear-gradient(135deg, #3dcf88, #08a367);
}

.floating-button--share {
  background: linear-gradient(135deg, #0bc6ff, #1853ff);
}

.floating-menu {
  top: auto;
  bottom: calc(100% + 0.65rem);
  right: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.6rem;
}

.floating-menu__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: rgba(47, 147, 255, 0.12);
  border: 1px solid rgba(47, 147, 255, 0.38);
  color: var(--primary);
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.floating-menu__item svg {
  width: 20px;
  height: 20px;
}

.floating-menu__item:hover {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  border-color: transparent;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--glow);
}

/* --------------------------------------------------- modals / lightbox ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(2, 6, 18, 0.72);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
  z-index: 60;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.dialog-card,
.lightbox-card {
  position: relative;
  width: min(680px, 100%);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: 1.6rem;
  border-radius: 26px;
  border: 1px solid var(--line-strong);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-overlay.is-open .dialog-card,
.modal-overlay.is-open .lightbox-card {
  transform: translateY(0) scale(1);
}

.dialog-card--compact {
  width: min(520px, 100%);
}

.dialog-head {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
}

.dialog-head h3 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.dialog-head p {
  margin: 0;
  color: var(--text-soft);
}

.dialog-form {
  display: grid;
  gap: 0.9rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field span {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-soft);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.4rem;
}

.dialog-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
  transition: background 0.2s ease;
}

.dialog-close:hover {
  background: var(--surface-2);
}

.lightbox-card {
  width: min(940px, 100%);
  padding: 1.4rem;
  background: var(--bg-elev);
}

.lightbox-card img {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 16px;
}

/* ---------------------------------------------------------------- toast ---- */
#toast-root {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 70;
  display: grid;
  gap: 0.65rem;
}

/* Flash messages from Yii (Html::alertSuccess / Html::alertError).
   Constrain to top-right corner like a toast — no more full-width banner
   that hides the header. */
.flash-stack {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 70;
  display: grid;
  gap: 0.6rem;
  max-width: 380px;
  pointer-events: none; /* allow header below to be clickable */
}
.flash-stack > .alert {
  pointer-events: auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  padding: 0.85rem 1rem;
  margin: 0;
  font-weight: 500;
  color: #fff;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  animation: flash-slide-in 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.flash-stack .alert-success {
  background: linear-gradient(135deg, #059669, #10b981);
}
.flash-stack .alert-danger {
  background: linear-gradient(135deg, #dc2626, #f97316);
}
.flash-stack .alert-warning {
  background: linear-gradient(135deg, #d97706, #fbbf24);
}
.flash-stack .alert-info {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
}
.flash-stack .btn-close {
  filter: invert(1) brightness(2);
  opacity: 0.7;
  flex-shrink: 0;
}
.flash-stack .btn-close:hover { opacity: 1; }

@keyframes flash-slide-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@media (max-width: 480px) {
  .flash-stack {
    top: auto;
    bottom: 1rem;
    left: 0.5rem;
    right: 0.5rem;
    max-width: none;
  }
}

.toast {
  min-width: min(360px, calc(100vw - 2rem));
  padding: 0.95rem 1.1rem;
  border-radius: 16px;
  color: #fff;
  font-weight: 600;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.toast--success {
  background: linear-gradient(135deg, #0f9f79, #12b981);
}

.toast--error {
  background: linear-gradient(135deg, #dc2626, #f97316);
}

/* ------------------------------------------------------------ keyframes ---- */
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.75);
    opacity: 0;
  }
}

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

@keyframes reviews-scroll {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reviews-track {
    animation: none;
  }
}

/* ---------------------------------------------------------- responsive ---- */
@media (max-width: 1100px) {
  .desktop-nav,
  .tool-cluster,
  .phone-chip:not(.phone-chip--mobile) {
    display: none;
  }

  .mobile-menu-button {
    display: inline-flex;
  }

  .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .operations-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .review-card {
    min-height: 420px;
  }

  .dialog-actions {
    flex-direction: column-reverse;
  }

  .dialog-actions .button {
    width: 100%;
  }

  #toast-root {
    left: 0.5rem;
    right: 0.5rem;
    top: auto;
    bottom: 0.5rem;
  }

  .toast {
    min-width: 0;
  }

  .floating-button {
    width: 50px;
    height: 50px;
  }

  /* Header bar — compact mobile padding */
  .site-header__bar {
    padding: 0.55rem 0;
  }
  .header-row {
    gap: 0.6rem;
  }
  .logo-link {
    height: 42px;
    padding: 5px 10px;
  }
  .logo-link img {
    max-height: 32px;
  }

  /* Hero text — reduce sizes on tight screens */
  .hero-slider h1,
  .hero-slider h2 {
    line-height: 1.15;
  }

  /* Section padding — tighter on mobile */
  .section {
    padding-top: clamp(2.4rem, 7vw, 4rem);
    padding-bottom: clamp(2.4rem, 7vw, 4rem);
  }

  /* Operation/case cards — single column on small */
  .op-card,
  .dir-tile {
    padding: 1.5rem 1.25rem;
  }

  /* Floating actions — bottom-right corner, smaller */
  .floating-actions {
    right: 12px;
    bottom: 12px;
    gap: 0.5rem;
  }

  /* Footer columns stack with smaller gap */
  footer .grid {
    gap: 1.5rem;
  }

  /* Contact form card padding tighter */
  .contact-form-card,
  .contact-info-card {
    padding: 1.25rem !important;
  }

  /* Cases grid 2 columns on very small */
  .cases-wrap .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }
  .cases-wrap .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Mobile drawer — full-bleed on narrow screens */
  .mobile-drawer {
    width: 100vw;
    border-left: none;
  }

  /* Section heading sizes */
  .section-heading h2 {
    font-size: clamp(1.3rem, 5vw, 1.7rem);
  }

  /* Header logo (mobile) — slightly smaller */
  .logo-link {
    height: 38px;
    padding: 4px 8px;
  }
  .logo-link img {
    max-height: 28px;
  }

  /* Header phone-chip (when shown) — compact text hidden.
     IMPORTANT: do NOT hide the phone-chip--mobile span in the drawer footer. */
  .phone-chip:not(.phone-chip--mobile) span {
    display: none;
  }
}

/* =========================================================================
   Yii2 layer: ActiveForm validation + small fixes
   ========================================================================= */
.form-group { margin-bottom: 1rem; }
.help-block,
.invalid-feedback {
  color: #f87171;
  font-size: 0.85rem;
  margin-top: 0.4rem;
}
#page-content { min-height: 60vh; }

/* Bootstrap-safe body bg override (unlayered, specificity 0,0,2 — beats any third-party body rule) */
html body {
  background:
    radial-gradient(1100px 640px at 84% -10%, rgba(47, 147, 255, 0.12), transparent 60%),
    radial-gradient(900px 620px at -12% 8%, rgba(34, 211, 238, 0.07), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
}

/* (Old .social-rail removed — socials now show only inside floating share menu) */

/* =========================================================================
   About page glow — make membership/internship items pulse subtly
   ========================================================================= */
.about-glow-item {
  position: relative;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(47, 147, 255, 0.06), rgba(34, 211, 238, 0.03));
  border: 1px solid rgba(47, 147, 255, 0.18);
  box-shadow: 0 0 0 1px rgba(47, 147, 255, 0.05), 0 8px 24px rgba(2, 6, 18, 0.25);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease,
              background 0.3s ease;
}

.about-glow-item:hover {
  border-color: rgba(47, 147, 255, 0.45);
  box-shadow: 0 0 0 1px rgba(47, 147, 255, 0.35), 0 16px 36px rgba(47, 147, 255, 0.18);
  transform: translateX(4px);
  background: linear-gradient(135deg, rgba(47, 147, 255, 0.1), rgba(34, 211, 238, 0.05));
}

.about-glow-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12%;
  bottom: 12%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  box-shadow: 0 0 14px rgba(47, 147, 255, 0.6);
  opacity: 0.75;
  transition: opacity 0.3s ease, box-shadow 0.3s ease;
}

.about-glow-item:hover::before {
  opacity: 1;
  box-shadow: 0 0 22px rgba(47, 147, 255, 0.95);
}

/* =========================================================================
   HOME — Manzil section: 2-column grid (map | contact card) — desktop only.
   Stacks vertically on tablet/mobile.
   ========================================================================= */
.home-contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  align-items: stretch;
  max-width: 1180px;
  margin: 0 auto;
}

@media (min-width: 1024px) {
  .home-contact-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 2rem;
  }
}

.home-contact-grid__map,
.home-contact-grid__card {
  min-width: 0; /* fix flex/grid overflow */
  display: flex;
  flex-direction: column;
}

/* Make the inner map fill the column height on desktop */
@media (min-width: 1024px) {
  .home-contact-grid__map > .contact-map-card {
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
  }
}

/* =========================================================================
   BLOG detail page — typography for rendered HTML body
   ========================================================================= */

.blog-lead {
  font-size: 1.18rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.86);
  margin: 0 0 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 400;
}

.blog-content {
  font-size: 1.05rem;
  line-height: 1.78;
  color: rgba(255, 255, 255, 0.82);
}

.blog-content > * + * {
  margin-top: 1.25rem;
}

.blog-content p {
  margin: 0 0 1.25rem;
}

.blog-content h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: #fff;
  margin: 2.2rem 0 1rem;
  padding-left: 0.9rem;
  position: relative;
}

.blog-content h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  bottom: 0.35em;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, #3b82f6, #06b6d4);
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.6);
}

.blog-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin: 1.6rem 0 0.8rem;
}

.blog-content ul,
.blog-content ol {
  padding-left: 1.4rem;
  margin: 0 0 1.5rem;
}

.blog-content ul li,
.blog-content ol li {
  margin: 0.4rem 0;
  padding-left: 0.4rem;
  line-height: 1.7;
}

.blog-content ul {
  list-style: none;
  padding-left: 0;
}

.blog-content ul li {
  position: relative;
  padding-left: 1.6rem;
}

.blog-content ul li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.7em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #7cc3ff 0%, #2f93ff 60%, #0c5fc7 100%);
  box-shadow: 0 0 10px rgba(47, 147, 255, 0.6);
}

.blog-content strong,
.blog-content b {
  color: #fff;
  font-weight: 700;
}

.blog-content em,
.blog-content i {
  color: rgba(255, 255, 255, 0.78);
  font-style: italic;
}

.blog-content a {
  color: #60a5fa;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(96, 165, 250, 0.4);
}

.blog-content a:hover {
  color: #93c5fd;
  text-decoration-color: #93c5fd;
}

.blog-content blockquote {
  border-left: 3px solid var(--primary);
  padding: 0.5rem 1.2rem;
  margin: 1.5rem 0;
  background: rgba(47, 147, 255, 0.05);
  border-radius: 0 12px 12px 0;
  color: rgba(255, 255, 255, 0.86);
  font-style: italic;
}

.blog-content img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  margin: 1.5rem 0;
}

/* Tags */
.blog-tags {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.blog-tags__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  margin-right: 0.3rem;
}

.blog-tag {
  font-size: 0.82rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

/* Related posts */
.blog-related-card {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.blog-related-card:hover {
  transform: translateY(-3px);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
}

.blog-related-card__cover {
  aspect-ratio: 16/10;
  overflow: hidden;
}

.blog-related-card__cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.blog-related-card:hover .blog-related-card__cover img {
  transform: scale(1.05);
}

.blog-related-card__title {
  padding: 1rem 1.1rem 1.2rem;
  font-size: 0.98rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =========================================================================
   Contact: QR codes + clinic notes block
   ========================================================================= */
.contact-info-card {
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(22, 33, 60, 0.55), rgba(11, 18, 34, 0.55));
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
}

.contact-info-card h3 {
  margin: 0 0 0.6rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.contact-info-card p,
.contact-info-card li {
  color: var(--text-soft);
  line-height: 1.7;
}

.contact-qr-grid {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.75rem, 2vw, 1.25rem);
  margin-top: 1.25rem;
}

.contact-qr-grid figure {
  margin: 0;
  display: grid;
  gap: 0.5rem;
  justify-items: center;
  text-align: center;
}

.contact-qr-grid img {
  width: clamp(100px, 14vw, 140px);
  height: auto;
  border-radius: 16px;
  background: #fff;
  padding: 6px;
  border: 1px solid var(--line-strong);
  box-shadow: 0 12px 28px rgba(2, 6, 18, 0.45);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.contact-qr-grid img:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(47, 147, 255, 0.32);
}

.contact-qr-grid figcaption {
  font-size: 0.8rem;
  color: var(--text-soft);
  font-weight: 600;
  letter-spacing: 0.02em;
}
