/* ===== CSS Variables (Light Theme Default) ===== */
:root {
    --bg-dark: #f8fafc;
    --bg-darker: #f1f5f9;
    --text-main: #0f172a;
    --text-muted: #475569;
    
    --accent-neon: #0ea5e9;
    --accent-purple: #3b82f6;
    --radio-1-color: #0ea5e9;
    --radio-2-color: #e11d48;
    
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

html.dark-theme {
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --accent-neon: #00f2fe;
    --accent-purple: #4facfe;
    --radio-1-color: #00f2fe;
    --radio-2-color: #f43f5e;
    
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

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

body {
    background-color: var(--bg-darker);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(14, 165, 233, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(225, 29, 72, 0.08), transparent 25%);
    background-attachment: fixed;
    padding-bottom: 120px; /* Space for radio bar */
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
    font-weight: 800;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Glassmorphism Utilities ===== */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 16px;
}

/* ===== Header ===== */
.glass-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img-full {
    height: auto;
    max-height: 55px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo-img-full:hover {
    transform: scale(1.05);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.social-icons {
    display: flex;
    gap: 20px;
    font-size: 1.6rem;
}

.social-icons a {
    color: var(--text-main);
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.social-icons a:hover {
    color: var(--accent-neon);
    transform: translateY(-2px);
}

.menu-toggle-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.menu-toggle-btn:hover {
    color: var(--accent-neon);
}

.dropdown-nav {
    position: absolute;
    top: 80px;
    right: 20px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    display: none; /* Oculto por defecto */
    flex-direction: column;
    gap: 15px;
    min-width: 200px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    z-index: 101;
}

.dropdown-nav.show {
    display: flex;
    animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.nav-link {
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
    padding: 5px 0;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-neon);
}

.admin-btn {
    margin-top: 10px;
    background: rgba(255,255,255,0.1);
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    text-align: center;
}

.admin-btn:hover {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* ===== Main Content ===== */
.main-content {
    margin-top: 100px;
}

.ad-banner {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    overflow: hidden;
}

.ad-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== News Grid ===== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
}

.news-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.hero-card {
    grid-column: span 12;
    flex-direction: row;
    min-height: 400px;
}

.hero-card .card-image {
    width: 60%;
    height: 100%;
}

.news-card:not(.hero-card) {
    grid-column: span 4;
}

.card-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
}

.card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.news-title {
    font-size: 1.25rem;
    line-height: 1.3;
}

.hero-card .news-title {
    font-size: 2.5rem;
}

.news-summary {
    color: var(--text-muted);
    font-size: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Skeletons */
.skeleton {
    background: var(--glass-bg);
}
.skeleton-img {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}
.skeleton-text {
    height: 20px;
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
    width: 100%;
}
.skeleton-text.title { height: 32px; width: 80%; }
@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== Floating Radio Bar ===== */
.radio-bar-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1200px;
    z-index: 999;
    padding: 15px 25px;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.85);
}

.radio-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
}

.radio-player {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.radio-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.radio-avatar {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.radio-1-bg {
    background: linear-gradient(135deg, var(--accent-neon), var(--accent-purple));
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.4);
}

.radio-2-bg {
    background: linear-gradient(135deg, #ff0844, #ffb199);
    box-shadow: 0 0 20px rgba(255, 8, 68, 0.4);
}

.radio-title {
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.radio-status {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.radio-status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
    box-shadow: 0 0 8px #10b981;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.5; }
}

.radio-controls {
    display: flex;
    align-items: center;
}

.control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: white;
    color: var(--bg-dark);
    transform: scale(1.05);
}

.control-btn.playing {
    background: white;
    color: var(--bg-dark);
    box-shadow: 0 0 20px rgba(255,255,255,0.4);
}

.player-divider {
    width: 2px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    margin: 0 30px;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    margin-left: 20px;
}

.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 80px;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    outline: none;
}
.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .hero-card { flex-direction: column; }
    .hero-card .card-image { width: 100%; height: 250px; }
    .news-card:not(.hero-card) { grid-column: span 6; }
    .player-divider { display: none; }
    .radio-bar { flex-direction: column; gap: 15px; }
    .radio-player { width: 100%; justify-content: space-between; }
    .hidden-mobile { display: none; }
    .radio-bar-container { padding: 15px; bottom: 10px; border-radius: 16px; }
    body.dark-theme { padding-bottom: 180px; }
}

@media (max-width: 768px) {
    .news-card:not(.hero-card) { grid-column: span 12; }
    .header-right { gap: 15px; }
    .social-icons { display: none; /* Opcional: ocultar redes en mobile si no caben */ }
}
