/* --- ESTILOS BASE Y RESET --- */
:root {
    --brand-dark: #111827;
    --brand-blue: #0a66c2; /* Azul oficial LinkedIn */
    --brand-light-blue: #eff6ff;
    --text-main: #374151;
    --text-muted: #6b7280;
    --bg-body: #f9fafb;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* RESET CRÍTICO: Para que vídeos e imágenes no rompan el diseño */
img, video, iframe {
    max-width: 100%;
    display: block;
}
iframe { border: 0; }

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
}

/* --- LAYOUT GENERAL --- */
.wrapper { 
    max-width: 1200px; /* Ampliado para dar más aire */
    margin: 0 auto; 
    padding: 0 20px; 
}

/* Header */
.site-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    position: sticky;
    top: 0; z-index: 100;
}
.site-header .wrapper { display: flex; justify-content: space-between; align-items: center; }
.logo-area { font-size: 1.5rem; font-weight: 700; color: var(--brand-dark); }
.logo-area strong { color: var(--brand-blue); }
nav a { color: var(--text-muted); text-decoration: none; margin-left: 20px; font-weight: 500; }
nav a:hover { color: var(--brand-blue); }

/* Main Grid: Sidebar ampliado a 360px */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 360px; /* Sidebar más ancho para el vídeo */
    gap: 40px;
    margin-top: 40px; margin-bottom: 60px;
}

/* Typography */
.post-header h1 { font-size: 2.2rem; color: var(--brand-dark); line-height: 1.2; margin-bottom: 15px; }
.post-header p { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 30px; }

/* --- GAME BOARD (TABLERO DE JUEGO) --- */
.game-board {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow-md);
    margin-bottom: 40px;
    position: relative; overflow: hidden;
}

/* Blur & Reveal Logic */
.blur-effect {
    filter: blur(12px); -webkit-filter: blur(12px);
    pointer-events: none; user-select: none;
    opacity: 0.4; transition: all 0.5s ease;
}
.spoiler-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    z-index: 10; background: rgba(255,255,255,0.1);
}
.btn-reveal {
    background: var(--brand-blue); color: white; border: none; padding: 15px 30px;
    font-size: 1.2rem; font-weight: 800; text-transform: uppercase;
    border-radius: 50px; cursor: pointer;
    box-shadow: 0 4px 15px rgba(10, 102, 194, 0.4);
    animation: pulse 2s infinite;
}
.btn-reveal:hover { background: #004182; transform: scale(1.05); }

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(10, 102, 194, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(10, 102, 194, 0); }
    100% { box-shadow: 0 0 0 0 rgba(10, 102, 194, 0); }
}

/* Card Internals */
.board-header { text-align: center; margin-bottom: 25px; border-bottom: 2px solid var(--bg-body); padding-bottom: 20px; }
.label { text-transform: uppercase; font-size: 0.8rem; font-weight: 700; color: var(--text-muted); }
.category-reveal { font-size: 1.8rem; color: var(--brand-blue); margin-top: 5px; }

.clues-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; }
.clue-card {
    background: var(--brand-light-blue); padding: 20px; border-radius: 12px;
    text-align: center; border: 1px solid rgba(10, 102, 194, 0.1);
}
.clue-number { display: block; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 5px; }
.clue-text { font-weight: 600; color: var(--brand-dark); font-size: 1.1rem; }

.action-area { margin-top: 25px; text-align: center; border-top: 1px solid #e5e7eb; padding-top: 20px; }
.btn-details, .btn-play-external {
    display: inline-block; background: transparent;
    border: 2px solid var(--brand-blue); color: var(--brand-blue);
    padding: 10px 20px; border-radius: 8px;
    text-decoration: none; font-weight: 700; transition: all 0.2s;
}
.btn-details:hover, .btn-play-external:hover { background: var(--brand-blue); color: white; }

/* --- CONTENIDO SEO (Rich Content) --- */
.rich-content { margin-top: 40px; }
.seo-article { margin-bottom: 40px; padding-bottom: 20px; border-bottom: 1px solid #eee; }
.seo-article h2 { font-size: 1.5rem; color: var(--brand-dark); margin-bottom: 15px; }

/* Listas SEO Bonitas */
.seo-list { list-style: none; padding: 0; margin: 20px 0; }
.seo-list li { position: relative; padding-left: 25px; margin-bottom: 15px; color: var(--text-main); line-height: 1.6; }
.seo-list li::before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--brand-blue); font-weight: bold; }
.seo-list strong { color: var(--brand-dark); }

.faq-container h2 { font-size: 1.5rem; margin-bottom: 20px; }
.faq-item { background: var(--card-bg); border: 1px solid var(--border-color); padding: 20px; border-radius: 8px; margin-bottom: 15px; }
.faq-item h3 { font-size: 1.1rem; margin-bottom: 10px; color: var(--brand-dark); }

/* --- SIDEBAR WIDGETS --- */
.widget { background: var(--card-bg); padding: 25px; border-radius: 12px; border: 1px solid var(--border-color); margin-bottom: 25px; }
.widget h3 { font-size: 1rem; text-transform: uppercase; color: var(--text-muted); margin-bottom: 15px; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; }

/* --- 1. WIDGET VIDEO (CORREGIDO FINAL) --- */

.sidebar-video-widget {
    background: #ffffff;
    border-radius: 12px;
    
    /* ESTO ES CRÍTICO: Corta cualquier cosa que intente salirse */
    overflow: hidden; 
    
    margin-bottom: 25px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    
    /* Sin padding para que llegue a los bordes */
    padding: 0 !important; 
    
    /* Aseguramos que el widget nunca sea más ancho que el sidebar */
    width: 100%;
    max-width: 100%;
}

.sidebar-video-header {
    padding: 12px 15px;
    border-bottom: 1px solid #f3f4f6;
    background: #f9fafb;
}

.sidebar-video-header h3 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-video-header h3::before {
    content: '▶';
    color: #ef4444;
    font-size: 0.7rem;
}

/* El Contenedor que mantiene el ratio 16:9 */
.sidebar-video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* Ratio 16:9 */
    height: 0;
    background: #000;
}

/* EL IFRAME FORZADO */
.sidebar-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    
    /* Forzamos al 100% del contenedor padre */
    width: 100% !important; 
    height: 100% !important;
    
    /* Seguridad extra: nunca superar el 100% */
    max-width: 100% !important; 
    
    border: none;
    display: block;
}

.sidebar-video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 0.8rem;
    background: #111;
}

/* 2. WIDGET COUNTDOWN */
.countdown-widget {
    background: linear-gradient(135deg, #0a66c2 0%, #004182 100%);
    color: #ffffff;
    padding: 25px 20px;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 10px 15px -3px rgba(10, 102, 194, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.countdown-widget h2 { font-size: 1rem; font-weight: 700; text-transform: uppercase; margin: 0 0 10px 0; color: rgba(255, 255, 255, 0.9); }
.next-id-highlight { color: #ffffff; font-weight: 900; border-bottom: 2px solid rgba(255,255,255,0.3); }
.sidebar-timer {
    font-family: 'Outfit', monospace;
    font-size: 2.2rem; font-weight: 800; color: #ffffff;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px; border-radius: 8px;
    display: inline-block; width: 100%;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.countdown-note { font-size: 0.75rem; opacity: 0.7; margin-top: 8px; display: block; }

/* 3. WIDGET ARCHIVE (Teasers) */
.archive-feed { display: flex; flex-direction: column; gap: 12px; }
.archive-card-link { text-decoration: none; display: block; color: inherit; }
.archive-teaser {
    background: #ffffff; border: 1px solid #e5e7eb; border-radius: 10px;
    padding: 15px; display: flex; justify-content: space-between; align-items: center;
    transition: all 0.2s ease;
}
.archive-teaser:hover { border-color: var(--brand-blue); transform: translateX(4px); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1); }
.teaser-left { display: flex; flex-direction: column; }
.teaser-id { font-weight: 800; font-size: 1.1rem; color: var(--brand-dark); }
.teaser-date { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.teaser-right { display: flex; align-items: center; }
.teaser-btn {
    background: var(--brand-light-blue); color: var(--brand-blue);
    font-size: 0.75rem; font-weight: 700; padding: 5px 12px;
    border-radius: 20px; text-transform: uppercase; transition: background 0.2s;
}
.archive-teaser:hover .teaser-btn { background: var(--brand-blue); color: white; }

/* Footer */
.site-footer { text-align: center; padding: 40px 0; border-top: 1px solid var(--border-color); color: var(--text-muted); font-size: 0.9rem; }

/* Mobile */
@media (max-width: 900px) {
    .main-grid { grid-template-columns: 1fr; }
    .wrapper { padding: 0 15px; }
}