/* ============================================
   RESPONSIVE STYLES FOR PORTUGAL AGENDA
   Mobile-First Approach
   ============================================ */

/* ============================================
   MOBILE MENU STYLES
   ============================================ */

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    transition: transform 0.3s ease;
}

.mobile-menu-toggle:hover {
    transform: scale(1.1);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile Navigation Styles */
@media (max-width: 1024px) {
    .mobile-menu-toggle {
        display: block;
    }

    .header-content {
        position: relative;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background-image: url('includes/bg.png');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        background-color: #fff;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        transition: right 0.3s ease;
        overflow-y: auto;
        padding: 80px 0 30px;
    }

    .nav.active {
        right: 0;
    }

    .nav ul {
        flex-direction: column;
        gap: 0;
        padding: 0;
    }

    .nav ul li {
        width: 100%;
        border-bottom: 1px solid rgba(240, 240, 240, 0.5);
    }

    .nav-link {
        display: block;
        padding: 18px 25px;
        font-size: 16px;
        color: #333;
        transition: background 0.2s ease;
        background: rgba(255, 255, 255, 0.7);
        text-decoration: none;
    }

    .nav-link:hover {
        background: rgba(248, 248, 248, 0.9);
    }

    .nav-link i {
        margin-right: 12px;
        width: 20px;
        text-align: center;
    }

    .language-switcher {
        padding: 18px 25px;
        display: flex;
        align-items: center;
        gap: 10px;
        background: rgba(255, 255, 255, 0.7);
    }

    .language-switcher .nav-link {
        padding: 8px 12px;
        border-radius: 4px;
        background: rgba(240, 240, 240, 0.8);
        display: inline-block;
    }

    .language-switcher .nav-link:hover {
        background: rgba(224, 224, 224, 0.9);
    }

    /* Close button for mobile menu */
    .nav::before {
        content: '\f00d';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        position: absolute;
        top: 20px;
        right: 20px;
        font-size: 24px;
        color: #333;
        cursor: pointer;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.8);
        transition: background 0.2s ease;
    }

    .nav::before:hover {
        background: rgba(240, 240, 240, 0.9);
    }

    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
    }
}

/* ============================================
   TABLET STYLES (max-width: 1024px)
   ============================================ */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }

    /* Header */
    .header-content {
        flex-wrap: nowrap;
    }

    /* Event Layout */
    .event-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .booking-sidebar {
        position: static;
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }

    /* Events Grid */
    .events-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* Footer */
    .footer-columns {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    /* Bundle Offers */
    .bundle-offers {
        grid-template-columns: 1fr;
    }

    /* Checkout Layout */
    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .order-summary {
        order: -1;
        margin-bottom: 30px;
    }
}

/* ============================================
   MOBILE STYLES (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    /* Typography */
    h1 {
        font-size: 28px;
    }

    h2 {
        font-size: 24px;
    }

    h3 {
        font-size: 20px;
    }

    /* Header */
    .header {
        padding: 15px 0;
    }

    .logo {
        flex: 1;
    }

    .logo-text {
        font-size: 18px;
    }

    .nav {
        width: 260px;
    }

    .nav-link {
        padding: 16px 20px;
        font-size: 15px;
    }

    .language-switcher {
        padding: 16px 20px;
    }

    /* Hero Slider */
    .hero-slider {
        height: 300px;
    }

    .slider-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .slider-dots {
        bottom: 15px;
    }

    .dot {
        width: 8px;
        height: 8px;
    }

    .slide-content {
        padding: 40px 20px;
    }

    .slide-content h2 {
        font-size: 24px;
        margin-bottom: 10px;
    }

    .slide-content p {
        font-size: 14px;
    }

    /* Breadcrumb */
    .breadcrumb {
        padding: 10px 0;
        font-size: 13px;
    }

    /* Event Hero */
    .event-hero {
        height: 250px;
    }

    /* Events Grid */
    .events-grid {
        grid-template-columns: 1fr;
    }

    .event-card {
        max-width: 100%;
    }

    /* Section Header */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    /* Booking Widget */
    .booking-widget {
        padding: 20px;
    }

    .step-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .checkout-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    /* Ticket Selection */
    .ticket-row {
        flex-direction: column;
        gap: 15px;
    }

    .ticket-info {
        width: 100%;
        justify-content: space-between;
    }

    .ticket-controls {
        width: 100%;
        justify-content: center;
    }

    /* Date Selection */
    .date-options {
        flex-direction: column;
    }

    .date-btn {
        width: 100%;
    }

    /* Time Selection */
    .time-options {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Bundle Cards */
    .bundle-card {
        padding: 15px;
    }

    .bundle-card img {
        height: 200px;
    }

    /* Checkout Form */
    .form-row {
        flex-direction: column;
    }

    .form-row .form-field {
        width: 100%;
    }

    /* Order Item */
    .order-item {
        flex-direction: column;
        text-align: center;
    }

    .order-item img {
        width: 100%;
        height: 150px;
    }

    .item-details {
        width: 100%;
    }

    /* Price Breakdown */
    .price-breakdown {
        font-size: 14px;
    }

    /* Footer */
    .footer-columns {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-logo img {
        max-width: 150px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
    }

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

    /* Event Description */
    .event-description {
        font-size: 15px;
    }

    /* Modal */
    .booking-modal {
        width: 95%;
        max-height: 95vh;
    }

    .booking-modal-body {
        max-height: calc(95vh - 80px);
    }
}

/* ============================================
   SMALL MOBILE STYLES (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
    /* Container */
    .container {
        padding: 0 15px;
    }

    /* Typography */
    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 20px;
    }

    h3 {
        font-size: 18px;
    }

    /* Header */
    .logo img {
        max-height: 35px;
    }

    .logo-text {
        font-size: 16px;
    }

    .nav {
        width: 240px;
    }

    .nav-link {
        padding: 14px 18px;
        font-size: 14px;
    }

    .language-switcher {
        padding: 14px 18px;
    }

    /* Hero Slider */
    .hero-slider {
        height: 200px;
    }

    .slider-btn {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    /* Event Hero */
    .event-hero {
        height: 180px;
    }

    /* Booking Widget */
    .booking-widget {
        padding: 15px;
    }

    .step-btn {
        padding: 12px;
        font-size: 14px;
    }

    /* Ticket Controls */
    .qty-circle-btn {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }

    .qty-display {
        font-size: 18px;
        min-width: 40px;
    }

    /* Time Selection */
    .time-options {
        grid-template-columns: 1fr;
    }

    .time-btn {
        padding: 12px;
    }

    /* Bundle Card */
    .bundle-card h4 {
        font-size: 16px;
    }

    .bundle-price {
        flex-direction: column;
        gap: 10px;
    }

    .book-now-btn {
        width: 100%;
    }

    /* Form Fields */
    .form-field input,
    .form-field select {
        font-size: 14px;
        padding: 10px;
    }

    /* Checkbox Field */
    .checkbox-field {
        font-size: 13px;
    }

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

    /* Footer */
    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form input {
        width: 100%;
    }

    .newsletter-form button {
        width: 100%;
    }

    /* Gift Card */
    .gift-card-option {
        padding: 12px;
        font-size: 14px;
    }

    .gift-card-form {
        padding: 15px;
    }

    .gift-card-title {
        font-size: 16px;
    }

    .gift-card-description {
        font-size: 13px;
    }

    /* Modal */
    .booking-modal {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .booking-modal-body {
        max-height: calc(100vh - 70px);
    }

    .booking-modal-close {
        font-size: 28px;
    }

    /* Payment Section */
    .card-logos img {
        max-height: 25px;
    }

    /* Promo Code */
    .promo-input-form {
        flex-direction: column;
    }

    .apply-promo-btn {
        width: 100%;
    }
}

/* ============================================
   LANDSCAPE MOBILE (max-height: 500px)
   ============================================ */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-slider {
        height: 250px;
    }

    .event-hero {
        height: 200px;
    }

    .booking-modal {
        max-height: 95vh;
    }

    .booking-modal-body {
        max-height: calc(95vh - 60px);
    }
}

/* ============================================
   UTILITY CLASSES FOR RESPONSIVE
   ============================================ */

/* Hide on Mobile */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

/* Hide on Desktop */
@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}

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

/* Responsive Tables */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Touch-Friendly Buttons */
@media (max-width: 768px) {
    button,
    .btn,
    a.btn {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Responsive Spacing */
@media (max-width: 768px) {
    .events-section {
        padding: 30px 0;
    }

    .event-content {
        padding: 20px 0;
    }

    .footer {
        padding: 30px 0 20px;
    }
}

/* Responsive Text Alignment */
@media (max-width: 768px) {
    .text-center-mobile {
        text-align: center;
    }
}

/* Prevent Horizontal Scroll */
body {
    overflow-x: hidden;
}

/* Responsive Container Max-Width */
@media (max-width: 1400px) {
    .container {
        max-width: 1200px;
    }
}

@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 540px;
    }
}

@media (max-width: 576px) {
    .container {
        max-width: 100%;
    }
}

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

/* Focus Visible for Keyboard Navigation */
@media (max-width: 768px) {
    *:focus-visible {
        outline: 2px solid #e91e63;
        outline-offset: 2px;
    }
}

/* Larger Touch Targets */
@media (max-width: 768px) {
    .qty-circle-btn,
    .date-btn,
    .time-btn {
        min-height: 44px;
        min-width: 44px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .header,
    .footer,
    .booking-sidebar,
    .slider-btn,
    .slider-dots,
    .nav,
    .mobile-menu-toggle,
    .mobile-menu-overlay {
        display: none !important;
    }

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

    .container {
        max-width: 100%;
        padding: 0;
    }

    .event-layout {
        grid-template-columns: 1fr;
    }

    a {
        text-decoration: underline;
        color: #000;
    }

    img {
        max-width: 100%;
        page-break-inside: avoid;
    }
}
