/* ========================================================================== 
   PARVARESHI — SHARED SITE SHELL
   Version: 1.0.0 (Media integration)
   Source of truth: approved Home V17 header/footer/navigation.

   Scope:
   - Desktop header + centered primary navigation + search
   - Mobile/tablet hamburger drawer + search
   - Shared footer
   - Mobile bottom navigation

   IMPORTANT:
   This file intentionally does NOT own the Media page hero, category rail,
   content grid, cards, or media slider. Those remain in assets/css/style.css.
   ========================================================================== */

:root {
  --pv-blue: #1769aa;
  --pv-blue-dark: #10558e;
  --pv-text-blue: #254968;
  --pv-line: #dfe8ef;
  --pv-soft: #f5f8fa;
  --pv-menu-width: 360px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 10050;
  top: 10px;
  right: 10px;
  transform: translateY(-150%);
  padding: 7px 13px;
  border-radius: 8px;
  color: #fff;
  background: var(--pv-blue-dark);
  font-size: 12px;
  font-weight: 700;
  transition: transform .18s ease;
}
.skip-link:focus { transform: translateY(0); }

.site-header,
.site-footer {
  position: relative;
  isolation: isolate;
  overflow: visible;
}

.site-header::before,
.site-header::after,
.site-footer::before,
.site-footer::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 0;
  right: 0;
  height: 22px;
  pointer-events: none;
  opacity: .72;
  background:
    radial-gradient(circle at 3px 3px, rgba(23,105,170,.12) 1px, transparent 1.35px) 0 0 / 12px 12px,
    linear-gradient(135deg, rgba(23,105,170,.035) 25%, transparent 25%) 0 0 / 18px 18px,
    #fff;
}
.site-header::before {
  top: 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 100%);
}
.site-header::after {
  bottom: -12px;
  -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 100%);
  mask-image: linear-gradient(to top, #000 0%, transparent 100%);
}
.site-footer::before {
  top: -12px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 100%);
}
.site-footer::after {
  bottom: 0;
  -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 100%);
  mask-image: linear-gradient(to top, #000 0%, transparent 100%);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  z-index: 900;
  border-bottom: 1px solid rgba(229,235,232,.72);
  background: rgba(255,255,255,.96);
}

.site-header .container,
.site-footer .container {
  width: min(calc(100% - 40px), 1240px);
  margin-inline: auto;
}

.site-header .header-inner {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 0 16px;
}

.site-header .hero-brand__link {
  flex: 0 0 clamp(170px, 18vw, 220px);
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.site-header .hero-brand__logo {
  display: block;
  width: 145px;
  max-width: 145px;
  height: auto;
  object-fit: contain;
}

.desktop-primary-nav {
  min-width: 0;
  flex: 1 1 auto;
  margin: 0;
}

.desktop-primary-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.desktop-primary-menu a {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 9px 11px;
  border-radius: 12px;
  color: #405c76;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 700;
  white-space: nowrap;
  transition: color .18s ease, background .18s ease;
}

.desktop-primary-menu a:hover,
.desktop-primary-menu a:focus-visible,
.desktop-primary-menu a[aria-current="page"] {
  color: var(--pv-blue);
  background: #eef6fc;
}

.desktop-site-search {
  position: relative;
  flex: 0 0 clamp(170px, 18vw, 220px);
  width: clamp(170px, 18vw, 220px);
  height: 44px;
  display: flex;
  align-items: center;
  margin: 0;
}

.desktop-site-search input {
  width: 100%;
  height: 44px;
  padding: 0 15px 0 48px;
  border: 1px solid #d9e5ee;
  border-radius: 14px;
  outline: 0;
  color: #304f6d;
  background: #f7fafc;
  font: inherit;
  font-size: 12.5px;
  line-height: 1;
  font-weight: 550;
  text-align: right;
  box-shadow: 0 5px 18px rgba(31,63,88,.045);
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.desktop-site-search input::placeholder { color: #9aaab7; opacity: 1; }
.desktop-site-search input:focus {
  border-color: #b7d3e6;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(23,105,170,.065), 0 7px 20px rgba(31,63,88,.055);
}

.desktop-site-search button {
  position: absolute;
  left: 5px;
  top: 5px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 10px;
  color: var(--pv-blue);
  background: #eaf4fb;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}
.desktop-site-search button:hover,
.desktop-site-search button:focus-visible {
  color: var(--pv-blue-dark);
  background: #dceefa;
  transform: translateY(-1px);
}

.site-header svg,
.mobile-menu-panel svg,
.mobile-bottom-nav svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.desktop-site-search svg { width: 16px; height: 16px; }

.mobile-menu-toggle,
.mobile-menu-panel,
.mobile-menu-backdrop-v10 { display: none; }

.mobile-menu-toggle {
  width: 43px;
  height: 43px;
  place-items: center;
  align-content: center;
  gap: 5px;
  flex: 0 0 43px;
  padding: 0;
  border: 1px solid #dbe7ef;
  border-radius: 13px;
  color: var(--pv-blue);
  background: #fff;
  box-shadow: 0 5px 16px rgba(31,63,88,.07);
  cursor: pointer;
}
.mobile-menu-toggle span {
  width: 19px;
  height: 2px;
  display: block;
  border-radius: 10px;
  background: currentColor;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  width: 100%;
  margin: 34px 0 0;
  clear: both;
  background: #fff;
}
.footer-inner {
  min-height: 125px;
  padding: 26px 0 30px;
  border-top: 1px solid #e5ebe8;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
}
.footer-logo-link {
  display: block;
  flex: 0 0 92px;
  width: 92px;
}
.footer-logo {
  display: block;
  width: 92px;
  max-width: 92px;
  height: auto;
}
.footer-copy {
  flex: 0 1 auto;
  max-width: 760px;
  margin: 0;
  color: #222a26;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.9;
  text-align: right;
}

.mobile-bottom-nav { display: none; }

.site-header a:focus-visible,
.site-header button:focus-visible,
.site-header input:focus-visible,
.mobile-menu-panel a:focus-visible,
.mobile-menu-panel button:focus-visible,
.mobile-menu-panel input:focus-visible,
.mobile-bottom-nav a:focus-visible {
  outline: 3px solid rgba(23,105,170,.22);
  outline-offset: 2px;
}

@media (min-width: 901px) and (max-width: 1080px) {
  .site-header .header-inner { gap: 10px; }
  .site-header .hero-brand__link,
  .desktop-site-search { flex-basis: 170px; }
  .desktop-site-search { width: 170px; }
  .desktop-primary-menu { gap: 0; }
  .desktop-primary-menu a { padding-inline: 7px; font-size: 11.5px; }
}

/* --------------------------------------------------------------------------
   Mobile + tablet
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  body { padding-bottom: calc(94px + env(safe-area-inset-bottom, 0px)); }
  body.mobile-menu-open {
    overflow: hidden !important;
    touch-action: none;
  }

  .site-header {
    position: sticky;
    top: 0;
    z-index: 900;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
  .site-header .header-inner {
    min-height: 76px;
    padding: 12px 0 11px;
  }
  .site-header .hero-brand__link { flex: 0 0 auto; }
  .site-header .hero-brand__logo { width: 120px; max-width: 120px; }

  .desktop-primary-nav,
  .desktop-site-search { display: none !important; }

  .mobile-menu-toggle {
    position: relative;
    z-index: 901;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px;
    display: grid !important;
  }

  .mobile-menu-backdrop-v10 {
    position: fixed;
    z-index: 9998;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    display: block;
    padding: 0;
    border: 0;
    background: rgba(17,33,45,.42);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .24s ease, visibility .24s ease;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }
  body.mobile-menu-open .mobile-menu-backdrop-v10 {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .mobile-menu-panel {
    position: fixed;
    z-index: 9999;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(var(--pv-menu-width), 88vw);
    height: 100dvh;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: calc(18px + env(safe-area-inset-top, 0px)) 14px calc(18px + env(safe-area-inset-bottom, 0px));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    direction: rtl;
    text-align: right;
    border-left: 1px solid #dce6ed;
    border-radius: 24px 0 0 24px;
    background: #fff;
    box-shadow: -22px 0 58px rgba(18,42,60,.22);
    transform: translateX(105%);
    visibility: hidden;
    pointer-events: none;
    transition: transform .28s cubic-bezier(.22,.7,.28,1), visibility .28s ease;
  }
  body.mobile-menu-open .mobile-menu-panel {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  .mobile-menu-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 1px 13px;
    border-bottom: 1px solid #edf1f4;
  }
  .mobile-menu-panel__brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .mobile-menu-panel__brand > img {
    width: 46px;
    height: 46px;
    max-width: 46px;
    flex: 0 0 46px;
    object-fit: contain;
    border-radius: 12px;
  }
  .mobile-menu-panel__brand > div {
    min-width: 0;
    display: grid;
    gap: 0;
  }
  .mobile-menu-panel__brand strong {
    color: #244b6c;
    font-size: 16px;
    line-height: 1.55;
    font-weight: 800;
  }
  .mobile-menu-panel__brand span {
    color: #8b9aa7;
    font-size: 10.5px;
    line-height: 1.65;
    font-weight: 500;
  }
  .mobile-menu-panel__close {
    width: 40px;
    height: 40px;
    min-width: 40px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid #dce7ef;
    border-radius: 12px;
    color: var(--pv-blue);
    background: #f5f9fc;
    cursor: pointer;
  }
  .mobile-menu-panel__close svg { width: 18px; height: 18px; }

  .mobile-menu-search {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 7px;
  }
  .mobile-menu-search input {
    width: 100%;
    height: 46px;
    padding: 0 13px 0 48px;
    border: 1px solid #dce7ef;
    border-radius: 13px;
    outline: 0;
    color: #304f6d;
    background: #f8fafc;
    font: inherit;
    font-size: 12.5px;
    text-align: right;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
  }
  .mobile-menu-search input:focus {
    border-color: #b9d4e7;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(23,105,170,.07);
  }
  .mobile-menu-search button {
    position: absolute;
    left: 5px;
    top: 5px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 10px;
    color: var(--pv-blue);
    background: #eef6fc;
    cursor: pointer;
  }
  .mobile-menu-search button svg { width: 17px; height: 17px; }

  .mobile-menu-list {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .mobile-menu-list li { margin: 0; padding: 0; }
  .mobile-menu-list a {
    width: 100%;
    min-height: 61px;
    display: grid;
    grid-template-columns: 40px minmax(0,1fr) 18px;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border: 1px solid #e5ecf1;
    border-radius: 14px;
    color: #304f6d;
    background: #fff;
    font-size: 13px;
    line-height: 1.6;
    font-weight: 750;
    text-align: right;
    transition: border-color .18s ease, background .18s ease, color .18s ease;
  }
  .mobile-menu-list a:hover,
  .mobile-menu-list a:focus-visible,
  .mobile-menu-list a[aria-current="page"] {
    border-color: #d2e3ee;
    color: var(--pv-blue);
    background: #f7fafc;
  }
  .mobile-menu-list__icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 11px;
    background: #f1f6fa;
  }
  .mobile-menu-list__icon img {
    width: 40px;
    height: 40px;
    object-fit: cover;
  }
  .mobile-menu-list__chevron { width: 16px; height: 16px; color: #98aaba; }
  .mobile-menu-panel__foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 13px;
    border-top: 1px solid #edf1f4;
    color: #93a1ad;
    font-size: 10px;
  }
  .mobile-menu-panel__foot > span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #59b8c6;
  }

  .mobile-bottom-nav {
    position: fixed;
    z-index: 900;
    right: 0;
    bottom: 0;
    left: 0;
    min-height: 66px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
    padding: 6px 5px calc(5px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(214,224,220,.96);
    background: rgba(255,255,255,.965);
    box-shadow: 0 -8px 24px rgba(22,65,50,.055);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
  .mobile-bottom-nav > a {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 3px 1px;
    border-radius: 10px;
    color: #53677a;
    font-size: 9.5px;
    line-height: 1.25;
    font-weight: 650;
    text-align: center;
    transition: color .18s ease, background .18s ease, transform .18s ease;
  }
  .mobile-bottom-nav > a:active,
  .mobile-bottom-nav > a[aria-current="page"] {
    color: var(--pv-blue);
    background: #eef6fc;
  }
  .mobile-bottom-nav > a:active { transform: scale(.96); }
  .mobile-bottom-nav__icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
  }
  .mobile-bottom-nav__icon svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.9;
  }

  .site-footer { margin-bottom: 4px; }
}

@media (max-width: 600px) {
  .site-header .container,
  .site-footer .container {
    width: min(calc(100% - 28px), 1240px);
  }
  .footer-inner {
    min-height: 105px;
    padding: 22px 0 24px;
    gap: 12px;
  }
  .footer-logo-link,
  .footer-logo {
    width: 76px;
    min-width: 76px;
    max-width: 76px;
  }
  .footer-copy {
    font-size: 12.5px;
    line-height: 1.8;
  }
}

@media (max-width: 390px) {
  .mobile-menu-panel { width: min(360px, 92vw); }
  .mobile-bottom-nav > a { font-size: 8.5px; }
  .mobile-bottom-nav__icon svg { width: 21px; height: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  .skip-link,
  .desktop-primary-menu a,
  .desktop-site-search input,
  .desktop-site-search button,
  .mobile-menu-panel,
  .mobile-menu-backdrop-v10,
  .mobile-bottom-nav > a {
    transition-duration: .01ms !important;
  }
}
