/*
 * Festival Activities BBC-Style Multi-Item Carousel
 * Human Rights Are Universal Arts Festival
 * Multi-item layout: 4 items on desktop, 2-3 on tablet, 1-2 on mobile
 * Updated: Line-wrapped text backgrounds for better legibility
 */

/* ========== Section Foundation ========== */
.festival-activities-section {
    position: relative;
    padding: 100px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    overflow: hidden;
}

/* ========== Section Header ========== */
.section-header {
    margin-bottom: 60px;
    position: relative;
    z-index: 2;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    color: #202060;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.section-underline {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #FFD900 0%, #FFC107 100%);
    border-radius: 2px;
    margin: 0 auto 25px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #6c757d;
    font-weight: 400;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* ========== BBC-Style Carousel Container ========== */
.activities-carousel-container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 60px; /* Space for navigation arrows */
}

/* ========== Navigation Arrows (BBC Style) ========== */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(32, 32, 96, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.carousel-nav:hover {
    background: #202060;
    border-color: #202060;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(32, 32, 96, 0.2);
}

.carousel-nav:hover svg {
    color: white;
}

.carousel-nav svg {
    width: 20px;
    height: 20px;
    color: #202060;
    transition: color 0.3s ease;
}

.carousel-nav-prev {
    left: 0;
}

.carousel-nav-next {
    right: 0;
}

.carousel-nav:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: translateY(-50%) scale(0.9);
}

.carousel-nav:disabled:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(32, 32, 96, 0.1);
    transform: translateY(-50%) scale(0.9);
}

/* ========== Swiper Container for Multi-Item Display ========== */
.activities-carousel-swiper {
    padding: 20px 0;
    overflow: hidden;
}

.activities-carousel-swiper .swiper-wrapper {
    display: flex;
    align-items: stretch;
}

.activities-carousel-swiper .swiper-slide {
    height: auto;
    display: flex;
}

/* ========== Activity Cards (BBC Style) ========== */
.activity-card {
    position: relative;
    width: 100%;
    height: 280px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

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

.activity-card.featured {
    border: 2px solid #FFD900;
}

.activity-card.featured:hover {
    border-color: #FFC107;
    box-shadow: 0 15px 40px rgba(255, 217, 0, 0.2);
}

/* ========== REMOVED: Heavy Image Overlay - Let images shine through ========== */
.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Minimal overlay - just for very bright images where even light text backgrounds might not be enough */
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.05) 0%,
        rgba(0, 0, 0, 0.02) 50%,
        rgba(0, 0, 0, 0.08) 100%
    );
    z-index: 1;
    transition: background 0.3s ease;
}

.activity-card:hover .card-overlay {
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.03) 0%,
        rgba(0, 0, 0, 0.01) 50%,
        rgba(0, 0, 0, 0.05) 100%
    );
}

/* Featured cards can have a slightly more noticeable tint */
.activity-card.featured .card-overlay {
    background: linear-gradient(
        135deg,
        rgba(255, 217, 0, 0.08) 0%,
        rgba(255, 217, 0, 0.04) 50%,
        rgba(255, 217, 0, 0.1) 100%
    );
}

/* ========== Card Content ========== */
.card-content {
    position: relative;
    z-index: 2;
    padding: 20px 18px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* ========== Activity Icon with Light Background Wrap ========== */
.activity-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.activity-icon i {
    font-size: 1.8rem;
    color: #202060; /* Dark color for contrast */
}

.activity-card:hover .activity-icon {
    background: rgba(255, 217, 0, 0.95);
    border-color: rgba(255, 217, 0, 0.8);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 217, 0, 0.3);
}

.activity-card:hover .activity-icon i {
    color: #202060; /* Keep dark for contrast */
}

/* ========== Line-Wrapped Text Backgrounds ========== */

/* Activity Title with Background Wrap */
.activity-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
}

.activity-title span {
    /* Line-wrapped background styling */
    background: rgba(255, 255, 255, 0.9);
    color: #202060; /* Dark text for contrast */
    padding: 0.2em 0.5em;
    border-radius: 6px;
    display: inline;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    
    /* Support for line breaking on longer titles */
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    -moz-box-decoration-break: clone;
    word-wrap: break-word;
    line-height: 1.4;
}

.activity-card:hover .activity-title span {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

/* Activity Description with Background Wrap */
.activity-description {
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 15px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.activity-description span {
    /* Line-wrapped background styling */
    background: rgba(245, 245, 245, 0.85);
    color: #333333; /* Dark grey for contrast */
    padding: 0.25em 0.4em;
    border-radius: 4px;
    display: inline;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    
    /* Support for line breaking */
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    -moz-box-decoration-break: clone;
    word-wrap: break-word;
    line-height: 1.5;
}

.activity-card:hover .activity-description span {
    background: rgba(245, 245, 245, 0.9);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Activity Tags Container */
.activity-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

/* Individual Tag with Light Background Wrap */
.tag {
    display: inline-block;
    padding: 0.25em 0.6em;
    background: rgba(255, 255, 255, 0.88);
    color: #202060; /* Dark color for contrast */
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.activity-card:hover .tag {
    background: rgba(255, 217, 0, 0.9);
    border-color: rgba(255, 217, 0, 0.6);
    color: #202060;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(255, 217, 0, 0.3);
}

/* Special styling for featured card tags */
.activity-card.featured .tag {
    background: rgba(255, 217, 0, 0.9);
    border-color: rgba(255, 217, 0, 0.6);
    color: #202060;
}

/* ========== BBC-Style Pagination ========== */
.carousel-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    padding: 20px;
}

.pagination-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1rem;
    color: #202060;
    font-weight: 500;
}

.current-view {
    font-weight: 700;
    font-size: 1.1rem;
}

.separator,
.of-text {
    color: #6c757d;
    font-weight: 400;
}

.items-showing,
.total-items {
    font-weight: 600;
}

.pagination-dots {
    display: flex;
    gap: 8px;
}

.pagination-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(32, 32, 96, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-dot-active,
.pagination-dot:hover {
    background: #202060;
    transform: scale(1.2);
}

/* ========== Responsive Design ========== */

/* Desktop Large (4 items) - Optimized for square-like cards */
@media (min-width: 1200px) {
    .activities-carousel-swiper {
        --slides-per-view: 4;
        --space-between: 24px;
    }
    
    .activity-card {
        height: 280px;
    }
    
    .card-content {
        padding: 20px 16px;
    }
    
    .activity-title {
        font-size: 1.25rem;
        margin-bottom: 8px;
    }
    
    .activity-description {
        font-size: 0.8rem;
        margin-bottom: 12px;
        -webkit-line-clamp: 2;
    }
}

/* Desktop (3 items) - Balanced aspect ratio */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .activities-carousel-swiper {
        --slides-per-view: 3;
        --space-between: 20px;
    }
    
    .activities-carousel-container {
        padding: 0 50px;
    }
    
    .activity-card {
        height: 300px;
    }
    
    .card-content {
        padding: 22px 18px;
    }
    
    .activity-title {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }
    
    .activity-title span {
        padding: 0.15em 0.4em;
        font-size: 1.3rem;
    }
    
    .activity-description {
        font-size: 0.85rem;
        margin-bottom: 15px;
        -webkit-line-clamp: 3;
    }
    
    .activity-description span {
        padding: 0.2em 0.35em;
        font-size: 0.85rem;
    }
}

/* Tablet (2 items) - More room for content */
@media (min-width: 768px) and (max-width: 991.98px) {
    .activities-carousel-swiper {
        --slides-per-view: 2;
        --space-between: 20px;
    }
    
    .activities-carousel-container {
        padding: 0 45px;
    }
    
    .festival-activities-section {
        padding: 80px 0;
    }
    
    .activity-card {
        height: 320px;
    }
    
    .card-content {
        padding: 25px 20px;
    }
    
    .activity-title {
        font-size: 1.4rem;
        margin-bottom: 12px;
    }
    
    .activity-title span {
        padding: 0.15em 0.4em;
        font-size: 1.4rem;
    }
    
    .activity-description {
        font-size: 0.9rem;
        margin-bottom: 18px;
        -webkit-line-clamp: 4;
    }
    
    .activity-description span {
        padding: 0.2em 0.35em;
        font-size: 0.9rem;
    }
}

/* Mobile Large (2 items) - Compact but readable */
@media (min-width: 576px) and (max-width: 767.98px) {
    .activities-carousel-swiper {
        --slides-per-view: 2;
        --space-between: 15px;
    }
    
    .activities-carousel-container {
        padding: 0 40px;
    }
    
    .festival-activities-section {
        padding: 60px 0;
    }
    
    .activity-card {
        height: 260px;
    }
    
    .card-content {
        padding: 18px 15px;
    }
    
    .activity-icon {
        width: 45px;
        height: 45px;
        margin-bottom: 12px;
    }
    
    .activity-icon i {
        font-size: 1.4rem;
    }
    
    .activity-title {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }
    
    .activity-title span {
        padding: 0.15em 0.35em;
        font-size: 1.1rem;
    }
    
    .activity-description {
        font-size: 0.8rem;
        margin-bottom: 12px;
        -webkit-line-clamp: 3;
    }
    
    .activity-description span {
        padding: 0.2em 0.3em;
        font-size: 0.8rem;
    }
    
    .tag {
        padding: 0.2em 0.4em;
        font-size: 0.7rem;
    }
}

/* Mobile (1 item) - Full card display */
@media (max-width: 575.98px) {
    .activities-carousel-swiper {
        --slides-per-view: 1;
        --space-between: 15px;
    }
    
    .activities-carousel-container {
        padding: 0 35px;
    }
    
    .festival-activities-section {
        padding: 50px 0;
    }
    
    .activity-card {
        height: 300px;
    }
    
    .card-content {
        padding: 25px 20px;
    }
    
    .activity-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 15px;
    }
    
    .activity-icon i {
        font-size: 1.5rem;
    }
    
    .activity-title {
        font-size: 1.3rem;
        margin-bottom: 12px;
    }
    
    .activity-title span {
        padding: 0.15em 0.35em;
        font-size: 1.3rem;
    }
    
    .activity-description {
        font-size: 0.9rem;
        margin-bottom: 18px;
        -webkit-line-clamp: 4;
    }
    
    .activity-description span {
        padding: 0.2em 0.3em;
        font-size: 0.9rem;
    }
    
    .tag {
        padding: 0.25em 0.5em;
        font-size: 0.75rem;
    }
    
    .carousel-nav {
        width: 40px;
        height: 40px;
    }
    
    .carousel-nav svg {
        width: 16px;
        height: 16px;
    }
    
    .carousel-pagination {
        margin-top: 30px;
        padding: 15px;
    }
    
    .pagination-info {
        font-size: 0.9rem;
    }
}

/* ========== Enhanced Text Background Effects ========== */

/* Subtle animation for text backgrounds on card hover */
.activity-card:hover .activity-title span,
.activity-card:hover .activity-description span {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Special effects for featured cards */
.activity-card.featured .activity-title span {
    background: rgba(255, 217, 0, 0.15);
    border-color: rgba(255, 217, 0, 0.4);
    color: #202060;
}

.activity-card.featured .activity-description span {
    background: rgba(255, 217, 0, 0.1);
    border-color: rgba(255, 217, 0, 0.3);
    color: #333333;
}

.activity-card.featured:hover .activity-title span {
    background: rgba(255, 217, 0, 0.25);
    border-color: rgba(255, 217, 0, 0.5);
    box-shadow: 0 3px 10px rgba(255, 217, 0, 0.2);
}

.activity-card.featured:hover .activity-description span {
    background: rgba(255, 217, 0, 0.2);
    border-color: rgba(255, 217, 0, 0.4);
    box-shadow: 0 2px 6px rgba(255, 217, 0, 0.15);
}

/* Better handling for very long text content */
.activity-title span,
.activity-description span {
    /* Ensure text wraps naturally */
    hyphens: auto;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .activity-title span {
        background: rgba(255, 255, 255, 0.95) !important;
        color: #000000 !important;
        border-color: rgba(0, 0, 0, 0.2) !important;
    }
    
    .activity-description span {
        background: rgba(255, 255, 255, 0.95) !important;
        color: #000000 !important;
        border-color: rgba(0, 0, 0, 0.2) !important;
    }
    
    .tag {
        background: rgba(255, 255, 255, 0.95) !important;
        color: #000000 !important;
        border-color: rgba(0, 0, 0, 0.2) !important;
    }
}

/* ========== Accessibility & Performance ========== */
.carousel-nav:focus,
.activity-card:focus {
    outline: 3px solid #FFD900;
    outline-offset: 4px;
}

/* Focus states for text elements */
.activity-card:focus .activity-title span,
.activity-card:focus .activity-description span {
    outline: 2px solid #FFD900;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .activity-title span,
    .activity-description span,
    .tag {
        transition: none !important;
        transform: none !important;
    }
}

/* ========== Performance Optimizations ========== */
.activity-card,
.card-content,
.activity-icon,
.activity-title,
.activity-description,
.tag {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* ========== Print Styles ========== */
@media print {
    .festival-activities-section {
        background: white;
        padding: 20px 0;
    }
    
    .carousel-nav,
    .carousel-pagination {
        display: none !important;
    }
    
    .card-overlay {
        opacity: 0.1;
    }
    
    .activity-title,
    .activity-description,
    .tag {
        background: rgba(255, 255, 255, 0.95) !important;
        color: #000 !important;
    }
} 