/* Events Page Styles */

/* Events Header */
.events-header {
    background-color: var(--green);
    padding: 150px 0 100px 0;
    margin-top: 90px;
    position: relative;
    text-align: center;
    color: var(--light);
}

/* Events Section */
.events-section {
    background-color: var(--cream);
    padding: 80px 0;
    min-height: 60vh;
}

/* Events Grid */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Event Card */
.event-card {
    background-color: var(--light);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
}

.event-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.event-card.featured {
    border: 3px solid var(--green);
}

.event-card.featured::before {
    content: '⭐ FEATURED';
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--green);
    color: var(--light);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 10;
}

/* Event Image */
.event-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.event-card:hover .event-image img {
    transform: scale(1.05);
}

.event-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.event-card:hover .event-overlay {
    opacity: 1;
}

.event-view-btn {
    color: var(--light);
    font-weight: 700;
    font-size: 1rem;
}

/* Event Content */
.event-content {
    padding: 25px;
}

.event-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--dark);
}

.event-date,
.event-location {
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: #666;
}

.event-description {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--dark);
    margin-top: 15px;
}

/* Event Detail Modal */
.event-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    overflow: auto;
}

.event-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-modal-content {
    background-color: var(--light);
    margin: 20px;
    border-radius: 15px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.event-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--light);
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.event-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.event-detail-header {
    width: 100%;
    height: 350px;
    overflow: hidden;
}

.event-detail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-detail-body {
    padding: 40px;
}

.event-detail-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 25px;
    color: var(--dark);
}

.event-detail-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background-color: var(--cream);
    border-radius: 10px;
}

.event-meta-item {
    font-size: 1rem;
}

.event-meta-item strong {
    display: block;
    margin-bottom: 5px;
    color: var(--green);
}

.event-detail-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--dark);
}

.event-detail-description p {
    margin-bottom: 15px;
}

/* Loading and Error States */
.loading,
.no-events,
.error {
    text-align: center;
    font-size: 1.2rem;
    color: #666;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.error {
    color: var(--red);
}

/* Admin Styles */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.event-image-preview {
    max-width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    margin-top: 15px;
    border-radius: 10px;
    border: 2px solid var(--green);
}

/* Responsive Design */
@media (max-width: 768px) {
    .events-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .event-image {
        height: 200px;
    }

    .event-detail-title {
        font-size: 1.8rem;
    }

    .event-detail-body {
        padding: 25px;
    }

    .event-detail-meta {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .event-modal-content {
        width: 95%;
        margin: 10px;
    }
}

@media (max-width: 480px) {
    .event-card.featured::before {
        font-size: 0.65rem;
        padding: 4px 10px;
        top: 10px;
        right: 10px;
    }

    .event-content {
        padding: 20px;
    }

    .event-title {
        font-size: 1.2rem;
    }

    .event-modal-close {
        width: 40px;
        height: 40px;
        font-size: 30px;
    }
}

/* Event Booking Section */
.event-booking-section {
    margin-top: 30px;
    padding: 25px;
    background-color: #f8f9fa;
    border-radius: 8px;
    text-align: center;
    border: 2px solid #e9ecef;
}

.event-booking-section button {
    padding: 12px 35px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px 0;
}

.booking-status {
    margin-top: 15px;
    font-size: 1rem;
    color: var(--green);
    font-weight: 600;
}
