/* ============================================================
   Video Player — Shared styles for welcome.html & learn.html
   ============================================================ */

/* --- Feature Showcase (Apple-style alternating sections on welcome) --- */

.feature-section {
    padding: 80px 24px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.feature-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-section:nth-child(even) {
    background: var(--bg-secondary);
}

.feature-section-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.feature-section:nth-child(even) .feature-section-inner {
    direction: rtl;
}

.feature-section:nth-child(even) .feature-section-inner > * {
    direction: ltr;
}

.feature-section-text {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-tagline {
    font-family: var(--font-serif);
    color: var(--accent-gold);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

.feature-description {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.7;
    margin: 0;
}

.feature-title-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-tertiary);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

/* --- Video container (shared) --- */

.video-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    background: var(--bg-tertiary);
    aspect-ratio: 1580 / 1080;
}

.video-container video,
.video-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-container video {
    background: var(--bg-tertiary);
}

/* --- Coming Soon overlay --- */

.coming-soon-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    pointer-events: none;
}

.coming-soon-badge {
    background: rgba(0, 0, 0, 0.6);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 20px;
    letter-spacing: 0.03em;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* --- Video Card Grid (learn.html) --- */

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.video-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-primary);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: default;
}

.video-card.playable {
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.video-card-media {
    position: relative;
    aspect-ratio: 1580 / 1080;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.video-card-media img,
.video-card-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Play overlay */
.video-card-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.video-card.playable:hover .video-card-play {
    opacity: 1;
}

.video-card-play-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.video-card-play-btn svg {
    width: 24px;
    height: 24px;
    fill: var(--text-inverse);
    margin-left: 3px; /* optical centering for play triangle */
}

/* Duration badge */
.video-card-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Card info */
.video-card-info {
    padding: 20px;
}

.video-card-title {
    margin: 0 0 8px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.video-card-description {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

/* --- Video Modal (lightbox) --- */

.video-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.video-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.video-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5);
    background: #000;
}

.video-modal-content video {
    display: block;
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
}

.video-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.2s ease;
    z-index: 1;
}

.video-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* --- Expand button on featured videos --- */

.video-expand-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
    z-index: 1;
}

.video-container:hover .video-expand-btn {
    opacity: 1;
}

.video-expand-btn:hover {
    background: rgba(0, 0, 0, 0.75);
}

.video-expand-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #fff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* --- Responsive --- */

@media (max-width: 1023px) {
    .feature-section-inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .feature-section:nth-child(even) .feature-section-inner {
        direction: ltr;
    }

    .feature-section {
        padding: 48px 24px;
    }

    .feature-tagline {
        font-size: 1.6rem;
    }
}

@media (max-width: 640px) {
    .video-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .feature-section {
        padding: 40px 16px;
    }

    .feature-tagline {
        font-size: 1.4rem;
    }

    .feature-description {
        font-size: 15px;
    }
}
