﻿/* Variables synced with your site.css */
:root {
    --modal-navy: #2E4057; /* --color-contrast */
    --modal-teal: #6BB8A8; /* Your preferred accent */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

/* 1. Overlay - The Scroll Container */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 30, 0.95);
    backdrop-filter: blur(10px);
    z-index: 10000;
    /* FIX: This allows the popup to be scrollable if it's longer than the screen */
    display: flex;
    overflow-y: auto;
    padding: 20px 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

    .modal-overlay.active {
        opacity: 1;
        visibility: visible;
    }

/* 2. The Card */
.event-modal-card {
    background: var(--modal-navy);
    width: 92%;
    max-width: 480px; /* Mobile width */
    margin: auto; /* Keeps it centered while allowing scroll */
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    color: white;
    box-shadow: 0 40px 80px rgba(0,0,0,0.6);
    transform: translateY(30px);
    transition: transform 0.6s cubic-bezier(0.17, 0.84, 0.44, 1);
}

.modal-overlay.active .event-modal-card {
    transform: translateY(0);
}

/* 3. Mobile Image (Top of card) */
.mobile-image-header {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    border-bottom: 4px solid var(--modal-teal);
}

.modal-content-wrapper {
    padding: 30px;
}

/* Typography */
.event-label {
    color: var(--modal-teal);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 15px;
    display: block;
}

.event-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 15px;
}

.event-tagline {
    color: rgba(255,255,255,0.8);
    line-height: 1.6;
    margin-bottom: 30px;
}

.event-info-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-box {
    width: 40px;
    height: 40px;
    background: rgba(107, 184, 168, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--modal-teal);
}

.modal-cta-area {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-teal {
    background: var(--modal-teal);
    color: var(--modal-navy);
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    font-weight: 800;
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    border: none;
    color: #8fa1b3;
    text-decoration: underline;
    cursor: pointer;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    z-index: 10;
}

/* 4. Desktop Logic (The Cinematic Split) */
@media (min-width: 992px) {
    .event-modal-card {
        max-width: 1000px;
        min-height: 550px;
    }

    .mobile-image-header {
        display: none;
    }

    .modal-content-wrapper {
        min-height: 550px;
        display: flex;
        align-items: center;
        /* Cinematic Gradient Mask */
        background: linear-gradient(to right, rgba(46, 64, 87, 1) 0%, rgba(46, 64, 87, 1) 35%, rgba(46, 64, 87, 0.2) 70%, rgba(46, 64, 87, 0) 100%), var(--desktop-bg);
        background-size: cover;
        background-position: center right;
    }

    .text-content {
        width: 50%;
        padding-left: 20px;
    }

    .event-title {
        font-size: 3.5rem;
    }

    .modal-cta-area {
        flex-direction: row;
        align-items: center;
        gap: 30px;
    }
}
