/* ===================================
   The Magnano Pizza Co - Responsive Styles
   =================================== */

/* ===================================
   Tablet Styles (768px - 1023px)
   =================================== */

@media screen and (max-width: 1023px) {
    :root {
        --spacing-3xl: 48px;
        --spacing-4xl: 64px;
    }
    
    .container {
        padding: 0 var(--spacing-md);
    }
    
    /* Gallery - 2 columns on tablet */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
    
    /* Footer - 2 columns on tablet */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-logo {
        grid-column: 1 / -1;
    }
}

/* ===================================
   Mobile Styles (< 768px)
   =================================== */

@media screen and (max-width: 767px) {
    :root {
        --h1-size: 2.5rem;
        --h2-size: 2rem;
        --h3-size: 1.5rem;
        --body-size: 1rem;
        --spacing-2xl: 32px;
        --spacing-3xl: 40px;
        --spacing-4xl: 48px;
        --header-height: 70px;
    }
    
    /* Container */
    .container {
        padding: 0 var(--spacing-md);
    }
    
    /* ===================================
       Navigation - Mobile Menu
       =================================== */
    
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: var(--spacing-4xl) var(--spacing-xl);
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right var(--transition-normal);
        z-index: 999;
        overflow-y: auto;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-item {
        width: 100%;
        margin-bottom: var(--spacing-lg);
    }
    
    .nav-link {
        display: block;
        padding: var(--spacing-sm) 0;
        font-size: 1.125rem;
    }
    
    .nav-btn {
        width: 100%;
        text-align: center;
        margin-top: var(--spacing-md);
    }
    
    /* Mobile menu overlay */
    .nav-menu.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }
    
    /* ===================================
       Hero Section
       =================================== */
    
    .hero {
        height: 70vh;
        min-height: 500px;
        background-attachment: scroll;
    }
    
    .hero-content {
        padding: var(--spacing-lg);
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: var(--spacing-md);
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
        margin-bottom: var(--spacing-xl);
    }
    
    .btn-hero {
        padding: var(--spacing-md) var(--spacing-xl);
        font-size: 1rem;
    }
    
    .scroll-indicator {
        bottom: var(--spacing-lg);
        font-size: 1.5rem;
    }
    
    /* ===================================
       Sections
       =================================== */
    
    .section-green,
    .section-light,
    .section-cream {
        padding: var(--spacing-3xl) 0;
    }
    
    .section-title,
    .section-title-dark,
    .section-title-center {
        font-size: 1.75rem;
        margin-bottom: var(--spacing-lg);
    }
    
    .section-text,
    .section-text-dark,
    .section-text-center {
        font-size: 1rem;
    }
    
    /* ===================================
       Story Sections - Stacked Layout
       =================================== */
    
    .two-column {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .two-column.reverse {
        direction: ltr;
    }
    
    .content-column {
        padding: 0;
    }
    
    .image-column {
        order: -1; /* Image always on top */
    }
    
    .quote {
        font-size: 1.125rem;
        margin-top: var(--spacing-lg);
        padding-left: var(--spacing-md);
    }
    
    /* ===================================
       Gallery - Single Column
       =================================== */
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .gallery-item {
        aspect-ratio: 4 / 3;
    }
    
    /* ===================================
       CTA Section
       =================================== */
    
    .cta-buttons {
        flex-direction: column;
        gap: var(--spacing-md);
        align-items: stretch;
    }
    
    .btn-large {
        width: 100%;
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: 1rem;
    }
    
    /* ===================================
       Footer - Stacked Layout
       =================================== */
    
    .footer {
        padding: var(--spacing-2xl) 0 var(--spacing-lg);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
        text-align: center;
    }
    
    .footer-logo {
        grid-column: 1;
    }
    
    .footer-info,
    .footer-social {
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-bottom {
        font-size: 0.75rem;
    }
    
    /* ===================================
       Contact Form - Mobile
       =================================== */
    
    .contact-form {
        padding: var(--spacing-xl) var(--spacing-lg);
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
        margin-bottom: 0;
    }
    
    .form-group {
        margin-bottom: var(--spacing-lg);
    }
    
    .form-group label {
        font-size: 0.95rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: var(--spacing-md);
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .form-submit .btn {
        width: 100%;
        min-width: auto;
    }
    
    /* ===================================
       Modals - Mobile
       =================================== */
    
    .modal.active {
        padding: var(--spacing-sm);
        align-items: flex-start;
    }
    
    .modal-content {
        padding: var(--spacing-xl) var(--spacing-lg);
        max-height: 95vh;
        margin-top: var(--spacing-lg);
    }
    
    .modal-menu {
        padding: var(--spacing-lg) var(--spacing-md);
    }
    
    .modal-close {
        top: var(--spacing-md);
        right: var(--spacing-md);
        font-size: 2rem;
        width: 36px;
        height: 36px;
    }
    
    .modal-title {
        font-size: 1.5rem;
        padding-right: var(--spacing-2xl);
        margin-bottom: var(--spacing-lg);
    }
    
    .pricing-section {
        margin-bottom: var(--spacing-xl);
    }
    
    .pricing-section h3 {
        font-size: 1.5rem;
    }
    
    .pricing-card {
        padding: var(--spacing-lg);
    }
    
    .pricing-card h4 {
        font-size: 1.25rem;
    }
    
    .price {
        font-size: 1.75rem;
    }
    
    .pricing-features li {
        font-size: 0.95rem;
        padding: var(--spacing-xs) 0;
        padding-left: var(--spacing-lg);
    }
    
    .booking-cta {
        padding: var(--spacing-lg);
    }
    
    .menu-image {
        border-radius: 4px;
    }
}

/* ===================================
   Small Mobile (< 480px)
   =================================== */

@media screen and (max-width: 479px) {
    :root {
        --h1-size: 2rem;
        --h2-size: 1.5rem;
        --spacing-lg: 16px;
        --spacing-xl: 20px;
        --spacing-2xl: 24px;
        --spacing-3xl: 32px;
        --spacing-4xl: 40px;
    }
    
    .logo-img {
        height: 50px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title,
    .section-title-dark,
    .section-title-center {
        font-size: 1.5rem;
    }
    
    .nav-menu {
        width: 90%;
        padding: var(--spacing-3xl) var(--spacing-lg);
    }
    
    .footer-logo-img {
        height: 60px;
    }
}

/* ===================================
   Landscape Mobile
   =================================== */

@media screen and (max-width: 767px) and (orientation: landscape) {
    .hero {
        height: 100vh;
        min-height: 400px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: var(--spacing-lg);
    }
    
    .scroll-indicator {
        display: none;
    }
}

/* ===================================
   Large Desktop (> 1440px)
   =================================== */

@media screen and (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-title {
        font-size: 4.5rem;
    }
    
    .hero-subtitle {
        font-size: 2rem;
    }
    
    .section-title,
    .section-title-dark,
    .section-title-center {
        font-size: 3.5rem;
    }
}

/* ===================================
   Touch Device Optimizations
   =================================== */

@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .nav-link {
        padding: var(--spacing-md) var(--spacing-sm);
    }
    
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .social-link {
        width: 48px;
        height: 48px;
    }
    
    /* Remove hover effects on touch devices */
    .gallery-item:hover {
        transform: none;
    }
    
    .gallery-item:hover img {
        transform: none;
    }
    
    .content-image:hover {
        transform: none;
    }
}

/* ===================================
   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;
    }
    
    .scroll-indicator {
        animation: none;
    }
}

/* ===================================
   High Contrast Mode
   =================================== */

@media (prefers-contrast: high) {
    :root {
        --primary-green: #1a4d2e;
        --text-dark: #000000;
    }
    
    .btn {
        border-width: 3px;
    }
    
    .nav-link::after {
        height: 3px;
    }
}

/* ===================================
   Dark Mode Support (Future Enhancement)
   =================================== */

@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here in the future */
    /* Currently maintaining light theme for brand consistency */
}
