/* Módulo 1 — estilos mínimos funcionales.
   El diseño final (paleta verde oscuro/borgoña/dorado, imágenes
   grandes, tipografía de marca) se implementa en el módulo de
   Frontend/Home una vez el contenido real esté conectado. */

:root {
    --color-dark-green: #0f2b1e;
    --color-burgundy: #7a1f2b;
    --color-gold: #c9a227;
    --color-cream: #f7f1e3;
    --color-black: #14100b;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--color-cream);
    color: var(--color-black);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.site-header {
    background: var(--color-dark-green);
    color: #fff;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.logo {
    color: var(--color-gold);
    text-decoration: none;
    font-weight: 700;
    line-height: 1.1;
    display: flex;
    flex-direction: column;
}
.logo-title { font-size: 1.4rem; letter-spacing: 1px; }
.logo-subtitle { font-size: 0.75rem; color: #fff; }

.main-nav a {
    color: #fff;
    text-decoration: none;
    margin-right: 1rem;
    font-size: 0.9rem;
}
.main-nav a:hover { color: var(--color-gold); }

.header-actions a {
    color: #fff;
    text-decoration: none;
    margin-left: 0.75rem;
    font-size: 0.9rem;
}

.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
}
.btn-primary { background: var(--color-burgundy); color: #fff; }
.btn-secondary { background: #ddd; color: #222; }

.flash {
    padding: 0.75rem 1.25rem;
    margin: 1rem auto;
    max-width: 1100px;
    border-radius: 6px;
}
.flash-success { background: #d7f0d9; color: #1e5c25; }
.flash-error { background: #fbdada; color: #7a1f1f; }

main { padding: 2rem 1.25rem 6rem; min-height: 60vh; }

.notice {
    background: #fff8e1;
    border-left: 4px solid var(--color-gold);
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

.auth-form-section, .profile-section {
    max-width: 420px;
    margin: 0 auto;
}

.auth-form label {
    display: block;
    margin-top: 1rem;
    font-weight: 600;
    font-size: 0.9rem;
}
.auth-form input {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-top: 0.25rem;
}
.auth-form button { margin-top: 1.5rem; width: 100%; }

.site-footer {
    background: var(--color-black);
    color: #ccc;
    text-align: center;
    padding: 1.5rem 0;
    font-size: 0.85rem;
}

/* Reproductor global */
.global-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-black);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0.6rem 1.25rem;
    z-index: 100;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.3);
    flex-wrap: wrap;
}
.player-track-info { display: flex; align-items: center; gap: 0.6rem; min-width: 160px; }
.player-track-info img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; background: #333; }
.player-track-text { display: flex; flex-direction: column; font-size: 0.8rem; max-width: 160px; overflow: hidden; }
.player-track-text span:first-child { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-track-text span:last-child { color: #aaa; font-size: 0.75rem; }

.player-controls { display: flex; align-items: center; gap: 0.5rem; }
.player-btn, .player-btn-sm {
    background: none; border: none; color: #fff; cursor: pointer; font-size: 1rem;
}
.player-btn { font-size: 1.4rem; }
.player-btn-active { color: var(--color-gold); }

.player-progress { display: flex; align-items: center; gap: 0.5rem; flex: 1; min-width: 180px; font-size: 0.75rem; color: #ccc; }
.player-progress input[type="range"] { flex: 1; }

.player-extra { display: flex; align-items: center; gap: 0.6rem; }
.player-extra a { color: #fff; text-decoration: none; }
.player-extra input[type="range"] { width: 80px; }

@media (max-width: 720px) {
    .global-player { justify-content: space-between; }
    .player-progress { order: 3; width: 100%; }
}

/* Música: tarjetas de canciones y artistas */
.music-section { margin-bottom: 2.5rem; }
.music-section h2 { font-size: 1.3rem; margin-bottom: 1rem; border-left: 4px solid var(--color-gold); padding-left: 0.6rem; }

.song-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}
.song-card {
    position: relative;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.song-card img { width: 100%; height: 140px; object-fit: cover; display: block; }
.song-play-btn {
    position: absolute; top: 96px; right: 10px;
    background: var(--color-burgundy); color: #fff; border: none;
    width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 0.9rem;
}
.song-card-info { padding: 0.6rem 0.7rem; display: flex; flex-direction: column; }
.song-card-info strong { font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-card-info span { font-size: 0.78rem; color: #777; }

.artist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}
.artist-card {
    background: #fff; border-radius: 8px; padding: 0.8rem; text-align: center;
    text-decoration: none; color: inherit; display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.artist-card img { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; background: #eee; }
.artist-card strong { font-size: 0.88rem; }
.artist-card span { font-size: 0.78rem; color: #777; }

.artist-header { display: flex; gap: 1.25rem; align-items: center; margin-bottom: 1rem; }
.artist-header img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; background: #eee; }
.artist-meta { color: #666; margin: 0.2rem 0; }
.artist-social a { margin-right: 0.8rem; font-size: 0.85rem; color: var(--color-burgundy); text-decoration: none; }
.artist-bio { max-width: 700px; line-height: 1.6; margin-bottom: 1.5rem; }

/* Videos */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.2rem;
}
.video-card { text-decoration: none; color: inherit; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.video-thumb-wrap { position: relative; }
.video-thumb-wrap img { width: 100%; height: 130px; object-fit: cover; display: block; background: #ddd; }
.video-play-overlay {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.6); color: #fff; width: 44px; height: 44px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.video-card-info { padding: 0.6rem 0.8rem; display: flex; flex-direction: column; gap: 0.15rem; }
.video-card-info strong { font-size: 0.9rem; line-height: 1.3; }
.video-card-info span { font-size: 0.78rem; color: #777; }
.video-player-wrap { background: #000; border-radius: 8px; overflow: hidden; }

/* Videos: tags de categoría */
.video-tag {
    display: inline-block;
    color: var(--color-burgundy);
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.video-tag-sm { font-size: 0.68rem; }
.video-card-views { font-size: 0.75rem; color: #888; }

/* Videos: sección "Todos los videos" */
.videos-section-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 2rem 0 1rem;
    border-bottom: 2px solid #ddd;
    padding-bottom: 0.6rem;
}
.videos-section-title h2 { font-size: 1.3rem; margin: 0; }
.videos-section-title h2 span { color: var(--color-burgundy); }
.videos-count { font-size: 0.8rem; color: #888; }

/* Videos: hero carrusel + sidebar (estilo portal de noticias) */
.video-hero {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.video-hero-main {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: var(--color-black);
    aspect-ratio: 16/9;
}
.video-hero-slide {
    position: absolute;
    inset: 0;
    display: block;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
.video-hero-slide.active { opacity: 1; pointer-events: auto; }
.video-hero-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-hero-caption {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 2rem 1.5rem 1.2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
    color: #fff;
}
.video-hero-caption .video-tag { color: var(--color-gold); }
.video-hero-caption h2 { margin: 0.3rem 0 0; font-size: 1.4rem; color: #fff; }

.hero-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    z-index: 5; background: rgba(0,0,0,0.4); color: #fff; border: none;
    width: 36px; height: 36px; border-radius: 50%; font-size: 1.4rem; cursor: pointer;
}
.hero-arrow-prev { left: 10px; }
.hero-arrow-next { right: 10px; }

.hero-dots {
    position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 6px; z-index: 5;
}
.hero-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.4); cursor: pointer; }
.hero-dot.active { background: var(--color-gold); }

.video-hero-sidebar { display: flex; flex-direction: column; gap: 0.7rem; }
.hero-sidebar-item {
    display: flex; gap: 0.7rem; text-decoration: none; color: inherit;
    background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.hero-sidebar-item img { width: 100px; height: 72px; object-fit: cover; flex-shrink: 0; }
.hero-sidebar-text { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.5rem 0.6rem 0.5rem 0; justify-content: center; }
.hero-sidebar-text strong { font-size: 0.82rem; line-height: 1.25; }
.hero-sidebar-views { font-size: 0.72rem; color: #888; }

@media (max-width: 780px) {
    .video-hero { grid-template-columns: 1fr; }
}

/* Noticias */
.news-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.news-filter-tag {
    text-decoration: none; color: var(--color-black); background: #fff;
    padding: 0.4rem 0.9rem; border-radius: 20px; font-size: 0.82rem; box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.news-filter-tag.active { background: var(--color-burgundy); color: #fff; }

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.2rem;
}
.news-card { text-decoration: none; color: inherit; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.news-card img { width: 100%; height: 160px; object-fit: cover; display: block; }
.news-card-info { padding: 0.8rem 1rem; display: flex; flex-direction: column; gap: 0.3rem; }
.news-card-info strong { font-size: 1rem; line-height: 1.3; }
.news-card-info p { font-size: 0.85rem; color: #666; margin: 0; line-height: 1.4; }
.news-card-date { font-size: 0.75rem; color: #999; }

.news-article { max-width: 760px; }
.news-article h1 { margin: 0.4rem 0 0.3rem; font-size: 1.9rem; line-height: 1.25; }
.news-article-image { width: 100%; border-radius: 8px; margin: 1.2rem 0; max-height: 420px; object-fit: cover; }
.news-article-content { line-height: 1.75; font-size: 1.02rem; }
.news-article-content img { max-width: 100%; border-radius: 6px; margin: 1rem 0; }
.news-article-content h2, .news-article-content h3 { margin-top: 1.5rem; }
.news-article-content blockquote { border-left: 4px solid var(--color-gold); padding-left: 1rem; color: #555; font-style: italic; }

.news-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.6rem; margin: 1rem 0; }
.news-gallery img { width: 100%; height: 110px; object-fit: cover; border-radius: 6px; }

.news-tags { margin: 1.2rem 0; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.news-tag { background: #eee; color: #555; font-size: 0.78rem; padding: 0.25rem 0.7rem; border-radius: 14px; }

.news-share { display: flex; align-items: center; gap: 0.8rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid #eee; font-size: 0.88rem; }
.news-share a { color: var(--color-burgundy); text-decoration: none; font-weight: 600; }
