/* ========================================
   Nodo Informativo - Custom Styles
   Layout: masonry
   ======================================== */

:root {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --accent-color: #06b6d4;
    --background-color: #f1f5f9;
    --card-bg: #ffffff;
    --text-color: #1a1a1a;
    --text-muted: #666666;
    --border-color: #e0e0e0;
    --hover-bg: #f5f5f5;
    
    --cat-nacional: #dc3545;
    --cat-politica: #007bff;
    --cat-economia: #28a745;
    --cat-deportes: #fd7e14;
    --cat-cultura: #6f42c1;
    --cat-destacado: #e74c3c;
    
    --font-primary: 'Merriweather', serif;
    --font-secondary: 'Inter', sans-serif;
    
    --space-xs: 0.25rem; --space-sm: 0.5rem; --space-md: 1rem;
    --space-lg: 1.5rem; --space-xl: 2rem; --space-2xl: 3rem;
    
    --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: 1400px; margin: 0 auto; padding: 0 var(--space-lg); }

/* PRELOADER: WAVE ANIMATION */
.preloader-wave {
    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.5s ease;
}
.preloader-wave.hidden {
    opacity: 0;
    pointer-events: none;
}
.wave-container {
    display: flex;
    gap: 5px;
    height: 40px;
    align-items: center;
    margin-bottom: 20px;
}
.wave-bar {
    width: 4px;
    height: 10px;
    background: var(--primary-color);
    animation: waveAnim 1.2s ease-in-out infinite;
}
.wave-bar:nth-child(1) { animation-delay: 0s; }
.wave-bar:nth-child(2) { animation-delay: 0.1s; }
.wave-bar:nth-child(3) { animation-delay: 0.2s; }
.wave-bar:nth-child(4) { animation-delay: 0.3s; }
.wave-bar:nth-child(5) { animation-delay: 0.4s; }
@keyframes waveAnim {
    0%, 100% { height: 10px; opacity: 0.3; }
    50% { height: 40px; opacity: 1; }
}
.preloader-logo {
    height: 110px;
}


.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); }
.site-logo { height: 50px; width: auto; object-fit: contain; }
.logo-section { display: flex; align-items: center; gap: var(--space-md); }
/* DEPRECATED: .logo-icon { width: 50px; height: 50px; background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; color: white; font-size: 1.5rem; } */
.site-title { font-family: var(--font-primary); font-size: 1.8rem; font-weight: 800; color: var(--primary-color); line-height: 1.2; }
.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; border-radius: var(--radius-sm); }
.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; padding: var(--space-sm); }

.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; letter-spacing: 1px; margin-right: var(--space-lg); }
.breaking-ticker { flex: 1; overflow: hidden; color: white; font-size: 0.9rem; }
.ticker-item { display: inline-block; padding: 0 var(--space-md); }

/* ALTERNATING CARDS LAYOUT */
.alternating-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2xl);
}

.alt-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
}

.alt-card:nth-child(even) {
    margin-top: var(--space-2xl);
}

.alt-card img {
    height: 250px;
    object-fit: cover;
}

.alt-card-content {
    padding: var(--space-xl);
}

@media (max-width: 768px) {
    .alternating-grid {
        grid-template-columns: 1fr;
    }
    .alt-card:nth-child(even) {
        margin-top: 0;
    }
}


.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--space-lg); }
.news-grid-3 { grid-template-columns: repeat(3, 1fr); }

.news-card { background: var(--card-bg); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform 0.3s ease, box-shadow 0.3s ease; cursor: pointer; }
.news-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.card-image-wrapper { position: relative; overflow: hidden; aspect-ratio: 16/9; }
.card-image-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.news-card:hover .card-image-wrapper img { transform: scale(1.1); }
.card-content { padding: var(--space-lg); }
.card-title { font-family: var(--font-primary); font-size: 1.2rem; font-weight: 700; margin-bottom: var(--space-sm); }
.card-title a:hover { color: var(--secondary-color); }
.card-excerpt { font-size: 0.9rem; color: var(--text-muted); margin-bottom: var(--space-md); line-height: 1.5; }
.card-footer { display: flex; justify-content: space-between; padding-top: var(--space-md); border-top: 1px solid var(--border-color); font-size: 0.8rem; color: var(--text-muted); }

.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; position: absolute; top: 10px; left: 10px; z-index: 10; }
.cat-nacional { background: var(--cat-nacional); }
.cat-politica { background: var(--cat-politica); }
.cat-economia { background: var(--cat-economia); }
.cat-deportes { background: var(--cat-deportes); }
.cat-cultura { background: var(--cat-cultura); }
.cat-destacado { background: var(--cat-destacado); }
.card-category-badge { position: absolute; }

.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; padding-left: 5px; }
.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; margin-bottom: 0.25rem; }
.disclaimer { font-size: 0.8rem; opacity: 0.6; }

@media (max-width: 1024px) { .news-grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .header-container { flex-wrap: wrap; } .main-nav { display: none; } .news-grid-3 { grid-template-columns: 1fr; } .card-hero { height: 350px; } .card-hero-title { font-size: 1.5rem; } }
@media (max-width: 480px) { .container { padding: 0 var(--space-md); } }
