/* ============================================
   GLOBAL RESPONSIVE SAFETY
   ============================================ */
html, body {
    overflow-x: hidden;
}
img, video, svg {
    max-width: 100%;
    height: auto;
}

/* ============================================
   TABLET & SMALL LAPTOP (<= 992px)
   ============================================ */
@media (max-width: 992px) {
    .container {
        padding: 0 20px;
    }

    .hero-grid {
        gap: 32px;
    }

    .tour-detail-wrap,
    .checkout-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .style-content,
    .mission-grid,
    .about-story {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .travel-styles-row.cols-2,
    .travel-styles-row.cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .new-tours-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid,
    .values-grid,
    .team-grid,
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
}

/* ============================================
   MOBILE (<= 768px)
   ============================================ */
@media (max-width: 768px) {
    :root {
        --section-pad: 48px 0;
    }

    body {
        font-size: 15px;
    }

    .container {
        padding: 0 16px;
    }

    .navbar {
        padding: 12px 0;
    }

    .nav-logo img {
        height: 52px;
    }

    .hero {
        padding: 20px 0 30px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .hero-content h1 {
        font-size: clamp(28px, 7vw, 42px);
    }

    .hero-content p {
        font-size: 15px;
        max-width: 100%;
    }

    .hero-actions {
        gap: 14px;
        flex-wrap: wrap;
    }

    .hero-actions .btn-primary {
        padding: 14px 22px;
        font-size: 12px;
    }

    .tour-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .tour-detail-wrap,
    .checkout-grid,
    .contact-grid,
    .mission-grid,
    .about-story {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .travel-styles-row.cols-2,
    .travel-styles-row.cols-3,
    .new-tours-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid,
    .values-grid,
    .team-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

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

    /* Cart horizontal scroll */
    .cart-table,
    .checkout-summary-wrap,
    .order-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .cart-header,
    .cart-item-row {
        min-width: 560px;
    }

    .cart-item-row {
        grid-template-columns: 2.5fr 1fr 1fr 1fr 0.5fr;
        padding: 16px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer {
        padding: 48px 0 20px;
        margin-top: 48px;
    }

    .footer-brand img {
        height: 50px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .footer-bottom-left,
    .footer-bottom-right {
        justify-content: center;
    }

    input,
    select,
    textarea {
        max-width: 100%;
    }

    .btn-primary,
    .btn-secondary {
        max-width: 100%;
    }
}

/* ============================================
   SMALL MOBILE (<= 480px)
   ============================================ */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .container {
        padding: 0 12px;
    }

    .nav-logo img {
        height: 44px;
    }

    .hero-content h1 {
        font-size: 26px;
    }

    .hero-actions .btn-primary,
    .hero-actions .link-secondary {
        width: 100%;
        justify-content: center;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .tour-card .img-wrap,
    .category-card .img-wrap {
        height: auto;
    }

    .btn-primary,
    .btn-secondary,
    button[type="submit"],
    input[type="submit"] {
        width: 100%;
        text-align: center;
    }

    .footer-brand img {
        height: 44px;
    }
}

/* ============================================
   PROFESSIONAL MOBILE MENU
   ============================================ */
@media (max-width: 768px) {
    .hamburger {
        width: 32px;
        height: 24px;
        justify-content: space-between;
        position: relative;
        z-index: 1002;
    }
    .hamburger span {
        width: 100%;
        height: 2px;
        background: var(--text-color);
        border-radius: 2px;
        transition: all .3s ease;
        transform-origin: center;
    }
    .hamburger.open span:nth-child(1) {
        transform: translateY(11px) rotate(45deg);
    }
    .hamburger.open span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.open span:nth-child(3) {
        transform: translateY(-11px) rotate(-45deg);
    }

    .mobile-menu {
        display: flex;
        align-items: flex-start;
        justify-content: flex-end;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .35s ease, visibility .35s ease;
        background: rgba(0, 0, 0, .45);
    }
    .mobile-menu.open {
        display: flex;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    .mobile-menu-content {
        width: min(320px, 85vw);
        height: 100%;
        max-height: 100vh;
        background: #ffffff;
        border-top-left-radius: 24px;
        border-bottom-left-radius: 24px;
        padding: 32px 24px 24px;
        box-shadow: -8px 0 40px rgba(0, 0, 0, .18);
        transform: translateX(100%);
        transition: transform .35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        overflow-y: auto;
    }
    .mobile-menu.open .mobile-menu-content {
        transform: translateX(0);
    }

    .mobile-menu-close {
        top: 18px;
        right: 18px;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--light-bg);
        border-radius: 50%;
        font-size: 22px;
        color: var(--primary);
        line-height: 1;
        transition: background .2s, color .2s;
    }
    .mobile-menu-close:hover {
        background: var(--primary);
        color: #fff;
    }

    .mobile-nav-links {
        margin: 48px 0 28px;
    }
    .mobile-nav-links a {
        font-size: 17px;
        font-weight: 500;
        padding: 16px 0;
        border-bottom: 1px solid #f2f2f2;
        position: relative;
        display: flex;
        align-items: center;
        transition: color .2s, padding-left .2s;
    }
    .mobile-nav-links a.active,
    .mobile-nav-links a:hover {
        color: var(--primary);
        padding-left: 12px;
    }
    .mobile-nav-links a.active::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 4px;
        height: 18px;
        border-radius: 4px;
        background: var(--primary);
    }

    .mobile-lang-selector {
        padding: 4px 0;
        margin-bottom: 24px;
        border-bottom: 1px solid #f2f2f2;
        padding-bottom: 24px;
    }
    .mobile-lang-selector button {
        border: 1px solid #e5e5e5;
        border-radius: 999px;
        padding: 8px 16px;
        font-size: 13px;
        color: #444;
        background: #fff;
        transition: all .2s;
    }
    .mobile-lang-selector button.active,
    .mobile-lang-selector button:hover {
        background: var(--primary);
        color: #fff;
        border-color: var(--primary);
    }

    .mobile-quick-links {
        gap: 12px;
    }
    .mobile-quick-links a {
        background: var(--light-bg);
        border-radius: 12px;
        padding: 14px 16px;
        font-weight: 500;
        font-size: 14px;
        transition: background .2s, color .2s, transform .2s;
    }
    .mobile-quick-links a:hover {
        background: var(--primary);
        color: #fff;
        transform: translateX(4px);
    }
    .mobile-quick-links a i {
        width: 22px;
        text-align: center;
    }
}

/* ============================================
   PROFESSIONAL MOBILE FOOTER
   ============================================ */
@media (max-width: 768px) {
    .footer {
        padding: 56px 0 24px;
        margin-top: 56px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 0;
        margin-bottom: 36px;
    }
    .footer-grid > div {
        border-bottom: 1px solid rgba(255, 255, 255, .08);
        padding: 22px 0;
    }
    .footer-grid > div:first-child {
        border-bottom: none;
        padding-top: 0;
    }
    .footer-brand {
        padding-right: 0;
        text-align: center;
    }
    .footer-brand img {
        margin: 0 auto 16px;
        height: 52px;
    }
    .footer-brand p {
        max-width: 100%;
        color: #bbb;
        font-size: 14px;
        line-height: 1.7;
    }
    .footer-grid h4 {
        font-size: 15px;
        margin-bottom: 14px;
        color: #fff;
    }
    .footer-grid a {
        padding: 8px 0;
        margin-bottom: 0;
        display: block;
        font-size: 14px;
        color: #bbb;
    }
    .footer-grid a:hover {
        padding-left: 6px;
    }
    .footer-social {
        justify-content: center;
        margin-top: 20px;
        gap: 14px;
    }
    .footer-social a {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, .08);
        border-radius: 50%;
        font-size: 16px;
    }
    .footer-social a:hover {
        background: var(--primary);
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 16px;
        padding-top: 20px;
    }
    .footer-bottom-left,
    .footer-bottom-right {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* ============================================
   DASHBOARD RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .dashboard-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-sidebar {
        position: static;
    }
    .dashboard-hero h2 {
        font-size: 20px;
    }
    .dashboard-hero {
        padding: 22px 24px;
    }
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    .booking-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .booking-side {
        width: 100%;
        justify-content: space-between;
    }
    .quick-actions {
        grid-template-columns: 1fr;
    }
}
