

.cs-events-section {
    padding: 100px 0;
    background:#fff;
    overflow: hidden;
}

.cs-events-heading {
    text-align: center;
    margin-bottom: 60px;
}

.cs-events-heading h2 {
    font-family: var(--heading-font);
    font-size: clamp(36px, 5vw, 40px);
    color: var(--dark);
    margin: 0;
    font-weight: 500;
}

.cs-events-heading span {
    /* color: var(--primary); */
}

/* ==========================================
   GRID
========================================== */
.cs-events-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* ==========================================
   CARD
========================================== */
.cs-event-card {
    position: relative;
    height: 520px;
    overflow: hidden;
    border-radius: 24px;
    cursor: pointer;
    transform: translateY(0);
    transition: all .45s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

.cs-event-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 30px 60px rgba(0,0,0,.18);
}

/* ==========================================
   IMAGE
========================================== */
.cs-event-image {
    width: 100%;
    height: 100%;
}

.cs-event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .8s ease;
}

.cs-event-card:hover .cs-event-image img {
    transform: scale(1.1);
}

/* ==========================================
   DARK OVERLAY
========================================== */
.cs-event-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* ==========================================
   TITLE
========================================== */
.cs-event-title {
    position: absolute;
    left: 30px;
    bottom: 30px;
    z-index: 3;
    transition: all .4s ease;
}

.cs-event-title h3 {
    color: #fff;
    font-size: 32px;
    margin: 0;
    font-family: var(--heading-font);
}

/* ==========================================
   HOVER OVERLAY
========================================== */
.cs-event-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
   background: #2b2b2be0;
    opacity: 0;
    visibility: hidden;
    transition: .4s ease;
}

.cs-event-card:hover .cs-event-overlay {
    opacity: 1;
    visibility: visible;
}

/* ==========================================
   META
========================================== */
.cs-event-info {
    margin-bottom: 25px;
}

.cs-event-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    margin-bottom: 14px;
}

.cs-event-meta i {
    color: var(--primary);
    width: 18px;
}

.cs-event-meta span {
    font-size: 15px;
    font-family: var(--body-font);
}

/* ==========================================
   BUTTON
========================================== */
.cs-read-more-btn {
    width: fit-content;
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
    cursor: pointer;
    padding: 14px 28px;
    border-radius: 50px;
    background: var(--primary);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    transition: .3s ease;
    font-family: var(--body-font);
}

.cs-read-more-btn:hover {
    transform: translateX(5px);
    background: var(--brown);
}

/* ==========================================
   MODAL
========================================== */
.cs-event-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: .4s ease;
}

.cs-event-modal.active {
    opacity: 1;
    visibility: visible;
}

.cs-event-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.85);
    backdrop-filter: blur(5px);
}

.cs-modal-wrapper {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    /* background: #fff; */
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    z-index: 10000;
    animation: modalFadeIn 0.4s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.cs-modal-gallery {
    flex: 1;
    min-width: 600px;
    /* background: var(--section-bg); */
    padding: 20px;
}

.cs-modal-content {
    flex: 1;
    min-width: 300px;
    padding: 40px;
   
}

.cs-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: none;
    cursor: pointer;
    z-index: 10001;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.cs-modal-close:hover {
    background: var(--primary);
    color: #fff;
    transform: rotate(90deg);
}

.cs-modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.cs-meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    opacity: 0.8;
    font-size: 14px;
    font-family: var(--body-font);
}

.cs-meta-item i {
    color: var(--primary);
    font-size: 16px;
}

.cs-modal-content h2 {
    font-family: var(--heading-font);
    font-size: 36px;
    margin: 0 0 20px 0;
    color: #fff;
}

.cs-modal-content p {
    color: #fff;
    line-height: 1.6;
    margin-bottom: 20px;
    font-family: var(--body-font);
}

/* Gallery Controls */
.cs-gallery-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.cs-gallery-prev,
.cs-gallery-next {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.cs-gallery-prev:hover,
.cs-gallery-next:hover {
    background: var(--dark);
    transform: scale(1.05);
}

/* Swiper Styles */
/* .swiper {
    width: 100%;
    height: 350px;
    border-radius: 16px;
    overflow: hidden;
} */

.swiper-slide img {
    width: 100%;
    /* height: 400px; */
    border-radius: 16px;
    object-fit: cover;
}

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

@media (max-width: 768px) {
    .cs-rail {
        right: 15px;
    }
    
    .cs-rail__icons a {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .cs-events-grid {
        grid-template-columns: 1fr;
    }
    
    .cs-event-card {
        height: 430px;
    }
    
    .cs-event-title h3 {
        font-size: 26px;
    }
    
    .cs-modal-wrapper {
        max-height: 80vh;
        padding-top :80px;
        overflow-y:auto;
    }
    
    .cs-modal-content {
        padding: 25px;
    }
    
    .cs-modal-content h2 {
        font-size: 28px;
    }
    
    .cs-gallery-controls {
        margin-bottom: 20px;
    }
    
    
}
@media (max-width:768px){
    .cs-modal-gallery{
        min-width: 100%;
    }
}
@media (max-width: 480px) {
    .cs-events-section {
        padding: 60px 0;
    }
    
    .cs-event-card {
        height: 380px;
    }
    
    .cs-read-more-btn {
        padding: 10px 20px;
        font-size: 12px;
    }
}
