:root {
    --primary-color: #e63946;
    --secondary-color: #1d3557;
    --accent-color: #f1faee;
    --dark-bg: #121212;
    --card-bg: #1e1e1e;
    --text-color: #ffffff;
    --text-muted: #b0b0b0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-color);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--dark-bg);
    display: flex; justify-content: center; align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}
.equalizer {
    display: flex; justify-content: center; align-items: flex-end;
    height: 40px; gap: 5px; margin-bottom: 15px;
}
.equalizer span {
    width: 8px; background: var(--primary-color);
    animation: bounce 1s infinite ease-in-out;
}
.equalizer span:nth-child(1) { height: 10px; animation-delay: 0.1s; }
.equalizer span:nth-child(2) { height: 35px; animation-delay: 0.3s; }
.equalizer span:nth-child(3) { height: 20px; animation-delay: 0.2s; }
.equalizer span:nth-child(4) { height: 40px; animation-delay: 0.4s; }
.equalizer span:nth-child(5) { height: 15px; animation-delay: 0.1s; }

@keyframes bounce {
    0%, 100% { transform: scaleY(0.3); }
    50% { transform: scaleY(1.1); }
}

/* Header */
.header {
    background: rgba(0,0,0,0.8);
    position: sticky; top: 0; z-index: 1000;
    backdrop-filter: blur(10px);
    padding: 15px 0;
}
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo a { font-size: 24px; font-weight: bold; color: #fff; text-decoration: none; }
.logo span { color: var(--primary-color); }
.nav-menu ul { display: flex; list-style: none; gap: 20px; align-items: center; }
.nav-menu a { color: #fff; text-decoration: none; transition: 0.3s; }
.nav-menu a:hover { color: var(--primary-color); }
.btn-admin {
    background: var(--primary-color); padding: 8px 15px;
    border-radius: 20px; font-size: 14px;
}
.menu-toggle { display: none; font-size: 24px; cursor: pointer; }

/* Reproductor Hero */
.player-section { padding: 60px 0; text-align: center; }
.player-card {
    background: var(--card-bg); border-radius: 20px; padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); max-width: 600px; margin: 0 auto;
}
.live-badge {
    background: var(--primary-color); color: #fff; padding: 5px 12px;
    border-radius: 15px; font-size: 12px; font-weight: bold;
    display: inline-block; margin-bottom: 15px;
    animation: pulse 2s infinite;
}
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }

.custom-player {
    display: flex; flex-direction: column; align-items: center;
    gap: 20px; margin: 30px 0;
}
.play-btn {
    width: 80px; height: 80px; border-radius: 50%;
    background: var(--primary-color); border: none; color: #fff;
    font-size: 30px; cursor: pointer; transition: 0.3s;
    display: flex; justify-content: center; align-items: center;
}
.play-btn:hover { transform: scale(1.1); box-shadow: 0 0 20px rgba(230,57,70,0.6); }

.volume-control { display: flex; align-items: center; gap: 10px; color: var(--text-muted); }
.volume-control input { accent-color: var(--primary-color); }

/* Redes Sociales */
.share-box { border-top: 1px solid #333; padding-top: 20px; margin-top: 20px; }
.social-share { display: flex; justify-content: center; gap: 15px; margin-top: 10px; }
.share-btn {
    width: 40px; height: 40px; border-radius: 50%; display: flex;
    justify-content: center; align-items: center; color: #fff;
    text-decoration: none; font-size: 18px; transition: 0.3s;
}
.share-btn.wa { background: #25D366; }
.share-btn.fb { background: #1877F2; }
.share-btn.tw { background: #000000; }
.share-btn:hover { transform: translateY(-3px); }

/* Blog */
.blog-section { padding: 60px 0; }
.section-title { text-align: center; margin-bottom: 40px; font-size: 28px; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px; }
.post-card { background: var(--card-bg); border-radius: 12px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.3); }
.post-media-img { width: 100%; height: 220px; object-fit: cover; }
.post-content { padding: 20px; }
.post-date { font-size: 12px; color: var(--text-muted); display: block; margin-bottom: 5px; }
.post-content h3 { margin: 10px 0; font-size: 20px; }
.post-content p { color: var(--text-muted); font-size: 14px; line-height: 1.6; }

.post-audio-wrapper, .post-video-wrapper { margin-top: 15px; }
.post-audio-wrapper p { font-size: 13px; margin-bottom: 5px; color: #fff; }
.post-audio, .post-video { width: 100%; border-radius: 8px; margin-top: 5px; }
.post-video-embed { width: 100%; height: 220px; border-radius: 8px; }

/* Footer */
footer { background: #0a0a0a; padding: 20px 0; text-align: center; color: var(--text-muted); }
.footer-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.footer-socials a { color: var(--text-muted); margin-left: 15px; font-size: 18px; }

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .nav-menu {
        display: none; position: absolute; top: 100%; left: 0;
        width: 100%; background: var(--dark-bg); padding: 20px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.5);
    }
    .nav-menu.active { display: block; }
    .nav-menu ul { flex-direction: column; gap: 15px; }
    .footer-content { flex-direction: column; text-align: center; }
}

/* --- 1. IMÁGENES COMPLETAS Y RESPONSIVAS --- */
.content-area img, 
.editor-content img,
.entry-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 15px auto;
    object-fit: contain; /* Evita que la imagen se recorte o distorsione */
    border-radius: 4px;
}

/* --- 2. REPRODUCTORES DE AUDIO AL 100% --- */
.content-area audio, 
.editor-content audio,
.entry-content audio {
    width: 100% !important;
    display: block;
    margin: 15px 0;
}

/* --- 3. REPRODUCTORES DE VIDEO REPRODUCIBLES (MP4/WEBM) --- */
.content-area video, 
.editor-content video,
.entry-content video {
    width: 100% !important;
    height: auto !important;
    max-height: 500px;
    display: block;
    margin: 15px auto;
    background-color: #000;
    border-radius: 6px;
}

/* --- 4. VIDEOS INCRUSTADOS (YouTube / Vimeo / Iframe) --- */
/* Envolver el <iframe> dentro de un <div class="video-wrapper"> */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* Mantiene relación de aspecto 16:9 */
    height: 0;
    overflow: hidden;
    margin: 15px 0;
    border-radius: 6px;
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
}
