/* ============================================
   RESPONSIVE DESIGN - Mobile First Approach
   Café Residenz am Weißen See
   ============================================ */

/* ============================================
   TABLET - 768px and below
   ============================================ */
@media screen and (max-width: 768px) {
    /* Typography adjustments */
    html {
        font-size: 15px;
    }

    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 280px;
        height: calc(100vh - 70px);
        flex-direction: column;
        background-color: var(--white);
        box-shadow: var(--shadow-lg);
        padding: var(--spacing-md);
        transition: var(--transition-normal);
        overflow-y: auto;
        align-items: flex-start;
    }

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

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

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

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

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

    .nav-link {
        width: 100%;
        padding: var(--spacing-sm) 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    /* Hero Section */
    .hero {
        background-attachment: scroll;
        min-height: 80vh;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

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

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

    .about-image {
        order: -1;
        max-height: 400px;
    }

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

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

    .location-map {
        order: -1;
    }

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

    .contact-info {
        order: 2;
    }

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

    /* Reviews */
    .reviews-grid {
        grid-template-columns: 1fr;
    }

    /* Lightbox */
    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        right: 10px;
        top: 10px;
    }

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

    /* Back to top */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* ============================================
   MOBILE - 480px and below
   ============================================ */
@media screen and (max-width: 480px) {
    /* Typography */
    html {
        font-size: 14px;
    }

    /* Spacing adjustments */
    :root {
        --spacing-xs: 0.5rem;
        --spacing-sm: 0.75rem;
        --spacing-md: 1.5rem;
        --spacing-lg: 2.5rem;
        --spacing-xl: 4rem;
    }

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

    /* Navigation */
    .logo-text {
        font-size: 1.25rem;
    }

    .logo-subtext {
        font-size: 0.75rem;
    }

    .nav-menu {
        width: 100%;
        right: -100%;
    }

    /* Hero */
    .hero {
        min-height: 70vh;
    }

    .scroll-indicator {
        display: none;
    }

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

    /* Menu */
    .menu-item-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .price {
        margin-top: var(--spacing-xs);
    }

    .services-list {
        grid-template-columns: 1fr;
    }

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

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

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

    /* Form */
    .contact-form {
        padding: var(--spacing-md);
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    /* Lightbox */
    .lightbox-prev,
    .lightbox-next {
        font-size: 2rem;
    }

    .lightbox-close {
        font-size: 2.5rem;
    }

    /* Back to top */
    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

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

    /* Rating */
    .score {
        font-size: 3rem;
    }

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

/* ============================================
   LARGE DESKTOP - 1400px and above
   ============================================ */
@media screen and (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }

    html {
        font-size: 18px;
    }

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

    /* Features - 4 columns */
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .navbar,
    .hero-buttons,
    .scroll-indicator,
    .mobile-menu-toggle,
    .back-to-top,
    .lightbox,
    .contact-form,
    .gallery-overlay {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    .section-dark {
        background: #fff;
        color: #000;
    }

    .section-dark h1,
    .section-dark h2,
    .section-dark h3,
    .section-dark h4,
    .section-dark h5,
    .section-dark h6,
    .section-dark p {
        color: #000;
    }

    a {
        text-decoration: underline;
    }

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

    .hero {
        page-break-after: always;
    }
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 3px solid var(--accent-light);
    outline-offset: 3px;
}

/* Reduced motion for users who prefer it */
@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;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000000;
        --text-dark: #000000;
        --bg-light: #FFFFFF;
    }

    .btn {
        border: 2px solid currentColor;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    /* The cafe design is already warm and works well in dark mode */
    /* No changes needed as the dark sections use appropriate colors */
}

/* ============================================
   LANDSCAPE ORIENTATION
   ============================================ */
@media screen and (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
    }

    .scroll-indicator {
        display: none;
    }

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

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets for mobile */
    .btn {
        min-height: 48px;
        min-width: 48px;
    }

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

    .gallery-item {
        cursor: default;
    }

    /* Show gallery overlay on touch devices */
    .gallery-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    }

    /* Remove hover effects */
    .feature-item:hover,
    .gallery-item:hover img,
    .about-image:hover img {
        transform: none;
    }
}
