/*
Theme Name: Spektra FM Custom
Theme URI: https://spektrafm.es
Author: ELTIODELAWEB.net
Description: Tema de alto rendimiento para radio. Backend nativo, navegación AJAX.
Version: 1.8
*/

/* 1. VARIABLES GLOBALES (Colores Flyer 2025) */
:root {
    --primary: #e3001b;        /* Rojo vibrante logo Spektra */
    --primary-hover: #ff1a35;  /* Rojo iluminado para botones */
    --secondary: #6e1c75;      /* Morado del halo de fondo */
    --bg-dark: #0c0814;        /* Fondo base (Negro/Morado muy profundo) */
    --bg-card: #1a142b;        /* Fondo tarjetas (Morado oscuro) */
    --text-main: #ffffff;      /* Texto principal blanco */
    --text-muted: #b3aeca;      /* Gris con tinte lavanda */
    --header-height: 80px;
    --player-height: 90px;
    --font-main: 'Inter', sans-serif;
    --font-title: 'Montserrat', sans-serif;
}

/* 2. RESET Y BASES (CORREGIDO PARA EL ADMIN) */
* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body:not(.wp-admin) {
    background-color: var(--bg-dark) !important;
    color: var(--text-main);
    font-family: var(--font-main);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body:not(.wp-admin) h1, 
body:not(.wp-admin) h2, 
body:not(.wp-admin) h3, 
body:not(.wp-admin) h4, 
body:not(.wp-admin) .logo {
    font-family: var(--font-title);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -1px;
    color: var(--text-main);
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s ease;
}

ul { list-style: none; padding: 0; margin: 0; }

/* 3. LAYOUT (HEADER) */
.main-header {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(12, 8, 20, 0.90);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    width: 90%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px;
    width: auto;
}

/* 4. NAVEGACIÓN */
.main-nav ul {
    display: flex;
    gap: 30px;
}

.main-nav ul li a {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.main-nav ul li a:hover,
.main-nav ul li.current-menu-item a {
    color: var(--primary);
}

/* 5. CONTENEDOR BARBA.JS */
main[data-barba="container"] {
    padding-top: var(--header-height);
    padding-bottom: calc(var(--player-height) + 40px);
    min-height: 100vh;
}

/* 6. HERO SECTION */
.hero {
    display: flex;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(12,8,20,0.95) 0%, rgba(12,8,20,0.4) 50%, rgba(0,0,0,0.1) 100%);
}

.hero-content {
    position: absolute;
    bottom: 180px; 
    left: 5%;      
    z-index: 10;
    max-width: 850px;
    text-align: left; 
    padding: 0;
    margin: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.2rem);
    margin: 0 0 10px 0; 
    line-height: 1.05;
    color: var(--text-main);
    letter-spacing: -2px;
    text-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--primary); 
    font-weight: 700;
    margin: 0;
    letter-spacing: 5px;
    text-transform: uppercase;
}

/* SLIDER HERO */
.hero-slider {
    position: relative;
    width: 100%;
    height: 80vh; 
    overflow: hidden;
}

.hero-slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0; 
    visibility: hidden; 
    z-index: 1;
}

.hero-slider .slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* 7. COMPONENTES */
.btn-spektra {
    background: var(--primary);
    color: white;
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 1px;
    display: inline-block;
    box-shadow: 0 8px 25px rgba(227, 0, 27, 0.4);
    text-transform: uppercase;
}

.btn-spektra:hover {
    transform: translateY(-3px);
    background: var(--primary-hover);
    box-shadow: 0 15px 35px rgba(227, 0, 27, 0.6);
}

.grid-spektra {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 50px 0;
}

.card {
    background: linear-gradient(145deg, var(--bg-card), #100b1a);
    border-radius: 15px;
    overflow: hidden;
    transition: 0.4s ease;
    border: 1px solid rgba(110, 28, 117, 0.2);
}

.card-img {
    height: 350px;
    background-size: cover;
    background-position: top center;
}

.fallback-img {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-card);
}

.fallback-img::after {
    content: attr(data-title);
    position: relative;
    z-index: 2;
    color: var(--text-main);
    font-family: var(--font-title);
    font-size: 1.8rem;
    font-weight: 900;
    text-transform: uppercase;
    text-align: center;
    padding: 0 20px;
    text-shadow: 0 5px 15px rgba(0,0,0,1);
}

/* 8. REPRODUCTOR FIXED (CENTRADO ABSOLUTO E INFALIBLE) */
.spektra-footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: var(--player-height);
    background: #09060f;
    border-top: 1px solid rgba(255,255,255,0.03);
    z-index: 2000;
    display: flex;
    align-items: center;
}

.player-wrapper {
    width: 95%;
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    position: relative; 
}

.now-playing { 
    display: flex; 
    align-items: center; 
    gap: 15px;
    flex: 1; 
    min-width: 0;
}

.album-art img {
    width: 60px; height: 60px;
    border-radius: 8px; object-fit: cover;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.track-data h4 { 
    font-size: 14px; margin: 0; color: #fff; 
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; 
}
.track-data p { font-size: 12px; margin: 5px 0 0; color: var(--text-muted); }

.player-controls { 
    position: absolute;
    left: 50%;
    transform: translateX(-50%); 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
    gap: 8px; 
    width: auto;
}

.play-button {
    background: var(--primary);
    border: none; width: 50px; height: 50px;
    border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 15px rgba(227, 0, 27, 0.4);
    transition: 0.3s ease;
}

.play-button:hover { transform: scale(1.05); background: var(--primary-hover); }
.play-button svg { width: 24px; fill: white; }

.audio-visualizer { 
    display: flex; 
    align-items: flex-end; 
    justify-content: center; 
    gap: 3px; 
    height: 18px; 
    width: 60px;
}

.bar { width: 3px; background: var(--primary); height: 15%; border-radius: 2px; }
.is-playing .bar { animation: bounce infinite alternate ease-in-out; }

@keyframes bounce { 0% { height: 15%; } 100% { height: 100%; } }

.player-extra { 
    flex: 1;
    display: flex; 
    justify-content: flex-end; 
}
.volume-control { display: flex; align-items: center; gap: 10px; }
.volume-control input[type="range"] { accent-color: var(--primary); }

/* =========================================
   11. SECCIÓN AHORA SONANDO (CORREGIDO)
   ========================================= */
.live-now-section {
    position: relative;
    z-index: 100;
    margin-top: -90px; 
    padding-bottom: 100px;
}

.elegant-live-card {
    display: flex;
    background: rgba(12, 10, 18, 0.98);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.9);
    max-width: 1100px; /* Un poco más ancho para equilibrar */
    margin: 0 auto;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-height: 400px;
}

.elegant-live-card:hover {
    transform: translateY(-8px) scale(1.01);
}

.live-flyer {
    flex: 0 0 45%; /* Aseguramos que el flyer ocupe el 45% */
    position: relative;
    line-height: 0;
}

.live-flyer img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Evita que la imagen se estire o se vea mal */
}

.badge-live {
    position: absolute;
    top: 25px;
    right: 25px; 
    background: var(--primary);
    color: #fff;
    padding: 6px 16px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 2px;
    border-radius: 6px;
    box-shadow: 0 0 20px rgba(227, 0, 27, 0.4);
    animation: livePulse 2s infinite;
    z-index: 10;
}

.live-content {
    flex: 1; /* El texto ocupa el resto del espacio */
    padding: 50px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.live-label {
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 5px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.live-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem) !important; /* Tamaño fluido */
    margin: 0 0 15px 0 !important;
    color: #ffffff;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -1px;
}

@keyframes livePulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(227, 0, 27, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(227, 0, 27, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(227, 0, 27, 0); }
}

/* =========================================
   12. AJUSTES RESPONSIVOS ADICIONALES
   ========================================= */
@media (max-width: 1024px) {
    .elegant-live-card { max-width: 90%; }
    .live-content { padding: 40px; }
}

@media (max-width: 850px) {
    .elegant-live-card { flex-direction: column; }
    .live-flyer { flex: 0 0 300px; width: 100%; }
    .live-content { padding: 30px; }
}

@media (max-width: 768px) {
    .hero-slider { height: 65vh; }
    .hero-content {
        bottom: 120px;
        left: 20px;
    }
    .hero h1 { font-size: 2rem; }
    .live-now-section { margin-top: 30px; }
    
    .player-wrapper { justify-content: space-between; }
    .player-controls { position: static; transform: none; left: auto; margin: 0 auto; }
    .player-extra { display: none; }
    .now-playing { flex: 0 1 auto; }
}

/* =========================================
   13. HEADER SOCIALS & LAYOUT
   ========================================= */
.header-right {
    display: flex;
    align-items: center;
    gap: 40px;
}

.header-socials {
    display: flex;
    gap: 15px;
    align-items: center;
    padding-left: 25px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.header-socials a svg {
    width: 18px;
    height: 18px;
    fill: var(--text-muted);
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-socials a:hover {
    transform: translateY(-2px);
}

.header-socials a:hover svg {
    fill: var(--primary);
}

@media (max-width: 1100px) {
    .header-right { gap: 20px; }
    .header-socials { padding-left: 15px; }
}

@media (max-width: 850px) {
    .header-socials { display: none; } 
}

/* =========================================
   14. ESTILOS DE NOTICIAS (HOME & ARCHIVE)
   ========================================= */
.news-card {
    background: rgba(26, 20, 43, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    transition: all 0.4s ease !important;
}

.news-card:hover {
    background: rgba(26, 20, 43, 0.8) !important;
    border-color: rgba(227, 0, 27, 0.3) !important;
}

.news-card .card-img {
    position: relative;
    overflow: hidden;
}

.news-card:hover .card-img {
    filter: saturate(1.2);
}

.news-date {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: var(--primary);
    color: #fff;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 900;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.news-card h3 {
    transition: color 0.3s ease;
}

.news-card:hover h3 {
    color: var(--primary);
}

/* =========================================
   15. RELOJ DIGITAL + FECHA (HORIZONTAL)
   ========================================= */
.header-clock {
    display: flex;
    flex-direction: row; /* Todo en la misma línea */
    align-items: center;
    gap: 15px;           /* Espacio entre fecha y hora */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 25px;
    border-radius: 50px; /* Estilo cápsula más moderno */
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    z-index: 10;
    pointer-events: none;
}

.header-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    font-weight: 700;
    text-transform: uppercase;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding-right: 15px;
}

.header-time {
    font-family: var(--font-title);
    font-weight: 900;
    color: var(--primary);
    font-size: 1.3rem;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(227, 0, 27, 0.5);
}

@media (max-width: 1100px) {
    .header-clock { padding: 6px 15px; gap: 10px; }
    .header-date { font-size: 0.65rem; padding-right: 10px; }
    .header-time { font-size: 1.1rem; }
}

@media (max-width: 900px) {
    .header-clock { display: none; }
}