/* Variables CSS */
:root {
    --primary-color: #ff7600; /* Azul Nautica */
    --secondary-color: #1a2444;
    --accent-color: #f5a524;
    --text-dark: #1A202C;
    --bg-dark: #000000;
    --text-light: #ffffff;
    --bg-light: #f7fafc;
    --header-height: 80px;
    --container-width: 1200px;
}

/* Reset Básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /* Font family handled in index.php via PHP config variable --font-main */
    color: var(--text-dark);
    background-color: var(--bg-light);
    background-image: url('../img/fondo.jpg');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Contenedor General */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Fondo blanco para el contenido principal */
main.container {
    background-color: var(--secondary-color);
    padding: 20px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    margin-top: 0px;
    padding-bottom: 50px; /* Espacio para el player */
}
.bg-white {
    background-color: var(--text-light);
}
/* Header */
header {
    background: var(--text-light);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative; /* Cambiado de sticky a relative para que no flote */
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.logo img {
    height: 60px; /* Ajustar según logo */
}

nav ul {
    display: flex;
    gap: 20px;
}

nav a {
    font-weight: 600;
    color: var(--text-dark);
}

nav a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    margin-bottom: 2rem;
}

.hero img {
    width: 100%;
    object-fit: cover;
    border-radius: 0 0 10px 10px;
}

/* Main Content Grid */
.main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
    align-items: stretch; /* Estirar para misma altura si el contenido lo permite */
}

@media (max-width: 768px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
}

/* Estilos de Tarjeta (Cajas Blancas) */
.widget-chat, .facebook-page {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    height: 650px; /* Altura fija para igualar */
    box-sizing: border-box;
    overflow: hidden; /* Para contener */
    max-width: 100%; /* Asegurar que no exceda el ancho */
}

/* Ajustes Móviles */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    main.container {
        padding: 10px;
        padding-bottom: 50px;
    }
    .widget-chat, .facebook-page {
        padding: 10px;
        height: auto; /* Altura flexible en movil o mantener fija segun preferencia */
        min-height: 500px;
    }
    .main-grid {
        gap: 20px;
    }
}

/* Scroll para Chat */
.widget-chat {
    overflow-y: auto; /* Scroll vertical */
}

/* Scrollbar personalizado (opcional, estilo moderno) */
.widget-chat::-webkit-scrollbar {
    width: 8px;
}
.widget-chat::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.widget-chat::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}
.widget-chat::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Sections Titles (Custom Red Design) */
.section-title {
    font-size: 1.5rem;
    color: white;
    background-color: #cf2e2e; /* Red Vivid */
    padding: 10px 20px;
    border-radius: 5px;
    margin-bottom: 20px; /* Separacion de titulo a contenido */
    position: relative;
    text-align: center;
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Cortar decoraciones que salgan */
}

/* Decoración Izquierda (Slash Blanco) */
.section-title::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    height: 100%;
    width: 15px;
    background-color: white;
    transform: skewX(-30deg);
}

/* Decoración Derecha (Puntos) */
.section-title::after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 20px;
    background-image: radial-gradient(circle, white 2px, transparent 2.5px);
    background-size: 8px 8px; /* Espaciado de puntos */
    opacity: 0.7;
}

/* Player Bar (Sticky Bottom - New Design) */
.player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #0c0c24; /* Dark Blue Deep */
    color: white;
    padding: 10px 0;
    z-index: 2000;
    border-top: 2px solid var(--primary-color);
    box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
}

.player-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.player-logo img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid white;
    object-fit: cover;
    animation: spin 10s linear infinite;
    animation-play-state: paused;
}

.player-logo img.playing {
    animation-play-state: running;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

.player-text {
    display: flex;
    flex-direction: column;
}

.station-name {
    font-weight: 800;
    font-size: 1.1rem;
    text-transform: uppercase;
    color: white;
}

.meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #ccc;
}

.live-badge {
    background-color: #e60000;
    color: white;
    padding: 1px 6px;
    font-size: 0.7rem;
    font-weight: bold;
    border-radius: 4px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
}
.live-badge::after {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    margin-left: 5px;
}

.player-controls-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.play-btn-circle {
    width: 50px;
    height: 50px;
    background: white;
    border: none;
    border-radius: 50%;
    color: #0c0c24;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
}

.play-btn-circle:hover {
    transform: scale(1.1);
    background: #f0f0f0;
}

.player-volume {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.player-volume input[type="range"] {
    width: 80px;
    cursor: pointer;
}

@media (max-width: 600px) {
    .player-text { display: none; } /* Ocultar texto en moviles muy pequeños si es necesario, o achicar */
    .player-volume { display: none; } /* Ocultar volumen en movil para ahorrar espacio */
    .player-inner { justify-content: space-around; }
}

/* Footer */
footer {
    background: var(--primary-color);
    color: var(--text-light);
    padding: 40px 0 80px 0; /* Extra padding bottom for player */
    text-align: center;
}

.footer-info p {
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}
