/* ================================
   Responsive Styles
   Mobile-First Approach
   ================================ */

/* ===== Tablet (768px - 1024px) ===== */
@media (max-width: 1024px) {
    :root {
        --spacing-xl: 3rem;
        --spacing-lg: 2.5rem;
    }

    /* Typography adjustments */
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.75rem; }

    /* Hero */
    .hero-title {
        font-size: 2.75rem;
    }

    .hero-thai {
        font-size: 1.5rem;
    }

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

    /* Contact */
    .contact-content {
        gap: var(--spacing-md);
    }

    /* Gallery */
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* ===== Mobile & Small Tablet (max-width: 768px) ===== */
@media (max-width: 768px) {
    :root {
        --spacing-xl: 2rem;
        --spacing-lg: 1.5rem;
        --spacing-md: 1rem;
    }

    /* Typography */
    html {
        font-size: 15px;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }

    /* Container */
    .container {
        padding: 0 var(--spacing-sm);
    }

    /* Section */
    .section {
        padding: var(--spacing-lg) 0;
    }

    /* ===== Navigation ===== */
    .nav-container {
        padding: var(--spacing-sm);
    }

    .nav-brand h2 {
        font-size: 1.25rem;
    }

    .thai-name {
        font-size: 0.75rem;
    }

    /* Mobile Menu Toggle */
    .mobile-menu-toggle {
        display: flex;
        z-index: 1001;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    /* Mobile Menu */
    .nav-menu {
        position: fixed;
        top: 76px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--white);
        padding: var(--spacing-md);
        gap: 0;
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        max-height: calc(100vh - 76px);
        overflow-y: auto;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--light-gray);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu a {
        display: block;
        padding: var(--spacing-sm);
        width: 100%;
    }

    /* Language Switcher - Move to mobile menu */
    .language-switcher {
        margin-left: auto;
        margin-right: var(--spacing-sm);
    }

    /* ===== Hero ===== */
    .hero {
        height: 100vh;
        min-height: 500px;
        margin-top: 76px;
        background-attachment: scroll;
    }

    .hero-content {
        padding: var(--spacing-sm);
    }

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

    .hero-thai {
        font-size: 1.25rem;
    }

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

    .rating {
        flex-direction: column;
        gap: var(--spacing-xs);
    }

    .stars {
        font-size: 1.25rem;
    }

    .btn-large {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    .hero-scroll {
        font-size: 0.875rem;
    }

    /* ===== About ===== */
    .features {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    .feature-item {
        padding: var(--spacing-sm);
    }

    .feature-icon {
        font-size: 2.5rem;
    }

    /* ===== Tours ===== */
    .tour-image {
        height: 250px;
    }

    .tour-content {
        padding: var(--spacing-md);
    }

    .tour-details {
        padding: var(--spacing-sm);
    }

    .tour-detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-xs);
    }

    .price {
        font-size: 1.25rem;
    }

    .time-slots {
        flex-direction: column;
    }

    .time-slot {
        justify-content: center;
    }

    .tour-includes ul {
        grid-template-columns: 1fr;
    }

    /* ===== Gallery ===== */
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    .gallery-item {
        height: 250px;
    }

    /* ===== Contact ===== */
    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .contact-item {
        flex-direction: column;
        text-align: center;
    }

    .contact-icon {
        margin: 0 auto;
    }

    .contact-map {
        min-height: 300px;
    }

    /* ===== Footer ===== */
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
        text-align: center;
    }

    .footer-links ul {
        align-items: center;
    }

    .footer-lang-buttons {
        justify-content: center;
    }

    /* ===== Floating WhatsApp ===== */
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }

    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }
}

/* ===== Small Mobile (max-width: 480px) ===== */
@media (max-width: 480px) {
    :root {
        --spacing-xl: 1.5rem;
        --spacing-lg: 1.25rem;
    }

    /* Typography */
    html {
        font-size: 14px;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }

    /* Hero */
    .hero-title {
        font-size: 1.75rem;
    }

    .hero-thai {
        font-size: 1.125rem;
    }

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

    /* Buttons */
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }

    .btn-large {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }

    /* Navigation Brand */
    .nav-brand h2 {
        font-size: 1.125rem;
    }

    /* Tour Card */
    .tour-image {
        height: 200px;
    }

    .tour-content {
        padding: var(--spacing-sm);
    }

    /* Gallery */
    .gallery-item {
        height: 200px;
    }

    /* Contact */
    .contact-item {
        padding: var(--spacing-sm);
    }

    .contact-icon {
        width: 40px;
        height: 40px;
    }

    .contact-icon svg {
        width: 20px;
        height: 20px;
    }

    /* Footer */
    .footer {
        padding: var(--spacing-md) 0 var(--spacing-sm);
    }

    /* Floating WhatsApp */
    .whatsapp-float {
        width: 45px;
        height: 45px;
        bottom: 15px;
        right: 15px;
    }

    .whatsapp-float svg {
        width: 24px;
        height: 24px;
    }
}

/* ===== Landscape Mobile (max-height: 500px) ===== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 400px;
    }

    .hero-content {
        padding: var(--spacing-sm);
    }

    .hero-title {
        font-size: 1.5rem;
        margin-bottom: var(--spacing-xs);
    }

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

    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: var(--spacing-sm);
    }

    .rating {
        margin-bottom: var(--spacing-sm);
    }

    .hero-scroll {
        display: none;
    }
}

/* ===== Print Styles ===== */
@media print {
    .navbar,
    .whatsapp-float,
    .hero-scroll,
    .mobile-menu-toggle,
    .language-switcher {
        display: none !important;
    }

    .hero {
        margin-top: 0;
        page-break-after: always;
    }

    .section {
        page-break-inside: avoid;
    }

    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: var(--gray);
    }
}

/* ===== Accessibility - Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .hero {
        background-attachment: scroll;
    }

    .whatsapp-float {
        animation: none;
    }

    .hero-scroll {
        animation: none;
    }
}

/* ===== High Contrast Mode ===== */
@media (prefers-contrast: high) {
    :root {
        --primary-green: #1a4029;
        --dark-text: #000000;
    }

    .btn {
        border-width: 3px;
    }

    .nav-menu a:hover,
    .nav-menu a:focus {
        outline: 3px solid var(--accent-teal);
    }
}
