/*=========================================================
  RESPONSIVE — desktop-first
  Breakpoints: 1600 / 1440 / 1366 / 1280 / 1200 / 1024 / 992
               768 / 576 / 480 / 390 / 375 / 360 / 320
=========================================================*/

/* 1600px and down — tighten container a touch */
@media (max-width: 1600px) {
  :root {
    --nk-container: 1140px;
  }
}

/* 1366px and down */
@media (max-width: 1366px) {
  :root {
    --nk-fs-h1: 3.1rem;
    --nk-fs-h2: 2.2rem;
  }
}

/* 1200px and down — collapse four-column rows to three */
@media (max-width: 1200px) {
  .nkPressRow {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 1024px and down — nav starts collapsing, editorial stacks */
@media (max-width: 1024px) {
  .nkNavLinks {
    gap: var(--nk-space-md);
  }

  .nkHeroGrid,
  .nkHoroscopeSpotlight,
  .nkStatEditorial,
  .nkAppSection,
  .nkEditorial,
  .nkWhyGrid {
    grid-template-columns: 1fr;
  }

  .nkHeroGrid .nkOrbit {
    order: -1;
    max-width: 320px;
  }

  .nkEditorial .nkGraphicPanel {
    order: -1;
    max-width: 320px;
    margin-inline: auto;
  }

  .nkStatTrio {
    grid-template-columns: repeat(3, 1fr);
  }

  .nkFooterGrid {
    grid-template-columns: 1fr 1fr;
  }
}

/* 992px and down */
@media (max-width: 992px) {
  .nkWaysGrid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nkStepsRow {
    grid-template-columns: repeat(2, 1fr);
    row-gap: var(--nk-space-xl);
  }

  .nkReadRow {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 768px and down — mobile navigation */
@media (max-width: 768px) {
  .nkNavToggle {
    display: flex;
  }

  .nkNav {
    position: relative;
  }

  .nkNavLinks {
    position: fixed;
    inset: 68px var(--nk-space-lg) auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--nk-surface);
    border: 1px solid var(--nk-border);
    border-radius: var(--nk-radius-md);
    padding: var(--nk-space-sm);
    box-shadow: var(--nk-shadow-lg);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--nk-transition-base), opacity var(--nk-transition-base);
    z-index: 99999;
  }

  .nkNavLinks.isOpen {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nkNavLinks li {
    width: 100%;
  }

  .nkNavLinks a {
    display: block;
    padding: 0.75rem var(--nk-space-sm);
    width: 100%;
  }

  .nkHeaderActions .nkBtnGhost {
    display: none;
  }

  /* Auth items inside the mobile nav drawer */
  .nkNavMobileAuth {
    display: list-item;
    width: 100%;
    border-top: 1px solid var(--nk-border);
    margin-top: 4px;
    padding-top: 4px;
  }

  /* Remove repeated divider — only show it on the first auth item */
  .nkNavMobileAuth + .nkNavMobileAuth {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
  }

  :root {
    --nk-fs-h1: 2.5rem;
    --nk-fs-h2: 1.9rem;
    --nk-space-2xl: 3.5rem;
    --nk-space-3xl: 4.5rem;
  }

  .nkPressRow,
  .nkWaysGrid,
  .nkReadRow,
  .nkStatTrio,
  .nkFooterGrid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nkAstrologerSection .nkSectionHead h2,
  .nkTestimonialSection .nkSectionHeadCenter h2 {
    font-size: 1.8rem;
  }

  .nkAstroCard {
    width: 230px;
  }

  .nkTestimonialCard {
    width: 280px;
    padding: 20px;
  }

  .nkFooterGrid {
    grid-template-columns: 1fr;
    gap: var(--nk-space-lg);
  }
}

/* 576px and down */
@media (max-width: 576px) {
  .nkPressRow,
  .nkWaysGrid,
  .nkReadRow,
  .nkStatTrio,
  .nkStepsRow {
    grid-template-columns: 1fr;
  }

  .nkStatVal {
    font-size: 2.5rem;
  }

  .nkHeroActions,
  .nkSignActions {
    flex-direction: column;
    align-items: stretch;
  }

  .nkHeroActions .nkBtn,
  .nkSignActions .nkBtn {
    width: 100%;
  }

  .nkTrustRow {
    justify-content: center;
    text-align: center;
  }

  .nkConsultItem {
    grid-template-columns: 1fr;
  }

  .nkProfileCard {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .nkProfileMeta {
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* 480px and down */
@media (max-width: 480px) {
  .nkContainer,
  .nkContainerNarrow {
    padding-inline: var(--nk-space-md);
  }

  :root {
    --nk-fs-h1: 2.1rem;
    --nk-fs-h2: 1.65rem;
    --nk-space-2xl: 2.75rem;
  }

  .nkAppSection,
  .nkConclusion,
  .nkHoroscopeSpotlight {
    padding: var(--nk-space-lg);
  }

  .nkFooterBottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* 390 / 375 / 360 / 320 — fine tuning for small phones */
@media (max-width: 390px) {
  .nkHeroLead {
    max-width: 100%;
  }

  .nkOrbit,
  .nkZodiacDial,
  .nkGraphicPanel {
    max-width: 240px;
  }

  .nkLogo {
    font-size: 1.2rem;
  }
}

@media (max-width: 320px) {
  :root {
    --nk-fs-h1: 1.85rem;
    --nk-fs-h2: 1.45rem;
  }

  .nkBtn {
    padding: 0.75rem 1.2rem;
    font-size: 0.88rem;
  }
}
