/* ── MOBILE & TABLET OPTIMIZATIONS ── */

/* ── TABLET (UP TO 960PX) ── */
@media (max-width: 960px) {
  /* Layout adjustments */
  .hero-inner, .about-inner, .sub-inner, .story-inner, .why-inner, .austria-banner, .wiso-intro-grid, .bbe-intro-grid {
    grid-template-columns: 1fr !important;
    gap: 48px;
  }
  
  .hero-visual { display: block; width: 100%; margin-top: 40px; }
  .grid-3 { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .topic-grid, .future-grid { grid-template-columns: 1fr; }
  
  .exam-info { 
    grid-template-columns: 1fr; 
    gap: 20px; 
  }
  
  .cta-block { padding: 40px 20px; text-align: center; }
  .section-head { text-align: center; margin-bottom: 32px; }
  .section-head p { margin-left: auto; margin-right: auto; }
  
  .wu-card { position: static !important; padding: 24px 20px !important; width: 100% !important; box-sizing: border-box !important; margin: 0 auto; }
  .austria-banner { padding: 32px 20px !important; grid-template-columns: 1fr !important; gap: 32px; width: 100% !important; box-sizing: border-box !important; }
  
  footer .wrap { flex-direction: column; gap: 20px; text-align: center; }
  
  .hero-stats { 
    grid-template-columns: repeat(2, 1fr); 
    margin-top: 40px;
    padding-top: 30px;
  }
  .hero-stats .stat-item:nth-child(2) { border-right: none; }
  .hero-stats .stat-item { 
    border-bottom: 1px solid var(--border); 
    padding: 16px 0; 
    border-right: 1px solid var(--border);
  }
  .hero-stats .stat-item:nth-child(3), 
  .hero-stats .stat-item:nth-child(4) { border-bottom: none; }
  
  .wrap { padding: 0 20px; }
  
  /* Hero refinement */
  .hero-inner { text-align: left; }
  .hero-desc { margin: 18px 0 32px; }
  .hero-ctas { justify-content: flex-start; }
  .hero-stats { justify-content: flex-start; }
  
  /* Navigation Mobile Menu Base */
  .nav-links {
    position: fixed;
    top: 66px;
    left: 0;
    right: 0;
    background: #0A2540;
    flex-direction: column;
    padding: 20px;
    gap: 8px;
    border-bottom: 1px solid rgba(215,219,227,0.15);
    box-shadow: 0 15px 35px rgba(0,0,0,0.25);
    transform: translateY(-130%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99;
    align-items: stretch !important;
  }
  
  .nav-links.open {
    transform: translateY(0);
  }
  
  .nav-link {
    width: 100%;
    padding: 12px 16px;
    font-size: 1.28rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .exam-dropdown { width: 100%; }
  .exam-menu {
    position: static;
    box-shadow: none;
    border: none;
    background: rgba(255,255,255,.07);
    margin-top: 8px;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  
  .exam-dropdown.open .exam-menu {
    display: block;
  }
  
  /* Hide Member? and lang-switcher from top bar on mobile */
  .member-link { display: none !important; }
  .lang-switcher { display: none !important; }

  /* Lang switcher cloned inside mobile menu */
  .mobile-lang-row {
    display: flex;
    justify-content: center;
    padding-top: 16px;
    margin-top: 8px;
    border-top: 1px solid rgba(215,219,227,0.15);
  }
  .mobile-lang-row .lang-switcher { display: flex !important; margin-left: 0; }

  /* Exam dropdown items: light text on dark mobile menu */
  .exam-dropdown-item { color: rgba(215, 219, 227, 0.85) !important; }

  /* Hide decorative orbs on mobile (EPD green blob) */
  .sub-orb { display: none; }

  /* EPD why-grid: single column on mobile */
  .why-grid { grid-template-columns: 1fr !important; }

  /* Hamburger Button — pushed to far right */
  .menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
    z-index: 101;
  }
  
  .menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #D7DBE3;
    transition: 0.3s;
  }
  
  .menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .menu-toggle.active span:nth-child(2) { opacity: 0; }
  .menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
}

/* ── SMALL MOBILE (UP TO 640PX) ── */
@media (max-width: 640px) {
  .testimonials-grid { grid-template-columns: 1fr; }
  h1 { font-size: 2.3rem; }
  h2 { font-size: 1.8rem; }
  
  .hero { padding: 60px 0 48px; }
  .section { padding: 60px 0; }
  .pricing-grid { grid-template-columns: 1fr; }
  
  .hero-desc { font-size: 1.28rem; }
  .hero-ctas { flex-direction: column; width: 100%; gap: 12px; }
  .btn { width: 100%; justify-content: center; }
  
  .profile-avatar { width: 70px; height: 70px; font-size: 1.8rem; }
  .course-card, .price-card, .future-card { padding: 24px 20px; }
  
  .faq-q { padding: 16px 20px; font-size: 1.24rem; }
  .faq-a-inner { padding: 0 20px; }
  
  .cta-block { border-radius: 12px; padding: 36px 20px; }
  .section { padding: 56px 0; }
  .section-gap { --section-gap: 56px; }
  
  /* Story Timeline adjustments */
  .st-item { gap: 15px; }
  .st-body { padding-bottom: 24px; }
  
  /* Stats bar */
  .stats-row { gap: 16px 12px; justify-content: center; }
  .stat-item { min-width: 120px; flex: 1 1 40%; }
  .stat-divider { display: none; }
  .stat-num { font-size: 1.8rem; }
  
  /* Subpage (BBE/WISO/EPD) */
  .sub-hero { padding: 48px 0 40px; text-align: left; }
  .sub-inner { grid-template-columns: 1fr; }
  .sub-inner .label, .sub-inner h1, .sub-inner p { margin-left: 0; margin-right: auto; }
  .sub-pills { justify-content: flex-start; }
  .enroll-card { position: static; margin-top: 40px; padding: 28px 20px; text-align: left; }
  
  /* Facts Card Fix (BBE/WISO) */
  .bbe-facts-card, .wiso-facts-card { padding: 24px 16px !important; width: 100% !important; box-sizing: border-box !important; }
  .fact-row { flex-direction: row; justify-content: space-between; gap: 12px; }
  .fact-label { font-size: 1.19rem; flex-shrink: 0; }
  .fact-val { font-size: 1.19rem; text-align: right; max-width: 65%; }
  
  @media (max-width: 480px) {
    .fact-row { flex-direction: column; align-items: flex-start !important; gap: 4px; }
    .fact-val { text-align: left !important; max-width: 100% !important; }
  }
  
  /* Timeline Grid Fix for BBE/WISO */
  .tl-item {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 6px;
    padding-left: 28px;
    padding-bottom: 24px;
  }
  .tl-item::before { left: 6px; }
  .tl-dot { left: 0; top: 4px; width: 12px; height: 12px; }
  .tl-date { grid-column: 1; grid-row: 1; margin-bottom: 2px; }
  .tl-title { grid-column: 1; grid-row: 2; font-size: 1.28rem; }
  .tl-desc { grid-column: 1; grid-row: 3; font-size: 1.19rem; }
  
  /* Why Cred Card */
  .why-cred-card { flex-direction: column; gap: 24px; padding: 32px 24px; text-align: center; }
  .cred-text p { margin-left: auto; margin-right: auto; }
  .cred-divider { width: 40px; height: 1px; }

  /* WU Facts alignment */
  .wu-fact { font-size: 1.24rem; align-items: flex-start; }
  .wu-fact-dot { margin-top: 6px; }
  
  /* Exam Panel Tab content for mobile */
  .exam-panel.active { grid-template-columns: 1fr; gap: 24px; }
  .exam-tab-btn { flex: 1 1 auto; min-width: 140px; text-align: center; padding: 12px 16px; }
  .exam-tabs { justify-content: center; }
  
  /* Buttons tap target */
  .btn { min-height: 48px; padding: 12px 24px; }
}

/* ── EXTRA SMALL (UP TO 400PX) ── */
@media (max-width: 400px) {
  h1 { font-size: 1.9rem; }
  .nav-logo { font-size: 1.28rem; }
  .hero-stats { grid-template-columns: 1fr; }
  .hero-stats .stat-item { border-right: none; border-bottom: 1px solid var(--border); padding: 12px 0; }
  .hero-stats .stat-item:last-child { border-bottom: none; }
  .btn { padding: 12px 16px; font-size: 1.28rem; }
}

/* wu-facts-strip */
.wu-facts-strip-grid{grid-template-columns:repeat(2,1fr);gap:24px 24px;}
