/* Enhanced Responsive Design Improvements */

/* Base responsive improvements */
@media (max-width: 320px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .hero__card {
        width: 260px;
        height: 350px;
        border-radius: 130px 130px 0 0;
        padding: 1.5rem;
    }
    
    .hero__card-logo img {
        max-width: 150px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .btn {
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
    }
}

/* Improved mobile navigation */
@media (max-width: 767px) {
    .header__nav {
        padding: 0.5rem 1rem;
    }
    
    .header__logo img {
        height: 35px;
    }
    
    .mobile-menu {
        width: min(90vw, 300px);
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .mobile-menu__nav a {
        font-size: 1.1rem;
        padding: 0.75rem;
    }
}

/* Better tablet layout */
@media (min-width: 768px) and (max-width: 1024px) {
    .hero__card {
        width: 400px;
        height: 500px;
        border-radius: 200px 200px 0 0;
    }
    
    .event {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        align-items: center;
    }
    
    .gallery__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .booking__form {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .booking__submit {
        grid-column: 1 / -1;
        justify-self: center;
        max-width: 300px;
    }
}

/* Desktop optimizations */
@media (min-width: 1025px) {
    .hero {
        min-height: 100vh;
    }
    
    .about__content {
        grid-template-columns: auto 1fr;
        gap: 8rem;
        align-items: start;
    }
    
    .event {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
        align-items: center;
    }
    
    .booking__form {
        display: flex;
        flex-direction: row;
        gap: 2rem;
        max-width: 1200px;
        margin: 0 auto;
                margin-left: 0rem;

    }
    
    .form-group {
        flex: 1;
    }
    
    .booking__submit {
        align-self: end;
        flex-shrink: 0;
    }
}

/* Large desktop improvements */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }
    
    .hero__card {
        width: 600px;
        height: 650px;
        border-radius: 300px 300px 0 0;
    }
    
    .section {
        padding: 4rem 0;
    }
}

/* Ultra-wide screens */
@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }
    
    .hero__card {
        width: 700px;
        height: 750px;
        border-radius: 350px 350px 0 0;
    }
}

/* Improved touch targets for mobile */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .header__mobile-toggle,
    .mobile-menu__close,
    .gallery-modal__close,
    .review-modal__close {
        min-height: 44px;
        min-width: 44px;
    }
    
    .mobile-menu__language-flag {
        width: 44px;
        height: 44px;
    }
    
    .form-input {
        min-height: 48px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn--outline,
    .form-input {
        border-width: 3px;
    }
    
    .hero__card {
        border: 2px solid #ffffff;
    }
}

/* Reduced motion preferences */
@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;
    }
    
    .loading-spinner {
        animation: none;
    }
}

/* Print styles */
@media print {
    .header,
    .mobile-menu,
    .loading-screen,
    .gallery-modal,
    .review-modal,
    .btn {
        display: none !important;
    }
    
    body {
        color: #000 !important;
        background: #fff !important;
    }
    
    .hero__card {
        background: #fff !important;
        color: #000 !important;
        border: 2px solid #000 !important;
    }
    
    .section {
        page-break-inside: avoid;
        margin: 1rem 0;
    }
}

/* Landscape orientation fixes */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 400px;
    }
    
    .hero__card {
        width: 300px;
        height: 250px;
        border-radius: 150px 150px 0 0;
    }
    
    .section {
        padding: 1.5rem 0;
    }
}

/* Container query support for modern browsers */
@supports (container-type: inline-size) {
    .hero {
        container-type: inline-size;
    }
    
    @container (max-width: 600px) {
        .hero__card {
            width: 280px;
            height: 400px;
        }
    }
}

/* Grid fallback for older browsers */
@supports not (display: grid) {
    .gallery__grid {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .gallery__item {
        flex: 1 1 300px;
    }
    
    .footer__content {
        display: flex;
        flex-wrap: wrap;
        gap: 2rem;
    }
    
    .footer__section {
        flex: 1 1 250px;
    }
}

/* Flexbox fallback */
@supports not (display: flex) {
    .header__nav {
        display: table;
        width: 100%;
    }
    
    .header__logo,
    .header__menu,
    .header__mobile-toggle {
        display: table-cell;
        vertical-align: middle;
    }
}