/* ============================================
   ARTISAN COFFEE HOUSE - RESPONSIVE STYLES
   ============================================
   
   TABLE OF CONTENTS:
   1. Large Screens (1400px+)
   2. Desktop (1200px - 1399px)
   3. Small Desktop (992px - 1199px)
   4. Tablet (768px - 991px)
   5. Mobile Landscape (576px - 767px)
   6. Mobile Portrait (< 576px)
   7. Print Styles
   
   ============================================ */

/* ============================================
   1. LARGE SCREENS (1400px+)
   ============================================ */
@media (min-width: 1400px) {
    .container {
        padding: 0 var(--spacing-2xl);
    }
    
    .hero-title {
        font-size: 5.5rem;
    }
    
    .menu-grid {
        gap: var(--spacing-2xl);
    }
}

/* ============================================
   2. DESKTOP (1200px - 1399px)
   ============================================ */
@media (max-width: 1399px) {
    :root {
        --container-padding: 1.5rem;
    }
    
    .about-grid {
        gap: var(--spacing-2xl);
    }
    
    .footer-grid {
        gap: var(--spacing-xl);
    }
}

/* ============================================
   3. SMALL DESKTOP (992px - 1199px)
   ============================================ */
@media (max-width: 1199px) {
    .specialties-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(3, 200px);
    }
    
    .gallery-item.large {
        grid-column: span 2;
        grid-row: span 1;
    }
    
    .gallery-item.tall {
        grid-row: span 1;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-2xl);
    }
    
    .about-features {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   4. TABLET (768px - 991px)
   ============================================ */
@media (max-width: 991px) {
    :root {
        --spacing-4xl: 4rem;
    }
    
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: var(--coffee-dark);
        flex-direction: column;
        justify-content: center;
        gap: var(--spacing-xl);
        padding: var(--spacing-2xl);
        transition: var(--transition-normal);
        box-shadow: var(--shadow-xl);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-link {
        font-size: 1.25rem;
        padding: var(--spacing-sm) 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    /* Hero */
    .hero {
        min-height: 600px;
    }
    
    .hero-content {
        padding: 0 var(--spacing-lg);
    }
    
    .steam-container {
        display: none;
    }
    
    /* About */
    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
    }
    
    .about-image {
        order: -1;
    }
    
    .image-frame img {
        height: 400px;
    }
    
    .experience-badge {
        bottom: auto;
        top: -20px;
        left: 20px;
    }
    
    /* Location */
    .location-grid {
        grid-template-columns: 1fr;
    }
    
    .location-map {
        min-height: 400px;
        order: -1;
    }
    
    /* Floating beans */
    .floating-beans {
        display: none;
    }
}

/* ============================================
   5. MOBILE LANDSCAPE (576px - 767px)
   ============================================ */
@media (max-width: 767px) {
    :root {
        --spacing-3xl: 3rem;
        --spacing-4xl: 3.5rem;
    }
    
    /* Typography adjustments */
    .section-header {
        margin-bottom: var(--spacing-2xl);
    }
    
    /* Hero */
    .hero {
        min-height: 100vh;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }
    
    /* Menu */
    .menu-tabs {
        gap: var(--spacing-sm);
    }
    
    .menu-tab {
        padding: var(--spacing-sm) var(--spacing-lg);
        font-size: var(--fs-small);
    }
    
    .menu-grid {
        grid-template-columns: 1fr;
    }
    
    /* Gallery */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(4, 180px);
    }
    
    .gallery-item.large,
    .gallery-item.tall {
        grid-column: span 1;
        grid-row: span 1;
    }
    
    /* Testimonials */
    .testimonial-card {
        padding: var(--spacing-lg);
    }
    
    .testimonial-content {
        padding: var(--spacing-lg);
    }
    
    .testimonial-text {
        font-size: 1rem;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-links h4::after,
    .footer-contact h4::after,
    .footer-newsletter h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-contact li {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* About features */
    .about-features {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   6. MOBILE PORTRAIT (< 576px)
   ============================================ */
@media (max-width: 575px) {
    :root {
        --spacing-2xl: 2rem;
        --spacing-3xl: 2.5rem;
        --spacing-4xl: 3rem;
        --container-padding: 1rem;
    }
    
    /* Typography */
    .section-subtitle {
        font-size: 1.1rem;
    }
    
    /* Hero */
    .hero-title .title-line {
        font-size: 0.4em;
        letter-spacing: 3px;
    }
    
    .hero-title .title-highlight {
        font-size: 1em;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    /* Navigation */
    .logo {
        font-size: 1.25rem;
    }
    
    .logo i {
        font-size: 1.5rem;
    }
    
    .nav-menu {
        width: 100%;
        max-width: none;
    }
    
    /* About */
    .image-frame img {
        height: 300px;
    }
    
    .floating-cup {
        width: 60px;
        height: 60px;
        top: -15px;
        right: -15px;
    }
    
    .floating-cup i {
        font-size: 1.5rem;
    }
    
    .experience-badge {
        padding: var(--spacing-md);
    }
    
    .experience-badge .years {
        font-size: 2rem;
    }
    
    /* Menu */
    .menu-tabs {
        flex-wrap: wrap;
    }
    
    .menu-tab {
        flex: 1 1 45%;
        justify-content: center;
    }
    
    .menu-item-image {
        height: 180px;
    }
    
    /* Gallery */
    .gallery-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(6, 200px);
    }
    
    /* Location */
    .info-card {
        flex-direction: column;
        text-align: center;
    }
    
    .info-icon {
        margin: 0 auto var(--spacing-sm);
    }
    
    .email-link {
        justify-content: center;
    }
    
    .hours-item {
        flex-direction: column;
        gap: var(--spacing-xs);
        text-align: center;
    }
    
    /* Testimonials */
    .slider-controls {
        gap: var(--spacing-md);
    }
    
    .slider-btn {
        width: 40px;
        height: 40px;
    }
    
    /* Footer */
    .footer-top {
        padding: var(--spacing-2xl) 0 var(--spacing-lg);
    }
    
    .newsletter-form .input-group {
        flex-direction: column;
    }
    
    .newsletter-form button {
        width: 100%;
        padding: var(--spacing-md);
    }
    
    /* Back to top */
    .back-to-top {
        width: 40px;
        height: 40px;
        right: var(--spacing-md);
        bottom: var(--spacing-md);
    }
}

/* ============================================
   7. PRINT STYLES
   ============================================ */
@media print {
    /* Hide non-essential elements */
    .navbar,
    .hero-video,
    .video-overlay,
    .steam-container,
    .floating-beans,
    .scroll-indicator,
    .back-to-top,
    .slider-controls,
    .social-links,
    .newsletter-form,
    .btn,
    .menu-tabs {
        display: none !important;
    }
    
    /* Reset backgrounds */
    body {
        background: white;
        color: black;
    }
    
    .hero {
        background: var(--cream);
        color: var(--coffee-dark);
        min-height: auto;
        padding: 2rem 0;
    }
    
    .hero-content {
        position: relative;
        z-index: 1;
    }
    
    .hero-title,
    .section-title,
    .coffee-text {
        background: none;
        -webkit-text-fill-color: var(--coffee-dark);
        color: var(--coffee-dark);
    }
    
    /* Adjust sections */
    .section {
        page-break-inside: avoid;
    }
    
    /* Show links */
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: gray;
    }
    
    /* Gallery grid for print */
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================
   ADDITIONAL RESPONSIVE UTILITIES
   ============================================ */

/* Hide on specific breakpoints */
.hide-mobile {
    display: block;
}

.hide-desktop {
    display: none;
}

@media (max-width: 767px) {
    .hide-mobile {
        display: none !important;
    }
    
    .hide-desktop {
        display: block !important;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .menu-item:hover {
        transform: none;
    }
    
    .gallery-overlay {
        opacity: 1;
    }
    
    .btn:hover {
        transform: none;
    }
}

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

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed */
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --caramel: #B8860B;
        --coffee-medium: #4A2F1D;
    }
    
    .btn-primary {
        border: 2px solid white;
    }
    
    .nav-link {
        text-decoration: underline;
    }
}

/* Landscape orientation adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding-top: 80px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .scroll-indicator {
        display: none;
    }
}
