/* ============================================
   MARLTOS REIZEN - Responsive Styles
   ============================================ */

/* Tablet - 1024px */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .search-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .search-btn {
        grid-column: 1 / -1;
    }

    .hero-tagline {
        max-width: 840px;
        font-size: 1.7rem;
    }

    .flights-layout {
        grid-template-columns: 1fr;
    }

    .filter-sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1001;
        background: var(--surface);
        padding: 24px;
        overflow-y: auto;
        max-height: 100vh;
    }

    .filter-card {
        padding: 16px;
        border-radius: 14px;
    }

    .filter-status {
        grid-template-columns: 1fr;
    }

    .filter-sidebar.mobile-open {
        display: block;
        animation: slideDown 0.3s ease;
    }

    .filter-mobile-btn {
        display: flex;
    }

    .filter-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1000;
    }

    .filter-overlay.active {
        display: block;
    }

    .filter-close-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: var(--bg);
        margin-bottom: 16px;
        margin-left: auto;
        cursor: pointer;
    }

    .booking-layout {
        grid-template-columns: 1fr;
    }

    .booking-summary {
        position: relative;
        top: 0;
        order: -1;
    }

}

/* Mobile Large - 768px */
@media (max-width: 768px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }

    .section {
        padding: 48px 0;
    }

    .container {
        padding: 0 16px;
    }

    /* Header — compact mobile */
    .header {
        --header-height: 60px;
    }

    .header-inner {
        padding: 0 12px;
    }

    .nav {
        gap: 5px;
    }

    .logo-mark {
        height: 30px;
        max-width: 160px;
    }

    /* ── Mobile slide menu ── */
    .nav-links {
        display: flex;
        position: fixed;
        top: 0;
        right: 0;
        left: auto;
        width: min(300px, 88vw);
        height: 100dvh;
        background: #fff;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 3px;
        z-index: 1002;
        padding: 12px 12px 20px;
        border-left: 1px solid var(--border-light);
        box-shadow: -16px 0 40px rgba(0, 26, 58, 0.13);
        transform: translateX(108%);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.18s ease, visibility 0.18s ease;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .nav-links.active {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    /* ── Compact header row ── */
    .mobile-nav-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 2px 2px 10px;
        margin-bottom: 4px;
        border-bottom: 1px solid var(--border-light);
        position: static;
        flex-shrink: 0;
    }

    .mobile-nav-logo {
        height: 28px;
        width: auto;
        max-width: 130px;
        object-fit: contain;
        display: block;
    }

    .mobile-nav-close {
        position: static;
        width: 32px;
        height: 32px;
        border-radius: 8px;
        border: 1px solid var(--border-light);
        background: var(--bg);
        color: var(--text-secondary);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all var(--transition);
        flex-shrink: 0;
    }

    .mobile-nav-close:hover {
        color: var(--text-primary);
        background: var(--border);
    }

    /* ── Nav links with icons ── */
    .nav-link {
        display: flex;
        align-items: center;
        gap: 11px;
        font-size: 0.92rem;
        font-weight: 600;
        padding: 10px 12px;
        width: 100%;
        text-align: left;
        border-radius: 9px;
        border: 1px solid transparent;
        background: transparent;
        color: var(--text-secondary);
    }

    .nav-link-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        border-radius: 8px;
        background: var(--bg);
        flex-shrink: 0;
        color: var(--text-secondary);
        transition: background 0.15s, color 0.15s;
    }

    .nav-link.mobile-only {
        display: flex;
    }

    .nav-divider {
        display: block;
        font-size: 0.67rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--text-light);
        padding: 8px 12px 2px;
        margin-top: 4px;
    }

    .header.transparent .nav-links .nav-link {
        color: var(--text-secondary);
    }

    .nav-link:hover {
        color: var(--primary);
        background: var(--primary-light);
        border-color: rgba(0, 87, 184, 0.12);
    }

    .nav-link:hover .nav-link-icon {
        background: rgba(0, 87, 184, 0.1);
        color: var(--primary);
    }

    .nav-link.active,
    .header.transparent .nav-links .nav-link.active {
        color: var(--primary);
        background: var(--primary-light);
        border-color: rgba(0, 87, 184, 0.18);
        font-weight: 700;
    }

    .nav-link.active .nav-link-icon {
        background: rgba(0, 87, 184, 0.12);
        color: var(--primary);
    }

    /* ── Cart widget in menu ── */
    .menu-cart-block {
        margin-top: 4px;
        border-radius: 10px;
        border: 1px solid rgba(229, 90, 43, 0.2);
        background: var(--accent-light);
        padding: 10px 12px;
        flex-shrink: 0;
    }

    .menu-cart-empty {
        display: flex;
        align-items: center;
        gap: 7px;
        font-size: 0.78rem;
        color: var(--text-light);
        font-style: italic;
    }

    .menu-cart-head {
        display: flex;
        align-items: center;
        gap: 7px;
        font-size: 0.8rem;
        font-weight: 700;
        color: var(--text-primary);
        margin-bottom: 7px;
    }

    .menu-cart-badge {
        margin-left: auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 20px;
        height: 20px;
        padding: 0 6px;
        border-radius: 999px;
        background: var(--accent);
        color: #fff;
        font-size: 0.68rem;
        font-weight: 800;
    }

    .menu-cart-rows {
        display: flex;
        flex-direction: column;
        gap: 3px;
        margin-bottom: 8px;
    }

    .menu-cart-item-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        font-size: 0.78rem;
    }

    .menu-cart-route {
        font-weight: 700;
        color: var(--text-primary);
    }

    .menu-cart-price {
        font-weight: 700;
        color: var(--accent-dark);
        white-space: nowrap;
    }

    .menu-cart-more {
        font-size: 0.72rem;
        color: var(--text-secondary);
        font-style: italic;
    }

    .menu-cart-cta {
        display: block;
        text-align: center;
        padding: 7px 10px;
        border-radius: 7px;
        background: var(--accent);
        color: #fff;
        font-size: 0.78rem;
        font-weight: 700;
        text-decoration: none;
        transition: background 0.15s;
    }

    .menu-cart-cta:hover {
        background: var(--accent-dark);
        color: #fff;
    }

    /* ── Compact footer ── */
    .mobile-nav-footer {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-top: auto;
        padding-top: 12px;
        border-top: 1px solid var(--border-light);
    }

    .mobile-nav-contact {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        width: 100%;
        padding: 9px 14px;
        border-radius: 9px;
        border: 1px solid var(--border);
        color: var(--text-secondary);
        background: var(--bg);
        font-size: 0.85rem;
        font-weight: 600;
        text-decoration: none;
        transition: all 0.15s;
    }

    .mobile-nav-contact:hover {
        border-color: rgba(0, 87, 184, 0.3);
        color: var(--primary);
        background: var(--primary-light);
    }

    .mobile-nav-chat {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        width: 100%;
        padding: 9px 14px;
        border-radius: 9px;
        border: 1px solid #a7f3d0;
        background: #ecfdf5;
        color: #059669;
        font-size: 0.85rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.15s;
        position: relative;
    }

    .mobile-nav-chat:hover {
        background: #d1fae5;
        border-color: #6ee7b7;
    }

    .mobile-nav-chat-dot {
        position: absolute;
        top: 9px;
        right: 12px;
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #10b981;
        box-shadow: 0 0 0 2px #ecfdf5;
        animation: pulse-dot 2s infinite;
    }

    @keyframes pulse-dot {
        0%, 100% { transform: scale(1); opacity: 1; }
        50%       { transform: scale(1.3); opacity: 0.7; }
    }

    .mobile-nav-cta {
        width: 100%;
        justify-content: center;
        font-size: 0.88rem;
        padding: 10px 14px;
    }

    .mobile-cart-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 9px 12px;
        border-radius: 9px;
        border: 1px solid rgba(0, 87, 184, 0.25);
        color: var(--primary);
        font-size: 0.84rem;
        font-weight: 600;
        background: rgba(255, 255, 255, 0.95);
    }

    .nav-link::after {
        display: none;
    }

    .nav-phone {
        display: none;
    }

    .nav-actions {
        display: none;
    }

    .menu-toggle {
        display: flex;
        position: relative;
        z-index: 1003;
    }

    .menu-toggle.active {
        opacity: 0;
        pointer-events: none;
    }

    .header.transparent .menu-toggle {
        background: var(--accent);
        border-color: var(--accent-dark);
    }

    .header.transparent .menu-toggle span,
    .header.transparent.scrolled .menu-toggle span,
    .header.transparent .menu-toggle.active span {
        background: #ffffff;
    }

    /* Hero */
    .hero {
        min-height: auto;
        padding-bottom: 40px;
    }

    .hero-content {
        padding: 40px 16px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-search {
        padding: 16px;
        border-radius: 12px;
    }

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

    .swap-btn {
        position: relative;
        right: auto;
        top: auto;
        transform: rotate(90deg);
        margin: -8px auto;
    }

    .search-tabs {
        width: 100%;
    }

    .search-tab {
        flex: 1;
        justify-content: center;
        font-size: 0.78rem;
        padding: 7px 10px;
    }

    .search-options {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: end;
        gap: 10px;
    }

    .hero-search .search-options > .search-field.autocomplete-wrapper,
    .hero-search .search-options > .search-option {
        width: 100%;
        margin: 0;
    }

    /* iOS Safari: prevent focus-zoom and layout jump while typing/selecting */
    .hero-search .search-field input,
    .hero-search .search-field select,
    .hero-search .search-option select,
    .hero-search #departure-date,
    .hero-search #return-date {
        font-size: 16px;
        line-height: 1.25;
    }

    .hero-search #departure-date,
    .hero-search #return-date {
        min-height: 46px;
        height: 46px;
        padding: 11px 42px 11px 12px;
    }

    .hero-search #passengers-input {
        font-size: 16px !important;
        width: 100% !important;
        max-width: none;
        padding-left: 36px !important;
        background-repeat: no-repeat;
        background-position: 12px center;
        background-size: 16px 16px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2355677a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
    }

    .hero-search #cabin-class {
        width: 100% !important;
        min-width: 0;
        font-size: 16px;
        padding-left: 36px !important;
        background-repeat: no-repeat, no-repeat;
        background-position: 12px center, right 10px center;
        background-size: 16px 16px, 16px 16px;
        background-image:
            url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2355677a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='7' width='18' height='12' rx='2'/%3E%3Cpath d='M7 7V5a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2'/%3E%3C/svg%3E"),
            url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    }

    .hero-search .search-field.autocomplete-wrapper {
        width: 100%;
    }

    .hero-tagline {
        margin-top: 30px;
        max-width: 560px;
        padding: 10px 14px 9px;
        border-radius: 999px;
    }

    .hero-tagline-note {
        font-size: 0.64rem;
        letter-spacing: 1.2px;
    }

    .hero-tagline-signature {
        font-size: 1.65rem;
    }

    body.passenger-dropdown-open .hero-tagline {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    /* Destinations Grid */
    .destinations-grid {
        grid-template-columns: 1fr;
    }

    /* Flight Cards */
    .flight-card-inner {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .flight-airline {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
    }

    .flight-route {
        display: grid;
        grid-template-columns: minmax(74px, auto) 1fr minmax(74px, auto);
        align-items: center;
        gap: 8px;
    }

    .flight-time {
        display: block;
        min-width: 0;
    }

    .flight-time-value {
        font-size: 1.14rem;
    }

    .flight-time-airport {
        font-size: 0.7rem;
    }

    .flight-duration {
        width: 100%;
        min-width: 0;
    }

    .flight-duration-time {
        font-size: 0.7rem;
    }

    .flight-stops {
        font-size: 0.66rem;
        padding: 3px 7px;
    }

    .flight-price {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "amount meta seats"
            "action action action";
        align-items: center;
        width: 100%;
        min-width: auto;
        padding: 10px;
        gap: 6px 8px;
        border-radius: 16px;
        border-color: #c7d9eb;
        background: linear-gradient(90deg, #f2f8ff 0%, #eef6ff 62%, #e9f3ff 100%);
    }

    .flight-price-amount {
        grid-area: amount;
        width: fit-content;
        min-height: 30px;
        display: inline-flex;
        align-items: center;
        padding: 0 11px;
        border-radius: 999px;
        background: #ffffff;
        border: 1px solid #d4e2f0;
        font-size: 1.06rem;
        line-height: 1;
    }

    .flight-price-person,
    .flight-price-seats {
        font-size: 0.66rem;
        line-height: 1.2;
        white-space: nowrap;
    }

    .flight-price-person {
        grid-area: meta;
        justify-self: start;
    }

    .flight-price-seats {
        grid-area: seats;
        justify-self: end;
    }

    .flight-book-btn {
        grid-area: action;
        width: 100%;
        min-height: 36px;
        border-radius: 999px;
        font-size: 0.7rem;
        padding: 0 13px;
        margin-top: 0;
        letter-spacing: 0.28px;
    }

    .flight-view-details-btn {
        width: 100%;
        justify-content: center;
        margin-left: 0;
    }

    .flight-sidepanel {
        width: min(520px, 100vw);
    }

    .flight-sidepanel-header {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .flight-sidepanel-header-price {
        grid-column: 1;
        grid-row: 2;
        align-items: flex-start;
        text-align: left;
        min-width: 0;
    }

    .flight-sidepanel-close {
        grid-column: 2;
        grid-row: 1 / span 2;
    }

    .flight-sidepanel-route {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .flight-sidepanel-route-line {
        order: 3;
    }

    .flight-sidepanel-facts {
        grid-template-columns: 1fr;
    }

    .flight-bound-summary {
        flex-direction: column;
        align-items: stretch;
    }

    .flight-bound-airline-logo {
        width: 100%;
        max-width: 110px;
        align-self: flex-start;
    }

    .flight-timeline-stop,
    .flight-timeline-join,
    .flight-timeline-layover {
        grid-template-columns: 66px 48px minmax(0, 1fr);
        gap: 6px;
    }

    /* Booking */
    .form-row,
    .form-row-3,
    .form-row-4 {
        grid-template-columns: 1fr;
    }

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

    .step-customer-summary-grid {
        grid-template-columns: 1fr;
    }

    .step3-layout {
        grid-template-columns: 1fr;
    }

    #step-3 .booking-form-section {
        padding: 16px 14px;
        border-radius: 14px;
    }

    #step-3 .booking-form-section h3 {
        font-size: 1.25rem;
    }

    #step-3 .step3-address-card,
    #step-3 .step3-review-card {
        padding: 12px;
    }

    .step3-ticket-route {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .step3-ticket-line {
        display: none;
    }

    #step-3 .form-row,
    #step-3 .form-row-3,
    #step-3 .form-row-4 {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .payment-methods {
        flex-direction: column;
    }

    .booking-layout {
        display: flex;
        flex-direction: column;
        padding: 0 12px;
    }

    .booking-form {
        order: 1;
    }

    .booking-summary {
        order: 2;
        position: static;
        top: auto;
        width: 100%;
        margin-top: 14px;
    }

    .summary-card {
        width: 100%;
    }

    .booking-form-section {
        width: 100%;
    }

    .passenger-card {
        padding: 14px;
        margin-bottom: 12px;
    }

    .passenger-card-header {
        margin-bottom: 12px;
    }

    .card-input-row {
        grid-template-columns: 1fr;
    }

    .form-nav {
        flex-direction: column-reverse;
        gap: 12px;
    }

    .form-nav .btn {
        width: 100%;
    }

    /* Results header */
    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-bar-summary {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-bar-modify {
        margin-left: 0;
        width: 100%;
    }

    .search-bar-modify .btn {
        width: 100%;
    }
}

/* Mobile Small - 480px */
@media (max-width: 480px) {
    .header-inner {
        padding: 0 10px;
    }

    .nav {
        gap: 4px;
    }

    .mobile-header-actions {
        gap: 4px;
    }

    .mh-action-btn {
        width: 34px;
        height: 34px;
        border-radius: 9px;
    }

    .mh-action-btn svg {
        width: 15px;
        height: 15px;
    }

    .menu-toggle {
        width: 34px;
        height: 34px;
        border-radius: 9px;
    }

    .menu-toggle span {
        width: 14px;
    }

    /* Extra compact menu for small phones */
    .nav-links {
        padding: 10px 10px 16px;
        gap: 2px;
    }

    .nav-link {
        padding: 8px 10px;
        font-size: 0.88rem;
    }

    .nav-link-icon {
        width: 28px;
        height: 28px;
        border-radius: 7px;
    }

    .nav-divider {
        padding: 6px 10px 2px;
        font-size: 0.63rem;
    }

    .menu-cart-block {
        padding: 8px 10px;
    }

    .mobile-nav-footer {
        gap: 6px;
        padding-top: 10px;
    }

    .mobile-nav-chat,
    .mobile-nav-cta {
        padding: 8px 12px;
        font-size: 0.82rem;
    }

    .logo-mark {
        height: 27px;
        max-width: 140px;
    }

    .hero-tagline {
        margin-top: 24px;
        max-width: 100%;
        padding: 9px 12px 8px;
    }

    .hero-tagline-note {
        font-size: 0.6rem;
        letter-spacing: 1px;
    }

    .hero-tagline-signature {
        font-size: 1.55rem;
    }

    .hero-title {
        font-size: 1.6rem;
    }

    .hero-search {
        padding: 12px;
    }

    .search-field input,
    .search-field select {
        min-height: 38px;
        padding: 10px 12px;
        font-size: 16px;
    }

    .hero-search #departure-date,
    .hero-search #return-date {
        min-height: 46px;
        height: 46px;
        padding: 11px 42px 11px 12px;
    }

    .hero-search #passengers-input {
        max-width: 100%;
    }

    .hero-search #cabin-class {
        width: 100% !important;
    }

    .flight-card {
        padding: 10px;
    }

    .flight-card-inner {
        gap: 8px;
    }

    .flight-route {
        grid-template-columns: minmax(68px, auto) 1fr minmax(68px, auto);
        gap: 6px;
    }

    .flight-time-value {
        font-size: 1.06rem;
    }

    .flight-duration-time {
        font-size: 0.66rem;
    }

    .flight-price {
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "amount meta seats"
            "action action action";
        gap: 6px;
        border-radius: 18px;
        padding: 8px;
    }

    .flight-price-amount {
        font-size: 0.95rem;
        min-height: 28px;
        padding: 0 10px;
    }

    .flight-price-person,
    .flight-price-seats {
        font-size: 0.62rem;
    }

    .flight-book-btn {
        width: 100%;
        justify-content: center;
    }

    .flight-sidepanel {
        width: 100vw;
    }

    .flight-sidepanel-header {
        padding: 14px 14px 12px;
        gap: 10px;
    }

    .flight-sidepanel-route-label {
        font-size: 1.16rem;
    }

    .flight-sidepanel-meta {
        font-size: 0.64rem;
    }

    .flight-sidepanel-header-book {
        min-height: 42px;
        font-size: 0.84rem;
    }

    .flight-sidepanel-pricing,
    .flight-sidepanel-body {
        padding-left: 14px;
        padding-right: 14px;
    }

    .flight-sidepanel-tab {
        min-height: 40px;
        font-size: 0.67rem;
    }

    .flight-sidepanel-price {
        font-size: 1.38rem;
    }

    .booking-form-section {
        padding: 12px;
        width: 100%;
    }

    .booking-layout {
        padding: 0 8px;
    }

    .passenger-card {
        padding: 10px;
        border-radius: 10px;
    }

    .summary-header {
        padding: 16px;
    }

    .summary-body {
        padding: 16px;
    }

    .summary-actions {
        padding: 0 16px 16px;
    }

    .toast {
        min-width: unset;
        max-width: calc(100vw - 48px);
    }

    .toast-container {
        right: 16px;
        left: 16px;
    }
}

@media (max-width: 360px) {
    .hero-tagline-signature {
        font-size: 1.3rem;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .filter-sidebar,
    .search-bar-compact,
    .btn,
    .form-nav {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .flight-card,
    .booking-form-section,
    .summary-card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
}
