/******************************************************************************
 * EVENTS CALENDAR - COMPONENT ARCHITECTURE & CLASS DEFINITIONS
 ******************************************************************************
 *
 * [PRIMARY CONTAINERS]
 * .calendar-main-container     - The root grid wrapper (70/30 split).
 * .events-upcoming-section     - Left main column for featured events (70%).
 * .events-archive-section      - Right sidebar column for historical data (30%).
 * .button-center-container     - bottom side container for button find more
 *
 * [UPCOMING EVENTS - SHOWCASE CARDS]
 * .upcoming-events-list        - Container for the stack of upcoming events.
 * .event-showcase-card         - Individual event card (Flex layout: Img + Info).
 * .event-card-thumbnail        - Fixed-size event image (200x130px) with cover fit.
 * .event-card-details          - Container for event title and metadata.
 * .event-card-title            - Primary event heading (H3) with custom branding color.
 *
 * [PAST EVENTS - ARCHIVE LIST]
 * .past-events-grid            - Vertical list container for archived events.
 * .past-event-item             - Compact list item with a decorative left border.
 * .past-event-content          - Internal wrapper for archive text elements.
 * .past-event-meta             - Smaller metadata text (Date/Location) for archive.
 *
 * [UI STATES & GLOBAL ELEMENTS]
 * .calendar-section-title      - Standardized H2 heading for both columns.
 * .calendar-status-loading     - Centered loading message state.
 * .calendar-status-error       - Visual styling for API or fetch errors.
 * .empty-calendar-notice       - Fallback text when no events are found.
 * .dashicons                   - WordPress icon library integration.
 *
 ******************************************************************************/

/* 1. RESET RODIČOVSKÉHO WP STĹPCA */
.wp-block-column.is-layout-flow.wp-block-column-is-layout-flow {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    display: block !important;
}

/* 2. LAYOUT GRID CONFIGURATION */
.calendar-main-container {
    display: grid;
    grid-template-columns: 7fr 3fr !important;
    gap: 30px;
    justify-content: center;
    width: 100% !important;
    max-width: 1280px !important;
    margin: 0 auto !important;
    padding: 0 30px !important;
    box-sizing: border-box !important;
    font-family: "Poppins", sans-serif;
}

.calendar-divider {
    display: none;
}

.calendar-section-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #1a202c;
    padding: 20px 0;
    margin-bottom: 25px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    letter-spacing: -0.02em;
    margin-top: 0;
}

.calendar-section-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: #2271b1;
    margin-right: 12px;
    border-radius: 2px;
}

/* 3. UPCOMING EVENTS STYLES (70% STACK) */
.events-upcoming-section {
    background-color: #FEFEFE;
    padding: 30px;
    border-radius: 12px;
    box-shadow: rgba(17, 17, 26, 0.05) 0 0 20px;
}

.button-center-container {
    grid-column: 1 / -1;
}

.event-showcase-card {
    display: flex;
    flex-direction: row;
    justify-content: start;
    align-items: center;
    gap: 30px;
    padding: 30px 20px;
    background-color: transparent;
    border-bottom: 1px solid #f5f5f5;
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    overflow: hidden;
}

.event-showcase-card::before,
.event-showcase-card::after {
    content: '';
    position: absolute;
    left: 15%;
    right: 15%;
    height: 1px;
    background: radial-gradient(circle, rgba(34, 113, 177, 0.15) 0%, rgba(34, 113, 177, 0) 80%);
    opacity: 0;
    transform: scaleX(0);
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform-origin: center;
}

.event-showcase-card::before { top: 0; }
.event-showcase-card::after { bottom: 0; }

.event-showcase-card:hover {
    background-color: rgba(34, 113, 177, 0.01);
    padding-left: 35px;
}

.event-showcase-card:hover::before,
.event-showcase-card:hover::after {
    opacity: 1;
    transform: scaleX(1.1);
}

.event-card-thumbnail {
    width: 210px;
    height: 130px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: rgba(0, 0, 0, 0.08) 0 2px 4px;
    transition: all 0.5s ease;
}

.event-showcase-card:hover .event-card-thumbnail {
    transform: scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04);
}

.event-card-title {
    color: #1a1a1a !important;
    font-weight: 600 !important;
    margin: 0 0 10px 0 !important;
    font-size: 1.4rem;
    letter-spacing: -0.01em;
    transition: color 0.4s ease;
}

.event-showcase-card:hover .event-card-title {
    color: #2271b1 !important;
}

.event-card-details p {
    color: #888;
    font-size: 0.95rem;
    font-weight: 400;
    margin: 6px 0;
}

.event-showcase-card:last-child {
    border-bottom: none;
}

/* 4. PAST EVENTS ARCHIVE (30% SIDEBAR) */
.events-archive-section {
    background: #FEFEFE;
    padding: 30px;
    border-radius: 12px;
    box-shadow: rgba(17, 17, 26, 0.05) 0 0 20px;
}

.past-events-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

.past-event-item {
    padding: 12px 12px 12px 20px;
    background-color: transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
}

.past-event-item::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 15%;
    height: 70%;
    width: 4px;
    background-color: #2271b1;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.past-event-item:hover {
    background-color: rgba(0, 0, 0, 0.035);
    transform: translateX(5px);
}

.past-event-item:hover::before {
    background-color: #1a5a8e;
    height: 90%;
    top: 5%;
}

.past-event-item h4 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    color: #2271b1;
    font-weight: 600;
}

.past-event-meta {
    margin-top: 7px;
}

.past-event-meta p {
    font-size: 0.96rem;
    font-weight: 400;
    color: #888 !important;
}

/* 5. RESPONSIVE DESIGN BREAKPOINTS */
@media (max-width: 1024px) {
    .calendar-main-container {
        padding: 0 30px !important;
    }
}

@media (max-width: 900px) {
    .calendar-main-container {
        grid-template-columns: 1fr !important;
        padding: 0 30px !important;
        gap: 30px;
    }

    .events-upcoming-section,
    .events-archive-section {
        width: 100%;
        box-sizing: border-box;
    }

    .event-showcase-card:hover {
        padding-left: 20px;
    }
}

@media (max-width: 600px) {
    .calendar-main-container {
        padding: 0 20px !important;
        gap: 20px;
    }

    .event-showcase-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 20px 10px;
    }

    .event-card-thumbnail {
        width: 100%;
        height: 180px;
    }
}

@media (max-width: 480px) {
    .event-card-thumbnail {
        display: none;
    }

    .event-showcase-card:hover {
        padding-left: 10px;
    }
}

/* 6. GLOBAL UI ELEMENTS & EMPTY STATE */
.event-card-details p, .past-event-meta p {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 5px 0;
}

.dashicons {
    color: #555;
    font-size: 18px;
}

.calendar-status-loading, .calendar-status-error {
    padding: 60px;
    text-align: center;
    color: #666;
}

.calendar-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    background: #fdfdfd;
    border: 1px solid #eee;
    border-radius: 12px;
    margin: 20px 0;
    animation: fadeInEmpty 0.4s ease-out;
}

.empty-state-icon {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #d1d5db;
    margin-bottom: 15px;
}

.empty-state-title {
    margin: 0 0 8px 0;
    font-size: 1.25rem;
    color: #1d2327;
    font-weight: 600;
}

.empty-state-text {
    margin: 0;
    font-size: 0.95rem;
    color: #646970;
    max-width: 320px;
    line-height: 1.5;
}

@keyframes fadeInEmpty {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}