/**
 * Theme Override Styles - Force Plugin Styles
 * This file uses !important to override any WordPress theme CSS
 */

/* ============================================
   MOBILE RESPONSIVE - FORCED OVERRIDES
   ============================================ */

@media (max-width: 768px) {
    .lnm-events-container .lnm-upcoming-events-section {
        margin-bottom: 30px !important;
        padding: 60px 20px 0 20px !important;
        width: 100% !important;
    }

    .lnm-events-container .lnm-community-events-section {
        padding: 0 20px 60px 20px !important;
        margin-bottom: 0 !important;
    }

    .lnm-events-container .lnm-upcoming-events-section .lnm-main-header {
        padding: 0 !important;
        margin-bottom: 40px !important;
    }

    .lnm-events-container .lnm-hero-event {
        min-height: 600px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .lnm-events-container .lnm-hero-content {
        padding: 40px 20px !important;
    }

    .lnm-events-container .lnm-hero-title {
        font-size: 42px !important;
        line-height: 1 !important;
        margin-bottom: 20px !important;
    }

    .lnm-events-container .lnm-hero-description {
        font-size: 15px !important;
        margin-bottom: 30px !important;
        line-height: 1.6 !important;
    }

    .lnm-events-container .lnm-hero-details {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
        margin-bottom: 35px !important;
    }

    .lnm-events-container .lnm-detail-label {
        font-size: 10px !important;
    }

    .lnm-events-container .lnm-detail-value {
        font-size: 14px !important;
    }

    .lnm-events-container .lnm-register-btn {
        padding: 16px 40px !important;
        font-size: 12px !important;
        width: 100% !important;
        text-align: center !important;
    }

    .lnm-events-container .lnm-section-subtitle {
        font-size: 32px !important;
    }

    .lnm-events-container .lnm-section-description {
        font-size: 15px !important;
    }

    /* Mobile grid - single column */
    .lnm-events-grid-1,
    .lnm-events-grid-2,
    .lnm-events-grid-3 {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .lnm-events-container .lnm-event-card {
        height: 400px !important;
    }

    .lnm-events-container .lnm-event-title {
        font-size: 20px !important;
    }

    .lnm-events-container .lnm-event-action-btn {
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    .lnm-events-container .lnm-hero-event {
        min-height: 550px !important;
    }

    .lnm-events-container .lnm-hero-title {
        font-size: 36px !important;
        line-height: 0.95 !important;
    }

    .lnm-events-container .lnm-hero-description {
        font-size: 14px !important;
    }

    .lnm-events-container .lnm-hero-details {
        grid-template-columns: 1fr !important;
        gap: 18px !important;
    }

    .lnm-events-container .lnm-section-subtitle {
        font-size: 28px !important;
    }
}

/* ============================================
   FULL WIDTH LAYOUT
   ============================================ */

/* Make container full width */
.lnm-events-container {
    width: 100% !important;
    max-width: 100% !important;
}

.lnm-events-container .lnm-upcoming-events-section {
    width: 100% !important;
    max-width: 100% !important;
    padding: 80px 40px 0 40px !important;
    margin-bottom: 40px !important;
}

.lnm-events-container .lnm-community-events-section {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 40px 80px 40px !important;
}

/* Make hero event full width */
.lnm-events-container .lnm-hero-event {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 12px !important;
}

/* Ensure content inside is properly styled */
.lnm-events-container .lnm-hero-overlay {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 12px !important;
}

/* ============================================
   FEATURES-STYLE WHITE CARDS
   ============================================ */

/* Responsive grid based on event count */
.lnm-events-grid-1 {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 25px !important;
}

.lnm-events-grid-2 {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 25px !important;
}

.lnm-events-grid-3 {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 25px !important;
}

/* White card styling */
.lnm-events-container .lnm-event-card {
    background: #FFFFFF !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    height: 360px !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    transition: transform 0.3s, box-shadow 0.3s !important;
    border: none !important;
    padding: 0 !important;
}

.lnm-events-container .lnm-event-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 8px 30px rgba(198, 33, 40, 0.2) !important;
}

/* Card image section */
.lnm-event-card-image {
    flex: 1 1 55% !important;
    background-size: cover !important;
    background-position: center !important;
    position: relative !important;
    overflow: hidden !important;
}

.lnm-event-card-image::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0.9) 100%) !important;
    z-index: 1 !important;
}

/* Card content section */
.lnm-events-container .lnm-event-card-content {
    flex: 1 1 45% !important;
    padding: 25px !important;
    background: #FFFFFF !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

.lnm-events-container .lnm-event-title {
    font-size: 22px !important;
    font-weight: 800 !important;
    color: #010101 !important;
    margin: 0 0 15px 0 !important;
    text-transform: uppercase !important;
    letter-spacing: -0.5px !important;
}

.lnm-events-container .lnm-event-meta {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    margin-bottom: 15px !important;
}

.lnm-events-container .lnm-event-distances {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
}

.lnm-events-container .lnm-event-distance-badge {
    display: inline-block !important;
    padding: 4px 12px !important;
    background: #C62128 !important;
    color: #FFFFFF !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    border-radius: 4px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.lnm-events-container .lnm-event-date {
    font-size: 13px !important;
    color: #666 !important;
    font-weight: 600 !important;
}

.lnm-events-container .lnm-event-action-btn {
    background: #C62128 !important;
    color: #FFFFFF !important;
    border: 2px solid #C62128 !important;
    padding: 12px 24px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    margin-top: auto !important;
}

.lnm-events-container .lnm-event-action-btn:hover {
    background: #FFFFFF !important;
    color: #C62128 !important;
    border-color: #C62128 !important;
}

/* ============================================
   MODAL FIX - PREVENT CUTOFF
   ============================================ */

/* Force modal to show all content */
.lnm-modal-swiper {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    max-height: 90vh !important;
}

.lnm-modal-event {
    overflow: hidden !important;
    height: auto !important;
    min-height: auto !important;
}

.lnm-modal-overlay-inner {
    min-height: auto !important;
    height: auto !important;
    align-items: flex-start !important;
    padding-top: 60px !important;
}

.lnm-modal-description {
    max-height: none !important;
    overflow-y: visible !important;
}

/* Mobile modal fixes */
@media (max-width: 768px) {
    .lnm-modal-content {
        padding-top: 70px !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
    }

    .lnm-modal-swiper {
        max-height: calc(100vh - 100px) !important;
    }

    .lnm-modal-overlay-inner {
        padding: 40px 20px !important;
        padding-top: 60px !important;
    }

    .lnm-modal-title {
        margin-top: 0 !important;
    }
}

@media (max-width: 480px) {
    .lnm-modal-swiper {
        max-height: calc(100vh - 80px) !important;
    }

    .lnm-modal-overlay-inner {
        padding: 40px 15px !important;
        padding-top: 50px !important;
    }
}

/* ============================================
   FORCE FULL WIDTH - OVERRIDE THEME CONSTRAINTS
   ============================================ */

/* Nuclear option: Force container to full viewport width */
.lnm-events-container {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
}

/* Prevent parent containers from constraining width */
body .lnm-events-container,
main .lnm-events-container,
article .lnm-events-container,
section .lnm-events-container,
div .lnm-events-container {
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 100vw !important;
    flex: none !important;
    flex-basis: auto !important;
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
}

/* Override any flex/grid parent constraints */
.lnm-events-container {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
}

/* Ensure inner sections also take full width */
.lnm-events-container .lnm-upcoming-events-section,
.lnm-events-container .lnm-community-events-section {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Remove max-width constraints from inner elements to match gallery plugin */
.lnm-events-container .lnm-hero-event,
.lnm-events-container .lnm-hero-content,
.lnm-events-container .lnm-upcoming-events-section .lnm-main-header,
.lnm-events-container .lnm-community-events-section {
    max-width: none !important;
}
