/* Responsive Design - Mobile-first media queries */

/* ========================================
   BASE STYLES (Mobile First - 320px+)
   ======================================== */

/* Base styles are defined in components.css */

/* ========================================
   LARGE PHONES (481px and up)
   ======================================== */

@media (min-width: 481px) {
    /* Hero Section */
    .hero-title {
        font-size: var(--font-size-6xl);
    }

    /* Menu Grid */
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Gallery Grid */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Reviews Grid */
    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   TABLETS PORTRAIT (768px and up)
   ======================================== */

@media (min-width: 768px) {
    /* Navigation */
    .nav-links {
        display: flex;
    }

    .mobile-menu-toggle {
        display: none;
    }

    /* Hero Section */
    .hero-title {
        font-size: var(--font-size-7xl);
    }

    .hero-subtitle {
        font-size: var(--font-size-2xl);
    }

    .hero-location {
        font-size: var(--font-size-xl);
    }

    /* Menu Grid */
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-xl);
    }

    /* Gallery Grid */
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-lg);
    }

    /* Location Section */
    .location-content {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-3xl);
    }

    /* Reviews Grid */
    .reviews-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* About Section */
    .about-content {
        grid-template-columns: 1fr 1fr;
    }

    /* Footer */
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }
}

/* ========================================
   DESKTOP (1024px and up)
   ======================================== */

@media (min-width: 1024px) {
    /* Navigation */
    .nav-link {
        font-size: var(--font-size-lg);
        padding: var(--spacing-sm) var(--spacing-lg);
    }

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

    /* Menu Grid */
    .menu-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Gallery Grid */
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Reviews Grid */
    .reviews-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-xl);
    }

    /* Section Titles */
    .section-title {
        font-size: var(--font-size-6xl);
    }

    /* Menu Tabs */
    .menu-tab {
        font-size: var(--font-size-lg);
        padding: var(--spacing-md) var(--spacing-xl);
    }

    /* Gallery Filters */
    .gallery-filter {
        font-size: var(--font-size-base);
        padding: var(--spacing-sm) var(--spacing-xl);
    }
}

/* ========================================
   LARGE DESKTOP (1280px and up)
   ======================================== */

@media (min-width: 1280px) {
    /* Container padding increased in variables.css */

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

    /* Menu Grid */
    .menu-grid {
        gap: var(--spacing-2xl);
    }

    /* Gallery Grid */
    .gallery-grid {
        gap: var(--spacing-xl);
    }
}

/* ========================================
   MOBILE-SPECIFIC ADJUSTMENTS
   ======================================== */

@media (max-width: 767px) {
    /* Language switcher mobile */
    .language-switcher {
        margin-left: var(--spacing-sm);
    }

    .lang-toggle {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: var(--font-size-base);
    }

    /* Logo mobile sizing */
    .logo-image {
        height: 50px;
    }

    .footer-logo-image {
        height: 60px;
    }

    /* Adjust hero for mobile */
    .hero {
        min-height: 500px;
        max-height: 100vh;
        background-position: center center;
        background-attachment: scroll !important;
    }

    .hero-title {
        font-size: var(--font-size-4xl);
    }

    .hero-subtitle {
        font-size: var(--font-size-lg);
    }

    .hero-location {
        font-size: var(--font-size-base);
    }

    .cta-button {
        padding: var(--spacing-sm) var(--spacing-lg);
        font-size: var(--font-size-base);
    }

    /* Section titles mobile */
    .section-title {
        font-size: var(--font-size-3xl);
    }

    /* Menu section mobile - ensure background */
    .menu-section {
        background-color: var(--color-background-alt);
        padding: var(--spacing-3xl) 0;
    }

    /* Menu tabs mobile - better sizing */
    .menu-tabs {
        gap: var(--spacing-xs);
        margin-bottom: var(--spacing-xl);
        padding: 0 var(--spacing-sm);
    }

    .menu-tab {
        flex: 1 1 calc(50% - var(--spacing-xs));
        min-width: 0;
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: var(--font-size-sm);
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Menu cards mobile */
    .menu-card {
        padding: var(--spacing-md);
        background-color: var(--color-white);
    }

    .menu-item-name {
        font-size: var(--font-size-lg);
    }

    .menu-item-description {
        font-size: var(--font-size-xs);
    }

    .menu-item-price {
        font-size: var(--font-size-base);
    }

    /* Gallery mobile */
    .gallery-item {
        aspect-ratio: 1;
    }

    /* Location mobile */
    .location-content {
        gap: var(--spacing-xl);
    }

    .location-map iframe {
        height: 300px;
    }

    /* Reviews mobile */
    .review-card {
        padding: var(--spacing-md);
        background-color: var(--color-white);
    }

    /* Review stats mobile */
    .review-stats {
        grid-template-columns: 1fr;
    }

    .stat-box {
        flex-direction: column;
        text-align: center;
    }

    .stat-link {
        width: 100%;
        text-align: center;
    }

    /* Featured header mobile */
    .featured-header {
        flex-direction: column;
        align-items: flex-start;
    }

    /* About mobile */
    .about-text p {
        font-size: var(--font-size-sm);
    }

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

    .footer-links {
        flex-direction: column;
        align-items: center;
    }

    .footer-social {
        justify-content: center;
    }

    /* Ensure all sections have background colors on mobile */
    section {
        background-color: var(--color-background) !important;
    }

    section:nth-child(even) {
        background-color: var(--color-beige) !important;
    }

    section:nth-child(odd) {
        background-color: var(--color-background-alt) !important;
    }
}

/* ========================================
   LANDSCAPE MOBILE (max height, any width)
   ======================================== */

@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: 400px;
    }

    .hero-title {
        font-size: var(--font-size-4xl);
    }

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

    .section-title {
        margin-bottom: var(--spacing-lg);
    }

    section {
        padding: var(--spacing-2xl) 0;
    }
}

/* ========================================
   HIGH DPI (RETINA) DISPLAYS
   ======================================== */

@media (-webkit-min-device-pixel-ratio: 2),
       (min-resolution: 192dpi) {
    /* Crisper text on retina displays */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .header,
    .footer,
    .mobile-menu,
    .lightbox,
    .gallery-filters,
    .menu-tabs {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    section {
        page-break-inside: avoid;
    }

    .menu-card,
    .review-card {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: var(--color-text-secondary);
    }
}

/* ========================================
   ACCESSIBILITY - PREFERRED MOTION
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    .menu-card:hover,
    .gallery-item:hover img,
    .review-card:hover,
    .cta-button:hover,
    .review-link-button:hover,
    .social-link:hover {
        transform: none !important;
    }

    .hours-status-dot {
        animation: none;
    }

    .hero-content {
        animation: none;
    }
}

/* ========================================
   ACCESSIBILITY - HIGH CONTRAST MODE
   ======================================== */

@media (prefers-contrast: high) {
    :root {
        --color-text-primary: #000000;
        --color-background: #FFFFFF;
    }

    .nav-link:hover,
    .nav-link:focus,
    .cta-button:focus,
    .menu-tab:focus,
    .gallery-filter:focus,
    .footer-link:focus,
    .social-link:focus {
        outline: 3px solid var(--color-black);
        outline-offset: 2px;
    }
}
