/*
Theme Name: Metropolitan Atom-Punk
Theme URI: https://metropolitanofficial.com
Author: Andrés Baena
Description: Tema oficial para Metropolitan con estética retro-futurista / atom-punk.
Version: 1.0
Text Domain: metropolitan
*/

:root {
  --bg-dark: #12181f; 
  --bg-panel: #1e2630; 
  --accent-yellow: #e5b236; 
  --accent-red: #d94b36; 
  --text-main: #e6e3d3; 
  --text-dark: #12181f;
  --border-thick: 3px solid var(--accent-yellow);
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'Courier Prime', monospace;
  --container-width: 1100px;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  background-image: radial-gradient(var(--bg-panel) 1px, transparent 1px);
  background-size: 4px 4px;
  line-height: 1.5;
  overflow-x: hidden;
  padding-top: 160px; /* Espacio para el navbar fijo */
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Tipografía global */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  letter-spacing: 0.1em;
  font-weight: 400;
  text-transform: uppercase;
}

/* Clases de componentes (Para usar en el editor de bloques) */
.section-title {
  font-size: 3.5rem;
  color: var(--accent-yellow);
  margin-bottom: 0.5rem;
  text-shadow: 3px 3px 0px var(--accent-red);
}

.section-desc {
  color: var(--text-main);
  margin-bottom: 3rem;
  font-size: 1rem;
  border-left: 3px solid var(--accent-red);
  padding-left: 1rem;
}

/* Botones Analógicos */
.btn, .wp-block-button__link {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  padding: 0.5rem 1.5rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: transform 0.1s;
  border: 2px solid var(--text-dark);
  background-color: var(--accent-yellow);
  color: var(--text-dark) !important;
  box-shadow: 4px 4px 0px var(--accent-red);
}
.btn:active, .wp-block-button__link:active {
  transform: translate(4px, 4px);
  box-shadow: 0px 0px 0px var(--accent-red);
}

.btn-outline {
  background-color: var(--bg-panel);
  color: var(--accent-yellow) !important;
  border-color: var(--accent-yellow);
  box-shadow: 4px 4px 0px var(--bg-dark);
}

/* Tarjetas Estilo Consola */
.retro-card {
  background-color: var(--bg-panel);
  border: 2px solid var(--accent-yellow);
  padding: 2rem;
  position: relative;
  box-shadow: 6px 6px 0px rgba(0,0,0,0.5);
  margin-bottom: 2rem;
}
.retro-card::before {
  content: "SYS.ONLINE";
  position: absolute;
  top: -12px;
  left: 10px;
  background: var(--accent-yellow);
  color: var(--text-dark);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0 0.5rem;
  font-family: var(--font-body);
}
/* ==========================================================================
   NAVEGACIÓN (HEADER) - ATOM PUNK
   ========================================================================== */
.navbar {
    position: fixed; 
    top: 0; 
    left: 0; 
    right: 0; 
    z-index: 1000;
    background: rgba(15, 4, 18, 0.95);
    border-bottom: var(--border-thick);
    
    /* Forzamos a que el contenedor crezca según su contenido */
    display: block !important; 
    height: auto !important; 
    padding: 20px 0; 
}

/* FIX: Evita que la barra de administrador de WordPress tape el logo */
body.admin-bar .navbar {
    top: 32px !important;
}

.nav-inner { 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    width: 100%; 
    gap: 20px; /* Separación entre el logo y el texto */
}

.logo { 
    display: block;
    margin: 0;
    padding: 0;
}

.nav-links { 
    display: flex; 
    flex-direction: row; 
    list-style: none; 
    gap: 50px; 
    margin: 0; 
    padding: 0; 
}

.nav-links li { 
    margin: 0; 
}

.nav-links a { 
    color: var(--accent-yellow); 
    font-family: var(--font-display); 
    font-size: 1.5rem; 
    text-decoration: none; 
    letter-spacing: 2px;
    transition: color 0.2s; 
}

.nav-links a:hover { 
    color: var(--accent-red); 
}

/* Adaptación para celulares */
@media (max-width: 782px) {
    /* La barra de WP es más gruesa en móviles */
    body.admin-bar .navbar { top: 46px !important; }
    .nav-links { gap: 20px; }
    .nav-links a { font-size: 1.2rem; }
}

/* --- FOOTER, REDES SOCIALES Y CONTACTO --- */
.site-footer {
    text-align: center;
    padding: 3rem 0 2rem;
    border-top: 2px dashed var(--accent-yellow);
    margin-top: 4rem;
    background-color: var(--bg-dark);
}

.social-networks {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 2.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.social-network-icon {
    width: 25px;
    height: 25px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    object-fit: contain;
    display: block;
    transition: transform 0.2s ease, filter 0.2s ease;
    
    /* TRUCO ATOM-PUNK: Este filtro convierte cualquier ícono blanco/negro al color Amarillo Acento del tema sin usar Photoshop */
    filter: invert(25%) sepia(35%) saturate(855%) hue-rotate(346deg) brightness(97%) contrast(92%);
}

.social-network-icon:hover {
    transform: translateY(-5px);
    /* Al pasar el mouse se cambian al color Rojo Acento */
    filter: invert(44%) sepia(87%) saturate(2250%) hue-rotate(338deg) brightness(90%) contrast(91%);
}

.contact {
    margin-bottom: 2rem;
    font-family: var(--font-display);
    font-size: 1.5rem;
}

.contact a {
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: color 0.2s;
}

.contact a:hover {
    color: var(--accent-red);
}

.copyright {
    font-size: 0.85rem;
    color: #7a828e;
}

/* --- COMPATIBILIDAD CON LA BARRA DE ADMINISTRADOR DE WORDPRESS --- */
body.admin-bar .navbar {
    top: 32px; /* Baja el menú 32px en escritorio para que no lo tape la barra de WP */
}

@media screen and (max-width: 782px) {
    body.admin-bar .navbar {
        top: 46px; /* La barra de WP es más gruesa en celulares (46px) */
    }
}

/* ==========================================================================
   ESTACIÓN DE MEDIOS (YOUTUBE & SPOTIFY)
   ========================================================================== */
.media-station {
    width: 100%;
    max-width: var(--container-width);
    margin: 4rem auto; /* Da aire por arriba y por abajo a toda la sección */
    padding: 0 1.5rem;
}

.media-grid {
    display: flex;
    flex-direction: column; /* Apilados en móviles */
    gap: 40px; /* Mucho aire entre ambos reproductores */
}

@media (min-width: 900px) {
    .media-grid {
        flex-direction: row; /* Uno al lado del otro en escritorio */
        align-items: flex-start;
    }
}

.monitor-box {
    flex: 1 1 50%;
    padding: 2.5rem 1.5rem 1.5rem 1.5rem; /* Aire interno de la tarjeta */
    position: relative;
    /* La clase .retro-card ya le pone el fondo, borde y sombra */
}

/* Etiqueta estilo consola para cada monitor */
.badge-title {
    position: absolute;
    top: -12px;
    right: 15px; /* Lo ponemos a la derecha para equilibrar el SYS.ONLINE de la izquierda */
    background-color: var(--accent-red);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0 0.5rem;
    letter-spacing: 1px;
}

/* Contenedor para que YouTube mantenga la proporción 16:9 perfecta */
.video-responsive {
    position: relative;
    padding-bottom: 56.25%; /* Ratio 16:9 */
    height: 0;
    overflow: hidden;
    border: 1px solid var(--text-dark); /* Borde sutil oscuro simulando la pantalla CRT */
}

.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ==========================================================================
   REPRODUCTOR DE AUDIO (SPOTIFY) - BLINDADO PARA COLUMNAS
   ========================================================================== */
.audio-responsive {
    width: 100%;
    min-height: 352px; /* Defiende su altura mínima contra la columna */
    display: block;
}

.audio-responsive iframe {
    position: static !important; /* Quitamos el absolute que confunde a las columnas */
    width: 100% !important;
    height: 352px !important;
    min-height: 352px !important; /* Fuerza a WordPress a respetarlo */
    border: none !important;
    display: block;
}

/* ==========================================================================
   LAYOUT ZIG-ZAG (HOME)
   ========================================================================== */

/* 1. Clases para las pantallas (Monitores) */
.monitor-box {
    padding: 2.5rem 1.5rem 1.5rem 1.5rem;
    position: relative;
    width: 100%;
}

.badge-title {
    position: absolute;
    top: -12px;
    right: 15px;
    background-color: var(--accent-red);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0 0.5rem;
    letter-spacing: 1px;
}

.video-responsive {
    position: relative;
    padding-bottom: 56.25%; /* Ratio 16:9 */
    height: 0;
    overflow: hidden;
    border: 1px solid var(--text-dark);
}

.video-responsive iframe {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
}

.audio-responsive {
    width: 100%;
    height: 352px;
    border: 1px solid var(--text-dark);
}

.audio-responsive iframe {
    width: 100%; height: 100%; display: block;
}

/* 2. Clase para el Texto Editable (Aquí le damos el "Aire") */
.retro-text-block {
    padding: 2rem 3rem; /* Espacio generoso a los lados y arriba/abajo */
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.8;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centra el texto verticalmente */
    height: 100%;
}

/* 3. Ajustes para Celulares (Responsive) */
@media (max-width: 781px) {
    .retro-text-block {
        padding: 1.5rem 1rem;
        text-align: center;
    }
    
    /* FIX DEFINITIVO: Obligamos a la clase a invertirse sin importar dónde la hayas puesto en WP */
    .reverse-mobile,
    .reverse-mobile .wp-block-columns {
        display: flex !important;
        flex-direction: column-reverse !important;
    }
    
    /* Asegura que los hijos ocupen el 100% de la pantalla para que no se aprieten */
    .reverse-mobile > *,
    .reverse-mobile .wp-block-column {
        width: 100% !important;
        flex-basis: 100% !important;
        margin-left: 0 !important;
    }
}

/* ==========================================================================
   LYRICS (ARCHIVE & SINGLE) - ESTRUCTURA DE 2 COLUMNAS
   ========================================================================== */
.lyric-content-wrapper {
    display: grid;
    grid-template-columns: 1fr; /* En móviles se apila una cosa sobre otra */
    gap: 2rem;
    margin-top: 2rem;
}

/* Forzamos 2 columnas a partir de tablets y pantallas de escritorio */
@media (min-width: 878px) {
    .lyric-content-wrapper {
        /* Columna 1: 350px exactos para el póster. Columna 2: 1fr (todo el espacio sobrante) para la letra */
        grid-template-columns: 350px 1fr; 
        gap: 4rem; /* Aire generoso entre la foto y el texto */
        align-items: start; /* Evita que la foto se estire verticalmente si la letra es muy larga */
    }
}

.lyric-poster img {
    width: 100%;
    max-width: 350px; /* Tope máximo para que no se robe la pantalla */
    height: auto;
    border: var(--border-thick);
    box-shadow: 6px 6px 0px rgba(0,0,0,0.5);
    display: block;
    margin: 0 auto; /* Mantiene la imagen centrada cuando se ve en celulares */
}

.lyric-text {
    width: 100%;
}

/* (A partir de aquí mantienes tus reglas de .lyric-meta, .lyric-body, etc.) */

.lyric-meta {
    margin-bottom: 2rem;
    color: var(--accent-red);
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.lyric-meta a {
    color: var(--accent-red);
    text-decoration: none;
}
.lyric-meta a:hover { color: var(--accent-yellow); }

.lyric-body {
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Formato para separar las estrofas en WordPress */
.lyric-body p {
    margin-bottom: 1.5rem;
}

/* Estilos de la lista principal */
.lyrics-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.lyric-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    text-decoration: none;
    transition: transform 0.2s;
}

.lyric-list-item:hover {
    transform: translateX(10px); /* Efecto de desplazamiento al pasar el mouse */
    border-color: var(--accent-red);
}

.lyric-list-title {
    margin: 0;
    color: var(--accent-yellow);
    font-size: 2rem;
}

/* ==========================================================================
   METADATOS DE LYRICS (Categorías y Etiquetas)
   ========================================================================== */
.lyric-meta {
    margin-bottom: 2rem;
    font-family: var(--font-body); /* Mantiene tu fuente Courier Prime estilo terminal */
    color: var(--text-main); 
    font-size: 1.1rem;
    display: block;
}

/* Forzamos el estilo del enlace para vencer el azul por defecto de WordPress */
.lyric-meta a {
    color: var(--accent-yellow) !important; /* Usa el mostaza de tu paleta */
    text-decoration: none !important; /* Elimina el subrayado */
    font-weight: 700;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

.lyric-meta a:hover {
    color: var(--accent-red) !important; /* Cambia a coral al pasar el mouse */
    text-decoration: underline !important; /* Subraya al hacer hover estilo web 1.0 */
}

/* --- LO QUE TENIAMOS EN EL HTML DEL HOME --- */

/* --- LO QUE TENIAMOS EN EL HTML DEL HOME --- */