/* ==========================================================================
   SNPN - Mobile & tablet refinements (loaded after each page's own styles)
   ========================================================================== */
img { max-width: 100%; height: auto; }
.nav-toggle { display: none; }

/* ---------- Header: compact bar + hamburger menu (tablet & phone) ---------- */
@media (max-width: 900px) {
    body .main-header .header-top-tier { height: auto; padding: 0; border-bottom: 0; }
    body .main-header .header-top-tier .tier-inner {
        flex-direction: row; flex-wrap: wrap; align-items: center;
        justify-content: space-between; gap: 0; text-align: left; padding: 8px 16px;
    }
    body .main-header .site-logo { height: 46px; }
    body .main-header .nav-toggle {
        display: inline-flex; align-items: center; justify-content: center;
        width: 44px; height: 44px; border: 1px solid #cbd5e1; border-radius: 8px;
        background: #fff; color: var(--primary-blue, #0A2F5D); font-size: 20px; cursor: pointer;
    }
    body .main-header .search-block { display: none; order: 3; flex: 0 0 100%; padding: 10px 0 4px; }
    body .main-header .search-box-wrapper { width: 100%; }
    body .main-header #site-search-input,
    body .main-header #site-search-input:focus { width: 100%; font-size: 16px; }
    body .main-header .search-dropdown-menu { width: 100%; left: 0; right: auto; }

    body .main-header .header-bottom-tier {
        display: none; height: auto; padding: 0;
        border-top: 1px solid #e2e8f0; border-bottom: 3px solid var(--primary-blue, #0A2F5D);
    }
    body .main-header.nav-open .search-block,
    body .main-header.nav-open .header-bottom-tier { display: block; }
    body .main-header.nav-open { max-height: 100vh; overflow-y: auto; }
    body .main-header .header-bottom-tier .tier-inner { padding: 0; }
    body .main-header .main-nav-menu { flex-direction: column; align-items: stretch; gap: 0; flex-wrap: nowrap; }
    body .main-header .main-nav-menu .nav-item {
        height: 48px; padding: 0 20px; justify-content: flex-start; font-size: 15px;
        border-bottom: 1px solid #e2e8f0;
    }
    body .main-header .main-nav-menu .nav-item.active-page { box-shadow: inset 4px 0 0 var(--primary-blue, #0A2F5D); }
    body .main-header .main-nav-menu .nav-item.contact-cta {
        margin: 12px 16px; border: 0; border-radius: 8px; justify-content: center; height: 46px;
    }
}

/* ---------- Page layout on tablets & phones ---------- */
@media (max-width: 768px) {
    body { overflow-x: clip; }
    .hero-splitscreen { flex-direction: column; min-height: 0; }
    .hero-content { padding: 28px 20px; }
    .hero-welcome-container { max-width: 100%; }
    .hero-title { font-size: 30px; }
    .hero-map-img { max-height: 380px; width: auto; margin: 0 auto; display: block; }
    .overlaid-cards-section { padding: 0 16px; }
    .overlaid-cards-container { flex-direction: column; gap: 22px; }
    .footer-container { flex-direction: column; gap: 24px; padding: 0 20px; }
    .footer-left, .footer-right { min-width: 0; max-width: 100%; }
    .footer-right { justify-content: flex-start; }
}

/* ---------- Phone refinements: heroes, sections, events, footer ---------- */
@media (max-width: 768px) {
    .events-hero, .awards-hero, .gallery-hero, .newsletter-hero { padding: 48px 20px; }
    .events-hero h1, .awards-hero h1, .gallery-hero h1, .newsletter-hero h1 { font-size: 30px; }
    .events-hero p, .awards-hero p, .gallery-hero p, .newsletter-hero p { font-size: 15px; }
    .events-section, .awards-section, .archive-section, .gallery-section, .subscribe-section { padding-left: 16px; padding-right: 16px; }

    .category-title-container { flex-direction: column; align-items: flex-start; gap: 6px; }
    .category-title { font-size: 22px; }
    .event-content { padding: 20px; }
    .event-meta li { align-items: flex-start; }
    .events-grid { gap: 22px; }

    .ibro-style-footer { padding: 40px 20px 28px; }
    .footer-container { padding: 0; width: 100%; }
    .footer-left, .footer-right { width: 100%; }
    .footer-contact-info { word-break: break-word; }
}

/* ---------- Registration pop-up on phones ---------- */
@media (max-width: 600px) {
    .modal-overlay { align-items: flex-start; padding: 12px; overflow-y: auto; }
    .modal-content { width: 100%; max-width: 100%; margin: 0 auto; padding: 22px 18px; border-radius: 12px; max-height: calc(100vh - 24px) !important; }
    .modal-title { font-size: 22px; padding-right: 28px; }
    .close-modal { top: 10px; right: 14px; font-size: 30px; }
    .form-group input, .form-group select, .form-group textarea { font-size: 16px; } /* stops iOS zoom on focus */
}

@media (max-width: 600px) {
    .name-fields-container { flex-wrap: wrap; }
    .name-fields-container select { flex: 0 0 100% !important; }
    .name-fields-container input { flex: 1 1 calc(50% - 6px); min-width: 0; }
}
