﻿/* =========================
   WRAPPERS
   ========================= */

.events-wrapper {
    padding: 3rem 1rem;
}

/* Used ONLY on event details page */
.event-details-wrapper {
    padding: 3rem 1rem;
}

.events-card {
    max-width: 1200px;
    margin: auto;
    background: white;
    border-radius: 22px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

/* =========================
   HEADER
   ========================= */

.events-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 2rem 2rem 1rem;
}

    .events-header h2 {
        font-weight: 700;
        margin: 0;
    }

.events-subtitle {
    color: #64748b;
    font-size: 1rem;
}

.events-header .btn {
    border-radius: 999px;
    padding: .35rem .9rem;
    font-weight: 600;
}

/* =========================
   CALENDAR
   ========================= */

.calendar-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: .5rem;
    text-align: center;
    font-weight: 600;
    color: #475569;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
}

.calendar-cell {
    height: 110px;
    background: #f8fafc;
    border-radius: 16px;
    padding: 10px 12px;
    text-decoration: none;
    color: #0f172a;
    position: relative;
    transition: all .25s ease;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    touch-action: manipulation;
}

    .calendar-cell:hover {
        background: #e0f2fe;
        transform: translateY(-4px);
    }

    .calendar-cell.active {
        background: #dbeafe;
        box-shadow: 0 8px 20px rgba(37,99,235,.25);
        transform: scale(1.02);
    }

.has-event {
    background: #eef2ff;
}

    .has-event .day-number {
        color: #2563eb;
        font-weight: 700;
    }

.day-number {
    font-size: 1.2rem;
    font-weight: 600;
    color: #334155;
}

.event-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    position: absolute;
    bottom: 10px;
    right: 10px;
}

.event-count {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #2563eb;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 999px;
    line-height: 1;
}

/* =========================
   PREVIEW PANEL
   ========================= */

.calendar-right {
    background: #f8fafc;
    border-radius: 18px;
    padding: 1.5rem;
}

.event-preview h4 {
    font-weight: 700;
    margin-bottom: 1rem;
}

#preview-content {
    opacity: 1;
    transition: opacity .25s ease;
}

    #preview-content.fade-out {
        opacity: 0;
    }

/* =========================
   EVENT CARDS
   ========================= */

.event-card {
    background: white;
    border-radius: 14px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 10px 20px rgba(0,0,0,.06);
}

    .event-card h6 {
        margin: 0 0 .3rem;
        font-weight: 600;
    }

/* =========================
   EVENT DETAILS PAGE
   ========================= */

.event-details {
    padding: 0;
    overflow: hidden;
}

.event-hero img {
    width: 100%;
    height: 320px;
    object-fit: cover;
}

.event-header h1 {
    font-weight: 700;
    margin-bottom: .5rem;
}

.event-date {
    color: #475569;
    font-size: 1rem;
}

.event-content {
    padding: 0 2rem 2rem;
}

    .event-content h5 {
        font-weight: 600;
        margin-bottom: .75rem;
    }

    .event-content p {
        line-height: 1.7;
        color: #334155;
        margin-bottom: 1rem;
    }

.event-actions {
    padding: 1.5rem 2rem 2rem;
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}

/* =========================
   MOBILE FIXES
   ========================= */

@media (max-width: 768px) {

    .events-card {
        padding: 1.25rem;
    }

    .events-header {
        flex-direction: column;
        gap: .75rem;
        text-align: center;
    }

        .events-header h2 {
            font-size: 1.4rem;
        }

    .calendar-layout {
        grid-template-columns: 1fr;
    }

    .calendar-cell {
        height: 70px;
        padding: 6px;
        border-radius: 12px;
    }

    .day-number {
        font-size: 1rem;
    }

    .calendar-weekdays {
        margin-bottom: .25rem;
    }

        .calendar-weekdays div {
            font-size: .75rem;
        }

    .calendar-grid {
        gap: 8px;
    }

    .calendar-right {
        margin-top: 1rem;
        padding: 1rem;
    }

    .month-nav {
        padding: .35rem .6rem;
    }
}
