/* ========================================
   ACTIVITIES SECTION - MAIN LAYOUT
======================================== */

.activities-section {
    padding: 50px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.activities-container {
    padding: 0 2rem;
}

.activities-title {
    font-size: 3rem;
    font-weight: 700;
    color: #EDAA03;
    margin-bottom: 1rem;
    text-align: center;
}

.activities-subtitle {
    font-size: 1.2rem;
    color: #6c757d;
    text-align: center;
    margin-bottom: 1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   SPLIDE CAROUSEL CONTAINER
======================================== */

.activities-carousel {
    margin: 0 auto;
}

.splide__slide {
    padding: 1.25rem 0 2rem 0 !important;
}

.splide__pagination {
    padding-top: 1.5rem;
}

/* ========================================
   ACTIVITY TILE - BASE STRUCTURE
======================================== */

.activity-tile {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    height: 380px;
    position: relative;
    cursor: pointer;
    margin: 0 1rem;
}

.activity-tile:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* ========================================
   ACTIVITY IMAGE SECTION
======================================== */

.activity-image-section {
    position: relative;
    height: 40%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: all 0.4s ease;
    overflow: hidden;
}

.activity-image-placeholder {
    color: #6c757d;
    font-size: 3.5rem;
    opacity: 0.3;
    text-align: center;
    justify-content: center;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 100%;
    background-color: #e6e6e6;
}

.activity-image-placeholder i {
    font-size: 3rem;
}

.activity-image-placeholder span {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========================================
   ACTIVITY CONTENT SECTION
======================================== */

.activity-content-section {
    position: relative;
    height: 60%;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.4s ease;
    background: white;
}

.activity-content-main {
    flex-grow: 1;
}

.activity-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.8rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    cursor: text;
}

.activity-date {
    font-size: 0.95rem;
    color: #6c757d;
    font-weight: 500;
    margin-bottom: 1rem;
    cursor: text;
}

.activity-description {
    font-size: 0.95rem;
    color: #495057;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: text;
}

/* ========================================
   ACTIVITY BUTTON
======================================== */

.activity-btn {
    background: #698EE9;
    color: white;
    border: none;
    padding: 0.2rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    align-self: flex-start;
    width: 100%;
    visibility: hidden;
}

.activity-btn:hover {
    background: #5a7ed4;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(105, 142, 233, 0.3);
    text-decoration: none;
}

.activity-btn i {
    font-size: 0.8rem;
}

/* ========================================
   HOVER EFFECTS - IMAGE SECTION
======================================== */

/* When hovering over image - image expands, content shrinks */
.activity-tile:hover .activity-image-section.image-hovered {
    height: 70%;
}

.activity-tile:hover .activity-content-section.image-hovered {
    height: 30%;
    padding: 1rem 1.5rem;
    justify-content: center;
}

/* Hide elements when image is hovered */
.activity-tile:hover .activity-content-section.image-hovered .activity-description {
    display: none;
}

.activity-tile:hover .activity-content-section.image-hovered .activity-btn {
    display: none;
}

/* ========================================
   HOVER EFFECTS - CONTENT SECTION
======================================== */

/* When hovering over content - content expands to 100%, image disappears */
.activity-tile:hover .activity-image-section.content-hovered {
    height: 0%;
}

.activity-tile:hover .activity-content-section.content-hovered {
    height: 100%;
    padding: 1.5rem;
    justify-content: space-between;
    overflow-y: hidden; 
}

.activity-tile:hover .activity-content-section.content-hovered .activity-title {
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
    overflow: visible;
    max-height: none;
}

/* Show all elements when content is hovered */
.activity-tile:hover .activity-content-section.content-hovered .activity-description {
    display: -webkit-box; 
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 6rem;
    text-overflow: ellipsis;
}

/* When no button exists, let description expand */
.activity-tile:hover .activity-content-section.content-hovered:not(:has(.activity-btn)) .activity-description {
    -webkit-line-clamp: unset;
    max-height: none;
    flex-grow: 1;
}

.activity-tile:hover .activity-content-section.content-hovered .activity-btn {
    display: inline-flex;
    margin-top: auto;
    visibility: visible;
}

/* ========================================
   ACTIVITY BADGES AND OVERLAYS
======================================== */

/* Featured star overlay */
.featured-star-overlay {
    position: absolute;
    top: 4px;
    left: 6px;
    color: #FFD700;
    font-size: 1rem;
    text-shadow: 0 0 3px rgba(237, 170, 3, 0.5);
    z-index: 20;
    pointer-events: none;
}

/* Activity tags container */
.activity-tags {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    display: flex;
    gap: 0.5rem;
    flex-direction: column;
    align-items: flex-end;
}

.activity-status-badge {
    padding: 0rem 0.5rem;
    border-radius: 20px;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(40, 167, 69, 0.3);
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.activity-type-badge {
    padding: 0rem 0.5rem;
    border-radius: 20px;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(25, 118, 210, 0.3);
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

/* Past Status Badge - For activities that already happened */
/* .activity-status-badge.status-past {
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3);
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
} */

/* Status Badge: Today */
.activity-status-badge.status-today {
    background: #FFF4D3;
    border: 1px solid #EDAA03;
    color: #B8820A;
    box-shadow: 0 2px 4px rgba(237, 170, 3, 0.25);
}

/* Event - Cool Blue */
.activity-tile[data-activity-type="event"] .activity-type-badge {
    background: #E3F2FD;
    color: #1565C0;
    border: 1px solid #90CAF9;
    box-shadow: 0 2px 4px rgba(21, 101, 192, 0.3);
}

/* News - Taupe / Cocoa */
.activity-tile[data-activity-type="news"] .activity-type-badge {
    background: #e3e6f6;           
    color: #0E1657;                
    border: 1px solid #aeb3e0;      
    box-shadow: 0 2px 6px rgba(14, 22, 87, 0.3); 
}

/* Announcement - Rich Pink */
.activity-tile[data-activity-type="announcement"] .activity-type-badge {
    background: #FDE9EA;           
    color: #C3020D;                
    border: 1px solid #F5B4B8;     
    box-shadow: 0 2px 4px rgba(195, 2, 13, 0.3);
}

/* Other - Refined Gray */
.activity-tile[data-activity-type="other"] .activity-type-badge {
    background: #EEEEEE;
    color: #424242;
    border: 1px solid #BDBDBD;
    box-shadow: 0 2px 4px rgba(66, 66, 66, 0.25);
}


/* ========================================
   ACTIVITIES FILTER CONTROLS
======================================== */

/* CRITICAL: Hide slides without splide__slide class */
.activities-carousel .splide__list li:not(.splide__slide) {
    display: none !important;
}

.activities-controls {
    position: relative;
    z-index: 1000;
    padding-right: 4rem;
    padding-left: 4rem;
}

/* Filter Button */
.filter-icon-container {
    position: relative;
    display: flex;
    justify-content: flex-end;
    z-index: 1002;
    isolation: isolate;
}

.filter-icon {
    background: none;
    color: #6c757d;
    width: 45px;
    height: 45px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 4px rgba(153, 153, 153, 0.25);
}

.filter-icon:hover {
    background: #999999;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(153, 153, 153, 0.25);
}

.filter-icon i {
    font-size: 1.1rem;
}

.filter-icon.has-active-filters {
    background: #EDAA03;
    color: white;
    box-shadow: 0 2px 8px rgba(237, 170, 3, 0.3);
}

.filter-icon.has-active-filters:hover {
    background: #d49903;
}

/* Filters Section */
.filters-section {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 0 4rem;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    transform: translateY(-10px);
    overflow: hidden;
}

.filters-section.show {
    max-height: 400px;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.filters-content {
    padding: 1.5rem;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    align-items: end;
}

/* Filter Groups */
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    color: #495057;
    transition: all 0.3s ease;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 3rem;
}

.filter-select:focus {
    outline: none;
    border-color: #EDAA03;
    box-shadow: 0 0 0 0.2rem rgba(237, 170, 3, 0.25);
}

.filter-select:hover {
    border-color: #dee2e6;
}

.filter-select.has-filter {
    border-color: #EDAA03;
    background: #fef9e7;
}

/* Clear Filters Button */
.clear-filters-container {
    display: flex;
    align-items: end;
    justify-content: left;
}

.clear-filters-btn {
    background: #ffeff0;
    border: 1px solid #C3020D;
    color: #C3020D;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: none;
}

.clear-filters-btn.show {
    display: inline-block;
}

.clear-filters-btn:hover {
    background: #ffd7da;
    color: #C3020D;
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 3rem 2rem;
    color: #6c757d;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #495057;
}

.no-results p {
    font-size: 1rem;
    margin-bottom: 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */

/* Extra large screens (1400px+) */
@media (min-width: 1400px) {
    .activities-section {
        padding: 45px 0;
    }
    
    .activity-tile {
        height: 360px;
    }
    
    .activities-title {
        font-size: 2.8rem;
        margin-bottom: 0.8rem;
    }
    
    .activities-subtitle {
        margin-bottom: 0.8rem;
    }
}

/* Medium-large screens (993px - 1199px) */
@media (max-width: 1199px) and (min-width: 993px) {
    .activities-section {
        padding: 55px 0;
    }
    
    .activity-tile {
        height: 400px;
        margin: 0 0.75rem;
    }
    
    .activities-title {
        font-size: 2.5rem;
    }
    
    .activities-subtitle {
        font-size: 1.1rem;
    }
    
    .featured-star-overlay {
        font-size: 0.9rem;
        top: 3px;
        left: 5px;
    }
}

/* Tablet screens (769px - 992px) */
@media (max-width: 992px) and (min-width: 769px) {
    .activities-section {
        padding: 60px 0;
    }
    
    .activities-title {
        font-size: 2.25rem;
    }
    
    .activity-tile {
        height: 420px;
    }
    
    .activity-content-section {
        padding: 1.25rem;
    }
    
    .splide__arrow--prev {
        left: -20px;
    }
    
    .splide__arrow--next {
        right: -20px;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .filter-icon {
        width: 40px;
        height: 40px;
    }
}

/* Mobile and small tablet (768px and below) */
@media (max-width: 768px) {
    .activities-section {
        padding: 40px 0;
    }
    
    .activities-title {
        font-size: 2rem;
    }
    
    .activities-subtitle {
        font-size: 1rem;
    }
    
    .activity-tile {
        min-height: 400px;
        margin: 0 0.5rem;
    }
    
    /* Base mobile layout */
    .activity-image-section {
        height: 40%;
        min-height: 160px;
    }
    
    .activity-content-section {
        height: 60%;
        padding: 1rem;
    }
    
    /* HOVER OVERRIDES - Image hover */
    .activity-tile:hover .activity-image-section.image-hovered {
        height: 70% !important;
    }
    
    .activity-tile:hover .activity-content-section.image-hovered {
        height: 30% !important;
    }
    
    /* HOVER OVERRIDES - Content hover */
    .activity-tile:hover .activity-image-section.content-hovered {
        min-height: 0;
        height: 0% !important;
    }
    
    .activity-tile:hover .activity-content-section.content-hovered {
        height: 100% !important;
        padding: 1rem !important;
        justify-content: space-between !important; 
        overflow-y: hidden !important; 
    }
    
    /* Button visibility on mobile */
    .activity-tile:hover .activity-content-section.content-hovered .activity-btn {
        visibility: visible !important;
        display: inline-flex !important;
        margin-top: auto !important;
    }

    .activity-tile:hover .activity-content-section.content-hovered .activity-title {
        display: block !important;
        -webkit-line-clamp: unset !important;
        -webkit-box-orient: unset !important;
        overflow: visible !important;
        max-height: none !important;
    }
    
    /* Content display overrides for mobile */
    .activity-tile:hover .activity-content-section.content-hovered .activity-description {
        display: -webkit-box !important; 
        -webkit-line-clamp: 6 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        max-height: 7.5rem !important;
        text-overflow: ellipsis !important; 
    }

    /* When no button exists on mobile, let description expand */
    .activity-tile:hover .activity-content-section.content-hovered:not(:has(.activity-btn)) .activity-description {
        -webkit-line-clamp: unset !important;
        max-height: none !important;
        flex-grow: 1 !important;
    }
    
    .activity-title {
        font-size: 1.2rem;
    }
    
    .activity-description {
        -webkit-line-clamp: 2;
    }
    
    .activity-image-placeholder {
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .activity-image-placeholder i {
        font-size: 2.5rem;
    }
    
    .splide__arrow {
        width: 45px;
        height: 45px;
    }
    
    .splide__arrow svg {
        width: 18px;
        height: 18px;
    }
    
    .splide__arrow--prev {
        left: -15px;
    }
    
    .splide__arrow--next {
        right: -15px;
    }
    
    .featured-star-overlay {
        font-size: 0.8rem;
        top: 3px;
        left: 4px;
    }
    
    .filters-content {
        padding: 1.5rem;
    }

    .filters-section {
        margin: 0;
    }
    
    .filters-grid {
        gap: 1rem;
    }
    
    .filter-select {
        padding: 0.6rem 0.8rem;
        padding-right: 2.5rem;
        font-size: 0.85rem;
    }
    
    .clear-filters-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
    }
}

/* Small mobile (576px and below) */
@media (max-width: 576px) {
    .activities-section {
        padding: 30px 0;
    }

    .activities-title {
        font-size: 1.5rem;
    }

    .activities-subtitle {
        font-size: 0.85rem;
    }
    
    .activity-tile {
        height: 380px;
        min-height: 380px;
    }
    
    /* Base mobile layout */
    .activity-image-section {
        height: 40%;
        min-height: 152px;
    }
    
    .activity-content-section {
        height: 60%;
    }
    
    /* HOVER OVERRIDES - Image hover */
    .activity-tile:hover .activity-image-section.image-hovered {
        height: 70% !important;
    }
    
    .activity-tile:hover .activity-content-section.image-hovered {
        height: 30% !important;
    }
    
    /* HOVER OVERRIDES - Content hover */
    .activity-tile:hover .activity-image-section.content-hovered {
        height: 0% !important;
    }
    
    .activity-tile:hover .activity-content-section.content-hovered {
        height: 100% !important;
        padding: 1rem !important;
        justify-content: space-between !important; /* Changed */
        overflow-y: hidden !important; /* Changed */
    }
    
    /* Button visibility on small mobile */
    .activity-tile:hover .activity-content-section.content-hovered .activity-btn {
        visibility: visible !important;
        display: inline-flex !important;
        margin-top: auto !important;
    }

    .activity-tile:hover .activity-content-section.content-hovered .activity-title {
        display: block !important;
        -webkit-line-clamp: unset !important;
        -webkit-box-orient: unset !important;
        overflow: visible !important;
        max-height: none !important;
    }
    
    /* Content display overrides for small mobile */
    .activity-tile:hover .activity-content-section.content-hovered .activity-description {
        display: -webkit-box !important; 
        -webkit-line-clamp: 7 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        max-height: 8rem !important;
        text-overflow: ellipsis !important;
    }

    /* When no button exists on small mobile, let description expand */
    .activity-tile:hover .activity-content-section.content-hovered:not(:has(.activity-btn)) .activity-description {
        -webkit-line-clamp: unset !important;
        max-height: none !important;
        flex-grow: 1 !important;
    }
    
    .activity-image-placeholder i {
        font-size: 2rem;
    }
    
    .activity-tags {
        top: 0.75rem;
        right: 0.75rem;
        gap: 0.3rem;
    }
    
    .activity-status-badge,
    .activity-type-badge {
        padding: 0.25rem 0.6rem;
        font-size: 0.7rem;
    }
    
    .splide__arrow--prev {
        left: 10px;
    }
    
    .splide__arrow--next {
        right: 10px;
    }
    
    .featured-star-overlay {
        font-size: 0.7rem;
        top: 2px;
        left: 3px;
    }
}

/* Very small screens */
@media (max-width: 400px) {
    #activities-carousel-track {
        padding-left: 0rem !important;
        padding-right: 0rem !important;
    }
}