/* ========================================
   CBN Noticias - Horizontal List Layout
   ======================================== */

:root {
    --primary-color: #003366;
    --secondary-color: #0055aa;
    --accent-color: #00a8e8;
    --background-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #1a1a1a;
    --text-muted: #666666;
    --border-color: #e0e0e0;
    
    --font-primary: 'Playfair Display', serif;
    --font-secondary: 'Noto Sans', sans-serif;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.12);
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-secondary); background: var(--background-color); color: var(--text-color); line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-color); text-decoration: none; transition: all 0.3s ease; }
a:hover { color: var(--secondary-color); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--space-lg); }

/* PRELOADER: BARS LOADING */
.preloader-bars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.4s ease;
}
.preloader-bars.hidden {
    opacity: 0;
    pointer-events: none;
}
.bars-container {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    height: 60px;
    margin-bottom: 20px;
}
.bar {
    width: 10px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 4px;
    animation: barBounce 1s ease-in-out infinite;
}
.bar:nth-child(1) { animation-delay: 0s; }
.bar:nth-child(2) { animation-delay: 0.1s; }
.bar:nth-child(3) { animation-delay: 0.2s; }
.bar:nth-child(4) { animation-delay: 0.3s; }
.bar:nth-child(5) { animation-delay: 0.4s; }
@keyframes barBounce {
    0%, 100% { height: 20px; }
    50% { height: 60px; }
}
.preloader-text {
    font-family: var(--font-secondary);
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
}


.header { background: var(--card-bg); border-bottom: 3px solid var(--primary-color); position: sticky; top: 0; z-index: 1000; box-shadow: var(--shadow-md); }
.header-container { display: flex; align-items: center; gap: var(--space-lg); padding: var(--space-md) var(--space-lg); }
.logo-section { display: flex; align-items: center; gap: var(--space-md); }
.site-logo { height: 50px; width: auto; object-fit: contain; }
.site-title { font-family: var(--font-primary); font-size: 1.8rem; font-weight: 800; color: var(--primary-color); }
.tagline { font-size: 0.85rem; color: var(--text-muted); }
.main-nav { display: flex; gap: var(--space-sm); flex: 1; justify-content: center; }
.nav-link { padding: var(--space-sm) var(--space-md); font-weight: 600; font-size: 0.9rem; text-transform: uppercase; }
.nav-link:hover, .nav-link.active { background: var(--primary-color); color: white; }
.search-toggle { background: transparent; border: none; color: var(--text-color); font-size: 1.2rem; cursor: pointer; }

.breaking-news { background: var(--primary-color); display: flex; align-items: center; padding: var(--space-sm) 0; margin-top: var(--space-md); }
.breaking-label { background: var(--accent-color); color: var(--primary-color); padding: var(--space-xs) var(--space-md); font-weight: 700; font-size: 0.75rem; text-transform: uppercase; }
.breaking-ticker { flex: 1; overflow: hidden; color: white; }

.featured-section { padding: var(--space-2xl) 0; }

/* HORIZONTAL LAYOUT STYLES */
.horizontal-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    max-width: 900px;
    margin: 0 auto;
}

.horizontal-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-lg);
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.horizontal-card:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-lg);
}

.horizontal-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.horizontal-card-content {
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.horizontal-card .category-badge {
    margin-bottom: var(--space-sm);
    width: fit-content;
}

.horizontal-card h3 {
    font-family: var(--font-primary);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    line-height: 1.3;
}

.horizontal-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.horizontal-card .card-meta {
    display: flex;
    gap: var(--space-lg);
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Hero Card for Horizontal Layout */
.hero-horizontal {
    position: relative;
    height: 450px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--space-2xl);
    box-shadow: var(--shadow-lg);
}

.hero-horizontal img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-horizontal:hover img {
    transform: scale(1.05);
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-2xl);
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: white;
}

.hero-overlay .category-badge {
    background: var(--accent-color);
    color: var(--primary-color);
}

.hero-overlay h2 {
    font-family: var(--font-primary);
    font-size: 2.2rem;
    font-weight: 800;
    margin: var(--space-sm) 0;
    max-width: 800px;
}

.hero-overlay p {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: var(--space-md);
    max-width: 700px;
}

.hero-meta {
    display: flex;
    gap: var(--space-lg);
    font-size: 0.9rem;
    opacity: 0.9;
}

.footer {
    background: var(--primary-color);
    color: white;
    padding: var(--space-2xl) 0 var(--space-lg);
    margin-top: var(--space-2xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2xl);
    margin-bottom: var(--space-xl);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.footer-logo img { height: 40px; width: auto; object-fit: contain; }

.footer-logo h3 {
    font-family: var(--font-primary);
    font-size: 1.3rem;
}

.footer-about {
    font-size: 0.9rem;
    line-height: 1.7;
    opacity: 0.9;
    margin-bottom: var(--space-md);
}

.social-links {
    display: flex;
    gap: var(--space-sm);
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

.footer-column h4 {
    font-size: 1.1rem;
    margin-bottom: var(--space-md);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

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

.footer-bottom {
    padding-top: var(--space-xl);
    border-top: 1px solid rgba(255,255,255,0.2);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.85rem;
    opacity: 0.8;
}

.category-badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
    color: white;
}

.cat-nacional { background: #dc3545; }
.cat-politica { background: #007bff; }
.cat-economia { background: #28a745; }
.cat-deportes { background: #fd7e14; }
.cat-cultura { background: #6f42c1; }
.cat-destacado { background: #e74c3c; }

:root { --space-xs: 0.25rem; --space-sm: 0.5rem; --space-md: 1rem; --space-lg: 1.5rem; --space-xl: 2rem; --space-2xl: 3rem; }

@media (max-width: 768px) {
    .horizontal-card {
        grid-template-columns: 1fr;
    }
    .horizontal-card img {
        height: 250px;
    }
    .hero-horizontal {
        height: 350px;
    }
    .hero-overlay h2 {
        font-size: 1.5rem;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
}
