/* ==========================================================================
   Events Grid Page Styles
   ========================================================================== */

.events-page-header {
    padding: 4rem 0 2rem;
    text-align: center;
}

.events-grid-section {
    padding: 2rem 0 6rem;
    background: #ffffff;
}

/* Year Filter - Typography Driven Premium Aesthetic */
.events-year-filter {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 50px;
    margin-bottom: 70px;
    flex-wrap: wrap;
    position: relative;
}

/* Subtle architectural baseline */
.events-year-filter::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #cbd5e1, transparent);
    z-index: 1;
}

.year-pill {
    display: inline-block;
    padding: 0;
    background: transparent;
    color: #94a3b8; /* Muted gray for inactive */
    border-radius: 0;
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 2px;
    text-decoration: none;
    border: none;
    box-shadow: none;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    z-index: 2;
}

.year-pill:hover {
    transform: translateY(-2px);
    color: #475569;
    background: transparent;
    box-shadow: none;
    border: none;
}

.year-pill.active {
    font-size: 34px;
    font-weight: 900;
    color: #A5DB5C;
    background: transparent;
    border: none;
    box-shadow: none;
}

/* Standard Grid Setup */
.events-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 0 auto 4rem;
    max-width: 1200px;
}


.event-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.35s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.event-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(15, 23, 42, 0.12);
    border-color: #cbd5e1;
}

/* Image Container */
.event-card-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: radial-gradient(circle at center, #000000 0%, #111111 100%);
    border-bottom: 1px solid #e2e8f0;
}

.event-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the fixed area */
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.08));
}

.event-card:hover .event-card-image img {
    transform: scale(1.06) translateY(-2px);
    filter: drop-shadow(0 20px 35px rgba(0, 0, 0, 0.14));
}

.event-placeholder-img {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #2a2a2a 0%, #111111 100%);
}

/* Card Content Area */
.event-card-content {
    padding: 20px 22px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.event-card-meta {
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.event-card-meta .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #A5DB5C; /* Brand Green */
}

.event-card-header {
    margin-bottom: 12px;
}

/* Match .showroom-card-title */
.event-card-title {
    font-size: 15px;
    color: #0f172a;
    margin: 0;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.3px;
    text-transform: uppercase !important;
}

.event-card-title a {
    color: #0f172a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.event-card-title a:hover {
    color: #A5DB5C;
}

.event-card-excerpt {
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Match homepage-card-link-text */
.event-card-action {
    margin-top: auto;
    width: 100%;
}

.event-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    width: 100%;
}

.event-read-more {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #111111;
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: color 0.3s ease, text-decoration-color 0.3s ease;
}

.event-card:hover .event-read-more,
.event-read-more:hover {
    color: #A5DB5C;
    text-decoration-color: #A5DB5C;
}


/* Pagination - Styled to match */
.events-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.events-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    background: #ffffff;
    color: #0f172a;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    border: 1px solid #e2e8f0;
    box-shadow: 0 5px 15px rgba(15, 23, 42, 0.05);
    transition: all 0.2s ease;
}

.events-pagination .page-numbers:hover {
    border-color: #cbd5e1;
    color: #0f172a;
    transform: translateY(-2px);
}

.events-pagination .page-numbers.current {
    background: #A5DB5C; /* Brand Green */
    color: #111111;
    border-color: #A5DB5C;
}

.no-events-found {
    text-align: center;
    font-size: 1.2rem;
    color: #475569;
    padding: 4rem 0;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 1200px) {
    .events-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .events-grid {
        grid-template-columns: 1fr;
    }
}
/* Modal Overlay */

/* ==========================================================================
   Event Modal Styles
   ========================================================================== */
.event-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6); /* Dark slate overlay */
    backdrop-filter: blur(5px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.event-modal-overlay.active {
    opacity: 1;
}

.event-modal-box {
    background: #0d0d0d; /* Dark background */
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transform: translateY(20px) scale(0.98);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.event-modal-overlay.active .event-modal-box {
    transform: translateY(0) scale(1);
}

.event-modal-split-layout {
    display: flex;
    width: 100%;
    align-items: stretch;
    flex: 1 1 auto;
    min-height: 0;
}

.event-modal-gallery-col {
    flex: 0 0 60%; /* Strictly 60% width */
    background: #111111;
    position: relative;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e2e8f0;
    overflow: hidden;
}

.modal-slider-wrapper {
    flex: 1 1 0; /* Strict flex sizing to prevent expanding beyond parent */
    min-height: 0; /* Crucial for flex children to not exceed container */
    position: relative;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-slider-track {
    display: flex;
    height: 100%; /* Force it to exactly match the wrapper */
    min-height: 0;
    width: 100%;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.modal-slide {
    flex: 0 0 100%; /* Ensure slide is exactly 100% of the wrapper */
    height: 100%;
    min-height: 0;
    position: relative;
    display: flex; /* Center the image perfectly */
    align-items: center;
    justify-content: center;
}

.event-modal-gallery-img {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Forces image to fill perfectly without distortion */
    display: block;
}

/* Slider Arrows */
.modal-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(18, 18, 18, 0.75); /* Sleek dark background */
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 72px;
    height: 72px;
    border-radius: 50%; /* Circular button */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ffffff;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
    opacity: 0;
}

.modal-slider-arrow svg {
    width: 32px !important;
    height: 32px !important;
    stroke-width: 2.2;
    filter: none; /* Shadow no longer needed with background */
}

.modal-slider-prev {
    left: 25px;
}

.modal-slider-next {
    right: 25px;
}

.modal-slider-arrow:hover {
    background: #ffffff;
    color: #111111; /* Invert colors for high contrast on hover */
    border-color: #ffffff;
    transform: translateY(-50%) scale(1.1);
}

.modal-slider-arrow.visible {
    opacity: 1;
}

.modal-slider-indicator {
    position: absolute;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(18, 18, 18, 0.7);
    backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, 0.9);
    padding: 8px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-slider-indicator.visible {
    opacity: 1;
}

.event-modal-content-col {
    flex: 0 0 40%; /* Strictly 40% width */
    padding: 60px 50px;
    overflow-y: auto;
}

.event-modal-back-btn {
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    margin-bottom: 30px;
    padding: 0;
    transition: color 0.2s ease, transform 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.event-modal-back-btn:hover {
    color: #A5DB5C;
    transform: translateX(-5px); /* subtle slide left effect */
}

.event-modal-title {
    font-size: 32px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 12px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.event-modal-meta {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #A5DB5C;
    font-weight: 700;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.event-modal-description {
    font-size: 16px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
}

.event-modal-description p {
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .event-modal-box {
        width: 100vw;
        height: 100vh;
    }
    
    .event-modal-split-layout {
        flex-direction: column;
    }
    
    .event-modal-gallery-col {
        width: 100%;
        height: 40vh; /* Fixed height for gallery on mobile */
        min-height: 250px;
        flex: none; /* Override desktop flex */
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .event-modal-content-col {
        width: 100%;
        flex: 1 1 0; /* Override desktop flex to fill remaining space */
        padding: 30px 20px;
        height: auto;
        overflow-y: auto;
    }
}

/* ==========================================================================
   Events Hero Effects
   ========================================================================== */

.events-hero {
    background: none !important;
    overflow: hidden;
    position: relative;
}

.events-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    filter: brightness(0.75) contrast(1.1);
}

.events-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(17, 17, 17, 0.7), rgba(17, 17, 17, 0.8));
    z-index: 1;
}

.events-hero-overlay::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.12;
    pointer-events: none;
    mix-blend-mode: overlay;
}

.events-hero-divider {
    z-index: 5;
}

.events-hero-content {
    position: relative;
    z-index: 10;
}

/* Event Modal CTA */
.event-modal-cta-wrap {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-start;
}

.event-modal-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #A5DB5C;
    color: #111111;
    padding: 16px 36px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.event-modal-cta:hover {
    background: #ffffff;
    color: #111111;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(165, 219, 92, 0.2);
    text-decoration: none !important;
}

/* ==========================================================================
   Events Empty State (The Void)
   ========================================================================== */
.events-empty-void {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 20px;
    max-width: 800px;
    margin: 0 auto 60px;
    position: relative;
    z-index: 1;
}

.void-large-text {
    font-size: clamp(80px, 15vw, 220px);
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 2px rgba(17, 17, 17, 0.5); /* Subtle watermark effect on light bg */
    letter-spacing: -6px;
    line-height: 0.8;
    margin-bottom: 30px;
    text-transform: uppercase;
    user-select: none;
}

.void-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 800;
    color: #111111;
    margin-bottom: 24px;
    letter-spacing: -1px;
    line-height: 1.2;
}

.void-text {
    font-size: 20px;
    color: #475569;
    line-height: 1.7;
    margin-bottom: 45px;
    max-width: 650px;
}
