/* ================================
VARIABLES
================================ */

:root {
    --verde-lima: #d8f205;
    --verde-oliva: #8c8302;
    --morado: #3f24a5;
    --naranja: #f29c6b;
    --amarillo: #f8d000;

    --gris-claro: #f5f5f5;
    --texto: #222;
}

/* ================================
RESET
================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--texto);
    background: white;
    line-height: 1.6;
}

img {
    max-width: 100%;
    display: block;
}

/* ================================
HERO
================================ */

.hero {
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    display: flex;
    align-items: center;
    justify-content: center;

    position: relative;
    /* IMPORTANTE */
    overflow: hidden;
}

/* QUITAMOS EL SOMBREADO */

.hero-overlay {
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;
}

/* CONTENIDO */

.hero-content {
    text-align: center;
}

/* LOGO */

.hero-logo {
    width: 800px;
    /* tamaño ideal escritorio */
    max-width: 100%;
    /* evita que se salga en pantallas pequeñas */

    animation: logoFade 1.8s ease forwards, floatLogo 6s ease-in-out infinite 2s;
}

@keyframes floatLogo {

    0%,
    50% {
        transform: translateY(0);
    }

    25% {
        transform: translateY(-8px);
    }
}

/* ANIMACIÓN */

@keyframes logoFade {

    0% {
        opacity: 0;
        transform: scale(0.85) translateY(40px);
    }

    60% {
        opacity: 1;
        transform: scale(1.03) translateY(-5px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }

}

/* ================================
BARRAS LATERALES
================================ */

.hero-bar {
    position: absolute;
    top: 0;
    height: 100%;
    width: auto;

    opacity: 0;
    animation: barrasFade 1.5s ease forwards;
}

/* izquierda */

.hero-bar-left {
    left: -150px;
    ;
}

/* derecha */

.hero-bar-right {
    right: -150px;
}

/* animación */

@keyframes barrasFade {

    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }

}

/* ================================
BARRA INFERIOR
================================ */

.hero-bar-bottom {
    position: absolute;
    bottom: 0;
    left: 0;

    width: 100%;
    height: auto;

    opacity: 0;
    animation: barraBottomFade 1.6s ease forwards;
}

/* animación */

@keyframes barraBottomFade {

    0% {
        opacity: 0;
        transform: translateY(40px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }

}

/* ================================
HISTORIA PARALLAX
================================ */

.historia-parallax {
    position: relative;
    min-height: 80vh;

    background-image:
        linear-gradient(rgba(0, 0, 0, 0.55),
            rgba(0, 0, 0, 0.65)),
        url('/es/Paginas/DiariodelCambio/images/Decoracion/fondo_1.png');

    background-size: cover;
    background-position: center;
    background-attachment: fixed;

    display: flex;
    align-items: center;
    justify-content: center;
}

/* contenedor del texto */

.historia-overlay {
    width: 100%;
    padding: 140px 20px;
}

/* contenido */

.historia-content {
    max-width: 900px;
    margin: auto;
    text-align: center;
    color: white;
}

.historia-content h2 {
    font-size: 2.5rem;
    margin-bottom: 25px;
}

.historia-content p {
    font-size: 1.2rem;
    line-height: 1.7;
}

/* ================================
SECCIONES GENERALES
================================ */

.section {
    padding: 100px 20px;
    text-align: center;
}

.section h2 {
    font-size: 2.4rem;
    margin-bottom: 40px;
    color: var(--morado);
}

.bg-light {
    background: var(--gris-claro);
}

/* SECCION VIDEO */

/* TITULO */

.video-title {
    font-size: 2.6rem;
    margin-bottom: 50px;
    color: #3f24a5;

    position: relative;
    z-index: 3;
}

/* ===== SECCIÓN VIDEOS DIARIOCAMBIO ===== */

.videos-dc-section {
    position: relative;
    padding: 100px 0 120px 0;
    background: url('/es/Paginas/DiariodelCambio/images/Decoracion/Textura_fondo.png');
    /* Fondo más neutro de DiarioCambio */
    overflow: hidden;
}

.videos-dc-title::after {
    content: "";
    display: block;
    width: 80px;
    height: 4px;
    background: #7e7d7d;
    margin: 15px auto 0;
    border-radius: 2px;
}

/* ===== VIDEO PRINCIPAL ===== */
.videos-dc-main {
    max-width: 1000px;
    margin: 0 auto 50px auto;
    position: relative;
    z-index: 2;
}

.videos-dc-main iframe {
    width: 100%;
    height: 500px;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    transition: transform 0.4s ease;
}

.videos-dc-main iframe:hover {
    transform: scale(1.02);
}

/* ===== MINIATURAS ===== */
.video-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    max-width: 1000px;
    margin: auto;
    position: relative;
    z-index: 2;
    /* encima de la barra */
}

.video-thumbs iframe {
    width: 100%;
    height: 180px;
    border-radius: 14px;
    transition: 0.4s ease;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.video-thumbs iframe:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.15);
}

/* TEXTO */

.video-invite {
    max-width: 720px;
    margin: auto;
    font-size: 1.15rem;
    line-height: 1.7;
    color: #333;

    position: relative;
    z-index: 3;
}

/* IMAGEN DECORATIVA */

.video-bg {
    position: absolute;

    bottom: -200px;
    left: 95%;
    transform: translateX(-50%);

    width: 90%;
    max-width: 1200px;

    opacity: 0.9;

    z-index: 1;
    pointer-events: none;
}

/* RESPONSIVE */

@media(max-width:900px) {

    .video-thumbs {
        grid-template-columns: 1fr 1fr;
    }

    .video-main iframe {
        height: 420px;
    }

}

@media(max-width:600px) {

    .video-main iframe {
        height: 260px;
    }

    .video-thumbs {
        grid-template-columns: 1fr;
    }

    .video-thumbs iframe {
        height: 200px;
    }

    .video-title {
        font-size: 2rem;
    }

}

/* ================================
CARTILLA
================================ */

.cartilla {

    background: url('/es/Paginas/DiariodelCambio/images/Decoracion/fondo_morado.png');
    padding: 120px 20px;
    text-align: center;

}

/* TITULO */

.cartilla h2 {

    font-size: 2.6rem;
    margin-bottom: 50px;
    color: #d8f205;

}

/* CONTENEDOR */

.cartilla-container {

    max-width: 700px;
    margin: auto;

    border-radius: 14px;
    overflow: hidden;
    /* evita bordes visuales */

}

/* VISOR CARTILLA */

.cartilla-container iframe {

    width: 100%;
    height: 85vh;

    border: none;
    box-shadow: none;
    /* elimina sombras */
    background: transparent;

}

/* TEXTO */

.cartilla-text {

    max-width: 700px;
    margin: 40px auto 0 auto;

    font-size: 1.1rem;
    line-height: 1.7;
    color: #d8f205;

}

/* IMAGENES DECORATIVAS CARTILLA */

.cartilla {
    position: relative;
    overflow: hidden;
    /* evita que se salgan a otras secciones */
}

.cartilla-bg {
    position: absolute;

    width: 32%;
    max-width: 420px;

    opacity: 0.9;

    z-index: 1;
    pointer-events: none;
}

/* IZQUIERDA */

.cartilla-bg-left {

    left: 0;
    top: 0;

    transform: scale(1.8);

    opacity: 0.9;

}

/* DERECHA */

.cartilla-bg-right {
    right: 0px;
    bottom: 0%;
    transform: scale(1.8);
    opacity: 9;
}

/* CONTENIDO POR ENCIMA */

.cartilla h2,
.cartilla-container,
.cartilla-text {
    position: relative;
    z-index: 3;
}

/* ANIMACIÓN FLOTAR */
@keyframes flotarCartilla {
    0% {
        transform: translateY(0px) scale(1);
    }

    50% {
        transform: translateY(-20px) scale(1.05);
    }

    100% {
        transform: translateY(0px) scale(1);
    }
}

/* NUEVO ELEMENTO IZQUIERDA */
.cartilla-float-left {
    position: absolute;
    left: 6%;
    top: 55%;
    width: 180px;
    animation: flotarCartilla 6s ease-in-out infinite;
    opacity: 0.9;
    transform: scale(1.4);
    z-index: 1;
}

/* NUEVO ELEMENTO DERECHA */
.cartilla-float-right {
    position: absolute;
    right: 6%;
    top: 35%;
    width: 220px;
    animation: flotarCartilla 7s ease-in-out infinite;
    opacity: 0.9;
    transform: scale(1.6);
    z-index: 1;
}

/* ================================
PARALLAX SECTION
================================ */

.parallax-section {

    height: 60vh;
    min-height: 420px;

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;

    display: flex;
    align-items: center;
    justify-content: center;

    position: relative;
    overflow: hidden;

}

/* overlay oscuro */

.parallax-overlay {

    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    text-align: center;
    padding: 20px;

    background: linear-gradient(rgba(0, 0, 0, 0.45),
            rgba(0, 0, 0, 0.45));

}

/* texto */

.parallax-overlay h2 {

    color: white;
    font-size: 2.6rem;
    max-width: 900px;
    line-height: 1.3;
    font-weight: 600;

}

/* responsive */

@media(max-width:900px) {

    .parallax-overlay h2 {
        font-size: 2rem;
    }

}

@media(max-width:600px) {

    .parallax-section {

        height: 50vh;

        /* parallax desactivado en mobile (mejor rendimiento) */
        background-attachment: scroll;

    }

    .parallax-overlay h2 {
        font-size: 1.6rem;
    }

}

/* ================================
SECCION NOTICIAS
================================ */

.noticias {
    position: relative;
    padding: 140px 20px;
    overflow: hidden;

    background: url('/es/Paginas/DiariodelCambio/images/Decoracion/Textura_fondo.png');
    background-size: cover;
    background-position: center;
}

/* TITULO */

.noticias h2 {
    text-align: center;
    font-size: 2.6rem;
    font-weight: 800;
    margin-bottom: 60px;
    color: #3f24a5;
}

/* GRID */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;

    max-width: 1100px;
    margin: auto;
}

/* CARD */

.card {

    background: white;
    border-radius: 16px;
    overflow: hidden;

    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);

    transition: 0.35s ease;

    display: flex;
    flex-direction: column;

}

.card:hover {

    transform: translateY(-10px);

    box-shadow: 0 22px 45px rgba(0, 0, 0, 0.15);

}

/* IMAGEN */

.card img {

    width: 100%;
    aspect-ratio: 3/2;
    object-fit: cover;

}

/* CONTENIDO */

.card-content {

    padding: 22px;

    display: flex;
    flex-direction: column;
    height: 100%;

}

.card-content h3 {

    font-size: 1.25rem;
    margin-bottom: 10px;
    color: #3f24a5;

}

.card-content p {

    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;

}

/* BOTON */

.btn-card {

    display: inline-block;

    margin-top: 18px;

    padding: 10px 24px;

    background: #3f24a5;
    color: white;

    text-decoration: none;
    border-radius: 30px;

    font-size: 0.9rem;
    font-weight: 600;

    transition: 0.3s ease;

    /* centrado */
    align-self: center;

}

.btn-card:hover {

    background: #f8d000;
    color: #222;

    transform: translateY(-2px);

}

/* ================================
DECORACION NOTICIAS
================================ */

.noticias-bg {
    position: absolute;

    width: 28%;
    max-width: 420px;

    opacity: 0.9;

    z-index: 1;
    pointer-events: none;

    animation: flotar 6s ease-in-out infinite;
}

/* IZQUIERDA */

.noticias-bg-left {
    left: -80px;
    top: 120px;
}

/* DERECHA */

.noticias-bg-right {
    right: -80px;
    bottom: 80px;
    animation-delay: 2s;
    /* para que no floten igual */
}

/* ANIMACION FLOTANTE */

@keyframes flotar {

    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-18px);
    }

    100% {
        transform: translateY(0);
    }

}

/* ASEGURAR QUE LAS CARDS ESTEN ENCIMA */

.noticias h2,
.grid,
.card {
    position: relative;
    z-index: 3;
}

/* ===== SECCIÓN REDES ===== */

.redes {
    position: relative;
    padding: 140px 20px;

    background: url('/es/Paginas/DiariodelCambio/images/Decoracion/fondo_morado.png');
    background-size: cover;
    background-position: center;

    overflow: hidden;
}

/* TITULO */

.redes h2 {
    text-align: center;
    font-size: 2.6rem;
    font-weight: 800;
    margin-bottom: 60px;
    color: #d8f205;
    position: relative;
    z-index: 2;
}

/* GRID */

.redes-grid {

    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));

    gap: 40px;

    max-width: 1200px;
    margin: auto;

    align-items: start;

    position: relative;
    z-index: 2;

}

/* EMBEDS INSTAGRAM */

.instagram-media {

    width: 100% !important;
    max-width: 420px !important;

    min-height: 565px !important;

    border-radius: 10px !important;
    overflow: hidden;

}

.instagram-media iframe {

    height: 720px !important;

}

.instagram-media:hover {

    transform: translateY(-8px) scale(1.02);

    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);

}

/* ===== BARRAS DECORATIVAS ===== */

.barra-red {
    position: absolute;
    width: 160px;
    opacity: 0;
    pointer-events: none;
    z-index: 1;

    transform: scale(0.7);
    animation: fadeBarraRed 1.6s ease forwards;
}

/* izquierda */

.barra-left {
    left: 0;
    top: 15%;
    animation-delay: 0.2s;
}

/* derecha */

.barra-right {
    right: 0;
    bottom: 10%;
    animation-delay: 0.4s;
}

/* animación */

@keyframes fadeBarraRed {

    from {
        opacity: 0;
        transform: scale(0.7) translateY(20px);
    }

    to {
        opacity: 0.9;
        transform: scale(0.7) translateY(0);
    }

}

/* IMAGENES DECORATIVAS REDES */

.redes-bg {
    position: absolute;

    width: 35%;
    max-width: 420px;

    opacity: 0.9;

    z-index: 1;
    pointer-events: none;
}

/* IZQUIERDA */

.redes-bg-left {

    left: -80px;
    bottom: -1%;
    /* en lugar de top */

}

/* DERECHA */

.redes-bg-right {

    right: -80px;
    bottom: -60px;

}

/* ASEGURAR QUE LOS EMBEDS ESTEN ENCIMA */

.redes h2,
.redes-grid,
.instagram-media {

    position: relative;
    z-index: 3;

}

/* ================================
GALERIA COLLAGE
================================ */

.galeria {

    padding: 140px 20px;

    background: url('/es/Paginas/DiariodelCambio/images/Decoracion/Textura_fondo.png');
    background-size: cover;
    background-position: center;

}

.galeria h2 {

    text-align: center;
    font-size: 2.6rem;
    margin-bottom: 60px;
    color: #3f24a5;

}

/* GRID */

.galeria-grid {

    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 220px;

    gap: 16px;

    max-width: 1200px;
    margin: auto;

}

/* IMAGENES */

/* GRID COLLAGE */

.galeria-grid {

    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 220px;
    gap: 16px;

    max-width: 1200px;
    margin: auto;

}

/* CONTENEDOR */

.galeria-grid a {

    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 14px;

}

/* IMAGEN */

.galeria-grid img {

    width: 100%;
    height: 100%;
    object-fit: cover;

    transition: 0.4s ease;

}

.galeria-grid a:hover img {

    transform: scale(1.05);

}

/* COLLAGE RANDOM */

.galeria-grid a:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
}

.galeria-grid a:nth-child(3) {
    grid-row: span 2;
}

.galeria-grid a:nth-child(5) {
    grid-column: span 2;
}

.galeria-grid a:nth-child(7) {
    grid-row: span 2;
}

/* RESPONSIVE */

@media(max-width:900px) {

    .galeria-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
    }

    .galeria-grid img:nth-child(1) {
        grid-column: span 2;
    }

    .galeria-grid img:nth-child(5) {
        grid-column: span 2;
    }

}

@media(max-width:500px) {

    .galeria-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 220px;
    }

    .galeria-grid img {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }

}

/* ================================
LOGOS
================================ */

.logos {
    padding: 80px 20px;
    background: #fff;
}

.logos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 40px;
    max-width: 900px;
    transform: scale(1.6);
    margin: 120px auto 0 auto;
    /* separación arriba */
    align-items: center;
}

.logos-grid img {
    max-height: 60px;
    margin: auto;
    opacity: 10;
    transition: 0.3s;
}

/* ================================
FOOTER
================================ */

footer {
    background: var(--morado);
    color: white;
    text-align: center;
    padding: 30px 20px;
    font-size: 0.9rem;
}

/* ================================
ANIMACIONES SCROLL
================================ */

.fade-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: 1s ease;
}

.fade-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ================================
RESPONSIVE
================================ */

/* TABLET */

@media(max-width:1024px) {

    .hero-content h1 {
        font-size: 2.4rem;
    }

    .scroll-image-section {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .scroll-text {
        text-align: center;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }

}

/* MOBILE */

@media(max-width:768px) {

    .hero-logo {
        width: 380px;
    }

}

@media(max-width:480px) {

    .hero-logo {
        width: 280px;
    }

}

.hero-content h1 {
    font-size: 2rem;
}

.hero-content p {
    font-size: 1rem;
}

.section {
    padding: 70px 20px;
}

.video-main iframe {
    height: 300px;
}

.cartilla iframe {
    height: 350px;
}

.gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 180px;
}

.news-grid {
    gap: 20px;
}

.redes-grid iframe {
    height: 420px;
}

/* MOBILE PEQUEÑO */

@media(max-width:480px) {

    .hero-content h1 {
        font-size: 1.6rem;
    }

    .section h2 {
        font-size: 1.8rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 220px;
    }

    .video-main iframe {
        height: 220px;
    }

    .cartilla iframe {
        height: 260px;
    }

}

html, body {
  overflow-x: hidden;
}