/* CSTV Page - Netflix-Inspired Styling */
:root {
    --secondary-blue: #006D77;
    /* Fallback to Teal */
}

/* Light Theme Body */
.cstv-body {
    background: linear-gradient(180deg, #f5fafd 0%, #eaf4f6 100%);
    color: #1a3c40;
    min-height: 100vh;
}

/* Header Styling - Light and Crisp */
.cstv-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 109, 119, 0.1);
    transition: all 0.3s ease;
}

.cstv-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.cstv-header nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cstv-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.cstv-breadcrumb a {
    color: #555;
    text-decoration: none;
    transition: color 0.2s;
}

.cstv-breadcrumb a:hover {
    color: var(--primary-teal);
}

.cstv-breadcrumb .separator {
    color: #ccc;
}

.cstv-breadcrumb .current {
    color: var(--primary-teal);
    font-weight: 600;
}

/* Main Content */
.cstv-main {
    padding-top: 80px;
}

/* Hero Section */
.cstv-hero {
    position: relative;
    height: 85vh;
    min-height: 600px;
    overflow: hidden;
    margin-bottom: 3rem;
    background: transparent;
}

.hero-video-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.video-player-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-player-wrapper iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.95) 0%,
            rgba(255, 255, 255, 0.7) 30%,
            rgba(255, 255, 255, 0.3) 60%,
            transparent 100%);
    z-index: 10;
    display: flex;
    align-items: center;
    pointer-events: none;
    /* Allow clicks to pass through to the iframe */
}

/* Re-enable pointer events for interactive elements */
.hero-mini-controls,
.hero-content-wrapper,
.hero-actions,
.btn-play-hero,
.btn-info-hero,
.mini-btn {
    pointer-events: auto;
}

/* Mini Controls on the Left */
.hero-mini-controls {
    position: absolute;
    left: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 100;
}

.mini-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 109, 119, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: var(--primary-teal);
}

.mini-btn:hover {
    transform: scale(1.15);
    background: white;
    color: var(--accent-crimson);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.mini-btn svg {
    width: 22px;
    height: 22px;
}

.hero-content-wrapper {
    width: 100%;
    padding: 0 8rem;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    transform: translateX(0);
}

.hero-content-wrapper.content-hidden {
    opacity: 0;
    transform: translateX(-40px);
    pointer-events: none;
}

.hero-content {
    max-width: 700px;
}

.featured-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--accent-crimson);
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(214, 40, 40, 0.3);
}

.hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--secondary-blue);
    margin-bottom: 2rem;
    line-height: 1.1;
    font-weight: 800;
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    color: #4a5a5c;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
}

.btn-play-hero,
.btn-info-hero {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-play-hero {
    background: white;
    color: #0f0f0f;
}

.btn-play-hero:hover {
    background: rgba(255, 255, 255, 0.85);
    transform: scale(1.05);
}

.btn-play-hero svg {
    width: 24px;
    height: 24px;
}

.btn-info-hero {
    background: rgba(109, 109, 110, 0.7);
    color: white;
    backdrop-filter: blur(10px);
}

.btn-info-hero:hover {
    background: rgba(109, 109, 110, 0.5);
    transform: scale(1.05);
}

.btn-info-hero svg {
    width: 22px;
    height: 22px;
}

/* Video Categories Section */
.cstv-categories {
    padding: 2rem 3rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

.video-row {
    margin-bottom: 4rem;
}

.row-title {
    color: var(--secondary-blue);
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    position: relative;
    padding-left: 1rem;
}

.row-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background: var(--primary-teal);
    border-radius: 2px;
}

.row-title::after {
    display: none;
    /* Remove default H2 underline from style.css */
}

/* Video Carousel */
.video-carousel {
    position: relative;
    overflow: hidden;
    /* Was visible, causing distortion */
    padding: 20px 0;
    /* Add vertical padding for hover effects */
}

.video-carousel .swiper-wrapper {
    padding-bottom: 1rem;
}

/* Video Card */
.video-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 109, 119, 0.05);
}

.video-card:hover {
    transform: scale(1.08) translateY(-10px);
    z-index: 100;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
}

.card-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #0f0f0f;
}

.card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .card-thumbnail img {
    transform: scale(1.1);
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.video-card:hover .play-overlay {
    opacity: 1;
}

.play-overlay svg {
    width: 30px;
    height: 30px;
    margin-left: 3px;
}

.card-info {
    padding: 1.25rem;
    background: #ffffff;
}

.card-info h3 {
    color: var(--secondary-blue);
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    line-height: 1.4;
}

.duration {
    color: #888;
    font-size: 0.875rem;
    margin: 0;
}

/* Swiper Navigation - Blue Default Icons */
.video-carousel .swiper-button-next,
.video-carousel .swiper-button-prev {
    width: 50px;
    height: 50px;
    background: var(--secondary-blue);
    border-radius: 50%;
    opacity: 1;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100 !important;
    display: flex;
    justify-content: center;
    align-items: center;
}

.video-carousel .swiper-button-next::after,
.video-carousel .swiper-button-prev::after {
    font-size: 20px;
    color: white;
    font-weight: bold;
}

.video-carousel .swiper-button-next {
    right: 10px;
    /* Position inside carousel */
}

.video-carousel .swiper-button-prev {
    left: 10px;
    /* Position inside carousel */
}

.video-carousel .swiper-button-next:hover,
.video-carousel .swiper-button-prev:hover {
    background: var(--primary-teal);
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Improve disabled state */
.video-carousel .swiper-button-disabled {
    opacity: 0 !important;
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .cstv-hero {
        height: 60vh;
        min-height: 500px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-description {
        font-size: 1.1rem;
    }

    .cstv-categories {
        padding: 2rem 2rem 3rem;
    }
}

@media (max-width: 768px) {
    .cstv-header nav {
        padding: 0 1.5rem;
    }

    .cstv-hero {
        height: 50vh;
        min-height: 400px;
    }

    .hero-overlay {
        padding: 2rem 1.5rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .btn-play-hero,
    .btn-info-hero {
        width: 100%;
        justify-content: center;
    }

    .cstv-categories {
        padding: 1.5rem 1rem 2rem;
    }

    .row-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .video-carousel .swiper-button-next,
    .video-carousel .swiper-button-prev {
        display: none;
    }
}

/* Video Details Side Sheet */
.video-side-sheet {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 500px;
    z-index: 2000;
    pointer-events: none;
}

.video-side-sheet.active {
    pointer-events: all;
}

.side-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.video-side-sheet.active .side-sheet-overlay {
    opacity: 1;
}

.side-sheet-content {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    background: linear-gradient(180deg, #1a1a1a 0%, #0f0f0f 100%);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.5);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
}

.video-side-sheet.active .side-sheet-content {
    transform: translateX(0);
}

.side-sheet-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.side-sheet-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.side-sheet-close svg {
    width: 20px;
    height: 20px;
    stroke: white;
}

.side-sheet-header {
    padding: 2rem 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.video-category {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: rgba(214, 40, 40, 0.9);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.side-sheet-header h2 {
    font-size: 1.75rem;
    color: white;
    margin: 0;
    line-height: 1.3;
}

.side-sheet-body {
    padding: 2rem;
}

.video-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #b3b3b3;
    font-size: 0.95rem;
}

.meta-item svg {
    width: 18px;
    height: 18px;
    stroke: var(--primary-teal);
}

.video-description,
.video-topics {
    margin-bottom: 2rem;
}

.video-description h3,
.video-topics h3 {
    font-size: 1.1rem;
    color: white;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.video-description p {
    color: #b3b3b3;
    line-height: 1.6;
    font-size: 0.95rem;
}

.topics-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.topic-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(0, 109, 119, 0.2);
    border: 1px solid rgba(0, 109, 119, 0.4);
    color: var(--primary-teal);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.topic-tag:hover {
    background: rgba(0, 109, 119, 0.3);
    border-color: var(--primary-teal);
}

.side-sheet-actions {
    padding-top: 1rem;
}

.btn-watch-full {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: white;
    color: #0f0f0f;
    border: none;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-watch-full:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.02);
}

.btn-watch-full svg {
    width: 20px;
    height: 20px;
}

/* Side Sheet Responsive */
@media (max-width: 768px) {
    .video-side-sheet {
        max-width: 100%;
    }

    .side-sheet-header,
    .side-sheet-body {
        padding: 1.5rem;
    }

    .side-sheet-header h2 {
        font-size: 1.5rem;
    }

    .video-meta {
        flex-direction: column;
        gap: 0.75rem;
    }
}