/* NÉP Select 1.8.2 — Mobile centered masthead + full-height editorial hero.
   Loaded after the previous layout styles; scoped to mobile/tablet only. */

/* The logo is in a true center track, regardless of how many tools appear at right.
   Existing drawer, search, and cart controls keep their original functionality. */
@media (max-width: 960px) {
  .site-header .header-inner {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
    align-items: center !important;
    column-gap: 0 !important;
    position: relative;
  }
  .site-header .mobile-menu-toggle {
    grid-row: 1;
    grid-column: 1;
    justify-self: start;
    align-self: center;
  }
  .site-header .brand {
    grid-row: 1;
    grid-column: 2;
    justify-self: center;
    align-self: center;
    display: inline-flex;
    align-items: baseline;
    min-width: 0;
    max-width: min(180px, 34vw);
    overflow: visible;
    position: relative;
    z-index: 1;
    white-space: nowrap;
    margin: 0;
  }
  .site-header .brand--logo { align-items: center; }
  .site-header .brand .custom-logo-link { display: flex; align-items: center; }
  .site-header .brand .custom-logo {
    display: block;
    width: auto;
    max-height: 44px;
    max-width: min(180px, 34vw);
    height: auto;
  }
  .site-header .header-actions {
    grid-row: 1;
    grid-column: 3;
    align-self: center;
    justify-self: end;
    justify-content: flex-end;
    margin: 0;
    min-width: 0;
    z-index: 1;
  }
}
@media (max-width: 700px) {
  .site-header .header-inner { min-height: 64px; }
  .site-header .brand { gap: 6px; }
  .site-header .brand__main { font-size: clamp(24px, 6.6vw, 28px); }
  .site-header .brand__sub { font-size: 7px; }
  .site-header .header-actions { gap: 0; }
  .site-header .header-actions .icon-button { min-width: 32px; width: 34px; }
}
/* At very narrow widths, avoid overlap rather than shrinking tap targets. */
@media (max-width: 360px) {
  .site-header .header-account { display: none !important; }
  .site-header .brand { max-width: 39vw; }
  .site-header .brand__main { font-size: 24px; }
  .site-header .brand__sub { font-size: 6.5px; }
}

/* Mobile: exactly one dynamic viewport of hero, including the campaign image.
   Full-bleed photo with restrained overlay improves readability and avoids a
   very tall stacked photo-plus-text section on smaller phones. */
@media (max-width: 767px) {
  .home-v12 .hero-simple {
    position: relative;
    width: 100%;
    height: 100vh; /* legacy browsers */
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    isolation: isolate;
    background: #28312e;
  }
  .home-v12 .hero-simple__grid {
    display: block;
    position: relative;
    width: 100%;
    max-width: none;
    height: 100%;
    min-height: 0;
    padding: 0 !important;
    margin: 0;
  }
  .home-v12 .hero-simple__media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    background: #525b56;
  }
  .home-v12 .hero-simple__media::after {
    content: '';
    position: absolute;
    z-index: 1;
    pointer-events: none;
    inset: 0;
    background: linear-gradient(180deg,
      rgba(15, 20, 17, .08) 0%,
      rgba(15, 20, 17, .02) 27%,
      rgba(15, 20, 17, .22) 51%,
      rgba(15, 20, 17, .74) 100%);
  }
  .home-v12 .hero-simple__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 34%;
  }
  .home-v12 .hero-simple__copy {
    position: absolute;
    z-index: 2;
    /* Account for the announcement + sticky mobile header so the CTA is
       visible in the first viewport even while the hero itself is 100dvh. */
    bottom: 96px;
    left: 0;
    right: 0;
    max-width: 600px;
    height: auto;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    margin: 0;
    padding: 25px 23px max(34px, env(safe-area-inset-bottom));
    color: #fff;
    overflow-y: auto;
    scrollbar-width: none;
  }
  body.admin-bar .home-v12 .hero-simple__copy { bottom: 142px; }
  .home-v12 .hero-simple__copy::-webkit-scrollbar { display: none; }
  .home-v12 .hero-simple__copy .overline {
    color: rgba(255, 255, 255, .88);
    font-size: 10px;
    letter-spacing: .12em;
    margin-bottom: 12px;
  }
  .home-v12 .hero-simple h1 {
    color: #fff;
    font-size: clamp(40px, 10vw, 59px);
    line-height: 1.11;
    margin: 0 0 14px;
    max-width: 550px;
    letter-spacing: -.06em;
    text-wrap: balance;
  }
  .home-v12 .hero-simple__lead {
    color: rgba(255, 255, 255, .94);
    font-size: 13px;
    line-height: 1.65;
    margin: 0 0 23px;
    max-width: 39ch;
  }
  .home-v12 .hero-simple__copy .button-dark {
    background: #fff;
    border-color: #fff;
    color: #202923;
    min-height: 47px;
    padding-inline: 19px;
    border-radius: 3px;
  }
  .home-v12 .hero-simple__copy .button-dark:hover,
  .home-v12 .hero-simple__copy .button-dark:focus-visible {
    background: #e9eee8;
    border-color: #e9eee8;
    color: #202923;
  }
  .home-v12 .hero-simple__fineprint { display: none; }
  .home-v12 .photo-credit {
    top: 12px;
    right: 12px;
    bottom: auto;
    z-index: 2;
    font-size: 9px;
    border-radius: 2px;
    padding: 5px 7px;
  }
  /* When sample CDN is blocked, retain a readable title instead of an empty hero. */
  .home-v12 .hero-simple__media .image-unavailable { z-index: 0; }
}
@media (max-width: 767px) and (max-height: 650px) {
  .home-v12 .hero-simple__copy { padding-bottom: max(21px, env(safe-area-inset-bottom)); }
  .home-v12 .hero-simple h1 { font-size: clamp(34px, 8vw, 45px); margin-bottom: 9px; }
  .home-v12 .hero-simple__lead { font-size: 12px; line-height: 1.5; margin-bottom: 14px; }
  .home-v12 .hero-simple__copy .overline { margin-bottom: 8px; }
  .home-v12 .hero-simple__copy .button-dark { min-height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  .home-v12 .hero-simple__media img { transition: none !important; animation: none !important; }
}
