/* ========================================
   ASTER HOLIDAYS - Mobile Native App UI
   Makes all pages feel like a native app
   ======================================== */

/* Base: Smooth scroll & safe areas */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overscroll-behavior-y: none;
}

/* ========== MOBILE ONLY (max 768px) ========== */
@media (max-width: 768px) {

    /* Safe area padding for notched phones */
    body {
        padding-bottom: env(safe-area-inset-bottom, 0);
    }

    /* ---- HEADER / NAV ---- */
    header,
    nav {
        height: 60px !important;
    }

    header .max-w-7xl,
    nav .max-w-7xl {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    header img,
    nav img {
        height: 32px !important;
    }

    /* Hide desktop nav items on mobile */
    header .hidden.md\:flex,
    nav .hidden.md\:flex {
        display: none !important;
    }

    /* ---- MOBILE HAMBURGER ---- */
    .mobile-menu-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 12px;
        background: rgba(26, 67, 20, 0.08);
        border: none;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    /* ---- MOBILE DRAWER ---- */
    .mobile-drawer {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 360px;
        height: 100vh;
        height: 100dvh;
        background: #fff;
        z-index: 9999;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
        display: flex;
        flex-direction: column;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-drawer.open {
        right: 0;
    }

    .mobile-drawer-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9998;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .mobile-drawer-overlay.open {
        opacity: 1;
        visibility: visible;
    }

    .mobile-drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 20px;
        border-bottom: 1px solid rgba(26, 67, 20, 0.08);
    }

    .mobile-drawer-close {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        background: rgba(26, 67, 20, 0.06);
        display: flex;
        align-items: center;
        justify-content: center;
        border: none;
        cursor: pointer;
    }

    .mobile-drawer-links {
        padding: 12px 0;
        flex: 1;
    }

    .mobile-drawer-links a {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 16px 24px;
        font-size: 15px;
        font-weight: 600;
        color: #1e293b;
        text-decoration: none;
        transition: background 0.2s;
    }

    .mobile-drawer-links a:active {
        background: rgba(26, 67, 20, 0.06);
    }

    .mobile-drawer-links a .material-symbols-outlined {
        font-size: 22px;
        color: #1a4314;
    }

    .mobile-drawer-cta {
        padding: 20px;
        border-top: 1px solid rgba(26, 67, 20, 0.08);
    }

    .mobile-drawer-cta a {
        display: block;
        width: 100%;
        padding: 16px;
        background: #1a4314;
        color: #fff;
        text-align: center;
        border-radius: 14px;
        font-weight: 700;
        font-size: 15px;
        text-decoration: none;
        box-shadow: 0 4px 14px rgba(26, 67, 20, 0.3);
    }

    /* ---- HERO ---- */
    section:first-of-type,
    .hero-section {
        min-height: 75vh !important;
        height: auto !important;
    }

    /* Hero text */
    h1,
    .text-5xl,
    .text-7xl,
    .md\:text-7xl {
        font-size: 2rem !important;
        line-height: 1.15 !important;
    }

    h2:not(.text-xl):not(.text-2xl),
    .text-4xl,
    .md\:text-5xl,
    .md\:text-6xl {
        font-size: 1.625rem !important;
        line-height: 1.2 !important;
    }

    .text-3xl {
        font-size: 1.375rem !important;
    }

    /* Body text mobile */
    .text-lg,
    .md\:text-xl {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }

    /* ---- SECTIONS ---- */
    section {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    .py-24 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    .px-6,
    .lg\:px-10 {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .max-w-7xl {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    /* ---- CARDS & GRIDS ---- */
    .grid {
        gap: 16px !important;
    }

    .grid.md\:grid-cols-2,
    .grid.md\:grid-cols-3,
    .grid.md\:grid-cols-4,
    .grid.lg\:grid-cols-3,
    .grid.lg\:grid-cols-4 {
        grid-template-columns: 1fr !important;
    }

    .rounded-xl,
    .rounded-2xl,
    .rounded-3xl {
        border-radius: 16px !important;
    }

    /* Cards padding */
    .p-8 {
        padding: 20px !important;
    }

    .p-10,
    .p-12,
    .lg\:p-12 {
        padding: 20px !important;
    }

    /* ---- BUTTONS ---- */
    button,
    a[class*="bg-primary"],
    a[class*="bg-white"],
    a[class*="border-2"] {
        min-height: 48px;
        border-radius: 14px !important;
        font-size: 14px !important;
    }

    .px-8,
    .px-10,
    .px-12 {
        padding-left: 24px !important;
        padding-right: 24px !important;
    }

    .py-4,
    .py-5 {
        padding-top: 14px !important;
        padding-bottom: 14px !important;
    }

    /* ---- FORMS ---- */
    input,
    select,
    textarea {
        font-size: 16px !important;
        min-height: 48px;
        border-radius: 12px !important;
    }

    /* Form sections side by side */
    .sm\:grid-cols-2 {
        grid-template-columns: 1fr !important;
    }

    /* ---- BENTO GRID ---- */
    .bento-grid {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto !important;
    }

    .bento-grid>div {
        min-height: 200px;
    }

    .bento-grid .col-span-1.md\:col-span-2,
    .bento-grid .col-span-1.md\:col-span-2.row-span-1 {
        grid-column: span 1 !important;
    }

    /* ---- IMAGE GRIDS ---- */
    .grid.grid-cols-1.md\:grid-cols-12 {
        grid-template-columns: 1fr !important;
        height: auto !important;
    }

    .grid.grid-cols-1.md\:grid-cols-12>div {
        min-height: 220px;
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }

    /* Columns layout (gallery) */
    .columns-1.md\:columns-2,
    .columns-1.lg\:columns-3 {
        columns: 1 !important;
    }

    /* ---- INQUIRY FORM SECTION ---- */
    .flex.flex-col.md\:flex-row {
        flex-direction: column !important;
    }

    .md\:w-2\/5,
    .md\:w-3\/5 {
        width: 100% !important;
    }

    /* ---- FOOTER ---- */
    footer {
        padding: 2.5rem 16px !important;
    }

    footer .flex.flex-col.md\:flex-row,
    footer .flex.md\:flex-row {
        flex-direction: column !important;
        align-items: center;
        text-align: center;
        gap: 20px !important;
    }

    footer .flex.gap-8 {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px !important;
    }

    /* ---- STICKY BOTTOM CTA BAR ---- */
    .mobile-bottom-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 9990;
        background: #fff;
        border-top: 1px solid rgba(26, 67, 20, 0.1);
        padding: 10px 12px;
        padding-bottom: max(10px, env(safe-area-inset-bottom));
        display: flex;
        align-items: center;
        gap: 8px;
        box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.1);
    }

    .mobile-bottom-bar a {
        height: 48px;
        border-radius: 12px;
        font-weight: 700;
        font-size: 13px;
        text-decoration: none;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        white-space: nowrap;
        transition: transform 0.2s;
    }

    .mobile-bottom-bar a:active {
        transform: scale(0.96);
    }

    .mobile-bottom-bar .btn-primary {
        flex: 1.5;
        background: #1a4314;
        color: #fff;
        box-shadow: 0 4px 12px rgba(26, 67, 20, 0.25);
    }

    .mobile-bottom-bar .btn-secondary {
        flex: 1;
        background: rgba(26, 67, 20, 0.06);
        color: #1a4314;
        padding-left: 4px;
        padding-right: 4px;
    }

    /* Add bottom padding to body for sticky bar */
    body {
        padding-bottom: 80px !important;
    }

    /* ---- HIDE ELEMENTS ON MOBILE ---- */
    .size-10.rounded-full.bg-primary\/10 {
        display: none !important;
    }

    /* Hide the bounce arrow */
    .animate-bounce {
        display: none !important;
    }

    /* ---- SCROLL SNAP (App-like sections) ---- */
    .h-\[800px\] {
        height: auto !important;
    }

    /* ---- ASPECT RATIOS ---- */
    .aspect-\[4\/5\] {
        aspect-ratio: 3/4 !important;
    }

    /* Map section */
    .h-\[450px\] {
        height: 280px !important;
    }

    /* ---- SMOOTH ANIMATIONS ---- */
    /* Image hover effects - disable on mobile for performance */
    .group:hover img {
        transform: none !important;
    }

    /* ---- TESTIMONIALS ---- */
    .grid.md\:grid-cols-3 {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        display: flex !important;
        gap: 16px;
        padding-bottom: 8px;
    }

    .grid.md\:grid-cols-3::-webkit-scrollbar {
        display: none;
    }

    .grid.md\:grid-cols-3>div {
        min-width: 85vw;
        scroll-snap-align: center;
        flex-shrink: 0;
    }

    /* ---- HEADINGS SPACING ---- */
    .mb-16 {
        margin-bottom: 2rem !important;
    }

    .mb-8 {
        margin-bottom: 1.25rem !important;
    }

    .gap-16 {
        gap: 2rem !important;
    }

    .gap-12 {
        gap: 1.5rem !important;
    }

    /* ---- CTA SECTION ---- */
    .min-h-\[500px\] {
        min-height: 380px !important;
        padding: 2rem 1rem !important;
    }

    .text-5xl.md\:text-7xl {
        font-size: 1.75rem !important;
    }

    /* ---- FLEX DIRECTION ---- */
    .flex-col.sm\:flex-row {
        flex-direction: column !important;
    }

    .flex.flex-wrap.gap-4 {
        flex-direction: column !important;
    }

    /* Hero buttons stack */
    .flex.flex-col.sm\:flex-row {
        width: 100%;
    }

    .flex.flex-col.sm\:flex-row>* {
        width: 100%;
        text-align: center;
    }

    /* Stats row */
    .flex.gap-10 {
        gap: 1.5rem !important;
    }
}

/* ========== SMALL PHONES (max 380px) ========== */
@media (max-width: 380px) {

    h1,
    .text-5xl {
        font-size: 1.625rem !important;
    }

    h2,
    .text-4xl {
        font-size: 1.375rem !important;
    }

    .mobile-bottom-bar a {
        font-size: 13px !important;
        padding: 12px 6px;
    }
}