/* ===================================
   Café Bornträger - Responsive Styles
   Mobile-first responsive design
   =================================== */

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

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

    .section-title {
        font-size: 3.5rem;
    }
}

/* Desktop (1024px - 1399px) */
@media screen and (max-width: 1399px) {
    :root {
        --spacing-xl: 5rem;
    }
}

/* Tablet (768px - 1023px) */
@media screen and (max-width: 1023px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 4rem;
    }

    .section-title {
        font-size: 2.5rem;
    }

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

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

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

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

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

    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .modal-prev {
        left: var(--spacing-xs);
    }

    .modal-next {
        right: var(--spacing-xs);
    }

    .modal-close {
        top: var(--spacing-xs);
        right: var(--spacing-xs);
    }
}

/* Mobile (max-width: 767px) */
@media screen and (max-width: 767px) {
    :root {
        --font-size-base: 15px;
        --spacing-md: 1.5rem;
        --spacing-lg: 2.5rem;
        --spacing-xl: 3rem;
    }

    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }

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

    .lead {
        font-size: 1.1rem;
    }

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

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--color-white);
        flex-direction: column;
        padding: var(--spacing-md);
        gap: 0;
        transition: left 0.3s ease;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }

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

    .nav-menu li {
        border-bottom: 1px solid var(--color-border);
    }

    .nav-link {
        display: block;
        padding: var(--spacing-sm) 0;
    }

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

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

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

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

    .hero-buttons {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .hero-buttons .btn {
        width: 100%;
    }

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

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

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

    /* Menu */
    .menu-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-xs);
    }

    .menu-item-header h4 {
        font-size: 1.1rem;
    }

    .price {
        font-size: 1.2rem;
    }

    .featured-badge {
        top: -10px;
        right: var(--spacing-sm);
        font-size: 0.75rem;
        padding: 4px 8px;
    }

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

    .modal-content {
        max-width: 95vw;
    }

    .modal-prev,
    .modal-next {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .modal-close {
        width: 40px;
        height: 40px;
        font-size: 1.8rem;
    }

    /* Reviews */
    .reviews-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    .rating-stars {
        font-size: 1.5rem;
    }

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

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

    .hours-table {
        font-size: 0.9rem;
    }

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

    .contact-details {
        gap: var(--spacing-sm);
    }

    .contact-icon {
        font-size: 1.2rem;
    }

    .form-group input,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }

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

    .footer-section {
        text-align: center;
    }

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

/* Small Mobile (max-width: 479px) */
@media screen and (max-width: 479px) {
    :root {
        --spacing-sm: 0.75rem;
        --spacing-md: 1.25rem;
        --spacing-lg: 2rem;
        --spacing-xl: 2.5rem;
    }

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

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

    .section-title {
        font-size: 1.75rem;
    }

    .navbar .container {
        padding: var(--spacing-sm);
    }

    .nav-brand h1 {
        font-size: 1.4rem;
    }

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

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

    .review-card {
        padding: var(--spacing-sm);
    }

    .contact-form-container {
        padding: var(--spacing-sm);
    }

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

/* Landscape Mobile (height < 500px) */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .hero {
        height: auto;
        min-height: 400px;
        padding: var(--spacing-xl) 0;
    }

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

    .scroll-indicator {
        display: none;
    }

    .nav-menu {
        flex-direction: row;
        flex-wrap: wrap;
        height: auto;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hero-buttons,
    .scroll-indicator,
    .gallery-overlay,
    .contact-form-container,
    .nav-toggle,
    .modal-close,
    .modal-prev,
    .modal-next {
        display: none;
    }

    body {
        background: white;
    }

    section {
        page-break-inside: avoid;
    }

    .hero {
        height: auto;
        padding: var(--spacing-lg) 0;
    }

    .hero-overlay {
        display: none;
    }

    .hero-content {
        color: var(--color-dark);
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --color-primary: #6b4423;
        --color-text: #000000;
        --color-border: #999999;
    }

    .btn-primary {
        border: 2px solid var(--color-dark);
    }
}

/* 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-title,
    .hero-subtitle,
    .hero-description,
    .hero-buttons {
        animation: none;
    }

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

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    /* Optional: Add dark mode styles if desired in future */
    /* Currently keeping the warm, light cafe aesthetic */
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px; /* Touch target size */
    }

    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .gallery-item:active .gallery-overlay {
        opacity: 1;
    }

    .gallery-item:active img {
        transform: scale(1.05);
    }
}

/* Very Large Screens (4K and above) */
@media screen and (min-width: 1920px) {
    .hero-title {
        font-size: 5.5rem;
    }

    .section-title {
        font-size: 4rem;
    }

    .container {
        max-width: 1600px;
    }
}
