/* ================================
   THE COFFEE MAN - Responsive Styles
   Mobile-first, Tablet, Desktop
   ================================ */

/* Tablet Styles (768px and below) */
@media (max-width: 768px) {
    /* Typography Adjustments */
    html {
        font-size: 14px;
    }

    /* Container */
    .container {
        padding: 0 1.5rem;
    }

    /* Navigation */
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
        transition: left var(--transition-speed) ease;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

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

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

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

    /* Hero Section */
    .hero {
        min-height: 500px;
    }

    .hero-content {
        padding: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }

    /* Section */
    .section {
        padding: 3rem 0;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    /* Features Grid */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Menu Grid */
    .menu-grid {
        gap: 1.5rem;
    }

    .menu-category {
        padding: 1.5rem;
    }

    /* Gallery Grid */
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Testimonials */
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    /* Location Section */
    .location-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    /* Contact Section */
    .contact-content {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-section .social-links {
        align-items: center;
    }

    /* Modal */
    .modal-close {
        top: 1rem;
        right: 1.5rem;
        font-size: 2rem;
    }

    .modal-prev,
    .modal-next {
        font-size: 2rem;
        padding: 0.5rem 1rem;
    }

    .modal-prev {
        left: 1rem;
    }

    .modal-next {
        right: 1rem;
    }

    /* Back to Top */
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}

/* Mobile Styles (480px and below) */
@media (max-width: 480px) {
    /* Typography */
    html {
        font-size: 13px;
    }

    /* Container */
    .container {
        padding: 0 1rem;
    }

    /* Navigation */
    .nav-container {
        padding: 0.75rem 1rem;
    }

    .nav-logo {
        font-size: 1.2rem;
    }

    /* Hero */
    .hero {
        min-height: 450px;
    }

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

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

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

    .btn {
        padding: 0.875rem 2rem;
        font-size: 0.9rem;
    }

    /* Section */
    .section {
        padding: 2rem 0;
    }

    .section-header {
        margin-bottom: 1.5rem;
    }

    /* Feature Card */
    .feature-card {
        padding: 1.5rem;
    }

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

    /* Menu */
    .menu-category {
        padding: 1.25rem;
    }

    .menu-item {
        padding: 0.875rem;
    }

    /* Gallery */
    .gallery-grid {
        gap: 0.75rem;
    }

    /* Info Cards */
    .info-card,
    .contact-card,
    .testimonial-card {
        padding: 1.5rem;
    }

    /* Form */
    .contact-form-container {
        padding: 1.5rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 0.875rem;
    }

    /* Modal */
    .modal-content {
        max-width: 95%;
        max-height: 80vh;
    }

    .modal-close {
        font-size: 1.5rem;
    }

    .modal-prev,
    .modal-next {
        font-size: 1.5rem;
        padding: 0.375rem 0.75rem;
    }
}

/* Large Desktop (1400px and above) */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }

    .section {
        padding: 6rem 0;
    }

    .section-header {
        margin-bottom: 5rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}

/* Print Styles */
@media print {
    .navbar,
    .nav-toggle,
    .hero-buttons,
    .scroll-indicator,
    .gallery-overlay,
    .modal,
    .back-to-top,
    .contact-form-container {
        display: none !important;
    }

    .hero {
        height: auto;
        min-height: auto;
        page-break-after: always;
    }

    .section {
        page-break-inside: avoid;
        padding: 2rem 0;
    }

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

    a {
        text-decoration: underline;
    }

    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 90%;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .scroll-indicator span::after {
        animation: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000000;
        --secondary-color: #333333;
        --accent-color: #666666;
    }

    .btn-primary {
        border: 3px solid #000;
    }

    .btn-secondary {
        border: 3px solid #fff;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --white: #1A1A1A;
        --black: #F5F5F5;
        --gray-light: #2A2A2A;
        --gray-medium: #B0B0B0;
        --gray-dark: #E0E0E0;
        --light-cream: #2D2416;
    }

    .navbar {
        background: rgba(26, 26, 26, 0.98);
    }

    .hero-overlay {
        background: linear-gradient(135deg, rgba(139, 69, 19, 0.5), rgba(210, 105, 30, 0.5));
    }

    .about,
    .gallery,
    .location {
        background: #1A1A1A;
    }

    .menu,
    .contact {
        background: #2A2A2A;
    }

    .menu-category,
    .info-card,
    .contact-card,
    .testimonial-card,
    .contact-form-container {
        background: #2A2A2A;
        color: #F5F5F5;
    }

    .menu-item {
        background: #1A1A1A;
    }

    .form-group input,
    .form-group textarea {
        background: #1A1A1A;
        color: #F5F5F5;
        border-color: #404040;
    }
}

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

    .hero-content {
        padding: 1rem;
    }

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

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

    .scroll-indicator {
        display: none;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn {
        padding: 1.25rem 2.5rem;
        min-height: 48px;
    }

    .nav-link {
        padding: 1rem;
        min-height: 48px;
        display: flex;
        align-items: center;
    }

    .gallery-item {
        /* Always show gallery overlay on touch devices when tapped */
        -webkit-tap-highlight-color: transparent;
    }

    /* Disable hover effects on touch devices */
    .feature-card:hover,
    .menu-category:hover,
    .menu-item:hover,
    .gallery-item:hover,
    .testimonial-card:hover,
    .info-card:hover,
    .contact-card:hover {
        transform: none;
    }

    /* But keep active states */
    .feature-card:active,
    .menu-category:active,
    .testimonial-card:active,
    .info-card:active,
    .contact-card:active {
        transform: scale(0.98);
    }
}

/* iPad and Tablet Landscape */
@media (min-width: 769px) and (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .location-content,
    .contact-content {
        grid-template-columns: 1fr;
    }

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

/* Small Desktop */
@media (min-width: 1025px) and (max-width: 1280px) {
    .container {
        max-width: 1100px;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
