/**
 * AI-AVIA — Mobile Optimization
 * ფაილი: assets/css/mobile.css
 * ავტორი: რეზი | ვერსია: 1.0
 */

/* ===== MOBILE FIXES (max-width: 768px) ===== */
@media (max-width: 768px) {

    /* — Header — */
    .site-header {
        height: 56px;
    }

    .header-inner {
        padding: 0 14px;
        gap: 10px;
    }

    .logo {
        font-size: 1.4rem;
    }

    .header-actions .btn {
        display: none !important;
    }

    .header-actions .user-badge,
    .header-actions > a:not(.mobile-toggle) {
        font-size: 0.72rem;
        padding: 5px 10px;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-toggle {
        display: flex !important;
        padding: 6px;
        margin-left: 4px;
    }

    .mobile-toggle span {
        width: 20px;
        height: 2px;
    }

    /* — Navigation menu — */
    .main-nav {
        display: none;
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        background: var(--navy, #1a1f71);
        flex-direction: column;
        padding: 10px 16px 16px;
        border-top: 1px solid rgba(255,255,255,0.08);
        box-shadow: 0 10px 30px rgba(0,0,0,0.35);
        z-index: 999;
        max-height: calc(100vh - 56px);
        overflow-y: auto;
    }

    .main-nav.open {
        display: flex;
        animation: slideDown 0.25s ease;
    }

    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-8px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .main-nav .nav-link {
        padding: 13px 16px;
        font-size: 0.92rem;
        border-radius: 10px;
        text-align: left;
        width: 100%;
    }

    .main-nav .nav-link.active {
        background: var(--yellow, #ffc800);
        color: var(--navy, #1a1f71);
    }

    .nav-dot {
        display: none;
    }

    .nav-auth-mobile {
        display: flex;
        gap: 8px;
        padding-top: 10px;
        margin-top: 6px;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    .nav-auth-mobile .btn {
        flex: 1;
        text-align: center;
        display: inline-flex !important;
        justify-content: center;
        padding: 11px 16px;
        font-size: 0.86rem;
    }

    /* — Site main — */
    .site-main {
        margin-top: 56px;
    }

    /* — Hero — */
    .hero {
        height: 320px;
    }

    .hero-content {
        padding: 0 16px;
    }

    .hero h1 {
        font-size: 1.35rem;
        line-height: 1.25;
        margin-bottom: 10px;
    }

    .hero p {
        font-size: 0.84rem;
        margin-bottom: 16px;
    }

    .hero-dots {
        gap: 6px;
    }

    .hero-dot {
        width: 8px;
        height: 8px;
    }

    .hero-dot.active {
        width: 22px;
    }

    /* — Search Box — */
    .sb {
        margin: -36px 12px 0;
        border-radius: 16px;
        box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    }

    .sb-top {
        padding: 12px 14px;
        gap: 10px;
        border-radius: 16px 16px 0 0;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .sb-trips {
        gap: 4px;
    }

    .sb-trip {
        padding: 7px 14px;
        font-size: 0.78rem;
    }

    .sb-extras {
        gap: 6px;
    }

    .sb-csel-display,
    .sb-select {
        padding: 7px 12px;
        font-size: 0.78rem;
    }

    .sb-form {
        padding: 12px 14px 16px;
    }

    .sb-row {
        grid-template-columns: 1fr !important;
        border: none !important;
        gap: 8px;
    }

    .sb-field {
        border: 1.5px solid var(--g200, #e9ecef) !important;
        border-radius: 12px !important;
        padding: 10px 12px 10px 38px !important;
        min-height: 52px !important;
    }

    .sb-field label {
        font-size: 0.62rem;
        margin-bottom: 2px;
    }

    .sb-field input {
        font-size: 0.86rem;
    }

    .sb-icon {
        left: 12px;
        font-size: 0.82rem;
    }

    .sb-swap {
        width: 34px !important;
        height: 34px !important;
        border: 1.5px solid var(--g200, #e9ecef) !important;
        border-radius: 50% !important;
        justify-self: center;
        transform: rotate(90deg);
        font-size: 0.8rem;
        margin: -4px 0;
    }

    .sb-btn {
        border-radius: 12px !important;
        padding: 14px !important;
        font-size: 0.92rem;
        margin-top: 2px;
    }

    .sb-return.hidden {
        display: none !important;
    }

    /* — Destinations — */
    .destinations {
        padding: 40px 14px;
    }

    .section-title {
        margin-bottom: 24px;
    }

    .section-title h2 {
        font-size: 1.3rem;
    }

    .section-title p {
        font-size: 0.86rem;
    }

    .dest-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .dest-card {
        height: 220px;
        border-radius: 14px;
    }

    .dest-info h3 {
        font-size: 1.1rem;
    }

    /* — Features — */
    .features {
        padding: 40px 14px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .feature-card {
        padding: 22px;
        display: flex;
        flex-direction: row;
        text-align: left;
        gap: 16px;
        align-items: center;
    }

    .feature-icon {
        margin: 0;
        width: 50px;
        height: 50px;
        min-width: 50px;
        font-size: 1.1rem;
    }

    .feature-card h3 {
        font-size: 0.92rem;
        margin-bottom: 3px;
    }

    .feature-card p {
        font-size: 0.8rem;
        line-height: 1.5;
    }

    /* — Steps — */
    .steps-section {
        padding: 40px 14px;
    }

    .steps-container .steps-header h2 {
        font-size: 1.3rem;
    }

    .steps-row {
        flex-direction: column;
        gap: 16px;
    }

    .step-arrow {
        transform: rotate(90deg);
        font-size: 0.7rem;
        color: rgba(255,255,255,0.2);
    }

    .step-item {
        display: flex;
        align-items: center;
        gap: 16px;
        text-align: left;
    }

    .step-number {
        margin: 0;
        min-width: 44px;
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

    /* — Testimonials — */
    .testimonials-section {
        padding: 40px 0;
    }

    .testimonials-container .testimonials-header h2 {
        font-size: 1.3rem;
    }

    .testimonial-card {
        min-width: 280px;
        padding: 20px;
    }

    /* — Footer — */
    .site-footer {
        margin-top: 0;
    }

    .footer-inner {
        padding: 36px 16px 16px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-brand .logo {
        font-size: 1.3rem;
    }

    .footer-desc {
        font-size: 0.82rem;
    }

    .footer-col h4 {
        font-size: 0.74rem;
        margin-bottom: 10px;
    }

    .footer-col ul li {
        margin-bottom: 7px;
    }

    .footer-col ul a {
        font-size: 0.84rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 4px;
        text-align: center;
        font-size: 0.76rem;
    }

    /* — WhatsApp float — */
    .wa-float {
        bottom: 16px;
        right: 14px;
    }

    .wa-float__btn {
        width: 52px;
        height: 52px;
    }

    .wa-float__tooltip {
        display: none;
    }

    /* — Cookie consent — */
    .cc-inner {
        margin: 0 8px 8px !important;
        padding: 16px !important;
    }

    /* — Autocomplete dropdowns — */
    .h-ap-drop,
    .sf-dropdown {
        max-height: 250px;
    }

    /* — Calendar popup — */
    .h-cal-drop {
        left: 0;
        right: 0;
        width: auto;
    }

    .h-cal-grid {
        font-size: 0.78rem;
    }
}

/* ===== SMALL PHONES (max-width: 380px) ===== */
@media (max-width: 380px) {
    .hero {
        height: 280px;
    }

    .hero h1 {
        font-size: 1.15rem;
    }

    .sb {
        margin: -30px 8px 0;
    }

    .sb-top {
        padding: 10px 12px;
    }

    .sb-form {
        padding: 10px 12px 14px;
    }

    .sb-field {
        padding: 8px 10px 8px 34px !important;
        min-height: 46px !important;
    }

    .dest-card {
        height: 190px;
    }
}

/* ===== TABLET (769px - 1024px) ===== */
@media (min-width: 769px) and (max-width: 1024px) {
    .sb-row {
        grid-template-columns: 1fr 40px 1fr;
    }

    .dest-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ===== ADMIN DASHBOARD MOBILE ===== */
@media (max-width: 768px) {
    .dash-stats {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    .dash-stat {
        padding: 18px 16px;
    }

    .dash-stat__value {
        font-size: 1.3rem;
    }

    .dash-grid {
        grid-template-columns: 1fr !important;
    }

    .dash-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .period-tabs {
        width: 100%;
    }

    .period-tab {
        flex: 1;
        text-align: center;
        padding: 7px 10px;
        font-size: 0.72rem;
    }

    .admin-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-table {
        min-width: 600px;
    }

    .dash-card__header {
        padding: 14px 16px;
    }

    .recent-user {
        padding: 10px 16px;
    }
}

/* ===== LANDSCAPE PHONE FIX ===== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        height: 260px;
    }

    .sb {
        margin-top: -20px;
    }
}

/* ===== TOUCH IMPROVEMENTS ===== */
@media (hover: none) and (pointer: coarse) {
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .sb-trip,
    .sb-csel-display,
    .sb-select {
        min-height: 40px;
    }

    .btn, .btn-sm {
        min-height: 44px;
    }

    .dest-card:hover img {
        transform: none;
    }

    .feature-card:hover {
        transform: none;
        box-shadow: none;
    }

    .booking-card:hover {
        transform: none;
    }

    .testimonials-track {
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }

    .testimonial-card {
        scroll-snap-align: start;
    }
}

/* ===== SAFE AREA (notch phones) ===== */
@supports (padding: env(safe-area-inset-bottom)) {
    .site-footer {
        padding-bottom: env(safe-area-inset-bottom);
    }

    .cc-inner {
        margin-bottom: calc(8px + env(safe-area-inset-bottom)) !important;
    }

    .wa-float {
        bottom: calc(16px + env(safe-area-inset-bottom));
    }
}