/**
 * Upcoming Events Slider Styles
 * 
 * Modern, clean design for the Upcoming Events widget.
 * Supports horizontal (image left) and vertical (image top) layouts.
 *
 * @package YoboTicket
 */

/* ==========================================================================
   1. BASE STYLES & WRAPPER
   ========================================================================== */

.yobo-upcoming-events {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.yobo-upcoming-events .swiper {
    width: 100%;
    padding-bottom: 50px; /* Space for pagination */
}

.yobo-upcoming-events .swiper-wrapper {
    align-items: stretch;
}

.yobo-upcoming-events .swiper-slide {
    height: auto;
    box-sizing: border-box;
}

/* ==========================================================================
   2. SECTION HEADER (JCCSF Style)
   ========================================================================== */

.events-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.events-section-title {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    color: #0d5c63;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.events-header-controls {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #0d5c63;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: color 0.25s ease;
}

.view-all-link:hover {
    color: #00838f;
}

.view-all-arrow {
    font-size: 18px;
    transition: transform 0.25s ease;
}

.view-all-link:hover .view-all-arrow {
    transform: translateX(3px);
}

/* ==========================================================================
   PROGRESS BAR - Bottom Center
   ========================================================================== */

/* Progress bar container (in header - legacy) */
.events-progress-container {
    display: none; /* No longer in header */
}

/* Progress bar - always at bottom */
.swiper-progress-bar {
    width: 60%;
    max-width: 400px;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin: 24px auto 0;
}

.swiper-progress-bar .progress-fill {
    height: 100%;
    background: #0d5c63;
    border-radius: 3px;
    transition: width 0.4s ease;
    width: 0%;
}

/* Legacy class - hidden */
.events-progress-bar {
    display: none;
}

/* Header Navigation Arrows */
.header-nav-arrows {
    display: flex;
    gap: 8px;
}

.header-nav-arrows .nav-arrow {
    width: 44px;
    height: 44px;
    border: 2px solid #1a1a1a;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    color: #1a1a1a;
}

.header-nav-arrows .nav-arrow:hover {
    background: #0d5c63;
    border-color: #0d5c63;
    color: #ffffff;
}

.header-nav-arrows .nav-arrow:disabled,
.header-nav-arrows .nav-arrow.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.header-nav-arrows .nav-arrow svg {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   3. EVENT CARD - BASE
   ========================================================================== */

.upcoming-event-card {
    display: flex;
    height: 100%;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.upcoming-event-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* Per-event shadow presets */
.upcoming-event-card.shadow-none {
    box-shadow: none !important;
}

.upcoming-event-card.shadow-none:hover {
    box-shadow: none !important;
}

.upcoming-event-card.shadow-small {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.upcoming-event-card.shadow-small:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
}

.upcoming-event-card.shadow-medium {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
}

.upcoming-event-card.shadow-medium:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18) !important;
}

.upcoming-event-card.shadow-large {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18) !important;
}

.upcoming-event-card.shadow-large:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25) !important;
}

/* ==========================================================================
   4. HORIZONTAL LAYOUT (Enhanced)
   ========================================================================== */

.upcoming-event-card.layout-horizontal {
    flex-direction: row;
}

.layout-horizontal .event-media {
    flex: 0 0 45%;
    max-width: 45%;
    min-height: 280px;
    position: relative;
}

.layout-horizontal .event-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px 40px;
}

.layout-horizontal .event-title {
    font-size: 24px;
    color: #0d5c63;
    margin-bottom: 16px;
}

/* ==========================================================================
   5. VERTICAL LAYOUT (JCCSF Style)
   ========================================================================== */

.upcoming-event-card.layout-vertical {
    flex-direction: column;
    border-radius: 0;
    box-shadow: none;
    border: none;
}

.layout-vertical .event-media {
    position: relative;
    width: 100%;
    height: 220px;
    flex-shrink: 0;
    overflow: hidden;
}

.layout-vertical .event-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.layout-vertical .event-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    text-align: left;
}

.layout-vertical .event-title {
    font-size: 18px;
    font-weight: 700;
    color: #0d5c63;
    text-transform: uppercase;
    margin: 0 0 12px 0;
    line-height: 1.3;
    text-align: left;
}

.layout-vertical .event-description {
    font-size: 17px;
    line-height: 1.6;
    color: #555555;
    margin-bottom: 0;
    text-align: left;
}

.layout-vertical .event-link {
    align-self: flex-start;
}

.layout-vertical .event-actions {
    padding-top: 12px;
}

/* Hover effect for vertical cards */
.layout-vertical:hover {
    box-shadow: none;
    transform: none;
}

.layout-vertical:hover .event-media img {
    transform: scale(1.05);
}

/* ==========================================================================
   5. EVENT MEDIA - MUST BE POSITIONING PARENT FOR BADGE
   ========================================================================== */

.event-media {
    position: relative !important;  /* Required for absolute positioning of badge */
    overflow: hidden;
    z-index: 1;
}

.layout-horizontal .event-media {
    position: relative !important;
    flex: 0 0 45%;
    max-width: 45%;
    min-height: 280px;
}

.layout-vertical .event-media {
    position: relative !important;
    width: 100%;
    height: 220px;
    flex-shrink: 0;
    overflow: hidden;
}

.event-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.upcoming-event-card:hover .event-media img {
    transform: scale(1.05);
}

/* ==========================================================================
   EVENT BADGE - ABSOLUTE POSITIONED ON IMAGE (HIGH SPECIFICITY)
   ========================================================================== */

/* Base positioning parent */
.yobo-upcoming-events .event-media {
    position: relative !important;
    display: block;
}

.yobo-upcoming-events .upcoming-event-card .event-media {
    position: relative !important;
}

/* Badge positioning - multiple selectors for specificity */
.yobo-upcoming-events .event-badge,
.yobo-upcoming-events .event-ribbon,
.yobo-upcoming-events .event-media .event-badge,
.yobo-upcoming-events .event-media .event-ribbon,
.yobo-upcoming-events .upcoming-event-card .event-media .event-badge,
.yobo-upcoming-events .upcoming-event-card .event-media .event-ribbon {
    position: absolute !important;
    top: 12px !important;
    left: 0 !important;
    right: auto !important;
    bottom: auto !important;
    padding: 8px 16px;
    background-color: #00838f;
    color: #ffffff !important;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.2;
    z-index: 100 !important;
    display: inline-block !important;
    margin: 0 !important;
    transform: none !important;
}

/* Ensure badge visible in horizontal layout */
.yobo-upcoming-events .layout-horizontal .event-media .event-badge,
.yobo-upcoming-events .layout-horizontal .event-media .event-ribbon {
    position: absolute !important;
    top: 12px !important;
    left: 0 !important;
    z-index: 100 !important;
}

/* Ensure badge visible in vertical layout */
.yobo-upcoming-events .layout-vertical .event-media .event-badge,
.yobo-upcoming-events .layout-vertical .event-media .event-ribbon {
    position: absolute !important;
    top: 12px !important;
    left: 0 !important;
    z-index: 100 !important;
}

/* ==========================================================================
   7. EVENT CONTENT
   ========================================================================== */

.event-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
}

/* ==========================================================================
   8. EVENT TITLE
   ========================================================================== */

.event-title {
    margin: 0 0 16px 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    color: #1a1a1a;
    letter-spacing: -0.01em;
}

.layout-vertical .event-title {
    font-size: 20px;
}

/* ==========================================================================
   8b. EVENT SUBTITLE
   ========================================================================== */

.event-subtitle {
    margin: -8px 0 16px 0;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.5;
    color: #777777;
}

.layout-vertical .event-subtitle {
    font-size: 18px;
    margin: -6px 0 12px 0;
}

/* ==========================================================================
   9. EVENT DESCRIPTION
   ========================================================================== */

.event-description {
    margin: 0 0 16px 0;
    font-size: 19px;
    font-weight: 400;
    line-height: 1.7;
    color: #555555;
}

/* WYSIWYG content styling */
.event-description p {
    margin: 0 0 8px 0;
}

.event-description p:last-child {
    margin-bottom: 0;
}

.event-description ul,
.event-description ol {
    margin: 0 0 8px 0;
    padding-left: 20px;
}

.event-description a {
    color: #F50275;
    text-decoration: underline;
}

.event-description a:hover {
    color: #c4015e;
}

.layout-vertical .event-description {
    font-size: 17px;
}

/* ==========================================================================
   10. EVENT LINK (legacy - kept for backward compatibility)
   ========================================================================== */

.event-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding: 0;
    font-size: 14px;
    font-weight: 600;
    color: #0066cc;
    text-decoration: none;
    transition: color 0.25s ease;
    position: relative;
}

.event-link::after {
    content: '→';
    display: inline-block;
    font-size: 16px;
    transition: transform 0.25s ease;
}

.event-link:hover {
    color: #004499;
}

.event-link:hover::after {
    transform: translateX(4px);
}

/* ==========================================================================
   12. EVENT META (Date & Time)
   ========================================================================== */

.event-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00838f;
    flex-shrink: 0;
}

.meta-icon svg {
    width: 16px;
    height: 16px;
}

.meta-label {
    font-size: 12px;
    font-weight: 700;
    color: #333333;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    min-width: 40px;
}

.meta-value {
    font-size: 14px;
    font-weight: 400;
    color: #555555;
}

/* Date and Time specific rows */
.meta-date,
.meta-time {
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-date .meta-value {
    font-size: 20px;
    color: #555555;
}

.meta-time .meta-value {
    font-size: 20px;
    color: #555555;
}

/* ==========================================================================
   EVENT PRICE ROW (Above Button)
   ========================================================================== */

.event-price-row {
    margin-bottom: 12px;
}

.event-price-row .price-badge {
    font-size: 16px;
    font-weight: 600;
    color: #333333;
}

.event-price-row .price-badge.price-free {
    color: #00838f;
    font-weight: 700;
    font-size: 16px;
}

/* ==========================================================================
   13. EVENT ACTIONS
   ========================================================================== */

.event-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: auto;
    padding-top: 8px;
    flex-wrap: wrap;
}

/* ==========================================================================
   BUTTON (Learn More / Find Out More)
   ========================================================================== */

.btn-learn-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    text-decoration: none;
    background-color: #F50275;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.2;
    text-transform: none;
    letter-spacing: normal;
}

.btn-learn-more:hover {
    background-color: #ffffff;
    color: #F50275;
}

.btn-learn-more:focus {
    outline: 2px solid #F50275;
    outline-offset: 2px;
}

.btn-learn-more .button-text {
    display: inline;
}

.btn-learn-more .button-icon {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.btn-learn-more:hover .button-icon {
    transform: translateX(3px);
}

.btn-learn-more .button-icon i,
.btn-learn-more .button-icon svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
}

.btn-learn-more .button-icon i {
    font-size: inherit;
    color: inherit;
}

/* Remove any old event-link styles that could interfere */
.event-actions .btn-learn-more {
    margin-top: 0;
}

/* Make button look good in vertical layout */
.layout-vertical .btn-learn-more {
    align-self: flex-start;
}

.price-badge {
    font-size: 14px;
    font-weight: 600;
    color: #555555;
}

.price-badge.price-free {
    color: #00838f;
    font-weight: 700;
}

/* ==========================================================================
   TEXT LINK (Alternative to Button)
   ========================================================================== */

.event-text-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #F50275;
    text-decoration: none;
    transition: color 0.25s ease;
    padding: 0;
    background: none;
    border: none;
    position: relative;
}

.event-text-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: currentColor;
    transition: width 0.25s ease;
}

.event-text-link:hover {
    color: #c4015e;
}

.event-text-link:hover::after {
    width: 100%;
}

.event-text-link .link-icon {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    transition: transform 0.25s ease;
}

.event-text-link:hover .link-icon {
    transform: translateX(3px);
}

.event-text-link .link-icon i,
.event-text-link .link-icon svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
}

.event-text-link .link-icon i {
    font-size: inherit;
    color: inherit;
}

.event-text-link:focus {
    outline: 2px solid #F50275;
    outline-offset: 2px;
}

/* Vertical layout alignment */
.layout-vertical .event-text-link {
    align-self: flex-start;
}

/* ==========================================================================
   14. NAVIGATION ARROWS
   ========================================================================== */

.yobo-upcoming-events .swiper-button-prev,
.yobo-upcoming-events .swiper-button-next {
    width: 48px;
    height: 48px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    top: calc(50% - 25px); /* Account for pagination space */
}

.yobo-upcoming-events .swiper-button-prev:hover,
.yobo-upcoming-events .swiper-button-next:hover {
    background: #0066cc;
    box-shadow: 0 4px 16px rgba(0, 102, 204, 0.3);
}

.yobo-upcoming-events .swiper-button-prev::after,
.yobo-upcoming-events .swiper-button-next::after {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    transition: color 0.3s ease;
}

.yobo-upcoming-events .swiper-button-prev:hover::after,
.yobo-upcoming-events .swiper-button-next:hover::after {
    color: #ffffff;
}

.yobo-upcoming-events .swiper-button-prev {
    left: 10px;
}

.yobo-upcoming-events .swiper-button-next {
    right: 10px;
}

/* Hide navigation when disabled */
.yobo-upcoming-events .swiper-button-disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.yobo-upcoming-events .swiper-button-disabled:hover {
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.yobo-upcoming-events .swiper-button-disabled:hover::after {
    color: #1a1a1a;
}

/* ==========================================================================
   12. PAGINATION DOTS
   ========================================================================== */

.yobo-upcoming-events .swiper-pagination {
    bottom: 0 !important;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
}

.yobo-upcoming-events .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: #d1d5db;
    opacity: 1;
    border-radius: 50%;
    transition: all 0.3s ease;
    margin: 0 !important;
    cursor: pointer;
}

.yobo-upcoming-events .swiper-pagination-bullet:hover {
    background: #9ca3af;
}

.yobo-upcoming-events .swiper-pagination-bullet-active {
    background: #0066cc;
    width: 28px;
    border-radius: 6px;
}

/* ==========================================================================
   16. RESPONSIVE STYLES - JCCSF Style Updates
   ========================================================================== */

/* Tablet */
@media (max-width: 1024px) {
    .events-section-title {
        font-size: 26px;
    }
    
    .events-progress-container {
        order: 3;
        flex-basis: 100%;
        max-width: 100%;
    }
    
    .layout-horizontal .event-content {
        padding: 24px 28px;
    }
    
    .event-title {
        font-size: 22px;
    }
    
    .yobo-upcoming-events .swiper-button-prev,
    .yobo-upcoming-events .swiper-button-next {
        width: 40px;
        height: 40px;
    }
    
    .yobo-upcoming-events .swiper-button-prev::after,
    .yobo-upcoming-events .swiper-button-next::after {
        font-size: 16px;
    }
}

/* Mobile - Horizontal stacks to vertical */
@media (max-width: 767px) {
    .events-section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .events-section-title {
        font-size: 22px;
    }
    
    .events-header-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .header-nav-arrows .nav-arrow {
        width: 40px;
        height: 40px;
    }
    
    .upcoming-event-card.layout-horizontal {
        flex-direction: column;
    }
    
    .layout-horizontal .event-media {
        flex: none;
        max-width: 100%;
        width: 100%;
        min-height: 200px;
        height: 200px;
    }
    
    .layout-horizontal .event-content {
        padding: 24px;
        text-align: left;
    }
    
    .layout-horizontal .event-title {
        text-align: left;
        font-size: 20px;
    }
    
    .layout-horizontal .event-description {
        text-align: left;
    }
    
    .layout-horizontal .event-link {
        align-self: flex-start;
    }
    
    .layout-vertical .event-media {
        height: 180px;
    }
    
    .layout-vertical .event-title {
        font-size: 16px;
    }
    
    .event-title {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    .event-description {
        font-size: 14px;
        margin-bottom: 16px;
    }
    
    .event-link {
        font-size: 13px;
    }
    
    .yobo-upcoming-events .event-ribbon,
    .yobo-upcoming-events .event-badge {
        font-size: 10px;
        padding: 8px 14px;
    }
    
    .meta-row {
        flex-wrap: wrap;
    }
    
    .meta-label {
        min-width: auto;
    }
    
    /* Navigation - smaller and closer */
    .yobo-upcoming-events .swiper-button-prev,
    .yobo-upcoming-events .swiper-button-next {
        width: 36px;
        height: 36px;
    }
    
    .yobo-upcoming-events .swiper-button-prev::after,
    .yobo-upcoming-events .swiper-button-next::after {
        font-size: 14px;
    }
    
    .yobo-upcoming-events .swiper-button-prev {
        left: 5px;
    }
    
    .yobo-upcoming-events .swiper-button-next {
        right: 5px;
    }
    
    /* Pagination - smaller */
    .yobo-upcoming-events .swiper-pagination-bullet {
        width: 8px;
        height: 8px;
    }
    
    .yobo-upcoming-events .swiper-pagination-bullet-active {
        width: 20px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .layout-horizontal .event-media,
    .layout-vertical .event-media {
        height: 180px;
        min-height: 180px;
    }
    
    .event-content {
        padding: 20px;
    }
    
    .layout-horizontal .event-content {
        padding: 20px;
    }
    
    .event-title {
        font-size: 17px;
    }
    
    .event-description {
        font-size: 13px;
        line-height: 1.6;
    }
}

/* ==========================================================================
   14. TOUCH DEVICE OPTIMIZATIONS
   ========================================================================== */

@media (hover: none) and (pointer: coarse) {
    /* Disable hover effects on touch devices */
    .upcoming-event-card:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    }
    
    .upcoming-event-card:hover .event-media img {
        transform: none;
    }
    
    /* Make navigation buttons larger for touch */
    .yobo-upcoming-events .swiper-button-prev,
    .yobo-upcoming-events .swiper-button-next {
        width: 44px;
        height: 44px;
    }
    
    /* Make pagination dots larger for touch */
    .yobo-upcoming-events .swiper-pagination-bullet {
        width: 12px;
        height: 12px;
    }
    
    .yobo-upcoming-events .swiper-pagination-bullet-active {
        width: 28px;
    }
}

/* ==========================================================================
   18. ACCESSIBILITY
   ========================================================================== */

/* Focus states */
.event-link:focus {
    outline: 2px solid #0d5c63;
    outline-offset: 2px;
}

.view-all-link:focus {
    outline: 2px solid #0d5c63;
    outline-offset: 2px;
}

.header-nav-arrows .nav-arrow:focus {
    outline: 2px solid #0d5c63;
    outline-offset: 2px;
}

.yobo-upcoming-events .swiper-button-prev:focus,
.yobo-upcoming-events .swiper-button-next:focus {
    outline: 2px solid #0d5c63;
    outline-offset: 2px;
}

.yobo-upcoming-events .swiper-pagination-bullet:focus {
    outline: 2px solid #0d5c63;
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .upcoming-event-card,
    .event-media img,
    .event-link,
    .event-link::after,
    .btn-learn-more,
    .btn-learn-more .button-icon,
    .view-all-link,
    .view-all-arrow,
    .header-nav-arrows .nav-arrow,
    .events-progress-bar .progress-fill,
    .yobo-upcoming-events .swiper-button-prev,
    .yobo-upcoming-events .swiper-button-next,
    .yobo-upcoming-events .swiper-pagination-bullet {
        transition: none;
    }
    
    .upcoming-event-card:hover {
        transform: none;
    }
    
    .upcoming-event-card:hover .event-media img {
        transform: none;
    }
    
    .event-link:hover::after,
    .btn-learn-more:hover .button-icon,
    .view-all-link:hover .view-all-arrow {
        transform: none;
    }
}

/* ==========================================================================
   16. HIGH CONTRAST MODE SUPPORT
   ========================================================================== */

@media (prefers-contrast: high) {
    .upcoming-event-card {
        border: 2px solid #1a1a1a;
    }
    
    .event-ribbon {
        border: 1px solid #ffffff;
    }
    
    .event-link {
        text-decoration: underline;
    }
}

/* ==========================================================================
   17. DARK SCHEME SUPPORT (OPTIONAL)
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    /* Uncomment below if dark mode support is needed */
    /*
    .upcoming-event-card {
        background: #2d2d2d;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    .event-content {
        background: #2d2d2d;
    }
    
    .event-title {
        color: #f5f5f5;
    }
    
    .event-description {
        color: #b0b0b0;
    }
    
    .yobo-upcoming-events .swiper-button-prev,
    .yobo-upcoming-events .swiper-button-next {
        background: #3d3d3d;
    }
    
    .yobo-upcoming-events .swiper-button-prev::after,
    .yobo-upcoming-events .swiper-button-next::after {
        color: #f5f5f5;
    }
    
    .yobo-upcoming-events .swiper-pagination-bullet {
        background: #555555;
    }
    */
}

/* ==========================================================================
   ELEMENTOR EDITOR - SMOOTH RE-RENDER
   Minimizes flash/layout shift during server-side re-rendering
   ========================================================================== */

/* Prevent layout shift by maintaining minimum height */
.elementor-editor-active .yobo-upcoming-events {
    min-height: 280px;
}

/* Smooth fade-in after re-render */
.elementor-editor-active .yobo-upcoming-events .swiper {
    animation: yoboFadeIn 0.2s ease-in;
}

@keyframes yoboFadeIn {
    from { opacity: 0.4; }
    to { opacity: 1; }
}

/* Prevent the jarring white flash by keeping bg consistent */
.elementor-editor-active .yobo-upcoming-events .swiper-wrapper {
    min-height: 250px;
}

/* Stabilize card dimensions during re-render */
.elementor-editor-active .upcoming-event-card {
    min-height: 200px;
}
