/* Modal Overlay (Background) */
.event-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Dimmed background */
    backdrop-filter: blur(4px); /* Blur effect */
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* The Modal Box */
.event-modal-box {
    background: #fff;
    width: 100%;
    max-width: 600px; /* Wider than the card */
    border-radius: 22px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 90vh; /* Prevents it from being taller than screen */
    transform-origin: center;
}

/* Close Button */
.close-modal-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    font-weight: bold;
    color: #fff;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    transition: transform 0.2s ease;
}

.close-modal-btn:hover {
    transform: scale(1.2);
    color: #F4B400;
}

/* Image Wrapper */
.event-modal-image-wrapper {
    position: relative;
    width: 100%;
    height: 250px; /* Fixed height for header image */
    flex-shrink: 0;
}

.event-modal-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Updated .modal-tag with visual styles */
.modal-tag {
    /* Positioning */
    position: absolute;
    top: 20px !important;
    left: 20px !important;
    z-index: 5;

    /* Visual Styles (Copied from your card tag) */
    color: #F4B400;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 30px;
    padding: 5px 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    
    /* Optional: Add shadow for better visibility on modal images */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); 
}

/* Modal Content Area */
.event-modal-content {
    padding: 25px 30px;
    overflow-y: auto; /* Allows text to scroll if very long */
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Title */
.modal-title {
    color: #111;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 5px;
}

/* Reuse your Scope styling, just adding margin */
.modal-scope {
    border-bottom: 1px solid rgba(0,0,0,0.08);
    padding-bottom: 15px;
    margin-bottom: 10px;
}

/* Description Text */
.modal-text {
    color: #555;
    font-size: 1rem;
    line-height: 1.7;
    text-align: justify;
}

/* Custom Scrollbar for the modal text */
.event-modal-content::-webkit-scrollbar {
    width: 8px;
}
.event-modal-content::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 4px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .event-modal-box {
        max-width: 95%;
    }
    .event-modal-image-wrapper {
        height: 200px;
    }
}