/* assets/css/style.css */

/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --radius: 0.625rem;
    --background: #ffffff;
    --foreground: #09090b;
    --card: #ffffff;
    --card-foreground: #09090b;
    --popover: #ffffff;
    --popover-foreground: #09090b;
    --primary: #18181b;
    --primary-foreground: #fafafa;
    --secondary: #f4f4f5;
    --secondary-foreground: #18181b;
    --muted: #f4f4f5;
    --muted-foreground: #71717a;
    --accent: #f4f4f5;
    --accent-foreground: #18181b;
    --destructive: #ef4444;
    --border: #e4e4e7;
    --input: #e4e4e7;
    --ring: #18181b;
    
    --font-sans: 'Inter', sans-serif;
    --font-serif: 'Playfair Display', serif;
}

.dark {
    /* Paleta Institucional: Deep Slate & Warm White */
    --background: #0f172a; /* Slate 900: Menos agresivo que el negro puro */
    --foreground: #e2e8f0; /* Slate 200: Blanco suave, reduce fatiga visual */
    --card: #1e293b; /* Slate 800: Para tarjetas y bloques secundarios */
    --card-foreground: #f1f5f9; /* Slate 100: Máxima claridad para lectura */
    --popover: #1e293b;
    --popover-foreground: #f1f5f9;
    --primary: #3b82f6; /* Azul corporativo para acentos */
    --primary-foreground: #ffffff;
    --secondary: #334155; /* Slate 700: Para elementos sutiles */
    --secondary-foreground: #f1f5f9;
    --muted: #1e293b;
    --muted-foreground: #94a3b8; /* Slate 400: Para metadatos y fechas */
    --accent: #1e293b;
    --accent-foreground: #f1f5f9;
    --border: rgba(148, 163, 184, 0.15); /* Slate 400 con opacidad */
    --input: rgba(148, 163, 184, 0.2);
}

/* Accesibilidad: Skip Link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: #ef4444;
    color: white;
    padding: 1rem 2rem;
    z-index: 9999;
    font-weight: 800;
    text-decoration: none;
    border-radius: 0 0 1rem 0;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
    outline: 4px solid #111827;
}

/* Visibilidad del foco para navegación por teclado */
:focus-visible {
    outline: 3px solid #3b82f6 !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.2) !important;
}

/* Reset y solución al cursor titilante (Caret) */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border-color: var(--border);
    caret-color: transparent; /* Oculta el cursor de texto en todo el sitio */
}

/* Re-habilitar el cursor solo donde es necesario escribir */
input, 
textarea, 
select, 
[contenteditable="true"], 
.ql-editor,
.ql-editor * {
    caret-color: auto !important;
}

body {
    background-color: var(--background);
    color: var(--foreground);
    font-family: var(--font-sans);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1440px; /* Ampliado de 1200px a 1440px para reducir márgenes laterales vacíos */
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Typography */
.font-serif { font-family: var(--font-serif); }
.font-bold { font-weight: 700; }
.uppercase { text-transform: uppercase; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }

h1, .text-4xl { font-size: 2.25rem; line-height: 1.1; font-weight: 700; }
h2, .text-3xl { font-size: 1.875rem; line-height: 1.2; font-weight: 700; }
h3, .text-2xl { font-size: 1.5rem; line-height: 1.3; font-weight: 700; }
.text-lg { font-size: 1.125rem; line-height: 1.6; }
.text-sm { font-size: 0.875rem; line-height: 1.5; }
.text-muted { color: var(--muted-foreground); }

/* Header & Nav */
header {
    background-color: var(--background);
    z-index: 1000;
}

/* Modo Oscuro - Ajustes Globales de Visibilidad */
.dark .footer-heading, 
.dark .footer-logo-text, 
.dark .breaking-content,
.dark .categories-nav a,
.dark .header-icons-right {
    color: #f1f5f9;
}

.dark .footer-links a,
.dark .footer-tagline,
.dark .footer-bottom p {
    color: #94a3b8;
}

.dark .footer-links a:hover {
    color: white;
}

.dark .breaking-news-header {
    background: #0f172a;
    border-color: #1e293b;
}

.dark .site-footer {
    background-color: #0f172a;
    border-top-color: #1e293b;
}

/* Mantener el fondo de CANOVI claro para que su logo sea legible */
.canovi-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.dark .canovi-container {
    background: #f1f5f9; /* Gris muy claro en modo noche */
    border-color: #334155;
}

/* Títulos de noticias adaptables */
h1, h2, h3 {
    color: var(--foreground);
}

/* Barra de Panel (Admin) */
.admin-top-bar {
    background-color: #0f172a;
    color: #94a3b8;
    font-size: 0.75rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-top-bar a {
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
    transition: color 0.2s;
}

.admin-top-bar a:hover {
    color: white;
}

/* Barra de Fecha y Clima */
.date-weather-bar {
    background-color: #020617;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.date-weather-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.institutional-nav {
    display: flex;
    gap: 1.5rem;
}

.institutional-nav a {
    color: white;
    transition: opacity 0.2s;
}

.institutional-nav a:hover {
    opacity: 0.8;
}

/* Logo Area */
.logo-container-central {
    padding: 2rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

@media (max-width: 768px) {
    .logo-container-central {
        flex-direction: column;
        padding: 1.5rem 0;
        gap: 1rem;
    }
    .header-icons-right {
        position: static !important;
        justify-content: center;
        width: 100%;
    }
}

.header-icons-right {
    position: absolute;
    right: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    color: var(--foreground);
}

.header-btn {
    background: transparent;
    border: none;
    color: inherit;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    transition: background-color 0.2s, transform 0.2s;
}

.header-btn:hover {
    background-color: var(--secondary);
    transform: scale(1.1);
}

.header-btn svg {
    width: 20px;
    height: 20px;
}

/* Transiciones para Modo Oscuro */
body, header, footer, .admin-navbar, .admin-card, .card, .date-weather-bar, .categories-nav, .site-footer, .breaking-news-header {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Header Search Styles */
.header-search-wrap {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid var(--border);
    padding: 0.5rem;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    z-index: 1001;
    width: 350px;
    margin-top: 10px;
}

.search-form-inner {
    display: flex;
    width: 100%;
    align-items: center;
}

.search-input-group {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.search-input-group input {
    width: 100%;
    border: none;
    background: var(--secondary);
    padding: 0.75rem 3rem 0.75rem 1.25rem;
    border-radius: 2rem;
    outline: none;
    font-size: 0.95rem;
    color: var(--foreground);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.search-input-group input:focus {
    background: var(--background);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.search-submit-btn {
    position: absolute;
    right: 6px;
    background: var(--primary);
    color: white !important;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.search-submit-btn:hover {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.search-submit-btn svg {
    width: 16px;
    height: 16px;
}

.header-search-wrap.active {
    display: flex;
}

.dark .header-search-wrap {
    background: var(--card);
    border-color: var(--border);
}

.header-icons-right i, .header-icons-right svg {
    width: 20px;
    height: 20px;
    cursor: pointer;
    transition: transform 0.2s;
}

.header-icons-right i:hover, .header-icons-right svg:hover {
    transform: scale(1.1);
}

/* Navigation Categories */
.categories-nav {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
}

@media (max-width: 768px) {
    .categories-nav .container {
        padding: 0;
    }
    .categories-nav nav {
        overflow-x: auto;
        white-space: nowrap;
        justify-content: flex-start !important;
        padding: 0.5rem 1.5rem;
        -webkit-overflow-scrolling: touch;
        gap: 1.5rem !important;
    }
    .categories-nav nav::-webkit-scrollbar {
        display: none;
    }
    .categories-nav .dropdown {
        flex-shrink: 0;
    }
}

.categories-nav nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    font-size: 0.85rem;
    font-weight: 800;
}

.categories-nav a {
    color: var(--foreground);
    text-transform: uppercase;
    transition: color 0.2s;
}

.categories-nav a:hover {
    color: var(--ring);
}

/* Último Momento Ticker */
.breaking-news-header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    height: 38px; /* Altura fija para consistencia absoluta */
    display: flex;
    align-items: center;
}

@keyframes breaking-blink {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.breaking-label {
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 900;
    padding: 0.2rem 0.6rem; /* Más compacto */
    border-radius: 0.2rem;
    text-transform: uppercase;
    margin-right: 1rem;
    display: inline-block;
    white-space: nowrap;
    animation: breaking-blink 1.5s ease-in-out infinite;
}

.breaking-content {
    font-size: 0.85rem;
    color: #1e293b;
    display: flex;
    align-items: center;
}

.breaking-category {
    color: #64748b;
    text-transform: uppercase;
    font-weight: 700;
    margin-right: 0.5rem;
}

/* Dropdown Categorías */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    text-transform: uppercase;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--card); /* Usar el color de tarjeta de la paleta */
    min-width: 220px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 100;
    border: 1px solid var(--border);
    border-top: none;
}

.dropdown-content a {
    color: var(--foreground); /* Asegurar que use el color de texto de la paleta */
    padding: 0.8rem 1.25rem;
    text-decoration: none;
    display: block;
    font-size: 0.75rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.dark .dropdown-content {
    background-color: #1e293b; /* Fondo específico oscuro si var(--card) no fuera suficiente */
}

.dark .dropdown-content a {
    color: #e2e8f0; /* Blanco suave para máxima legibilidad */
}

.dropdown-content a:last-child { border-bottom: none; }
.dropdown-content a:hover { background-color: var(--secondary); }

.dropdown:hover .dropdown-content { display: block; }

/* Nav Search Integrated */
.nav-search {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 2rem;
    padding: 0.2rem 1rem; /* Aumentado padding interno */
    margin-left: auto;
    width: 280px; /* Ancho aumentado de 200px a 280px */
    height: 34px; /* Altura fija para que no crezca la barra */
    transition: border-color 0.2s;
}

.nav-search:focus-within {
    border-color: var(--primary);
}

.nav-search input {
    border: none;
    background: transparent;
    padding: 0.2rem;
    font-size: 0.85rem; /* Fuente un poco más grande */
    outline: none;
    width: 100%;
}

.nav-search button {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #64748b;
    display: flex;
    align-items: center;
}

@media (max-width: 1024px) {
    .nav-search { display: none; } /* Ocultar en móviles para no romper el menú */
}

/* Grid & Cards */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }

@media (min-width: 768px) {
    .grid-md-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-md-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .logo-img { height: 8rem; }
}

@media (min-width: 1024px) {
    .grid-lg-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .grid-lg-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .grid-lg-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    
    .main-layout-grid {
        display: grid;
        grid-template-columns: 1fr 350px;
        gap: 3rem;
    }

    .main-content-area {
        /* Toma el resto del espacio (1fr) */
    }

    .sidebar-area {
        border-left: 1px solid var(--border);
        padding-left: 2.5rem;
    }}

.card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 1rem;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.01);
    text-decoration: none !important;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    border-color: var(--primary);
}

.card-image-wrapper {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 0.85rem;
    margin-bottom: 1rem;
    background-color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

.card-title {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    line-height: 1.3;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--foreground);
    transition: color 0.2s;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card:hover .card-title {
    color: var(--primary);
}

.card-excerpt {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    font-size: 0.7rem;
    color: var(--muted-foreground);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dark .card {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

.dark .card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    border-color: var(--primary);
}

.badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    font-size: 0.65rem;
    font-weight: 800;
    border-radius: 0.5rem;
    background-color: var(--primary);
    color: var(--primary-foreground);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.dark .badge {
    background-color: var(--secondary);
    color: var(--foreground);
}

/* Footer */
.site-footer {
    background-color: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 4rem 0 2rem 0;
    margin-top: auto;
}

.footer-logo-text {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e3a8a; /* Dark blue color from image */
    line-height: 1;
    margin-bottom: 0.5rem;
}

.footer-logo-text span {
    color: #ef4444; /* Red color for 'SOLO' if needed, or matched from image */
}

.footer-tagline {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    max-width: 300px;
}

.footer-heading {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #1e293b;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #64748b;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #1e293b;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.footer-social a {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    transition: opacity 0.2s;
}

.footer-social a:hover {
    opacity: 0.8;
}

.canovi-container {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.footer-bottom {
    border-top: 1px solid #e2e8f0;
    margin-top: 3rem;
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #94a3b8;
}

/* Scroll to top button */
.scroll-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    background-color: #1d4ed8;
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: transform 0.2s, background-color 0.2s;
    opacity: 0;
    visibility: hidden;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top-btn:hover {
    background-color: #1e40af;
    transform: translateY(-5px);
}

/* Custom Checkbox Captcha */
.captcha-container {
    background-color: #f9f9f9;
    border: 1px solid #d3d3d3;
    border-radius: 3px;
    width: 100%;
    max-width: 302px;
    height: 76px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    font-family: 'Roboto', 'Inter', sans-serif;
    user-select: none;
    box-shadow: 0 0 4px rgba(0,0,0,0.05);
}

@media (max-width: 400px) {
    .captcha-container {
        padding: 0 8px;
    }
    .captcha-text {
        font-size: 12px;
    }
}

.captcha-checkbox-wrapper {
    position: relative;
    width: 28px;
    height: 28px;
    margin-right: 12px;
}

.captcha-checkbox {
    width: 28px;
    height: 28px;
    border: 2px solid #c1c1c1;
    border-radius: 2px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.captcha-checkbox:hover { border-color: #b2b2b2; }

.captcha-checkbox.verified {
    border-color: transparent;
    background: transparent;
}

.captcha-checkbox.loading {
    border: 2px solid #4d90fe;
    border-top-color: transparent;
    border-radius: 50%;
    animation: captcha-spin 1s linear infinite;
    cursor: default;
}

.captcha-text {
    font-size: 14px;
    color: #2e2e2e;
    flex-grow: 1;
}

.captcha-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.captcha-logo img {
    width: 32px;
    height: 32px;
    opacity: 0.8;
}

.captcha-logo span {
    font-size: 8px;
    color: #9b9b9b;
}

.captcha-check-mark {
    display: none;
    width: 35px;
    height: 35px;
    position: absolute;
    top: -4px;
    left: -2px;
}

.captcha-checkbox.verified + .captcha-check-mark {
    display: block;
}

@keyframes captcha-spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   SISTEMA DE NOTIFICACIONES (TOASTS)
   ========================================================================== */
.toast-container {
    position: fixed;
    top: 120px;
    right: 20px;
    z-index: 999999 !important;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: #ffffff !important;
    color: #1e293b !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 12px 20px !important;
    min-width: 320px;
    max-width: 450px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    pointer-events: all !important;
    animation: toast-slide-in 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

.dark .toast {
    background: #1e293b !important;
    color: #f1f5f9 !important;
    border-color: #334155 !important;
}

.toast.success { border-left: 5px solid #10b981 !important; }
.toast.success i { color: #10b981 !important; }

.toast.error { border-left: 5px solid #ef4444 !important; }
.toast.error i { color: #ef4444 !important; }

.toast span { font-weight: 600 !important; font-size: 0.95rem !important; }

@keyframes toast-slide-in {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toast-out {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(120%); opacity: 0; }
}

/* Utilities */
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.text-muted { color: var(--muted-foreground); }
.text-xs { font-size: 0.75rem; }

/* ==========================================================================
   SISTEMA DE PUBLICIDAD (ADVERTISING SYSTEM)
   ========================================================================== */

/* Top Bar Ad */
.top-bar-ad {
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0;
    text-align: center;
}

.dark .top-bar-ad {
    background: #1e293b;
}

/* Header Ad (Billboard) */
.header-ad-wrap {
    min-height: 90px;
    background: var(--background);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Sidebar Ads */
.sidebar-area .sidebar-ad-wrapper {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.sidebar-ad-wrapper img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.sidebar-ad-wrapper:hover img {
    transform: scale(1.02);
}

/* Interscroller Ad Effect (Revealed Background) */
.interscroller-wrap {
    position: relative;
    width: 100%;
    height: 500px;
    clip-path: inset(0);
    margin: 4rem 0;
    background: #000;
}

.interscroller-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.interscroller-ad-content {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 768px) {
    .interscroller-wrap {
        height: 350px;
    }
}

/* Sticky Footer Ad */
.sticky-footer-ad {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--border);
    z-index: 9999;
    padding: 1rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    animation: slideUp 0.5s ease-out forwards;
}

.dark .sticky-footer-ad {
    background: rgba(15, 23, 42, 0.98);
}

.sticky-footer-close {
    position: absolute;
    top: -15px;
    right: 20px;
    width: 30px;
    height: 30px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 10000;
    text-decoration: none !important;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.ad-label {
    font-size: 0.65rem;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 0.25rem;
    text-align: center;
}


/* Utility Classes for Responsive Visibility */
@media (max-width: 768px) {
    .hidden-mobile {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    .hidden-tablet {
        display: none !important;
    }
}
