/**
 * Hero Ads Component Styles
 * Matches TheFaithThread PRD design system (gold/black theme)
 */

:root {
    --accent-gold: #FFD700;
    --accent-gold-hover: #FFC400;
    --accent-gold-text: #000000;
    --bg-primary: #000000;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #e8e8e8;
    --text-muted: #b8b8b8;
}

/* Hero Ads Container */
.hero-ads-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto 24px;
    position: relative;
    background: var(--bg-secondary);
    border: 2px solid var(--accent-gold);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.1);
}

/* Carousel */
.hero-ads-carousel {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 31.25%; /* 16:5 aspect ratio (600/1920) */
    overflow: hidden;
}

.hero-ad-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-ad-slide.active {
    opacity: 1;
    z-index: 1;
}

/* Image Ads */
.hero-ad-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.hero-ad-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Video Ads */
.hero-ad-video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
}

.hero-ad-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: var(--bg-primary);
}

.hero-ad-video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-primary);
    font-size: 14px;
    z-index: 1;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.hero-ad-video-wrapper[data-mux-video="true"] .hero-ad-video-loading {
    display: block;
}

.hero-ad-video[data-loaded="true"] ~ .hero-ad-video-loading,
.hero-ad-video.playing ~ .hero-ad-video-loading {
    opacity: 0;
    pointer-events: none;
}

.hero-ad-video-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    cursor: pointer;
}

.hero-ad-video-controls {
    position: absolute;
    bottom: 16px;
    right: 16px;
    display: flex;
    gap: 8px;
    z-index: 3;
}

.hero-ad-play-pause,
.hero-ad-skip {
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid var(--accent-gold);
    color: var(--accent-gold);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.hero-ad-play-pause:hover,
.hero-ad-skip:hover {
    background: var(--accent-gold);
    color: var(--accent-gold-text);
}

.hero-ad-play-pause .pause-icon {
    display: none;
}

.hero-ad-video-wrapper.playing .hero-ad-play-pause .play-icon {
    display: none;
}

.hero-ad-video-wrapper.playing .hero-ad-play-pause .pause-icon {
    display: inline;
}

.hero-ad-skip {
    display: none;
}

.hero-ad-video-wrapper.can-skip .hero-ad-skip {
    display: block;
}

/* Controls */
.hero-ads-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--bg-secondary);
}

.hero-ads-label {
    font-size: 12px;
    color: var(--accent-gold);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-ads-dots {
    display: flex;
    gap: 8px;
}

.hero-ad-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--accent-gold);
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-ad-dot:hover {
    background: var(--accent-gold);
    transform: scale(1.2);
}

.hero-ad-dot.active {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-ads-carousel {
        padding-bottom: 50%; /* Taller aspect ratio on mobile */
    }
    
    .hero-ad-video-controls {
        bottom: 8px;
        right: 8px;
        flex-direction: column;
    }
    
    .hero-ad-play-pause,
    .hero-ad-skip {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .hero-ads-controls {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .hero-ads-dots {
        align-self: center;
    }
}

@media (max-width: 480px) {
    .hero-ads-container {
        border-radius: 8px;
        margin-bottom: 16px;
    }
    
    .hero-ads-carousel {
        padding-bottom: 56.25%; /* 16:9 on very small screens */
    }
}

/* Loading State */
.hero-ads-container.loading {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-ads-container.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid var(--bg-tertiary);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Accessibility */
.hero-ads-container:focus-within {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

.hero-ad-link:focus,
.hero-ad-video-link:focus {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .hero-ads-container {
        border-width: 3px;
    }
    
    .hero-ad-dot {
        width: 10px;
        height: 10px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .hero-ad-slide {
        transition: none;
    }
    
    .hero-ad-play-pause,
    .hero-ad-skip {
        transition: none;
    }
}

