/* ========================================
   BASE STYLES
   ======================================== */

body {
    background-color: #fdf0d5;
    color: #003049;
    margin: 0;
    padding: 0;
}

.section-divider {
    width: 100%;
    height: 3px;
    background-color: #003049;
}

.spacer-section {
    height: 5vh;
    background-color: #fdf0d5;
}

.empty-state {
    padding: 100px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.empty-content {
    text-align: center;
}

.empty-icon {
    margin-bottom: 30px;
}

.empty-icon i {
    font-size: 4rem;
    color: #669bbc;
}

.empty-content h3 {
    color: #003049;
    margin-bottom: 15px;
}

.empty-content p {
    color: #669bbc;
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero-section {
    margin-top: 5vh;
    margin-bottom: 5vh;
    position: relative;
    width: 100vw;
    height: 50vh;
    background-image: url("/img/serie.png");
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.hero-text {
    color: white;
    max-width: 900px;
    padding: 1rem;
}

.hero-text h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

.hero-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.hero-text p {
    font-size: 1.1rem;
    line-height: 1.6;
}

/* ========================================
   SERIES SECTIONS
   ======================================== */

.series-block {
    margin-bottom: 3rem;
    padding: 0 1rem;
    position: relative;
}

.series-title {
    padding: 1rem 0;
    font-size: 2rem;
    color: #003049;
    font-weight: bold;
    position: relative;
    display: inline-block;
    transition: all 0.4s ease;
}

.series-title::after {
    content: "";
    position: absolute;
    bottom: 0.5rem;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #c1121f, #780000);
    transition: width 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.series-block:hover .series-title::after {
    width: 100%;
}

.series-description {
    padding: 0;
    font-size: 1.1rem;
    color: rgba(0, 48, 73, 0.8);
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    text-align: justify;
    line-height: 1.6;
    transition: color 0.3s ease;
}

.series-block:hover .series-description {
    color: #003049;
}

/* ========================================
   CAROUSEL SYSTEM
   ======================================== */

.carousel-wrapper {
    position: relative;
    overflow: hidden;
    padding: 1rem 0;
    transition: all 0.4s ease;
}

.carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 1rem 0;
}

.carousel::-webkit-scrollbar {
    display: none;
}

/* ========================================
   VIDEO CARDS
   ======================================== */

.video-card {
    background-color: #fdf0d5;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    width: 550px;
    flex-shrink: 0;
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    border-radius: 0;
}

.video-card:hover {
    transform: translateY(-8px) scale(1.02);
    filter: brightness(1.05);
}

.card {
    background: none;
    border: none;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
}

.video-card:hover .card {
    box-shadow: 0 12px 40px rgba(0, 48, 73, 0.25);
}

/* ========================================
   VIDEO THUMBNAIL & OVERLAY
   ======================================== */

.video-link {
    position: relative;
    display: block;
}

.video-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    filter: brightness(0.95) saturate(0.9);
}

.video-card:hover .video-thumbnail {
    transform: scale(1.1) rotate(0.5deg);
    filter: brightness(1.1) saturate(1.1) contrast(1.05);
}

.overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(0, 0, 0, 0.5) 40%,
        rgba(0, 0, 0, 0.6) 100%
    );
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    backdrop-filter: blur(0px);
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    pointer-events: none;
}

.video-link:hover .overlay {
    opacity: 1;
    backdrop-filter: blur(3px);
    pointer-events: auto;
}

.play-icon {
    font-size: 3.5rem;
    color: white;
    opacity: 0;
    transform: scale(0.3) rotate(-45deg);
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
}

.video-link:hover .play-icon {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    animation: pulse 2s infinite ease-in-out;
}

/* ========================================
   CARD BODY & CONTENT
   ======================================== */

.card-body {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px 10px;
    flex-direction: row;
    gap: 1rem;
    background-color: #fdf0d5;
    color: #003049;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    height: 85px;
}

.video-card:hover .card-body {
    padding: 18px 12px;
    background: linear-gradient(135deg, #fdf0d5 0%, #f8e8c8 100%);
}

.video-card:hover .card-body::before {
    width: 100%;
}

.card-title {
    flex: 1;
    font-size: 1.4rem;
    font-weight: bold;
    color: #003049;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.2;
    transition: all 0.4s ease;
    position: relative;
}

.video-card:hover .card-title {
    color: #001a2e;
    transform: translateX(3px);
    letter-spacing: 0.5px;
}

.card-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
    font-size: 0.9rem;
    text-align: right;
    color: rgba(0, 48, 73, 0.75);
    transition: all 0.4s ease;
}

.video-card:hover .card-meta {
    color: rgba(0, 48, 73, 0.9);
    transform: translateX(-3px);
}

.meta-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.video-card:hover .meta-row {
    transform: scale(1.02);
}

.video-card:hover::after {
    width: 100%;
}

/* ========================================
   NAVIGATION ARROWS
   ======================================== */

.arrow__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(
        135deg,
        rgba(0, 48, 73, 0.2),
        rgba(120, 0, 0, 0.15)
    );
    border: 1px solid rgba(0, 48, 73, 0.3);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 1.8rem;
    width: 55px;
    height: 55px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.arrow__btn:hover {
    background: linear-gradient(
        135deg,
        rgba(0, 48, 73, 0.4),
        rgba(120, 0, 0, 0.3)
    );
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.carousel-wrapper:hover .arrow__btn {
    opacity: 1;
}

.left-arrow {
    left: 15px;
}

.right-arrow {
    right: 15px;
}

/* ========================================
   EMPTY STATE
   ======================================== */

.no-videos {
    text-align: center;
    font-size: 1.2rem;
    color: rgba(0, 48, 73, 0.7);
    margin-top: 20px;
    padding: 2rem;
    background: linear-gradient(
        135deg,
        rgba(253, 240, 213, 0.8),
        rgba(248, 232, 200, 0.9)
    );
    border: 1px solid rgba(0, 48, 73, 0.1);
}

/* ========================================
   ANIMATIONS
   ======================================== */
.video-card {
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.video-card:nth-child(1) {
    animation-delay: 0.1s;
}
.video-card:nth-child(2) {
    animation-delay: 0.2s;
}
.video-card:nth-child(3) {
    animation-delay: 0.3s;
}
.video-card:nth-child(4) {
    animation-delay: 0.4s;
}
.video-card:nth-child(5) {
    animation-delay: 0.5s;
}
.video-card:nth-child(6) {
    animation-delay: 0.6s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
    }
    50% {
        transform: scale(1.1) rotate(2deg);
        filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.5));
    }
}

/* Carousel items animation */
.item {
    opacity: 0;
    animation: carouselFadeIn 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.item:nth-child(1) {
    animation-delay: 0.1s;
}
.item:nth-child(2) {
    animation-delay: 0.2s;
}
.item:nth-child(3) {
    animation-delay: 0.3s;
}
.item:nth-child(4) {
    animation-delay: 0.4s;
}
.item:nth-child(5) {
    animation-delay: 0.5s;
}

@keyframes carouselFadeIn {
    from {
        opacity: 0;
        transform: translateX(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Large Desktop: 1200px+ (default styles above) */

/* Medium Desktop: 992px - 1199px */
@media (max-width: 1199px) {
    .video-card {
        width: 480px;
    }

    .card-title {
        font-size: 1.3rem;
    }

    .card-meta {
        font-size: 0.85rem;
    }
}

/* Small Desktop/Large Tablet: 768px - 991px */
@media (max-width: 991px) {
    .hero-section {
        height: 45vh;
    }

    .hero-text h2 {
        font-size: 2.4rem;
    }

    .hero-text h3 {
        font-size: 1.6rem;
    }

    .video-card {
        width: 420px;
    }

    .series-title {
        font-size: 1.8rem;
    }

    .series-description {
        font-size: 1rem;
    }

    .card-title {
        font-size: 1.2rem;
    }

    .play-icon {
        font-size: 3.2rem;
    }
}

/* Tablet: 576px - 767px */
@media (max-width: 767px) {
    .hero-section {
        height: 40vh;
    }

    .hero-text h2 {
        font-size: 2rem;
    }

    .hero-text h3 {
        font-size: 1.4rem;
    }

    .hero-text p {
        font-size: 1rem;
    }

    .video-card {
        width: 350px;
    }

    .series-title {
        font-size: 1.6rem;
    }

    .series-description {
        font-size: 0.95rem;
        text-align: left;
    }

    .card-title {
        font-size: 1.1rem;
    }

    .card-meta {
        font-size: 0.8rem;
    }

    .play-icon {
        font-size: 3rem;
    }

    .arrow__btn {
        display: none !important;
    }

    .video-card:hover {
        transform: translateY(-4px) scale(1.02);
    }
}

/* Large Mobile: 400px - 575px */
@media (max-width: 575px) {
    .hero-section {
        height: 35vh;
    }

    .hero-text h2 {
        font-size: 1.6rem;
    }

    .hero-text h3 {
        font-size: 1.2rem;
    }

    .hero-text p {
        font-size: 0.95rem;
    }

    .video-card {
        width: 90vw;
        min-width: 280px;
        max-width: 320px;
    }

    .series-title {
        font-size: 1.4rem;
    }

    .series-description {
        font-size: 0.9rem;
    }

    .card-body {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        height: auto;
        padding: 12px 8px;
    }

    .card-title {
        font-size: 1rem;
        text-align: left;
    }

    .card-meta {
        align-items: flex-start;
        text-align: left;
        font-size: 0.75rem;
    }

    .meta-row {
        gap: 0.5rem;
    }

    .play-icon {
        font-size: 2.8rem;
    }

    .carousel {
        gap: 15px;
    }

    .video-card:hover {
        transform: translateY(-2px) scale(1.01);
    }
}

/* Small Mobile: 320px - 399px */
@media (max-width: 399px) {
    .hero-section {
        height: 30vh;
    }

    .hero-text h2 {
        font-size: 1.4rem;
    }

    .hero-text h3 {
        font-size: 1.1rem;
    }

    .hero-text p {
        font-size: 0.9rem;
    }

    .video-card {
        width: 95vw;
        min-width: 250px;
        max-width: 280px;
    }

    .series-title {
        font-size: 1.2rem;
    }

    .series-description {
        font-size: 0.85rem;
    }

    .card-body {
        padding: 10px 6px;
    }

    .card-title {
        font-size: 0.9rem;
    }

    .card-meta {
        font-size: 0.7rem;
    }

    .play-icon {
        font-size: 2.5rem;
    }

    .carousel {
        gap: 10px;
    }

    .video-card:hover {
        transform: translateY(-1px) scale(1.005);
    }
}

/* Extra Small Mobile: max 319px */
@media (max-width: 319px) {
    .hero-section {
        height: 25vh;
    }

    .hero-text h2 {
        font-size: 1.2rem;
    }

    .hero-text h3 {
        font-size: 1rem;
    }

    .hero-text p {
        font-size: 0.85rem;
    }

    .video-card {
        width: 98vw;
        min-width: 220px;
        max-width: 250px;
    }

    .series-title {
        font-size: 1.1rem;
    }

    .series-description {
        font-size: 0.8rem;
    }

    .card-body {
        padding: 8px 5px;
    }

    .card-title {
        font-size: 0.85rem;
    }

    .card-meta {
        font-size: 0.65rem;
    }

    .play-icon {
        font-size: 2.2rem;
    }

    .carousel {
        gap: 8px;
    }
}
