/*
 * Igbaras Tourism Portal — Responsive Stylesheet
 * Mobile-first breakpoints layered on top of style.css
 */

/* ── TABLET (≤1024px) ─────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .about-grid { grid-template-columns: 1fr; gap: var(--space-10); }
    .itinerary-builder { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
    .footer-brand { grid-column: 1 / -1; }
    .dest-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

/* Items that only appear inside the mobile menu */
.nav-mobile-only { display: none; }

/* ── MOBILE NAV (≤900px) ──────────────────────────────────────────────────── */
@media (max-width: 900px) {
    /* backdrop-filter makes the navbar the containing block for position:fixed
       children, which pinned the auth panel over the logo/hamburger.
       Turn it off on mobile so fixed = relative to the screen. */
    .navbar { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--green-deep); }

    .nav-links {
        position: fixed;
        top: var(--nav-height); left: 0; right: 0;
        background: var(--green-deep);
        flex-direction: column;
        align-items: stretch;
        padding: var(--space-4);
        padding-bottom: 160px; /* room for the fixed auth panel at the bottom */
        gap: var(--space-1);
        max-height: calc(100vh - var(--nav-height));
        overflow-y: auto;
        transform: translateY(-150%);
        opacity: 0;
        transition: var(--transition-slow);
        box-shadow: var(--shadow-lg);
    }
    .nav-links.open { transform: translateY(0); opacity: 1; }
    .nav-link { padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); }
    .nav-auth { display: none; }
    .nav-auth.mobile-show {
        display: flex;
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0; right: 0;
        background: var(--green-deep);
        padding: var(--space-4);
        border-top: 1px solid rgba(255,255,255,.12);
        box-shadow: 0 -4px 12px rgba(0,0,0,.2);
        flex-direction: column;
        gap: var(--space-3);
        z-index: 999;
    }
    /* user dropdown opens upward since the panel now sits at the bottom */
    .nav-auth.mobile-show .dropdown-menu,
    .nav-auth.mobile-show .user-dropdown,
    .nav-auth.mobile-show .nav-dropdown {
        top: auto;
        bottom: calc(100% + 8px);
    }
    .hamburger { display: flex; }
    .nav-mobile-only { display: block; }
}

/* ── TABLET/MOBILE (≤768px) ───────────────────────────────────────────────── */
@media (max-width: 768px) {
    :root { --nav-height: 64px; }

    .container { padding: 0 var(--space-4); }

    .hero-content { padding-top: calc(var(--nav-height) + var(--space-10)); }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; justify-content: center; }
    .hero-stats { gap: var(--space-6); }
    .hero-stat-num { font-size: 1.7rem; }

    .section-header { margin-bottom: var(--space-8); }
    .destinations-section, .features-section, .about-content {
        /* vertical only, so a .container on the same element keeps its side padding */
        padding-top: var(--space-12);
        padding-bottom: var(--space-12);
    }

    .dest-grid { grid-template-columns: 1fr; gap: var(--space-5); }
    .features-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-group { min-width: 100%; }

    .form-row { grid-template-columns: 1fr; gap: 0; }

    .footer-grid { grid-template-columns: 1fr; gap: var(--space-8); padding: 0 var(--space-4); }
    .footer-bottom-inner { flex-direction: column; text-align: center; padding: 0 var(--space-4); }

    .auth-card-body, .auth-card-header { padding-left: var(--space-5); padding-right: var(--space-5); }

    .faq-panel { width: calc(100vw - 32px); right: -8px; }

    .page-hero { padding: calc(var(--nav-height) + var(--space-8)) 0 calc(var(--space-12) + 40px); }

    /* Destination detail page: stack columns on mobile (overrides inline styles) */
    .dest-detail-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
    .dest-detail-sidebar { position: static !important; }
    .tour-options-grid { grid-template-columns: 1fr !important; }

    .booking-steps { gap: var(--space-1); }
    .step-label { display: none; }
    .booking-step { min-width: auto; flex: 0 0 auto; }

    .data-table { font-size: .78rem; }
    .data-table th, .data-table td { padding: var(--space-2) var(--space-3); }

    .map-container { height: 400px; }
}

/* ── SMALL MOBILE (≤480px) ────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .hero-title { font-size: 2.1rem; }
    .hero-subtitle { font-size: .9rem; }
    .section-title { font-size: 1.6rem; }
    .logo-sub { display: none; }
    .dest-card-img { height: 180px; }
    .auth-card { border-radius: var(--radius-lg); }
    .faq-toggle { width: 52px; height: 52px; font-size: 1.3rem; }
}

/* ── DESKTOP-ONLY UTILITY (hide hamburger) ────────────────────────────────── */
@media (min-width: 901px) {
    .hamburger { display: none !important; }
    .nav-links { transform: none !important; opacity: 1 !important; position: static; flex-direction: row; padding: 0; background: none; box-shadow: none; max-height: none; overflow: visible; }
    .nav-auth { display: flex !important; }
}