/* =========================================
    CONFIGURACIÓN GLOBAL
   ========================================= */
* {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
    width: 100%;
}

:root {
    --accent: #66a50c;
    --bg: #0f0f1a;
    --card-bg: #181824;
    --text-main: #ffffff;
    --text-dim: #66a50c;
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    position: relative;
}

/* =========================================
    CABECERA (HEADER)
   ========================================= */
.main-header {
    padding: 20px 5%;
    background: rgba(22, 22, 37, 0.98);
    position: sticky;
    top: 0;
    z-index: 9999;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    text-transform: uppercase;
}

.logo span {
    color: var(--accent);
}

/* =========================================
    HERO / BANNER PRINCIPAL
   ========================================= */
.hero-banner {
    width: 100%;
    height: 400px; 
    background: linear-gradient(rgba(0,0,0,0.3), var(--bg)), url('../img/portada.jpg') center/cover;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    text-align: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin: 0;
}

.hero-adorno {
    margin-top: 30px;
    max-width: 350px;
    opacity: 0.9;
}

/* =========================================
    BUSCADOR
   ========================================= */
.search-container {
    display: flex;
    justify-content: center;
    margin: -20px auto 40px;
    padding: 0 20px;
}

.search-box {
    position: relative;
    width: 100%;
    max-width: 500px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent);
}

.search-box input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    color: white;
    outline: none;
    transition: 0.3s;
}

.search-box input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(102, 165, 12, 0.3);
}

/* =========================================
    CONTENEDOR Y GRILLA DE RADIOS
   ========================================= */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 20px 100px;
}

.section-title {
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 40px;
    font-size: 1.2rem;
    color: var(--text-main);
}

.radio-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 30px;
}

.radio-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.radio-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
}

.radio-image {
    position: relative;
}

.radio-image img {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 10px;
    object-fit: cover;
}

.card-play-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #fff;
    color: #000;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* =========================================
    SECCIÓN DE CONTACTO
   ========================================= */
.contacto-streaming {
    padding: 40px 20px 120px;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
}

.contacto-container h3 {
    color: #5e9c0e;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.social-btn {
    width: 35px;
    height: 35px;
    background: #fff;
    color: #000;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: 0.3s;
}

.social-btn:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-3px);
}

/* =========================================
    REPRODUCTOR GLOBAL (PLAYER BAR)
   ========================================= */
.player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.1); 
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    /* Borde sutil para definir los límites del blanco */
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding: 15px 0;
    z-index: 1000;
}

.player-content {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.player-left {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 35%;
}

#player-cover {
    width: 55px;
    height: 55px;
    border-radius: 8px;
    object-fit: cover;
}

/* Etiqueta AL AIRE */
.status-on-air {
    background: #ff0000;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 4px;
    letter-spacing: 1px;
}

.dot {
    width: 6px;
    height: 6px;
    background-color: white;
    border-radius: 50%;
    animation: blink 1s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.2; }
    100% { opacity: 1; }
}

#player-title {
    font-weight: 700;
    font-size: 1rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Estilo para el mensaje de error SEÑAL OFFLINE */
.offline-text {
    color: #ff4d4d !important;
    font-weight: 800;
    text-transform: uppercase;
    animation: pulse-offline 1.5s infinite;
}

@keyframes pulse-offline {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

#player-description {
    font-size: 0.8rem;
    color: var(--accent);
    margin: 0;
}

.player-center {
    width: 30%;
    display: flex;
    justify-content: center;
}

/* Botón Play Blanco Redondo */
.round-play-btn {
    width: 50px;
    height: 50px;
    background: white;
    color: black;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: 0.2s;
}

.round-play-btn:hover {
    transform: scale(1.05);
}

.player-right {
    display: flex;
    justify-content: flex-end;
    width: 35%;
}

#player-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}

#player-close:hover {
    background: rgba(255, 0, 0, 0.4);
}

/* =========================================
    RESPONSIVIDAD (MEDIA QUERIES)
   ========================================= */
@media (max-width: 1200px) {
    .radio-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .radio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .player-left {
        width: 70%;
    }

    .player-center {
        width: 30%;
        justify-content: flex-end;
    }

    .player-right {
        display: none; /* Ocultar cerrar en móvil */
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    #player-cover {
        width: 45px;
        height: 45px;
    }

    #player-title {
        font-size: 0.9rem;
    }
}