@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --bg-color: #0b1120;
    --surface: #1e293b;
    --surface-hover: #334155;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --live: #ef4444;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text);
    padding-bottom: 120px;
    overflow-x: hidden;
}

/* HEADER STICKY GLASSMORPHISM */
.cabecera {
    position: fixed; top: 0; left: 0; width: 100%;
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 5%;
    background: rgba(11, 17, 32, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    z-index: 9999;
    transition: all 0.3s ease;
}

.logo-container img {
    height: 55px;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.1));
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.logo-container img:hover { transform: scale(1.05) rotate(-2deg); }

/* BOTON EN VIVO MODERNIZADO */
.btn-en-vivo {
    background: rgba(239, 68, 68, 0.1);
    color: var(--live);
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    display: flex; align-items: center; gap: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
}
.btn-en-vivo:hover {
    background: var(--live); color: white;
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.6);
    transform: translateY(-2px);
}
.punto-parpadeo {
    width: 10px; height: 10px; background-color: currentColor;
    border-radius: 50%; animation: pulse-live 1.5s infinite;
}
@keyframes pulse-live {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* HERO PORTADA PARALLAX */
.fondo-portada {
    background: linear-gradient(to bottom, rgba(11,17,32,0.3) 0%, rgba(11,17,32,1) 100%), url('portada.jpg');
    background-position: center top; background-size: cover; background-attachment: fixed;
    width: 100%; height: 60vh; min-height: 400px;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    position: relative;
}

.nav-portada {
    display: flex; gap: 30px; margin-top: 40px;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px 30px; border-radius: 50px;
    backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.1);
    animation: fadeUp 1s ease-out;
}
.nav-portada a {
    color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.9rem;
    letter-spacing: 1px; transition: all 0.3s ease; position: relative;
}
.nav-portada a::after {
    content: ''; position: absolute; width: 0; height: 2px;
    bottom: -5px; left: 0; background: var(--primary); transition: width 0.3s ease;
}
.nav-portada a:hover { color: var(--primary); }
.nav-portada a:hover::after { width: 100%; }

/* SECCIONES Y TITULOS */
.contenido-principal {
    max-width: 1200px; margin: -50px auto 0; padding: 0 5%;
    position: relative; z-index: 10; display: flex; flex-direction: column; gap: 80px;
}
.titulo-seccion {
    font-size: 3rem; font-weight: 800; text-align: center; margin-bottom: 50px;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* PROGRAMACION CARRUSEL */
.card-hero {
    background: var(--surface); border-radius: 30px; padding: 20px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.05);
}
.carrusel-programacion {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    gap: 20px; padding-bottom: 10px; scroll-behavior: smooth;
}
.carrusel-programacion::-webkit-scrollbar { height: 8px; }
.carrusel-programacion::-webkit-scrollbar-track { background: var(--bg-color); border-radius: 10px; }
.carrusel-programacion::-webkit-scrollbar-thumb { background: var(--surface-hover); border-radius: 10px; }

.banner-carrusel {
    flex: 0 0 100%; width: 100%; height: clamp(160px, 30vw, 300px); object-fit: contain;
    background: var(--bg-color); border-radius: 20px; scroll-snap-align: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

/* NOTICIAS MODERNAS */
.lista-noticias { display: grid; grid-template-columns: 1fr; gap: 50px; }
.noticia-premium {
    background: var(--surface); border-radius: 30px; overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.noticia-premium:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px -15px rgba(0,0,0,0.6);
    border-color: rgba(255,255,255,0.1);
}
.titulo-noticia-top {
    padding: 30px; font-size: 1.8rem; font-weight: 800; margin: 0;
    background: linear-gradient(90deg, var(--primary), #8b5cf6);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* GALERIA FOTOS */
.contenedor-galeria { position: relative; padding: 0 20px; }
.visor-fotos {
    display: flex; gap: 15px; overflow-x: auto; scroll-snap-type: x mandatory;
    scrollbar-width: none; border-radius: 20px;
}
.visor-fotos::-webkit-scrollbar { display: none; }
.foto-galeria {
    flex: 0 0 calc(50% - 7.5px); height: 350px; object-fit: cover;
    border-radius: 20px; scroll-snap-align: center; filter: brightness(0.85); transition: 0.3s;
}
.foto-galeria:hover { filter: brightness(1.1); }

.flecha-noticia {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.1); backdrop-filter: blur(5px);
    color: white; border: 1px solid rgba(255,255,255,0.2);
    width: 50px; height: 50px; border-radius: 50%; cursor: pointer; z-index: 10;
    font-size: 20px; transition: all 0.3s ease;
}
.flecha-noticia:hover { background: var(--primary); transform: translateY(-50%) scale(1.1); box-shadow: 0 0 20px var(--primary-glow); }
.flecha-noticia.prev { left: 5px; }
.flecha-noticia.next { right: 5px; }

.cuerpo-noticia { padding: 30px; }
.texto-fluido { font-size: 1.1rem; color: var(--text-muted); line-height: 1.8; }
.texto-oculto { display: none; }
.btn-leer-mas {
    background: none; border: none; color: var(--primary); font-weight: 800;
    font-size: 0.9rem; cursor: pointer; margin-left: 10px; font-family: 'Outfit', sans-serif;
    text-transform: uppercase; letter-spacing: 1px; transition: 0.3s;
}
.btn-leer-mas:hover { color: #60a5fa; text-shadow: 0 0 10px var(--primary-glow); }

/* REDES GRID */
.redes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.btn-ola {
    position: relative; height: 90px; background: var(--surface); border-radius: 25px;
    display: flex; justify-content: center; align-items: center; text-decoration: none;
    overflow: hidden; border: 1px solid rgba(255,255,255,0.05); transition: 0.3s;
}
.icon-default { font-size: 35px; color: var(--text-muted); z-index: 2; transition: 0.4s; }
.text-hover { position: absolute; opacity: 0; transform: translateY(20px); z-index: 2; font-weight: 800; font-size: 1.2rem; color: white; transition: 0.4s; }
.btn-ola::before {
    content: ''; position: absolute; bottom: -250px; left: 50%; transform: translateX(-50%);
    width: 300px; height: 300px; border-radius: 40%; z-index: 0; transition: bottom 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-ola:hover { transform: translateY(-5px); border-color: rgba(255,255,255,0.2); }
.btn-ola:hover .icon-default { opacity: 0; transform: translateY(-20px); }
.btn-ola:hover .text-hover { opacity: 1; transform: translateY(0); }
.btn-ola:hover::before { bottom: -50px; animation: rotarOla 4s linear infinite; }

.btn-fb::before { background: #1877F2; }
.btn-yt::before { background: #FF0000; }
.btn-tg::before { background: #0088cc; }
.btn-app::before { background: var(--primary); }

@keyframes rotarOla { 0% { transform: translateX(-50%) rotate(0deg); } 100% { transform: translateX(-50%) rotate(360deg); } }

/* REPRODUCTOR FLOTANTE PREMIUM */
.reproductor-fijo {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
    width: 90%; max-width: 800px; height: 90px;
    background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1); border-radius: 45px;
    display: flex; justify-content: space-between; align-items: center; padding: 0 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 20px rgba(59, 130, 246, 0.15);
    z-index: 1000; overflow: hidden;
}
#canvas-ondas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0.8; }
.info-radio { position: relative; z-index: 1; display: flex; align-items: center; gap: 15px; }
.icono-radio { font-size: 30px; background: rgba(255,255,255,0.05); width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid rgba(255,255,255,0.05); }
.info-radio p { font-size: 0.8rem; color: var(--live); font-weight: 800; letter-spacing: 1px; margin-bottom: 2px; }
.info-radio h3 { font-size: 1.2rem; font-weight: 600; color: white; }

.controles { position: relative; z-index: 1; }
#btn-play {
    background: var(--primary); border: none; color: white;
    padding: 12px 30px; border-radius: 30px; font-weight: 800; font-size: 1rem; font-family: 'Outfit', sans-serif;
    cursor: pointer; transition: 0.3s; display: flex; align-items: center; gap: 10px;
    box-shadow: 0 5px 15px var(--primary-glow);
}
#btn-play:hover { background: #60a5fa; transform: scale(1.05); box-shadow: 0 10px 25px var(--primary-glow); }

/* ANIMACIONES DE ENTRADA (REVEAL) */
.reveal { opacity: 0; transform: translateY(50px); transition: all 0.8s cubic-bezier(0.5, 0, 0, 1); }
.reveal.visible { opacity: 1; transform: translateY(0); }

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

/* ANIMACION CLICK GALERIA */
@keyframes pulseClick {
    0% { transform: scale(1); filter: brightness(0.85); }
    50% { transform: scale(0.97); filter: brightness(1.2); }
    100% { transform: scale(1); filter: brightness(0.85); }
}
.foto-galeria.efecto-click {
    animation: pulseClick 0.4s ease-out;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .nav-portada { display: none; }
    .fondo-portada { height: 60vh; }
    .foto-galeria { flex: 0 0 100%; }
    .titulo-seccion { font-size: 2rem; margin-bottom: 30px; }
    .reproductor-fijo { width: 95%; padding: 0 20px; border-radius: 30px; }
    .icono-radio { display: none; }
    #btn-play { padding: 10px 20px; font-size: 0.9rem; }
    .cuerpo-noticia { padding: 20px; }
    .titulo-noticia-top { padding: 20px; font-size: 1.4rem; }
}

/* PAGINA INTERNA: CASA DE MISERICORDIA */
.btn-volver {
    align-self: flex-start; color: var(--text-muted); text-decoration: none;
    font-weight: 600; transition: 0.3s;
}
.btn-volver:hover { color: var(--primary); }
.video-principal {
    width: 100%; max-height: 70vh; border-radius: 20px; background: #000; display: block;
}
.sin-padding { padding: 0 0 15px; }
.galeria-interna { padding-top: 20px; padding-bottom: 20px; }
.btn-ver-video {
    display: inline-flex; align-items: center; gap: 8px; margin-left: 10px;
    background: var(--primary); color: white; text-decoration: none; font-weight: 800;
    font-size: 0.9rem; letter-spacing: 1px; padding: 10px 20px; border-radius: 30px;
    box-shadow: 0 5px 15px var(--primary-glow); transition: 0.3s;
}
.btn-ver-video:hover { background: #60a5fa; transform: translateY(-2px); }

/* PAGINAS INTERNAS: HERO */
.fondo-interna { height: 42vh; min-height: 300px; padding-top: 70px; text-align: center; padding-left: 5%; padding-right: 5%; }
.titulo-hero {
    font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 800; animation: fadeUp 0.8s ease-out;
    background: linear-gradient(135deg, #fff 0%, #93c5fd 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.subtitulo-hero { color: var(--text-muted); font-size: 1.15rem; margin-top: 10px; animation: fadeUp 1.1s ease-out; }
.insignia-vivo {
    display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px;
    padding: 8px 18px; border-radius: 50px; font-size: 0.8rem; font-weight: 800; letter-spacing: 2px;
    color: var(--live); background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.35);
}
.insignia-azul { color: #93c5fd; background: rgba(59, 130, 246, 0.15); border-color: rgba(59, 130, 246, 0.4); }
.pagina-interna .contenido-principal { margin-top: -20px; }
.btn-volver-radio { color: var(--text); background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.15); box-shadow: none; }

/* REPRODUCTOR YOUTUBE */
.marco-video { position: relative; padding-top: 56.25%; border-radius: 20px; overflow: hidden; background: #000; }
.marco-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.barra-video {
    display: flex; justify-content: space-between; align-items: center; gap: 15px; flex-wrap: wrap;
    padding: 18px 10px 5px; color: var(--text-muted); font-size: 0.95rem;
}
.btn-youtube {
    display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: white;
    background: #ff0000; padding: 10px 20px; border-radius: 30px; font-weight: 800; font-size: 0.85rem;
    transition: 0.3s; box-shadow: 0 5px 15px rgba(255, 0, 0, 0.3);
}
.btn-youtube:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(255, 0, 0, 0.5); }

/* GRILLA DE VIDEOS */
.grid-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 25px; }
.tarjeta-video {
    background: var(--surface); border-radius: 22px; overflow: hidden; cursor: pointer;
    border: 1px solid rgba(255,255,255,0.05); transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s;
}
.tarjeta-video:hover { transform: translateY(-8px); box-shadow: 0 25px 45px -15px rgba(0,0,0,0.6); border-color: rgba(59,130,246,0.5); }
.tarjeta-video.activa { border-color: var(--primary); box-shadow: 0 0 25px var(--primary-glow); }
.miniatura { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.miniatura img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease, filter 0.3s; filter: brightness(0.8); }
.tarjeta-video:hover .miniatura img { transform: scale(1.08); filter: brightness(1); }
.icono-play {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.8);
    width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: rgba(59, 130, 246, 0.9); color: white; font-size: 1.1rem; opacity: 0; transition: 0.3s;
    box-shadow: 0 0 25px var(--primary-glow);
}
.tarjeta-video:hover .icono-play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.datos-video { padding: 16px 18px 20px; }
.datos-video h3 { font-size: 1rem; font-weight: 600; line-height: 1.4; margin-bottom: 8px; }
.datos-video small { color: var(--text-muted); }

/* HERO INTERNO: MAS CONTRASTE PARA EL TITULO */
.fondo-interna {
    background: linear-gradient(to bottom, rgba(11,17,32,0.65) 0%, rgba(11,17,32,1) 100%), url('portada.jpg');
    background-position: center top; background-size: cover;
}

/* MOVIL Y TABLET */
@media (max-width: 768px) {
    .cabecera { padding: 10px 4%; }
    .logo-container img { height: 38px; }
    .btn-en-vivo { padding: 8px 12px; font-size: 0.7rem; gap: 6px; }
    .fondo-interna { height: auto; min-height: 260px; padding: 90px 5% 50px; }
    .subtitulo-hero { font-size: 1rem; }
    .barra-video { flex-direction: column; align-items: flex-start; }
    .grid-videos { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
    .contenido-principal { gap: 50px; }
}
@media (max-width: 400px) {
    .texto-vivo { max-width: 95px; line-height: 1.1; white-space: normal; text-align: left; }
}
