/*
Theme Name: De Parranda
Description: De Parranda custom theme by SebaGervasio
Version: 2.0
Author: SebaGervasio
*/



/* ==========================================================================
   1. HEADER BASE (Por defecto: CLARO para las páginas interiores y header-sections)
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 89px; z-index: 100;
    background-color: var(--bg-cream); /* Fondo claro nativo */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.site-header .container {
    height: 100%; display: flex; justify-content: space-between; align-items: center; position: relative;
}

/* Elementos oscuros por defecto (para fondo claro) */
.site-header .logo img { filter: none; height: 42px; width: auto; transition: filter 0.4s ease; }
.site-header .main-nav a { color: var(--text-dark); text-shadow: none; font-size: 0.9rem; font-weight: 500; text-decoration: none; transition: opacity 0.3s ease, color 0.4s ease; }
.site-header .main-nav a:hover { opacity: 0.7; }
.site-header .btn-search, .site-header .btn-outline-header { color: var(--text-dark); border-color: rgba(30, 30, 30, 0.2); }
.site-header .hamburger span { background-color: var(--text-dark); }

/* Layout base del menú */
.nav-wrapper { display: flex; align-items: center; }
.main-nav { position: absolute; left: 50%; transform: translateX(-50%); z-index: 100; }
.main-nav ul { list-style: none; display: flex; gap: 40px; margin: 0; padding: 0; }
.header-actions { display: flex; align-items: center; gap: 16px; z-index: 100; }

/* ==========================================================================
   2. EXCEPCIÓN SOLO HOME (Transparente inicial)
   ========================================================================== */
/* Aplica solo si la etiqueta body tiene la clase .home, NO hemos scrolleado y el menú está cerrado */
.home .site-header:not(.scrolled):not(.menu-open) {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.home .site-header:not(.scrolled):not(.menu-open) .logo img { filter: brightness(0) invert(1); }
.home .site-header:not(.scrolled):not(.menu-open) .main-nav a { color: var(--text-light); text-shadow: 0 1px 3px rgba(0,0,0,0.5); }
.home .site-header:not(.scrolled):not(.menu-open) .btn-search,
.home .site-header:not(.scrolled):not(.menu-open) .btn-outline-header { color: var(--text-light); border-color: rgba(255, 255, 255, 0.4); }
.home .site-header:not(.scrolled):not(.menu-open) .hamburger span { background-color: var(--text-light); }

/* ==========================================================================
   3. RESPONSIVE MOBILE MENU
   ========================================================================== */
@media (max-width: 1200px) {
    .main-nav { position: static; transform: none; } 
    .nav-wrapper { display: flex; flex: 1; justify-content: flex-end; gap: 30px; }
    .header-actions { margin-left: 0; }
}

@media (max-width: 992px) {
    .hamburger { 
        display: flex; flex-direction: column; justify-content: center;
        gap: 6px; width: 32px; height: 32px; background: transparent; border: none; cursor: pointer; z-index: 101;
    }
    .hamburger span { display: block; width: 100%; height: 2px; transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.4s ease; border-radius: 2px; }
    .hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .nav-wrapper {
        position: absolute; top: 89px; left: 0; width: 100%;
        background-color: var(--bg-cream) !important; /* El menú abierto SIEMPRE es blanco */
        flex-direction: column; align-items: center; padding: 0; gap: 0;
        opacity: 0; visibility: hidden; transform: translateY(-10px);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease, visibility 0.4s;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1); box-shadow: 0 10px 25px rgba(0,0,0,0.1);
        max-height: calc(100vh - 89px); overflow-y: auto;
    }
    
    .nav-wrapper.active { transform: translateY(0); opacity: 1; visibility: visible; padding-bottom: 40px; }
    
    .main-nav { width: 100%; }
    .main-nav ul { width: 100%; flex-direction: column; align-items: stretch; gap: 0; }
    .main-nav li { border-bottom: 1px solid rgba(0, 0, 0, 0.06); }
    
    .main-nav a { 
        display: block; padding: 20px 30px; text-align: center;
        font-size: 1.1rem; color: var(--text-dark) !important; text-shadow: none !important; 
    }
    .main-nav a:hover { background-color: rgba(0,0,0,0.02); }

    .header-actions { flex-direction: column; gap: 15px; padding-top: 30px; width: 100%; padding: 0 30px; }
    .header-actions .btn-search { align-self: center; }
    .header-actions .btn-outline-header { width: 100%; text-align: center; padding: 14px 24px; }
    
    .header-actions .btn-search,
    .header-actions .btn-outline-header { color: var(--text-dark) !important; border-color: rgba(30, 30, 30, 0.2) !important; }

    /* Al abrir el menú en la Home, forzar el logo y el botón hamburguesa a oscuros */
    .home .site-header.menu-open {
        background-color: var(--bg-cream) !important;
        backdrop-filter: none !important;
    }
    .home .site-header.menu-open .logo img { filter: none !important; }
    .home .site-header.menu-open .hamburger span { background-color: var(--text-dark) !important; }
}

/* ==========================================================================
   LAYOUT ARCHIVO GENERAL
   ========================================================================== */
.archive-layout {
    padding-top: 180px; 
    padding-bottom: 120px;
}

.page-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 80px auto;
}

.page-title {
    font-family: var(--font-heading);
    font-size: 4.5rem;
    font-weight: 400;
    color: var(--text-dark);
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.page-desc {
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--text-muted);
}

/* ==========================================================================
   GRILLA DE EVENTOS (Reutilizable en Home y Archive)
   ========================================================================== */
.eventos-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 40px 30px; 
    margin-bottom: 60px; 
}

.evento-card {
    display: flex; 
    flex-direction: column; 
    cursor: pointer; 
    text-decoration: none;
}

/* El contenedor de la imagen maneja el hover arcoíris */
.ec-image-wrap {
    position: relative; 
    width: 100%; 
    aspect-ratio: 3/4; 
    border-radius: 12px;
    overflow: hidden; 
    margin-bottom: 16px; 
    background-color: #ddd;
    border: 1px solid transparent; 
    transition: transform 0.3s ease;
}

.ec-image-wrap img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.6s ease; 
}

.evento-card:hover .ec-image-wrap img { 
    transform: scale(1.05); 
}

/* Pseudo-elemento para el borde arcoíris SOLO en la imagen */
.ec-image-wrap::after {
    content: ""; 
    position: absolute; 
    inset: -2px; 
    border-radius: inherit;
    background: conic-gradient(from var(--rainbow-angle), var(--rb-1), var(--rb-2), var(--rb-3), var(--rb-4), var(--rb-5), var(--rb-1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor; 
    mask-composite: exclude; 
    padding: 2px;
    pointer-events: none; 
    opacity: 0; 
    transition: opacity 0.3s ease; 
    z-index: 10;
}

.evento-card:hover .ec-image-wrap::after { 
    opacity: 1; 
    animation: spinRainbow 2.5s linear infinite; 
}

.evento-card:hover .ec-image-wrap { 
    transform: translateY(-4px); 
}

/* Etiquetas sobre la imagen */
.ec-cat {
    position: absolute; 
    top: 16px; 
    left: 16px; 
    background: var(--text-light);
    color: var(--text-dark); 
    padding: 6px 12px; 
    border-radius: 50px;
    font-size: 0.65rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 0.05em; 
    z-index: 2;
}

.ec-date-badge {
    position: absolute; 
    top: 16px; 
    right: 16px; 
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px); 
    -webkit-backdrop-filter: blur(8px); 
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-light); 
    padding: 8px 12px; 
    border-radius: 8px;
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    line-height: 1; 
    z-index: 2;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.ec-date-badge .ec-m { 
    font-size: 0.6rem; 
    font-weight: 600; 
    text-transform: uppercase; 
    letter-spacing: 0.1em; 
    margin-bottom: 4px; 
}

.ec-date-badge .ec-d { 
    font-family: var(--font-heading); 
    font-size: 1.4rem; 
    font-weight: 400; 
}

/* Textos debajo de la tarjeta */
.ec-title { 
    font-family: var(--font-heading); 
    font-size: 1.3rem; 
    font-weight: 400; 
    color: var(--text-dark); 
    margin-bottom: 8px; 
    line-height: 1.2; 
}

.ec-loc { 
    display: flex; 
    align-items: center; 
    gap: 6px; 
    font-size: 0.8rem; 
    color: var(--text-muted); 
    font-style: italic; 
}

.ec-loc svg { 
    color: var(--accent-blue); 
}

/* Botón Cargar Más */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 60px;
}

.btn-load-more {
    border: 1px solid rgba(30, 30, 30, 0.2); 
    border-radius: 50px;
    padding: 16px 36px; 
    color: var(--text-dark); 
    font-size: 0.95rem;
    font-weight: 600; 
    background: transparent; 
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
}

/* ==========================================================================
   PAGINACIÓN (Nativa de WP y Botón Estático)
   ========================================================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 60px;
    flex-wrap: wrap;
}

/* 1. Estilo para el botón "Cargar más" (Si usas AJAX) */
.btn-load-more {
    border: 1px solid rgba(30, 30, 30, 0.2); 
    border-radius: 50px;
    padding: 16px 36px; 
    color: var(--text-dark); 
    font-size: 0.95rem;
    font-weight: 600; 
    background: transparent; 
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-load-more:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

/* 2. Estilos para la Paginación Nativa de WordPress (paginate_links) */
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 15px;
    border-radius: 50px;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

/* Hover de los números */
.pagination .page-numbers:hover {
    background-color: rgba(0,0,0,0.04);
}

/* Página Activa */
.pagination .page-numbers.current {
    background-color: var(--text-dark);
    color: var(--text-light);
    border-color: var(--text-dark);
}

/* Botones "Anterior" y "Siguiente" nativos */
.pagination .next.page-numbers,
.pagination .prev.page-numbers {
    border: 1px solid rgba(30, 30, 30, 0.2); 
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.8rem;
    margin: 0 10px;
}

.pagination .next.page-numbers:hover,
.pagination .prev.page-numbers:hover {
    border-color: var(--text-dark);
    background-color: transparent;
}

/* ==========================================================================
   RESPONSIVE (Ajustes para el layout de archivo)
   ========================================================================== */
@media (max-width: 1366px) {
    .page-title { font-size: 4rem; }
}

@media (max-width: 1200px) {
    .page-title { font-size: 3.8rem; }
    .eventos-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 992px) {
    .archive-layout { padding-top: 140px; padding-bottom: 80px; }
    .page-title { font-size: 3.2rem; }
    .page-header { margin-bottom: 50px; }
    .eventos-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
    .page-title { font-size: 2.5rem; }
    .page-desc { font-size: 1rem; }
    .eventos-grid { grid-template-columns: 1fr; gap: 30px; }
}

/* ==========================================================================
   LAYOUT ARCHIVO VIDEOS
   ========================================================================== */
.videos-archive-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 40px 30px; 
    margin-bottom: 60px;
}

.video-card {
    position: relative; 
    border-radius: 12px; 
    display: block; 
    width: 100%;
    aspect-ratio: 16/9;
    text-decoration: none; 
    color: var(--text-light); 
    background-color: #1a1a1a;
    border: 1px solid transparent; 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.video-card img {
    position: absolute; 
    inset: 0; 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.6s ease;
}

.video-card:hover img { transform: scale(1.05); }

/* Gradiente para que el texto sea legible siempre */
.v-overlay {
    position: absolute; 
    inset: 0; 
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.4) 40%, transparent 100%);
    transition: opacity 0.3s;
}

/* Botón Play (Glassmorphism) */
.v-play {
    position: absolute; 
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: rgba(255,255,255,0.15); 
    backdrop-filter: blur(4px); 
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.4); 
    border-radius: 50%; 
    display: flex;
    align-items: center; justify-content: center; 
    transition: transform 0.3s, background 0.3s, border-color 0.3s; 
    z-index: 2;
    width: 60px; height: 60px;
}

.video-card:hover .v-play {
    transform: translate(-50%, -50%) scale(1.1); 
    background: rgba(255,255,255,0.25); 
    border-color: rgba(82, 166, 119, 0.8); /* Borde verde del tema */
}

/* Información del Video */
.v-info { 
    position: absolute; 
    bottom: 24px; left: 24px; right: 24px; 
    z-index: 2; 
}

.v-title { 
    font-family: var(--font-heading); 
    font-size: 1.3rem; 
    font-weight: 400; 
    margin-bottom: 8px; 
    line-height: 1.25; 
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.v-meta { 
    font-size: 0.65rem; 
    font-weight: 600; 
    text-transform: uppercase; 
    letter-spacing: 0.1em; 
    color: rgba(255,255,255,0.8); 
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

/* Rainbow Hover Video Cards */
.video-card::after {
    content: ""; position: absolute; inset: -2px; border-radius: inherit;
    background: conic-gradient(from var(--rainbow-angle), var(--rb-1), var(--rb-2), var(--rb-3), var(--rb-4), var(--rb-5), var(--rb-1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude; padding: 2px;
    pointer-events: none; opacity: 0; transition: opacity 0.3s ease; z-index: 10;
}

.video-card:hover::after { opacity: 1; animation: spinRainbow 2.5s linear infinite; }
.video-card:hover { transform: translateY(-4px); box-shadow: 0 15px 35px rgba(0,0,0,0.15); }

/* Responsive */
@media (max-width: 1366px) {
    .videos-archive-grid { gap: 30px 20px; }
}
@media (max-width: 1200px) {
    .videos-archive-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 30px; }
}
@media (max-width: 576px) {
    .videos-archive-grid { grid-template-columns: 1fr; gap: 30px; }
}

/* ==========================================================================
   LAYOUT ARCHIVO NOVEDADES
   ========================================================================== */
.novedades-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 50px 30px; 
    margin-bottom: 60px;
}

.novedades-card { 
    display: flex; 
    flex-direction: column; 
    text-decoration: none; 
}

.nc-image-wrap {
    position: relative; 
    width: 100%; 
    aspect-ratio: 4/3; 
    border-radius: 12px;
    overflow: hidden; 
    margin-bottom: 20px; 
    background-color: #ddd;
    border: 1px solid transparent; 
    transition: transform 0.3s ease;
}

.nc-image-wrap img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.6s ease; 
}

.novedades-card:hover .nc-image-wrap img { transform: scale(1.05); }

/* Borde arcoíris solo en la imagen */
.nc-image-wrap::after {
    content: ""; position: absolute; inset: -2px; border-radius: inherit;
    background: conic-gradient(from var(--rainbow-angle), var(--rb-1), var(--rb-2), var(--rb-3), var(--rb-4), var(--rb-5), var(--rb-1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude; padding: 2px;
    pointer-events: none; opacity: 0; transition: opacity 0.3s ease; z-index: 10;
}

.novedades-card:hover .nc-image-wrap::after { opacity: 1; animation: spinRainbow 2.5s linear infinite; }
.novedades-card:hover .nc-image-wrap { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,0.06); }

/* Etiquetas sobre la imagen */
.nc-cat {
    position: absolute; top: 16px; left: 16px; background: var(--text-light);
    color: var(--text-dark); padding: 6px 12px; border-radius: 50px;
    font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; z-index: 2;
}

.nc-date-badge {
    position: absolute; top: 16px; right: 16px; background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-light); padding: 8px 12px; border-radius: 8px;
    display: flex; flex-direction: column; align-items: center; line-height: 1; z-index: 2;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.nc-date-badge .nc-m { font-size: 0.6rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 4px; }
.nc-date-badge .nc-d { font-family: var(--font-heading); font-size: 1.4rem; font-weight: 400; }

/* Textos de la tarjeta */
.nc-title { font-family: var(--font-heading); font-size: 1.4rem; font-weight: 400; color: var(--text-dark); margin-bottom: 12px; line-height: 1.3; }
.nc-excerpt { font-size: 0.95rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 20px; flex: 1; }
.nc-excerpt p { margin: 0; }

.nc-read-more { 
    font-size: 0.75rem; color: var(--accent-red); font-weight: 700; 
    text-transform: uppercase; letter-spacing: 0.1em; display: inline-flex; 
    align-items: center; gap: 6px; transition: opacity 0.3s; 
}
.novedades-card:hover .nc-read-more { opacity: 0.7; }

/* Responsive */
@media (max-width: 1200px) {
    .novedades-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 30px; }
}
@media (max-width: 576px) {
    .novedades-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ==========================================================================
   SINGLE POST LAYOUT
   ========================================================================== */
.single-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 80px;
    padding-top: 150px; 
    padding-bottom: 100px;
}

/* --- Contenido Principal --- */
.post-main { width: 100%; max-width: 900px; }
.post-header { margin-bottom: 30px; }

.post-tag {
    display: inline-flex; align-items: center; font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.15em; color: var(--accent-red); margin-bottom: 16px;
}
.post-tag::before { content: ''; display: block; width: 30px; height: 1px; background-color: currentColor; margin-right: 12px; }

.post-title { font-family: var(--font-heading); font-size: 3.5rem; font-weight: 400; line-height: 1.15; color: var(--text-dark); margin-bottom: 24px; letter-spacing: -0.01em; }

.post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; font-size: 0.85rem; color: var(--text-muted); border-bottom: 1px solid var(--border-light); padding-bottom: 24px; }
.post-meta span { display: flex; align-items: center; gap: 8px; }
.post-meta .author { font-weight: 600; color: var(--text-dark); }

.post-featured-image { width: 100%; border-radius: 16px; overflow: hidden; margin-bottom: 40px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.post-featured-image img { width: 100%; aspect-ratio: 21/9; object-fit: cover; }

/* --- Textos nativos del Editor de WordPress --- */
.post-content { font-size: 1.1rem; line-height: 1.8; color: var(--text-body); }
.post-content p { margin-bottom: 24px; }
.post-content h2 { font-family: var(--font-heading); font-size: 2.2rem; font-weight: 400; color: var(--text-dark); margin: 48px 0 24px; line-height: 1.2; }
.post-content h3 { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 400; color: var(--text-dark); margin: 32px 0 16px; }
.post-content ul, .post-content ol { margin-bottom: 24px; padding-left: 20px; }
.post-content li { margin-bottom: 10px; }

.post-content blockquote {
    font-family: var(--font-heading); font-size: 1.5rem; font-style: italic; line-height: 1.5;
    color: var(--accent-red); border-left: 4px solid var(--accent-red); padding: 10px 0 10px 30px;
    margin: 40px 0; background: rgba(213, 108, 115, 0.03); border-radius: 0 12px 12px 0;
}

/* Soporte para galerías nativas e iframes (Mapas) */
.post-content .wp-block-gallery { margin: 40px 0; gap: 20px; }
.post-content .wp-block-image img { border-radius: 12px; }

/* ==========================================================================
   SIDEBAR (Posteos laterales)
   ========================================================================== */
.sidebar-widget { position: sticky; top: 130px; }
.sidebar-title {
    font-family: var(--font-heading); font-size: 1.5rem; font-weight: 400; color: var(--text-dark);
    margin-bottom: 30px; border-bottom: 1px solid var(--border-light); padding-bottom: 16px; display: flex; align-items: center; gap: 12px;
}
.sidebar-title::after { content: ''; flex: 1; height: 1px; background-color: var(--border-light); }

.sidebar-card { display: flex; gap: 16px; background-color: #FFFFFF; border: 1px solid var(--border-light); border-radius: 12px; padding: 12px; margin-bottom: 20px; text-decoration: none; color: inherit; }
.sidebar-img { width: 100px; height: 100px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.sidebar-img img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-info { display: flex; flex-direction: column; justify-content: center; }

.sidebar-cat { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent-red); margin-bottom: 8px; }
.sidebar-post-title { font-family: var(--font-heading); font-size: 1.1rem; line-height: 1.3; color: var(--text-dark); margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sidebar-date { font-size: 0.7rem; color: var(--text-muted); font-weight: 500; }

/* Rainbow Hover Sidebar */
.card-rainbow-hover { position: relative; z-index: 1; border: 1px solid transparent; transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s; }
.card-rainbow-hover:hover { border-color: transparent !important; transform: translateY(-3px); box-shadow: 0 10px 25px rgba(0,0,0,0.06); }
.card-rainbow-hover::after {
    content: ""; position: absolute; inset: -1px; border-radius: inherit;
    background: conic-gradient(from var(--rainbow-angle), var(--rb-1), var(--rb-2), var(--rb-3), var(--rb-4), var(--rb-5), var(--rb-1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; padding: 1px;
    pointer-events: none; opacity: 0; transition: opacity 0.3s ease; z-index: -1;
}
.card-rainbow-hover:hover::after { opacity: 1; animation: spinRainbow 2.5s linear infinite; }

/* ==========================================================================
   RESPONSIVE DESIGN SINGLE POST
   ========================================================================== */
@media (max-width: 1200px) {
    .single-layout { grid-template-columns: 1fr 320px; gap: 40px; }
    .post-title { font-size: 3rem; }
}
@media (max-width: 992px) {
    .single-layout { grid-template-columns: 1fr; gap: 60px; padding-top: 120px; }
    .sidebar-widget { position: static; }
}
@media (max-width: 576px) {
    .post-title { font-size: 2.2rem; }
    .post-content h2 { font-size: 1.8rem; }
    .post-meta { flex-direction: column; align-items: flex-start; gap: 10px; }
    .post-featured-image img { aspect-ratio: 16/9; }
}


/* ==========================================================================
   SINGLE VIDEO LAYOUT
   ========================================================================== */
.single-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 60px;
    padding-top: 130px; 
    padding-bottom: 100px;
}

.post-main { width: 100%; max-width: 1000px; }

/* --- Reproductor de YouTube --- */
.video-player-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* Aspect Ratio 16:9 */
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 32px;
    background-color: #000;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

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

/* --- Información del Video --- */
.post-header { margin-bottom: 30px; }
.post-tag {
    display: inline-flex; align-items: center; font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.15em; color: var(--accent-green); margin-bottom: 16px;
}
.post-tag::before { content: ''; display: block; width: 30px; height: 1px; background-color: currentColor; margin-right: 12px; }

.post-title { font-family: var(--font-heading); font-size: 2.8rem; font-weight: 400; line-height: 1.2; color: var(--text-dark); margin-bottom: 24px; }

.post-meta { display: flex; align-items: center; gap: 20px; font-size: 0.85rem; color: var(--text-muted); border-bottom: 1px solid var(--border-light); padding-bottom: 24px; }
.post-meta span { display: flex; align-items: center; gap: 8px; }

.post-content { font-size: 1.05rem; line-height: 1.8; color: var(--text-body); }
.post-content p { margin-bottom: 20px; }
.post-content h3 { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 400; color: var(--text-dark); margin: 32px 0 16px; }

/* ==========================================================================
   SIDEBAR (Siguientes Videos)
   ========================================================================== */
.sidebar-widget { position: sticky; top: 110px; }
.sidebar-title {
    font-family: var(--font-heading); font-size: 1.5rem; font-weight: 400; color: var(--text-dark);
    margin-bottom: 24px; border-bottom: 1px solid var(--border-light); padding-bottom: 16px; display: flex; align-items: center; gap: 12px;
}
.sidebar-title::after { content: ''; flex: 1; height: 1px; background-color: var(--border-light); }

.sidebar-video-card {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
    text-decoration: none;
    background-color: #1a1a1a;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sidebar-video-card img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease;
}

.sv-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
    transition: opacity 0.3s; z-index: 1;
}

.mini-play-btn {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 45px; height: 45px; background: rgba(255,255,255,0.15); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    border-radius: 50%; display: flex; justify-content: center; align-items: center; border: 1px solid rgba(255,255,255,0.4);
    color: #fff; transition: transform 0.3s, background 0.3s, border-color 0.3s; z-index: 2;
}

.sv-info { position: absolute; bottom: 16px; left: 16px; right: 16px; z-index: 2; }

.sidebar-post-title {
    font-family: var(--font-heading); font-size: 1.15rem; font-weight: 400; line-height: 1.25; color: var(--text-light);
    margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.sidebar-meta {
    font-size: 0.65rem; color: rgba(255,255,255,0.8); font-weight: 600; display: flex; gap: 6px; align-items: center; text-transform: uppercase; letter-spacing: 0.05em;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}
.sidebar-meta .cat-name { color: var(--accent-green); font-weight: 700; }

/* Efectos Hover */
.sidebar-video-card:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(0,0,0,0.15); }
.sidebar-video-card:hover img { transform: scale(1.05); }
.sidebar-video-card:hover .mini-play-btn { transform: translate(-50%, -50%) scale(1.1); background: rgba(255,255,255,0.25); border-color: var(--accent-green); }

/* Borde Arcoíris */
.sidebar-video-card::after {
    content: ""; position: absolute; inset: -1px; border-radius: inherit;
    background: conic-gradient(from var(--rainbow-angle), var(--rb-1), var(--rb-2), var(--rb-3), var(--rb-4), var(--rb-5), var(--rb-1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; padding: 2px;
    pointer-events: none; opacity: 0; transition: opacity 0.3s ease; z-index: 10;
}
.sidebar-video-card:hover::after { opacity: 1; animation: spinRainbow 2.5s linear infinite; }

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1200px) {
    .single-layout { grid-template-columns: 1fr 300px; gap: 40px; }
    .post-title { font-size: 2.4rem; }
}
@media (max-width: 992px) {
    .single-layout { grid-template-columns: 1fr; gap: 60px; padding-top: 110px; }
    .sidebar-widget { position: static; }
}
@media (max-width: 576px) {
    .post-title { font-size: 2rem; }
}

/* ==========================================================================
   SINGLE NOVEDADES - LAYOUT BASE
   ========================================================================== */
.single-layout {
    display: grid;
    grid-template-columns: 1fr 340px; /* Sidebar ajustado para artículos */
    gap: 70px;
    padding-top: 150px; 
    padding-bottom: 100px;
}

.post-main { width: 100%; max-width: 860px; } /* Ancho óptimo para lectura (max ~75 caracteres por línea) */

/* --- Cabezal del Artículo --- */
.post-header { margin-bottom: 40px; }
.post-tag {
    display: inline-flex; align-items: center; font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.15em; color: var(--accent-red); margin-bottom: 16px;
}
.post-tag::before { content: ''; display: block; width: 30px; height: 1px; background-color: currentColor; margin-right: 12px; }

.post-title { font-family: var(--font-heading); font-size: 3.5rem; font-weight: 400; line-height: 1.15; color: var(--text-dark); margin-bottom: 24px; letter-spacing: -0.01em; }

.post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; font-size: 0.85rem; color: var(--text-muted); border-bottom: 1px solid var(--border-light); padding-bottom: 24px; }
.post-meta span { display: flex; align-items: center; gap: 8px; }
.post-meta .author { font-weight: 600; color: var(--text-dark); }

/* --- Imagen Destacada --- */
.post-featured-image { width: 100%; border-radius: 16px; overflow: hidden; margin-bottom: 50px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.post-featured-image img { width: 100%; aspect-ratio: 21/9; object-fit: cover; }

/* ==========================================================================
   ESTILOS DEL EDITOR DE WORDPRESS (Cuerpo del texto)
   ========================================================================== */
.post-content { font-size: 1.15rem; line-height: 1.85; color: var(--text-body); }
.post-content p { margin-bottom: 28px; }

/* Títulos internos */
.post-content h2 { font-family: var(--font-heading); font-size: 2.2rem; font-weight: 400; color: var(--text-dark); margin: 56px 0 24px; line-height: 1.25; }
.post-content h3 { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 400; color: var(--text-dark); margin: 40px 0 20px; line-height: 1.3; }

/* Listas */
.post-content ul, .post-content ol { margin: 0 0 28px 0; padding-left: 24px; }
.post-content li { margin-bottom: 12px; }

/* Citas (Blockquotes) */
.post-content blockquote {
    font-family: var(--font-heading); font-size: 1.5rem; font-style: italic; line-height: 1.5;
    color: var(--accent-red); border-left: 4px solid var(--accent-red); padding: 16px 0 16px 32px;
    margin: 48px 0; background: rgba(213, 108, 115, 0.03); border-radius: 0 12px 12px 0;
}

/* Imágenes internas y Galerías */
.post-content img { border-radius: 12px; margin: 32px 0; max-width: 100%; height: auto; }
.post-content .wp-block-gallery { margin: 48px 0; gap: 20px; }
.post-content .wp-block-image img { margin: 0; }
.post-content figcaption { font-size: 0.85rem; color: var(--text-muted); text-align: center; margin-top: 12px; font-style: italic; }

/* ==========================================================================
   SIDEBAR (Tarjetas Claras con Texto Oscuro)
   ========================================================================== */
.sidebar-widget { position: sticky; top: 130px; }
.sidebar-title {
    font-family: var(--font-heading); font-size: 1.5rem; font-weight: 400; color: var(--text-dark);
    margin-bottom: 30px; border-bottom: 1px solid var(--border-light); padding-bottom: 16px; display: flex; align-items: center; gap: 12px;
}
.sidebar-title::after { content: ''; flex: 1; height: 1px; background-color: var(--border-light); }

/* Tarjeta Horizontal Clásica */
.sidebar-text-card { 
    display: flex; gap: 16px; background-color: #FFFFFF; /* Fondo Blanco */
    border: 1px solid var(--border-light); border-radius: 12px; 
    padding: 12px; margin-bottom: 20px; text-decoration: none; 
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.st-img { width: 100px; height: 100px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.st-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }

.st-info { display: flex; flex-direction: column; justify-content: center; }

/* Textos oscuros */
.st-cat { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent-red); margin-bottom: 8px; }
.st-title { font-family: var(--font-heading); font-size: 1.1rem; line-height: 1.35; color: var(--text-dark); margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.st-date { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }

/* Efecto Hover (Rainbow Border) */
.card-rainbow-hover { position: relative; z-index: 1; }
.sidebar-text-card:hover { border-color: transparent; transform: translateY(-3px); box-shadow: 0 10px 25px rgba(0,0,0,0.06); }
.sidebar-text-card:hover .st-img img { transform: scale(1.05); }

.card-rainbow-hover::after {
    content: ""; position: absolute; inset: -1px; border-radius: inherit;
    background: conic-gradient(from var(--rainbow-angle), var(--rb-1), var(--rb-2), var(--rb-3), var(--rb-4), var(--rb-5), var(--rb-1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; padding: 1px;
    pointer-events: none; opacity: 0; transition: opacity 0.3s ease; z-index: -1;
}
.card-rainbow-hover:hover::after { opacity: 1; animation: spinRainbow 2.5s linear infinite; }

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1200px) {
    .single-layout { grid-template-columns: 1fr 300px; gap: 50px; }
    .post-title { font-size: 3rem; }
}
@media (max-width: 992px) {
    .single-layout { grid-template-columns: 1fr; gap: 60px; padding-top: 120px; }
    .sidebar-widget { position: static; }
}
@media (max-width: 576px) {
    .post-title { font-size: 2.2rem; }
    .post-content h2 { font-size: 1.8rem; }
    .post-meta { flex-direction: column; align-items: flex-start; gap: 10px; }
    .post-featured-image img { aspect-ratio: 16/9; }
}

/* --- Mapa (Custom Field) --- */
.post-map { 
    width: 100%; 
    border-radius: 16px; 
    overflow: hidden; 
    margin: 30px 0 50px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); 
    border: 1px solid var(--border-light); 
    background: #eee; 
}

.post-map iframe { 
    width: 100%; 
    height: 400px; 
    display: block; 
    border: none; 
}

@media (max-width: 576px) {
    .post-map iframe { height: 300px; }
}

/* --- Separador Interno --- */
.post-divider {
    border: none;
    height: 1px;
    background-color: var(--border-light);
    margin: 60px 0 40px; /* Da aire entre el texto final del artículo y el título del mapa */
    width: 100%;
}

/* ==========================================================================
   PÁGINA DE ARCHIVO: TOQUES
   ========================================================================== */
.toques-archive {
    padding-top: 150px; /* Evita que el header fijo tape el contenido */
    padding-bottom: 100px;
    background-color: var(--bg-cream);
}

.page-header {
    margin-bottom: 60px;
    text-align: center;
}

.page-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 400;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.page-desc {
    font-size: 1.25rem;
    color: var(--text-muted);
}

/* Estilos de paginación para que queden acordes al diseño */
.pagination {
    margin-top: 80px;
    display: flex;
    justify-content: center;
    gap: 10px;
}
.pagination a, .pagination span {
    padding: 10px 18px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}
.pagination .current {
    background-color: var(--text-dark);
    color: var(--text-light);
    border-color: var(--text-dark);
}
.pagination a:hover {
    border-color: var(--text-dark);
}

/* --- Playlist de Spotify (Custom Field) --- */
.post-playlist { 
    width: 100%; 
    border-radius: 16px; 
    overflow: hidden; 
    margin: 30px 0 50px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    background: transparent;
}

.post-playlist iframe { 
    width: 100%; 
    /* Spotify suele traer su propio height (152px o 352px), con esto aseguramos que no se rompa */
    min-height: 152px; 
    display: block; 
    border: none; 
}