/* ==========================================================================
   HOPE FOUNDATION (HF) NEPAL — Responsive & Mobile-First Breakpoints
   Complete build for full mobile compatibility across all pages
   ========================================================================== */

/* ==========================================================================
   GLOBAL OVERFLOW PREVENTION
   ========================================================================== */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

img {
  max-width: 100%;
  height: auto;
}

/* ==========================================================================
   TABLET & SMALLER DESKTOPS (<= 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
  .pillars-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pillars-grid .pillar-card:last-child {
    grid-column: span 2;
  }

  .journey-steps-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .leadership-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mina-feature-card {
    grid-template-columns: 1fr;
    padding: 2rem;
    gap: 1.8rem;
  }

  .voices-subgrid {
    grid-template-columns: repeat(2, 1fr);
  }

  .voices-subgrid .voice-card:last-child {
    grid-column: span 2;
  }

  .footer-top-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }

  .footer-brand {
    grid-column: span 2;
  }

  .contact-layout-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .pillar-hero-split {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 7rem 0 3.5rem;
  }

  .pillar-intro-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .schedule-timeline-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pillar-modules-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   TABLETS & MOBILE DEVICES (<= 768px)
   ========================================================================== */
@media (max-width: 768px) {
  /* Core overflow lockdown */
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative;
  }

  .container,
  .container-narrow {
    padding-left: 1.2rem;
    padding-right: 1.2rem;
    width: 100%;
    max-width: 100%;
  }

  /* --- Navigation --- */
  .mobile-toggle-btn {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 82%;
    max-width: 340px;
    height: 100vh;
    height: 100svh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid var(--border-subtle);
    flex-direction: column;
    align-items: flex-start;
    padding: 5.5rem 1.8rem 2rem;
    gap: 1.25rem;
    z-index: 99;
    box-shadow: -10px 0 35px rgba(15, 23, 42, 0.12);
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform var(--transition-smooth), visibility var(--transition-smooth);
  }

  .nav-links.open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  .nav-link {
    font-size: 1.1rem;
    width: 100%;
    padding: 0.6rem 0;
    color: var(--text-main);
    border-bottom: 1px solid #f1f5f9;
  }

  .header-hotline-btn {
    display: none;
  }

  .brand-name-en {
    font-size: 0.82rem;
    letter-spacing: 0.08em;
  }

  .brand-name-ne {
    font-size: 0.72rem;
  }

  /* --- Fullbleed Scenes --- */
  .fullbleed-story-scene {
    min-height: 80vh;
    min-height: 80dvh;
    padding: 5rem 1.2rem 3.5rem;
    width: 100%;
    overflow: hidden;
  }

  .fullbleed-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
  }

  .fullbleed-caption {
    padding: 1.5rem 0.5rem;
    width: 100%;
    max-width: 100%;
  }

  .scene-title-large {
    font-size: clamp(1.5rem, 5vw, 2rem);
    line-height: 1.25;
  }

  .scene-title-hero {
    font-size: clamp(1.6rem, 6vw, 2.4rem);
    line-height: 1.2;
  }

  .scene-subtitle-ne,
  .scene-subtitle-nepali {
    font-size: 0.95rem;
  }

  /* --- Story slides --- */
  .story-slide {
    padding: 5.5rem 1.2rem 4rem;
    min-height: auto;
    width: 100%;
    overflow: hidden;
  }

  /* --- Hook slide --- */
  .hook-slide .main-slogan-hero {
    font-size: clamp(1.7rem, 6vw, 2.5rem);
    line-height: 1.25;
  }

  /* --- Narrative text --- */
  .narrative-title {
    font-size: clamp(1.5rem, 5.5vw, 2.2rem);
    line-height: 1.3;
  }

  .narrative-sub {
    font-size: 1rem;
    line-height: 1.7;
  }

  /* --- Pillars grid --- */
  .pillars-grid {
    grid-template-columns: 1fr;
  }

  .pillars-grid .pillar-card:last-child {
    grid-column: span 1;
  }

  .pillar-expanded-desc {
    max-height: 220px;
    opacity: 1;
  }

  /* --- Journey steps --- */
  .journey-steps-grid {
    grid-template-columns: 1fr;
  }

  .journey-steps-grid .journey-step-item:nth-child(4),
  .journey-steps-grid .journey-step-item:nth-child(5) {
    grid-column: span 1;
  }

  /* --- Metrics / counter --- */
  .metrics-counter-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .counter-card {
    padding: 1.5rem 1rem;
  }

  .counter-number {
    font-size: 2.8rem;
  }

  /* --- Voices --- */
  .voices-subgrid {
    grid-template-columns: 1fr;
  }

  .voices-subgrid .voice-card:last-child {
    grid-column: span 1;
  }

  /* --- Ask / CTA sections --- */
  .ask-content {
    padding: 2.4rem 1.2rem;
  }

  .ask-actions-cluster {
    flex-direction: column;
    width: 100%;
    align-items: stretch;
  }

  .btn-primary-action,
  .btn-whatsapp-action,
  .btn-outline-action {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  /* --- Hotline box --- */
  .hotline-highlight-box {
    padding: 1.8rem 1.2rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .hotline-display-number {
    font-size: clamp(1.4rem, 5vw, 1.8rem);
    flex-wrap: wrap;
    gap: 0.5rem;
    text-align: center;
    justify-content: center;
  }

  .hotline-btn-big {
    width: 100%;
    justify-content: center;
    padding: 0.95rem 1.5rem;
    font-size: 1rem;
  }

  /* --- Slogan ticker --- */
  .slogan-ticker-wrap {
    margin-bottom: 1.25rem;
    max-width: 100%;
    flex-wrap: wrap;
  }

  .slogan-text {
    font-size: 0.82rem;
  }

  /* --- Services page: pillar detail cards --- */
  .services-pillar-detail-card {
    gap: 0;
    padding: 0;
    margin-bottom: 2rem;
  }

  .services-pillar-detail-card > div:last-child {
    padding: 1.5rem 1.2rem 1.8rem;
  }

  .services-pillar-detail-icon {
    width: 100%;
  }

  .services-pillar-detail-icon img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center 20%;
  }

  .services-pillar-detail-title {
    font-size: 1.3rem;
  }

  .services-pillar-detail-lead {
    font-size: 0.95rem;
  }

  /* --- Inner pages: hero split & intro --- */
  .pillar-hero-split {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 6rem 0 2.5rem;
  }

  .pillar-hero-illustration {
    width: 100%;
    max-height: 260px;
    overflow: hidden;
  }

  .pillar-hero-illustration img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    object-position: center 20%;
  }

  .pillar-intro-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* --- Module grid --- */
  .pillar-modules-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .pillar-module-card {
    padding: 1.5rem 1.2rem;
  }

  /* --- Showcase cards (dark grid) --- */
  .showcase-auto-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .showcase-card {
    width: 100%;
  }

  .showcase-card img {
    width: 100%;
    height: 190px !important;
    object-fit: cover;
    object-position: center center;
  }

  /* --- Schedule & timeline --- */
  .schedule-timeline-grid {
    grid-template-columns: 1fr;
  }

  .admission-timeline-card {
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem 1.2rem;
  }

  /* --- Page hero banner --- */
  .page-hero-banner {
    padding: 6.5rem 1.2rem 3rem;
  }

  .page-title {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
    letter-spacing: -0.3px;
  }

  .page-subtitle {
    font-size: 1rem;
    line-height: 1.65;
  }

  /* --- Leadership grid --- */
  .leadership-grid {
    grid-template-columns: 1fr;
  }

  /* --- Footer --- */
  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-brand {
    grid-column: span 1;
  }

  .footer-bottom-bar {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  /* --- Sticky dock --- */
  .sticky-action-dock {
    bottom: 18px;
    right: 18px;
    gap: 10px;
  }

  .dock-btn {
    width: 52px;
    height: 52px;
  }

  .dock-tooltip {
    display: none;
  }

  /* --- Shutter intro (mobile sizing) --- */
  .shutter-brand-name {
    font-size: clamp(1rem, 5vw, 1.6rem);
    letter-spacing: 0.2em;
  }

  .shutter-slogan {
    font-size: clamp(1.1rem, 4.5vw, 1.8rem);
  }

  .shutter-logo-wrap {
    width: 80px;
    height: 80px;
  }

  .shutter-logo {
    width: 54px;
    height: 54px;
  }

  .shutter-skip-btn {
    bottom: 1.2rem;
    right: 1.2rem;
  }

  /* --- Inner sections --- */
  .inner-section,
  .inner-section-alt {
    padding: 3.5rem 0;
  }

  .section-heading {
    font-size: clamp(1.4rem, 5.5vw, 2rem);
    line-height: 1.3;
  }

  /* --- Checklist / modal --- */
  .checklist-card {
    padding: 1.8rem 1.2rem;
  }

  .modal-card {
    padding: 1.8rem 1.2rem;
  }

  /* --- Contact page --- */
  .contact-layout-grid {
    grid-template-columns: 1fr;
  }

  /* --- About page: Mina feature --- */
  .mina-feature-card {
    grid-template-columns: 1fr;
    padding: 1.8rem 1.2rem;
    gap: 1.5rem;
  }

  /* --- FAQ accordion --- */
  .faq-accordion-grid {
    gap: 1rem;
  }

  .faq-accordion-card {
    padding: 1.4rem 1.2rem;
  }
}

/* ==========================================================================
   SMALL SMARTPHONES (<= 480px)
   ========================================================================== */
@media (max-width: 480px) {
  .container,
  .container-narrow {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .brand-logo img {
    height: 40px;
    width: 40px;
  }

  .brand-name-en {
    font-size: 0.75rem;
  }

  .hook-slide .main-slogan-hero {
    font-size: 1.6rem;
  }

  .narrative-title {
    font-size: 1.45rem;
  }

  /* Counter: single column */
  .metrics-counter-grid {
    grid-template-columns: 1fr;
  }

  .page-hero-banner {
    padding: 5.5rem 1rem 2.5rem;
  }

  .page-title {
    font-size: clamp(1.55rem, 7vw, 2.2rem);
  }

  .page-subtitle {
    font-size: 0.96rem;
  }

  .pillar-hero-split {
    padding: 5rem 0 2rem;
  }

  .pillar-hero-illustration {
    max-height: 210px;
  }

  .pillar-hero-illustration img {
    height: 210px;
  }

  .services-pillar-detail-icon img {
    height: 180px;
  }

  .services-pillar-detail-card > div:last-child {
    padding: 1.2rem 1rem 1.5rem;
  }

  .pillar-module-card {
    padding: 1.2rem 1rem;
  }

  .showcase-card img {
    height: 160px !important;
  }

  .shutter-center {
    padding: 1rem;
  }

  .shutter-brand-name {
    font-size: clamp(0.9rem, 4.5vw, 1.3rem);
    letter-spacing: 0.15em;
  }

  .shutter-slogan {
    font-size: clamp(1rem, 4vw, 1.5rem);
  }

  .shutter-welcome-badge {
    font-size: 0.7rem;
    letter-spacing: 0.35em;
  }

  .fullbleed-story-scene {
    padding: 4rem 1rem 3rem;
  }

  .inner-section,
  .inner-section-alt {
    padding: 3rem 0;
  }

  .checklist-card {
    padding: 1.5rem 1rem;
  }

  .admission-timeline-card {
    padding: 1.2rem 1rem;
  }

  .modal-card {
    padding: 1.5rem 1rem;
  }
}

/* ==========================================================================
   VERY SMALL (<= 360px)
   ========================================================================== */
@media (max-width: 360px) {
  .hook-slide .main-slogan-hero {
    font-size: 1.4rem;
  }

  .narrative-title {
    font-size: 1.3rem;
  }

  .page-title {
    font-size: 1.4rem;
  }

  .shutter-brand-name {
    font-size: 0.85rem;
    letter-spacing: 0.1em;
  }

  .counter-number {
    font-size: 2.4rem;
  }
}
