/* ========================================
   Event Page - List Events
   ======================================== */

/* Container and Background */
.calendar-section-wrapper {
    background-color: #f8efe5;
    padding: 40px;
    color: #333;
}

/* Top Header */
.calendar-section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 24px;
}

.calendar-section-header h2 {
    font-size: 32px;
    font-weight: 300;
    margin: 0;
    color: #4a4a4a;
}

.full-calendar-link {
    color: #b75c4b;
    text-decoration: none;
    font-size: 16px;
}

.full-calendar-link:hover {
    text-decoration: underline;
}

/* Grid */
.calendar-events {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

/* Card */
.calendar-card {
    min-width: 0;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

/* Image & Badge Overlay */
.calendar-card-image-wrap {
    position: relative;
}

.calendar-card-image {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.calendar-date-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 12px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.calendar-date-badge .badge-month {
    display: block;
    font-size: 11px;
    color: #b75c4b;
    font-weight: 600;
    letter-spacing: 1.5px;
}

.calendar-date-badge .badge-day {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #333;
    line-height: 1;
    margin-top: 2px;
}

/* Card Content */
.calendar-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.calendar-type {
    margin: 0 0 10px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #b75c4b;
    font-weight: 600;
}

.calendar-card h3 {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    color: #333;
}

.calendar-detail {
    margin: 0 0 20px;
    font-size: 14px;
    color: #888;
}

/* Event Action Link */
.calendar-action-link {
    display: inline-block;
    margin-top: auto;
    color: #b75c4b;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

.calendar-action-link:hover {
    color: #333333;
    text-decoration: underline;
}

.calendar-action-link.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Footer (Instagram) */
.calendar-section-footer {
    display: flex;
    justify-content: flex-start;
    margin-top: 20px;
}

.calendar-section-footer a {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-decoration: none;
    color: #4a4a4a;
    font-size: 16px;
    gap: 8px;
}

.calendar-section-footer a:hover {
    color: #b75c4b;
}

.instagram-icon {
    color: #b75c4b;
    flex-shrink: 0;
}

/* Responsive - Calendar Event List */

/* Prevent padding from increasing element width */
.calendar-section-wrapper,
.calendar-section-wrapper *,
.featured-event-card,
.featured-event-card * {
    box-sizing: border-box;
}

.calendar-section-wrapper {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

/* Tablet */
@media (max-width: 900px) {
    .calendar-events {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    .calendar-card {
        min-width: 0;
        max-width: 100%;
    }

    .calendar-card-image {
        height: 200px;
    }

    .calendar-card-content {
        padding: 20px;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .calendar-section-wrapper {
        padding: 20px 16px;
        min-width: 0;
    }

    .calendar-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .calendar-section-header h2 {
        font-size: 28px;
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .calendar-events {
        display: grid !important;
        grid-template-columns: 1fr !important;
        width: 100% !important;
        min-width: 0;
        gap: 20px !important;
    }

    .calendar-card {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .calendar-card-image-wrap {
        width: 100%;
        min-width: 0;
    }

    .calendar-card-image {
        display: block;
        width: 100%;
        max-width: 100%;
        height: 200px;
        object-fit: cover;
    }

    .calendar-card-content {
        width: 100%;
        min-width: 0;
        padding: 20px 16px;
        overflow-wrap: anywhere;
    }

    .calendar-card h3 {
        font-size: 19px;
        overflow-wrap: anywhere;
    }

    .calendar-detail,
    .calendar-action-link {
        overflow-wrap: anywhere;
    }

    /* Footer Styling */
    .calendar-section-footer {
        display: flex;
        justify-content: flex-start;
        width: 100%;
    }

    .calendar-section-footer a {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        text-align: left !important;
        gap: 8px !important;
    }

    .calendar-section-footer .instagram-icon {
        flex-shrink: 0;
        margin-right: 0 !important;
    }
}

/* Small Mobile Screens */
@media (max-width: 360px) {
    .calendar-section-wrapper {
        padding: 16px 12px;
    }

    .calendar-card-content {
        padding: 16px 12px;
    }

    .calendar-date-badge {
        top: 12px;
        left: 12px;
    }
}

/* ========================================
   Past Events Header Styles
   ======================================== */
.past-events-wrapper {
    padding-top: 0;
}

.past-events-header {
    margin-bottom: 24px;
}

.past-events-label {
    margin: 0 0 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #b75c4b;
    font-weight: 600;
}

.past-events-title {
    font-size: 32px;
    font-weight: 300;
    margin: 0;
    color: #4a4a4a;
}

/* ========================================
   No Events Fallback Card
   ======================================== */
.no-events-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    max-width: 600px;
    margin-bottom: 40px;
}

.no-events-card h3 {
    color: #b75c4b;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 16px;
}

.no-events-card p {
    color: #4a4a4a;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 24px;
}

.no-events-card p strong {
    font-weight: 600;
    color: #333;
}

.no-events-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Fallback Buttons */
.no-events-actions a {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

/* Primary Button */
.btn-primary {
    background-color: #b75c4b;
    color: #fff;
    border: 1px solid #b75c4b;
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background-color: #333333 !important;
    color: #FFFFFF !important;
    border-color: #333333 !important;
}

/* Secondary Button */
.btn-secondary {
    background-color: #fff;
    color: #b75c4b;
    border: 1px solid #b75c4b;
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
    background-color: #BF684C !important;
    color: #FFFFFF !important;
    border-color: #BF684C !important;
}

/* Responsive Adjustment for Fallback Card */
@media (max-width: 600px) {
    .no-events-card {
        padding: 24px 20px;
    }

    .no-events-actions {
        flex-direction: column;
        gap: 12px;
    }

    .no-events-actions a {
        text-align: center;
        width: 100%;
    }
}