/* =========================================================
   PelisPlusFlix — GÉNEROS
   Diseño de tarjetas con thumbnails
   ========================================================= */


/* =========================================================
   CONTENEDOR PRINCIPAL
   ========================================================= */

.genres-page {
    width: 100%;
    max-width: 1250px;
    margin: 0 auto;
    padding: 55px 20px 80px;
}


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

.genres-hero {
    position: relative;
    overflow: hidden;

    padding: 55px 35px;
    margin-bottom: 40px;

    border-radius: 28px;

    background:
        radial-gradient(
            circle at 10% 20%,
            rgba(59,156,255,.24),
            transparent 35%
        ),
        radial-gradient(
            circle at 90% 80%,
            rgba(103,181,255,.18),
            transparent 35%
        ),
        linear-gradient(
            135deg,
            #27384a,
            #2c3e51,
            #1d2a3a
        );

    border: 1px solid rgba(255,255,255,.08);

    box-shadow:
        0 25px 80px rgba(0,0,0,.30);
}


/* Efecto luminoso */

.genres-hero::before {
    content: "";

    position: absolute;

    width: 300px;
    height: 300px;

    top: -150px;
    right: -100px;

    border-radius: 50%;

    background:
        rgba(59,156,255,.14);

    filter:
        blur(50px);

    animation:
        genreFloat 7s ease-in-out infinite;
}


/* Título */

.genres-hero h1 {
    position: relative;
    z-index: 2;

    margin: 0 0 15px;

    font-size:
        clamp(
            32px,
            5vw,
            58px
        );

    line-height: 1.05;

    font-weight: 900;

    letter-spacing: -2px;

    color: #fff;
}


/* Texto degradado */

.genres-hero h1 span {
    background:
        linear-gradient(
            90deg,
            #82c4ff,
            #3b9cff,
            #67b5ff,
            #82c4ff
        );

    background-size: 200% auto;

    -webkit-background-clip: text;
    background-clip: text;

    color: transparent;

    animation:
        gradientMove 5s linear infinite;
}


/* Descripción */

.genres-hero p {
    position: relative;
    z-index: 2;

    max-width: 700px;

    margin: 0;

    color:
        rgba(255,255,255,.70);

    font-size: 17px;

    line-height: 1.7;
}


/* =========================================================
   CONTADOR
   ========================================================= */

.genres-count {
    display: flex;
    align-items: center;

    gap: 12px;

    margin: 30px 0;

    color:
        rgba(255,255,255,.60);

    font-size: 14px;
}


.genres-count strong {
    color: #fff;

    font-size: 17px;
}


/* =========================================================
   GRID
   ========================================================= */

.genres-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 20px;
}


/* =========================================================
   TARJETA
   ========================================================= */

.genre-card {
    position: relative;

    min-height: 250px;

    overflow: hidden;

    display: flex;
    align-items: flex-end;

    border-radius: 18px;

    text-decoration: none;

    background:
        linear-gradient(
            145deg,
            #2c3e51,
            #1d2a3a
        );

    border: 1px solid
        rgba(255,255,255,.08);

    box-shadow:
        0 10px 30px rgba(0,0,0,.25);

    isolation: isolate;

    transition:
        transform .35s ease,
        box-shadow .35s ease,
        border-color .35s ease;
}


/* =========================================================
   THUMBNAIL
   ========================================================= */

.genre-background {
    position: absolute;

    inset: 0;

    z-index: -2;

    background-image:
        var(--genre-bg);

    background-size: cover;

    background-position: center;

    background-repeat: no-repeat;

    transform:
        scale(1.02);

    opacity: .72;

    transition:
        transform .6s ease,
        opacity .4s ease;
}


/* =========================================================
   OVERLAY
   ========================================================= */

.genre-card::after {
    content: "";

    position: absolute;

    inset: 0;

    z-index: -1;

    background:
        linear-gradient(
            to top,
            rgba(23,35,49,.98) 0%,
            rgba(23,35,49,.84) 32%,
            rgba(23,35,49,.42) 65%,
            rgba(23,35,49,.08) 100%
        );

    pointer-events: none;
}


/* =========================================================
   REFLEJO / GLOW
   ========================================================= */

.genre-card::before {
    content: "";

    position: absolute;

    inset: 0;

    z-index: 0;

    background:
        radial-gradient(
            circle at 80% 15%,
            rgba(59,156,255,.20),
            transparent 45%
        );

    opacity: .7;

    pointer-events: none;

    transition:
        opacity .4s ease;
}


/* =========================================================
   CONTENIDO
   ========================================================= */

.genre-content {
    position: relative;

    z-index: 3;

    width: 100%;

    padding: 22px;

    padding-right: 65px;
}


/* =========================================================
   NOMBRE
   ========================================================= */

.genre-name {
    position: relative;

    margin: 0 0 7px;

    color: #fff;

    font-size: 22px;

    font-weight: 800;

    line-height: 1.15;

    letter-spacing: -.3px;

    text-shadow:
        0 3px 12px rgba(0,0,0,.8);
}


/* =========================================================
   CANTIDAD
   ========================================================= */

.genre-movies {
    position: relative;

    margin: 0;

    color:
        rgba(255,255,255,.75);

    font-size: 13px;

    font-weight: 500;

    text-shadow:
        0 2px 8px rgba(0,0,0,.8);
}


/* =========================================================
   FLECHA
   ========================================================= */

.genre-arrow {
    position: absolute;

    right: 20px;
    bottom: 20px;

    width: 38px;
    height: 38px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background:
        rgba(59,156,255,.16);

    border: 1px solid
        rgba(103,181,255,.18);

    color: #fff;

    font-size: 20px;

    backdrop-filter:
        blur(8px);

    -webkit-backdrop-filter:
        blur(8px);

    transition:
        transform .3s ease,
        background .3s ease,
        border-color .3s ease;
}


/* =========================================================
   HOVER
   ========================================================= */

.genre-card:hover {
    transform:
        translateY(-7px);

    border-color:
        rgba(103,181,255,.28);

    box-shadow:
        0 18px 45px rgba(0,0,0,.45),
        0 0 25px rgba(59,156,255,.10);
}


.genre-card:hover .genre-background {
    transform:
        scale(1.10);

    opacity: .90;
}


.genre-card:hover::before {
    opacity: 1;
}


.genre-card:hover .genre-arrow {
    transform:
        translateX(5px);

    background:
        rgba(59,156,255,.35);

    border-color:
        rgba(103,181,255,.40);
}


/* =========================================================
   ANIMACIONES
   ========================================================= */

@keyframes genreFloat {

    0%,
    100% {
        transform:
            translate(0,0);
    }

    50% {
        transform:
            translate(-35px,30px);
    }
}


@keyframes gradientMove {

    0% {
        background-position:
            0% center;
    }

    100% {
        background-position:
            200% center;
    }
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1000px) {

    .genres-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        gap: 16px;
    }

    .genre-card {
        min-height: 230px;
    }

}


/* =========================================================
   MÓVIL
   ========================================================= */

@media (max-width: 700px) {

    .genres-page {
        padding:
            30px 14px 60px;
    }


    .genres-hero {
        padding:
            38px 24px;

        margin-bottom: 30px;

        border-radius: 22px;
    }


    .genres-hero h1 {
        letter-spacing: -1px;

        font-size:
            clamp(30px, 9vw, 42px);
    }


    .genres-hero p {
        font-size: 15px;

        line-height: 1.6;
    }


    .genres-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 12px;
    }


    .genre-card {
        min-height: 205px;

        border-radius: 15px;
    }


    .genre-content {
        padding: 16px;

        padding-right: 48px;
    }


    .genre-name {
        font-size: 18px;
    }


    .genre-movies {
        font-size: 12px;
    }


    .genre-arrow {
        right: 12px;
        bottom: 12px;

        width: 32px;
        height: 32px;

        font-size: 17px;
    }

}


/* =========================================================
   MÓVILES PEQUEÑOS
   ========================================================= */

@media (max-width: 420px) {

    .genres-page {
        padding-left: 10px;
        padding-right: 10px;
    }


    .genres-grid {
        gap: 10px;
    }


    .genre-card {
        min-height: 185px;

        border-radius: 13px;
    }


    .genre-content {
        padding: 14px;

        padding-right: 42px;
    }


    .genre-name {
        font-size: 16px;
    }


    .genre-movies {
        font-size: 11px;
    }


    .genre-arrow {
        right: 10px;
        bottom: 10px;

        width: 29px;
        height: 29px;

        font-size: 15px;
    }

}