/* Event Banner Styles */
/* Outer container for the whole section */
.event-carousel-section {
    margin-top: 40px;
    margin-bottom: 40px;
}

/* The box that contains the carousel items and arrows */
.event-carousel-container {
    padding: 20px;
    background-color: #f8f9fa; /* Adjust if needed */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    text-align: center;
    overflow: hidden;
}

/* Flex container for arrows and scrollable content */
.carousel-display-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* The actual scrollable container for event cards */
.event-carousel {
    display: flex;
    overflow-x: scroll; /* Enable horizontal scrolling */
    /* REMOVE THIS LINE: scroll-snap-type: x mandatory; */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    scrollbar-width: none; /* Hide scrollbar for Firefox */
    -ms-overflow-style: none; /* Hide scrollbar for IE/Edge */
    gap: 1.5rem; /* Space between cards */
    padding-bottom: 10px; /* Space for potential scrollbar area if it appears */
    flex-grow: 1; /* Allow it to take up available space in the flex container */
    justify-content: flex-start; /* Items align to the start */
    align-items: stretch; /* This ensures all cards have the same height */
    /* Add this if you need to constrain its vertical growth again, as discussed before */
    /* align-self: flex-start; */
    /* height: auto; */
    /* min-height: min-content; */
}

/* Hide scrollbar for Webkit browsers (Chrome, Safari) */
.event-carousel::-webkit-scrollbar {
    display: none;
}

/* Individual Event Cards */
.event-slide {
    /* flex: 0 0 calc((100% - (2 * 1.5rem)) / 3); */
     flex: 0 0 calc((100% - (2 * 2rem)) / 3);
    scroll-snap-align: start;
    background-color: #ffffff; /* Consistent with your .card background */
    border-radius: 8px; /* Matching your .card border-radius */
    box-shadow: 10px 24px 54px 0px rgba(0, 0, 0, 0.05); /* Matching your .card shadow */
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 350px; /* Fixed height instead of min-height */
    max-height: 350px; /* Prevent exceeding this height */
    overflow: hidden; /* Hide any overflow content */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-slide:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* Image Wrapper and Image */
.event-image-wrapper {
    width: 100%;
    height: 180px; /* Fixed height for consistent image area */
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1rem;
    flex-shrink: 0; /* Prevent shrinking */
}

.event-card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.event-slide:hover .event-card-img {
    transform: scale(1.1);
    transition: transform 0.3s ease-in-out;
}

/* Card Content */
.card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
    align-items: center;
    min-height: 0; /* Allow content to shrink if needed */
    overflow: hidden; /* Prevent overflow */
}

.event-slide .card-title {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #464f4c;
    text-align: center;
    font-family: Poppins, "Source Sans Pro", sans-serif;
    
    /* Single line with ellipsis */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    display: block;
}

.event-slide .card-text {
    font-size: 0.85rem;
    color: #464f4c;
    margin-bottom: 1rem;
    text-align: center;
    font-family: "Source Sans Pro", sans-serif;
    white-space: nowrap; /* Keep date on one line */
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- SIMPLIFIED BUTTON STYLING --- */
/* --- SIMPLIFIED BUTTON STYLING --- */
.event-slide .btn.btn-secondary {
    width: 100%;
    max-width: 200px;
    margin-top: auto;
    margin-left: auto;
    margin-right: auto;
    flex-shrink: 0;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    /* Add some bottom margin to give it more space in the card */
    margin-bottom: 5px; /* Adjust as needed */
}

/* This is the important part for hover clipping */
.event-slide .btn.btn-secondary:hover {
    /* Your existing hover styles for color/background/border */
    /* Reduce or remove transform, or add a slight translateY for space */
    /*transform: translateY(-2px); /* Keep it very subtle, or remove if not essential */
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.3);; /* A slightly less aggressive shadow */
}


  .carousel-nav-btn {
            background: none;
            border: none;
            font-size: 2rem;
            color: #464f4c;
            cursor: pointer;
            padding: 0 10px;
            user-select: none;
            transition: color 0.3s ease, transform 0.3s ease;
            display: block;
            min-width: 40px;
        }

        .carousel-nav-btn:hover {
            color: #333;
            transform: scale(1.1);
            background: none;
        }

        .carousel-nav-btn.disabled {
            opacity: 0.3;
            pointer-events: none;
            cursor: not-allowed;
        }


        

/* Responsive Adjustments */
@media (max-width: 991.98px) { /* Tablet and smaller */
    .event-slide {
        flex: 0 0 calc(50% - 0.75rem);
        height: 340px; /* Slightly taller to accommodate wrapped text */
        max-height: 340px;
    }
    .event-image-wrapper {
        height: 160px;
    }
    .carousel-nav-btn {
        font-size: 1.5rem;
    }
    
    /* Allow text wrapping on tablets */
    .event-slide .card-title {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.3;
        text-overflow: unset;
    }
}

@media (max-width: 767.98px) { /* Mobile */
    .event-slide {
        flex: 0 0 95%;
        margin: 0 auto;
        height: 350px; /* Taller for mobile to accommodate wrapped text */
        max-height: 350px;
    }
    .event-image-wrapper {
        height: 140px; /* Smaller image to make room for text */
    }
    .carousel-nav-btn {
        font-size: 1.2rem;
    }
    .carousel-display-area {
        gap: 5px;
    }
    
    /* Allow text wrapping on mobile */
    .event-slide .card-title {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 3; /* Allow up to 3 lines on mobile */
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.3;
        text-overflow: unset;
        font-size: 1rem; /* Slightly smaller font on mobile */
    }
    
    .event-slide .card-text {
        font-size: 0.8rem; /* Smaller text on mobile */
    }
    
    .event-slide .btn.btn-secondary {
        font-size: 0.85rem; /* Smaller button text on mobile */
        padding: 0.4rem 0.8rem;
    }
}