/* ============ FILMS SECTION ============ */

#films {
    padding: 100px 0 0;
}

/* HEADER — constelación claqueta */
.fm-header {
    text-align: center;
    margin-bottom: 40px;
}

.fm-constellation {
    width: 320px;
    max-width: 70vw;
    display: block;
    margin: 0 auto;
    opacity: 0.9;
}

.fm-header h2 {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-top: 10px;
}

/* REEL — video enmarcado con sparkles */
.fm-reel {
    max-width: 1000px;
    margin: 0 auto 70px;
    padding: 0 40px;
}

.fm-frame {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.75);
    padding: 24px;
}

.fm-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #000;
}

/* sparkles del marco — laten suavemente, mismo lenguaje que Games */
.fm-sparkle {
    position: absolute;
    color: #fff;
    z-index: 3;
    line-height: 1;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
    animation: fm-sparkle-pulse 3.5s ease-in-out infinite;
}

.fm-sparkle.s1 { top: -14px;    left: 18%;   font-size: 1.6rem; animation-delay: 0s; }
.fm-sparkle.s2 { top: -10px;    right: 12%;  font-size: 1.1rem; animation-delay: 0.6s; }
.fm-sparkle.s3 { top: 38%;      left: -12px; font-size: 1.2rem; animation-delay: 1.2s; }
.fm-sparkle.s4 { top: 52%;      right: -14px; font-size: 1.7rem; animation-delay: 1.8s; }
.fm-sparkle.s5 { bottom: -16px; left: 45%;   font-size: 1.5rem; animation-delay: 2.4s; }
.fm-sparkle.s6 { bottom: -10px; right: 22%;  font-size: 1rem; animation-delay: 3s; }

@keyframes fm-sparkle-pulse {
    0%, 100% { opacity: 0.5; transform: scale(0.9); }
    50%      { opacity: 1;   transform: scale(1.15); }
}

/* INTRO */
.fm-intro {
    max-width: 900px;
    margin: 0 auto 70px;
    padding: 35px 50px;
    background: rgba(11, 154, 164, 0.15);
    border: 1px solid rgba(78, 205, 196, 0.15);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.fm-intro p {
    text-align: center;
    font-size: 1.05rem;
    line-height: 1.8;
    opacity: 0.85;
}

/* TOOLS & TECH */
.fm-tools {
    max-width: 1000px;
    margin: 0 auto 100px;
    padding: 35px 50px;
    background: rgba(11, 154, 164, 0.15);
    border: 1px solid rgba(78, 205, 196, 0.15);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.fm-tools h3 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 25px;
}

.fm-tools-content {
    display: flex;
    gap: 30px;
    align-items: center;
}

.fm-tools-icon {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #4ecdc4, #44b8f5);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fm-tools-icon img {
    width: 60%;
    height: 60%;
    object-fit: contain;
}

.fm-tools-list {
    list-style: none;
}

.fm-tools-list li {
    font-size: 0.95rem;
    line-height: 1.8;
    opacity: 0.85;
    padding-left: 18px;
    position: relative;
}

.fm-tools-list li::before {
    content: '▪';
    position: absolute;
    left: 0;
    color: var(--cyan);
    font-size: 0.7rem;
    top: 0.55em;
}

/* BTS — salón de clases + fotógrafa */
.fm-bts {
    position: relative;
    width: 100%;
    overflow: visible; /* deja que la fotógrafa sobresalga sin recortarse */
    padding-right: 40px;
}

.fm-bts-bg {
    width: 100%;
    height: auto;
    display: block;
}

.fm-bts-figure {
    position: absolute;
    right: 2%;
    bottom: -6%;
    height: 128%;
    max-width: none;
    z-index: 2;
}

/* ============ FILMS RESPONSIVE ============ */

@media (max-width: 768px) {

    .fm-reel,
    .fm-intro,
    .fm-tools {
        padding: 0 25px;
    }

    .fm-tools-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    /* la fotógrafa al 128% se desborda del ancho en pantallas chicas;
       la contenemos dentro del marco, sin el efecto "sobresale" */
    .fm-bts {
        padding-right: 0;
    }

    .fm-bts-figure {
        height: 100%;
        right: 0;
        bottom: 0;
    }
}