/* WEF Leading Voices Section - Professional WEF Style */
.wef-leading-voices-section {
    padding: 6rem 0 8rem 0;
    background: url('/static/assets/images/new-hero-background.png') center/cover no-repeat;
    position: relative;
    overflow: hidden;
}

/* Override wef-section-navy-dark for leading voices */
.wef-leading-voices-section.wef-section-navy-dark {
    background: url('/static/assets/images/new-hero-background.png') center/cover no-repeat !important;
}

.wef-leading-voices-section.wef-section-navy-dark::before {
    display: none !important;
}

.wef-leading-voices-section::before {
    display: none;
}

/* Main container with consistent max-width */
.wef-voices-main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

/* Professional shadow box container */
.wef-voices-container-wrapper {
    background: transparent;
    border-radius: 0.75rem;
    padding: 2rem;
    padding-left: 3rem;
    padding-right: 3rem;
    box-shadow: none;
    border: none;
    backdrop-filter: none;
    position: relative;
    display: block !important;
    visibility: visible !important;
}

/* Header - Professional WEF Typography */
.wef-voices-header {
    text-align: left;
    margin-bottom: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 2rem;
}

.wef-voices-title {
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
    font-family: 'Inter', sans-serif;
    line-height: 1.1;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.wef-voices-subtitle {
    font-size: 1.125rem;
    color: #e2e8f0;
    max-width: 42rem;
    margin: 0;
    line-height: 1.6;
    font-weight: 400;
    font-family: 'Inter', sans-serif;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.005em;
}

/* Professional carousel container */
.wef-voices-carousel-container {
    overflow: hidden;
    width: 100%;
    display: block !important;
    visibility: visible !important;
    position: relative;
}

/* Dynamic Carousel Grid - JS-driven dimensions */
.wef-voices-grid {
    display: flex !important;
    visibility: visible !important;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    gap: 0;
    /* Width: 200% to contain 2 slides of 100% each */
    width: 200%;
    margin: 0;
    padding: 0;
}

.wef-voices-slide {
    display: flex !important;
    visibility: visible !important;
    gap: 1.5rem;
    flex-shrink: 0;
    width: 50%; /* Each slide is 50% of the 200% grid */
    min-width: 50%;
}

.wef-voices-container {
    overflow: hidden;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    padding: 0 2rem;
}

/* Always show 4 cards per slide on desktop */
@media (min-width: 768px) {
    .wef-voices-slide {
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    .wef-voices-slide {
        gap: 1.5rem;
    }
}

/* Navigation Arrows - Professional WEF Style */
.wef-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    color: white;
}

.wef-nav-prev {
    left: 8px;
}

.wef-nav-next {
    right: 8px;
}

.wef-nav-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.wef-nav-arrow:disabled,
.wef-nav-arrow[disabled] {
    opacity: 0.3;
    cursor: not-allowed;
}

.wef-nav-arrow svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

/* Navigation Dots - Professional Style */
.wef-navigation-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 2.5rem;
}

.wef-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.wef-dot.active {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.25);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

.wef-dot:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Mobile responsive - JS-driven layout */
@media (max-width: 767px) {
    .wef-voices-slide {
        gap: 1rem;
    }
    
    .wef-play-button-small {
        width: 40px;
        height: 40px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        bottom: auto;
        right: auto;
    }

    .wef-play-button-small svg {
        width: 16px;
        height: 16px;
    }
    
    .wef-nav-arrow {
        width: 36px;
        height: 36px;
    }
    
    .wef-nav-arrow svg {
        width: 16px;
        height: 16px;
    }
}

/* Voice Card - Professional WEF Design */
.wef-voice-card {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    position: relative;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 2px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    flex: 1 1 calc(25% - 1.125rem);
    min-width: 320px;
    max-width: calc(25% - 1.125rem); /* 4 cards per slide with gaps */
    height: 520px; /* Increased for larger video + speaker info */
}

.wef-voice-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 16px 48px rgba(0, 0, 0, 0.4),
        0 4px 20px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

/* Video Container - Large Professional Aspect Ratio */
.wef-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* Full card height */
    overflow: hidden;
    background: #000;
}

.wef-video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    cursor: pointer;
    z-index: 1;
}

@media (min-width: 768px) {
    .wef-video-container {
        min-height: 240px;
    }
}

@media (min-width: 1024px) {
    .wef-video-container {
        min-height: 280px;
    }
}

.wef-video-element {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    filter: brightness(0.9) contrast(1.1);
}

/* Video error state */
.video-error {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-error::after {
    content: '📹 Video unavailable';
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
}

.wef-voice-card:hover .wef-video-element {
    transform: scale(1.03);
    filter: brightness(1) contrast(1.1);
}

.wef-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        transparent 0%,
        transparent 30%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0.7) 80%,
        rgba(0, 0, 0, 0.9) 100%
    );
    z-index: 2;
    pointer-events: none;
}

/* Small Play Button - Professional WEF Style */
/* Play button - CENTERED in video box */
.wef-play-button-small {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    z-index: 5;
    opacity: 1;
    pointer-events: auto;
}

.wef-play-button-small:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.wef-play-button-small svg {
    width: 20px;
    height: 20px;
    margin-left: 2px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.wef-voice-card:hover .wef-play-button-small {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Hide play button when video is playing */
.wef-voice-card.is-playing .wef-play-button-small {
    opacity: 0;
    pointer-events: none;
}

.wef-voice-card.is-playing .wef-video-overlay {
    opacity: 0;
    pointer-events: none;
}

/* Fullscreen button - bottom right corner when playing */
.wef-fullscreen-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 4px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}

.wef-fullscreen-btn:hover {
    background: rgba(0, 0, 0, 0.85);
}

.wef-voice-card.is-playing .wef-fullscreen-btn {
    display: flex;
}

/* Duration - Professional Styling */
.wef-duration {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(15, 23, 42, 0.9);
    color: #ffffff;
    padding: 0.25rem 0.625rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 3;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-family: 'Inter', sans-serif;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Card Content - Professional WEF Spacing */
.wef-card-content {
    display: block !important;
    padding: 1.25rem;
    background: transparent;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3;
}

/* Category Badge - Professional WEF Style */
.wef-category-badge {
    display: inline-block !important;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
    border: none;
    backdrop-filter: blur(8px);
}

/* Card Title - Professional Typography */
.wef-card-title {
    display: block !important;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.4;
    margin-bottom: 0.875rem;
    font-family: 'Inter', sans-serif;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Speaker Section - Professional WEF Layout */
.wef-speaker-section {
    display: flex !important;
    align-items: center;
    gap: 0.875rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.wef-speaker-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.wef-speaker-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.speaker-placeholder {
    color: #ffffff;
    font-size: 0.6875rem;
    font-weight: 600;
    text-align: center;
    font-family: 'Inter', sans-serif;
    text-rendering: optimizeLegibility;
}

.wef-speaker-info {
    flex: 1;
    min-width: 0;
}

.wef-speaker-name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.25rem;
    font-family: 'Inter', sans-serif;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.wef-speaker-title {
    font-size: 0.8125rem;
    color: #e2e8f0;
    font-weight: 400;
    font-family: 'Inter', sans-serif;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-rendering: optimizeLegibility;
    letter-spacing: -0.005em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Removed duplicate navigation styles - using unified styles below */

/* Video Modal - Enhanced WEF Style */
.wef-video-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
}

.wef-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wef-modal-video {
    width: 100%;
    height: auto;
    max-height: 90vh;
    border-radius: 1rem;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.wef-modal-close {
    position: absolute;
    top: -3rem;
    right: 0;
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.wef-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Coming Soon Card - Professional Placeholder */
.wef-coming-soon-placeholder {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    height: 100%;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
}

.wef-coming-soon-content {
    text-align: center;
    color: white;
}

.wef-coming-soon-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

.wef-coming-soon-text {
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    opacity: 0.8;
}

/* Accessibility - Focus States and Keyboard Navigation */
.wef-nav-arrow:focus,
.wef-voice-card:focus,
.wef-dot:focus,
.wef-play-button-small:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    box-shadow: 
        0 0 0 4px rgba(59, 130, 246, 0.2),
        0 0 0 2px #3b82f6;
}

.wef-nav-arrow:focus {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.wef-voice-card:focus {
    transform: translateY(-2px);
    border-color: rgba(59, 130, 246, 0.4);
}

.wef-dot:focus {
    transform: scale(1.2);
    background: rgba(59, 130, 246, 0.6);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .wef-voice-card {
        border-width: 2px;
        border-color: rgba(255, 255, 255, 0.3);
    }
    
    .wef-category-badge {
        border-width: 2px;
        font-weight: 700;
    }
    
    .wef-nav-arrow,
    .wef-dot {
        border-width: 2px;
        border-color: rgba(255, 255, 255, 0.4);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .wef-voices-grid,
    .wef-voice-card,
    .wef-nav-arrow,
    .wef-dot,
    .wef-play-button-small {
        transition: none;
        animation: none;
    }
    
    .wef-voice-card:hover {
        transform: none;
    }
    
    .wef-nav-arrow:hover {
        transform: translateY(-50%);
    }
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Responsive Adjustments - Professional WEF Standards */
@media (max-width: 768px) {
    .wef-leading-voices-section {
        padding: 4rem 0 6rem 0;
    }
    
    .wef-voices-header {
        padding: 0 1.5rem;
        margin-bottom: 2.5rem;
    }
    
    .wef-voices-title {
        font-size: 2.25rem;
    }
    
    .wef-voices-subtitle {
        font-size: 1rem;
    }
    
    .wef-voices-grid {
        padding: 0 1.5rem;
    }
    
    .wef-card-content {
        padding: 1rem 1.25rem 1.25rem 1.25rem;
    }
}

@media (max-width: 480px) {
    .wef-leading-voices-section {
        padding: 3rem 0 4rem 0;
    }
    
    .wef-voices-header {
        padding: 0 1rem;
        margin-bottom: 2rem;
    }
    
    .wef-voices-title {
        font-size: 1.875rem;
    }
    
    .wef-voices-subtitle {
        font-size: 0.9375rem;
    }
    
    .wef-voices-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        padding: 0 1rem;
    }
    
    .wef-play-button {
        width: 48px;
        height: 48px;
    }
    
    .wef-play-button svg {
        width: 16px;
        height: 16px;
    }
}