/* ============================================================
   RESPONSIVE STYLES — Medley Toastmasters
   Breakpoints: 1024px (tablet landscape), 768px (tablet), 480px (mobile)
   ============================================================ */

/* ---- Tablet Landscape ---- */
@media (max-width: 1100px) {
    .nav-menu > li > a { padding: .5rem .55rem; font-size: .82rem; }
    .excom-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

/* ---- Tablet Portrait ---- */
@media (max-width: 1024px) {
    .header-cta { display: none; }

    .hamburger { display: flex; }

    /* Mobile drawer */
    .primary-nav {
        position: fixed;
        top: 0;
        right: -320px;
        width: 300px;
        height: 100vh;
        background: var(--color-navy);
        z-index: 999;
        overflow-y: auto;
        padding: 5rem 0 2rem;
        transition: right .35s cubic-bezier(.4,0,.2,1);
        justify-content: flex-start;
        box-shadow: -4px 0 20px rgba(0,0,0,.4);
    }

    .primary-nav.open { right: 0; }

    .nav-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
    }

    .nav-menu > li > a {
        padding: .85rem 1.5rem;
        border-radius: 0;
        border-bottom: 1px solid rgba(255,255,255,.06);
        font-size: .95rem;
    }

    .nav-menu .arrow { margin-left: auto; }

    .nav-menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-top: none;
        border-radius: 0;
        background: rgba(0,0,0,.2);
        display: none;
        padding: 0;
    }

    .nav-menu > li.open > .sub-menu { display: block; }

    .sub-menu li a {
        padding: .65rem 2.5rem;
        border-bottom: 1px solid rgba(255,255,255,.04);
    }

    /* Hero adjustments */
    .hero-section { min-height: 75vh; }
    .hero-content { max-width: 100%; }

    /* Stats */
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,.12); }
    .stat-item:nth-child(odd) { border-right: 1px solid rgba(255,255,255,.12); }
    .stat-item:last-child, .stat-item:nth-last-child(2):nth-child(odd) { border-bottom: none; }

    /* Stories */
    .grid-3 { grid-template-columns: repeat(2, 1fr); }

    /* ExCom */
    .excom-grid { grid-template-columns: repeat(3, 1fr); }

    /* Resources */
    .resources-layout { grid-template-columns: 1fr; gap: 2rem; }

    /* Presidents Note */
    .note-layout { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
    .note-excerpt { text-align: left; }

    /* About */
    .about-intro { grid-template-columns: 1fr; }
    .about-intro-img { height: 280px; }

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

    /* Leaders hub */
    .leaders-hub-grid { grid-template-columns: 1fr 1fr; }

    /* Meetings */
    .meetings-grid { grid-template-columns: repeat(2, 1fr); }

    /* Mission/Vision */
    .mission-vision-grid { grid-template-columns: 1fr; }
}

/* ---- Mobile ---- */
@media (max-width: 768px) {
    /* Header */
    .header-inner { height: 60px; }

    /* Typography scale */
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }

    /* Section padding */
    .section-padding    { padding: 50px 0; }
    .section-padding-sm { padding: 30px 0; }

    /* Hero */
    .hero-section { min-height: 85vh; }
    .hero-actions { flex-direction: column; align-items: flex-start; }
    .hero-actions .btn { width: 100%; max-width: 280px; }

    /* Stories */
    .grid-3 { grid-template-columns: 1fr; }

    /* ExCom */
    .excom-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .footer-bottom-inner { flex-direction: column; text-align: center; }

    /* Popup */
    .popup-box { max-width: 100%; margin: 0 .5rem; }
    .popup-header, .popup-body { padding: 1.25rem; }

    /* Leaders */
    .leaders-hub-grid { grid-template-columns: 1fr; }

    /* Meetings */
    .meetings-grid { grid-template-columns: 1fr; }

    /* Grid overrides */
    .grid-2 { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }

    /* Page banner */
    .page-banner { height: 200px; }
    .page-banner h1 { font-size: 1.5rem; }

    /* Note archive */
    .note-archive-card { flex-direction: column; }
    .note-archive-card img { margin: 1.5rem auto .5rem; }
    .note-archive-body { padding: 0 1.5rem 1.5rem; }

    /* Contact */
    .contact-info-block { padding: 1.5rem; }
}

/* ---- Small Mobile ---- */
@media (max-width: 480px) {
    .container { padding: 0 1rem; }

    .excom-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
    .member-card img { height: 180px; }

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

    .newsletter-grid { grid-template-columns: 1fr; }

    .hero-title { font-size: 1.75rem; }
    .hero-subtitle { font-size: .95rem; }

    .grid-4 { grid-template-columns: 1fr; }
}

/* ---- Print ---- */
@media print {
    .site-header, .site-footer, .popup-overlay, .hamburger { display: none !important; }
    body { color: #000; background: #fff; }
    a { text-decoration: underline; }
}
