/*
Theme Name: Sin Límite de Tiempo Premium
Theme URI: http://example.com/sin-limite
Author: AI Assistant
Description: Tema premium para portal de noticias, estilo MTP Noticias.
Version: 3.0
License: GNU General Public License v2 or later
Text Domain: sin-limite-theme
*/

:root {
  --color-rojo: #D32F2F;
  --color-guinda: #B71C1C;
  --color-azul-marino: #000000;
  --color-blanco: #FFFFFF;
  --color-negro: #111111;
  --color-gris-fondo: #F4F6F8;
  --color-gris-texto: #4A4A4A;
  --color-borde: #E2E8F0;
  
  --font-titulos: 'Outfit', sans-serif;
  --font-texto: 'Inter', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-texto);
  background-color: var(--color-gris-fondo);
  color: var(--color-negro);
  line-height: 1.6;
}

/* Tipografía */
h1, h2, h3, h4 { font-family: var(--font-titulos); font-weight: 800; line-height: 1.2; }
a { color: var(--color-guinda); text-decoration: none; transition: all 0.3s ease; }
a:hover { color: var(--color-rojo); }

.container { max-width: 1280px; width: 100%; margin: 0 auto; padding: 0 20px; box-sizing: border-box; }
.main-content, .sidebar, .main-grid > div { min-width: 0; }
img, iframe, video { max-width: 100%; }

/* Barra Superior (Fecha y Redes) */
.top-bar { background-color: var(--color-negro); color: #fff; padding: 5px 0; font-size: 12px; }
.top-bar .container { display: flex; justify-content: space-between; align-items: center; }
.top-bar-date { font-weight: 500; }
.top-bar-social { display: flex; gap: 15px; }
.top-bar-social a { color: #fff; font-size: 14px; transition: 0.3s; }
.top-bar-social a:hover { color: var(--color-rojo); transform: scale(1.1); }

/* Header & Nav */
.site-header { background: var(--color-blanco); position: sticky; top: 0; z-index: 1000; box-shadow: 0 4px 20px rgba(0,0,0,0.05); }
.header-top { display: flex; justify-content: space-between; align-items: center; padding: 0; }
.site-logo { display: flex; align-items: center; gap: 15px; }
.site-logo img { max-height: 140px; width: auto; max-width: 100%; }
.site-logo h1 { font-size: 28px; color: var(--color-negro); text-transform: uppercase; letter-spacing: -1px; margin: 0; }
.site-logo h1 span { color: var(--color-rojo); }

.ad-banner-header { width: 70%; height: 120px; display: flex; justify-content: flex-end; align-items: center; color: #888; font-size: 12px; overflow: hidden; background: transparent; border: none; }
.ad-banner-header > div { width: 100%; height: 100%; }

.main-navigation { background: var(--color-azul-marino); border-top: 4px solid var(--color-guinda); }
.main-navigation ul { list-style: none; display: flex; justify-content: center; margin: 0; padding: 0; }
.main-navigation li a { display: block; padding: 14px 20px; color: var(--color-blanco); font-family: var(--font-titulos); font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: 0.5px; position: relative; }
.main-navigation li a:hover { background: var(--color-guinda); }

/* Anuncios solo móvil */
.mobile-only-ad { display: none; width: 100%; margin-bottom: 30px; text-align: center; overflow: hidden; }

/* LAYOUT MTP NOTICIAS (Main Grid) */
.main-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; margin-top: 30px; }

/* Contenido Principal (Izquierda) */
.main-content { display: flex; flex-direction: column; gap: 30px; }

/* Hero Post */
.hero-post { position: relative; border-radius: 8px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.hero-post img { width: 100%; height: 500px; object-fit: cover; display: block; transition: transform 0.5s ease; }
.hero-post:hover img { transform: scale(1.03); }
.hero-overlay { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 50%, transparent 100%); padding: 40px 30px; color: var(--color-blanco); pointer-events: none; }
.hero-overlay h2 { font-size: 38px; color: #fff; margin-bottom: 10px; text-shadow: 2px 2px 4px rgba(0,0,0,0.6); pointer-events: auto; }
.hero-overlay p { color: #eee; font-size: 16px; margin-bottom: 0; }
.cat-badge { background: var(--color-rojo); color: #fff; padding: 5px 12px; font-size: 11px; font-weight: 800; text-transform: uppercase; border-radius: 3px; display: inline-block; margin-bottom: 10px; pointer-events: auto; }

/* Mosaico Inferior (4 Notas) */
.mosaic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.mosaic-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 3px 10px rgba(0,0,0,0.05); transition: transform 0.2s; display: flex; flex-direction: column; }
.mosaic-card:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.mosaic-card .img-wrapper { height: 180px; overflow: hidden; }
.mosaic-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.mosaic-card:hover img { transform: scale(1.05); }
.mosaic-card-content { padding: 15px; display: flex; flex-direction: column; flex: 1; }
.mosaic-card-content h3 { font-size: 18px; margin-top: 5px; color: var(--color-negro); }
.ad-sidebar { width: 100%; min-height: 250px; display: flex; align-items: center; justify-content: center; margin-bottom: 30px; overflow: hidden; background: transparent; border: none; }
.ad-sidebar > div { width: 100%; height: 100%; }
.ad-img { width: 100%; height: 100%; object-fit: contain; }

/* Columna Derecha (Más Leídas & Ads) */
.sidebar { display: flex; flex-direction: column; gap: 30px; }
.sidebar-widget { background: #fff; padding: 25px; border-radius: 8px; box-shadow: 0 3px 10px rgba(0,0,0,0.05); border-top: 4px solid var(--color-azul-marino); }
.sidebar-title { font-size: 22px; text-transform: uppercase; margin-bottom: 20px; color: var(--color-negro); position: relative; padding-bottom: 10px; }
.sidebar-title::after { content: ''; position: absolute; left: 0; bottom: 0; width: 50px; height: 3px; background: var(--color-rojo); }

.trending-list { list-style: none; }
.trending-item { display: flex; gap: 15px; margin-bottom: 20px; border-bottom: 1px solid var(--color-borde); padding-bottom: 15px; }
.trending-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.trending-number { font-family: var(--font-titulos); font-size: 36px; font-weight: 900; color: #E2E8F0; line-height: 1; }
.trending-content h4 { font-size: 15px; margin: 0; }
.trending-content h4 a { color: var(--color-negro); }
.trending-content h4 a:hover { color: var(--color-guinda); }

.sidebar-ad { background: #f0f0f0; display: flex; justify-content: center; align-items: center; border: 1px dashed #ccc; color: #888; font-size: 12px; margin: 20px 0; overflow: hidden; }
.sidebar-ad-300x250 { width: 100%; height: 250px; }
.sidebar-ad-300x600 { width: 100%; height: 600px; }

/* Categorías Secciones (Ej. Nacional, Seguridad) */
.section-block { margin-top: 50px; }
.section-title { font-size: 28px; text-transform: uppercase; border-bottom: 2px solid var(--color-guinda); margin-bottom: 25px; padding-bottom: 5px; color: var(--color-negro); }
.section-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* Desktop classes for layout */
.site-logo { width: 30%; }
.hero-image-wrapper { position: relative; width: 100%; height: 450px; }
.hero-img-cover { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.list-post-item { display: flex; gap: 20px; }
.list-post-thumb { flex: 0 0 250px; height: 150px; border-radius: 4px; overflow: hidden; }

/* Responsive */
@media (max-width: 1024px) {
  .main-grid { grid-template-columns: 1fr; }
  .section-grid { grid-template-columns: repeat(2, 1fr); }
  .sidebar { flex-direction: row; flex-wrap: wrap; }
  .sidebar-widget, .sidebar-ad { flex: 1; min-width: 300px; }
}
@media (max-width: 768px) {
  html, body { overflow-x: hidden; width: 100%; position: relative; }
  .header-top { flex-direction: column; gap: 15px; }
  .site-logo { width: 100%; text-align: center; display: flex; justify-content: center; }
  .site-logo img { max-height: 120px; object-fit: contain; }
  .ad-banner-header { width: 100%; height: auto; min-height: 50px; }
  .main-navigation ul { justify-content: center; flex-wrap: wrap; overflow-x: visible; }
  .main-navigation li a { padding: 10px 12px; font-size: 13px; white-space: nowrap; }
  
  .mobile-only-ad { display: block; }
  .sidebar .ad-sidebar { display: none; }
  
  .mosaic-grid, .section-grid { grid-template-columns: 1fr; }
  .hero-post img { height: 350px; }
  .hero-overlay h2 { font-size: 26px; }
  .sidebar { flex-direction: column; }
  
  .hero-image-wrapper { height: auto; aspect-ratio: 16/9; }
  .list-post-item { flex-direction: column; gap: 10px; }
  .list-post-thumb { flex: none; width: 100%; height: auto; aspect-ratio: 16/9; }
}
