/* 
 * Eggington's Website Responsive Styles
 * Additional responsive styles to enhance mobile experience
 */

/* ===== Mobile Menu Styles ===== */
.hamburger.active {
    background-color: transparent;
}

.hamburger.active::before {
    transform: rotate(45deg);
    top: 0;
}

.hamburger.active::after {
    transform: rotate(-45deg);
    bottom: 0;
}

/* ===== Tablet Styles (768px - 1023px) ===== */
@media (max-width: 1023px) {
    /* Adjust spacing */
    .section {
        padding: var(--space-lg) 0;
    }
    
    /* Adjust grid layouts */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Adjust header for tablet */
    .nav-item {
        margin: 0 var(--space-xs);
    }
    
    .nav-link {
        font-size: 0.9rem;
    }
    
    /* Adjust hero section */
    .hero-text {
        max-width: 500px;
    }
    
    /* Adjust hours & location section */
    .hours-location-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .map {
        grid-column: span 2;
    }
}

/* ===== Mobile Styles (up to 767px) ===== */
@media (max-width: 767px) {
    /* Adjust button sizes for better touch targets */
    .btn {
        padding: 12px 20px;
        width: 100%;
        margin-bottom: var(--space-xs);
    }
    
    /* Improve mobile menu */
    .mobile-menu {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        z-index: 99;
    }
    
    .mobile-nav-link {
        padding: var(--space-sm) 0;
    }
    
    /* Adjust hero section */
    .hero {
        background-position: center right;
    }
    
    .hero-text {
        background-color: rgba(0, 0, 0, 0.5);
        padding: var(--space-md);
        border-radius: var(--border-radius-md);
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
    }
    
    /* Adjust welcome section */
    .welcome-content {
        gap: var(--space-md);
    }
    
    /* Adjust testimonials */
    .testimonial {
        margin-bottom: var(--space-md);
    }
    
    /* Adjust gallery items */
    .gallery-item {
        height: 250px;
    }
    
    /* Adjust form elements */
    input, select, textarea {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Adjust footer */
    .footer {
        padding: var(--space-lg) 0 var(--space-md);
    }
    
    .footer-content {
        gap: var(--space-lg);
    }
    
    .social-icons a {
        width: 48px;
        height: 48px;
    }
}

/* ===== Small Mobile Styles (up to 480px) ===== */
@media (max-width: 480px) {
    :root {
        --container-padding: 12px;
    }
    
    h1 {
        font-size: 1.5rem; /* 24px */
    }
    
    h2 {
        font-size: 1.375rem; /* 22px */
    }
    
    .logo img {
        height: 50px;
    }
    
    .hero {
        height: 350px;
    }
    
    .gallery-filters .btn {
        margin-bottom: var(--space-xs);
        font-size: 0.875rem;
        padding: 8px 16px;
    }
    
    .menu-filters .btn {
        margin-bottom: var(--space-xs);
        font-size: 0.875rem;
        padding: 8px 16px;
    }
    
    .gallery-item {
        height: 200px;
    }
    
    .footer h3 {
        font-size: 1.125rem;
    }
}

/* ===== Print Styles ===== */
@media print {
    .header, .footer, .hero, .newsletter, .cta-section {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        page-break-inside: avoid;
    }
    
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }
    
    .menu-item, .dish-card {
        page-break-inside: avoid;
    }
    
    a {
        color: #000;
        text-decoration: none;
    }
    
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
}

/* ===== Accessibility Enhancements ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode improvements */
@media (forced-colors: active) {
    .btn, .nav-link, .mobile-nav-link, .footer a {
        forced-color-adjust: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .mobile-menu, .header {
        background-color: var(--color-charcoal);
    }
    
    .mobile-nav-link, .nav-link {
        color: var(--color-white);
    }
    
    .hamburger, .hamburger::before, .hamburger::after {
        background-color: var(--color-white);
    }
}



/* ===== Additional Responsive Enhancements ===== */

/* Skip to content link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-deep-purple);
    color: white;
    padding: 8px;
    z-index: 1000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Header scrolled state */
.header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Responsive tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Touch support for gallery items */
.gallery-item.touch-active .gallery-item-overlay {
    transform: translateY(0);
}

/* Improved form styling on mobile */
@media (max-width: 767px) {
    input, select, textarea, button {
        margin-bottom: var(--space-sm);
    }
    
    .form-group {
        margin-bottom: var(--space-md);
    }
    
    /* Fix for iOS input zoom */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px;
    }
    
    /* Better touch targets */
    .nav-link, .mobile-nav-link, .btn, .social-icons a {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Improved mobile menu animation */
    .mobile-menu {
        transition: transform 0.3s ease, opacity 0.3s ease;
        opacity: 0;
        display: block;
        pointer-events: none;
    }
    
    .mobile-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
}

/* Smooth header transition */
.header {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Improved focus styles for accessibility */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
/*    outline: 2px solid var(--color-deep-purple);
    outline-offset: 2px;*/
}

/* Responsive images */
img {
    height: auto;
    max-width: 100%;
}

/* Improved spacing on small screens */
@media (max-width: 480px) {
    .section {
        padding: var(--space-md) 0;
    }
    
    p {
        margin-bottom: var(--space-sm);
    }
    
    .container {
        padding: 0 var(--space-sm);
    }
}

