/* ========================================
   Carousel + Sidebar Layout
   ======================================== */

:root {
    --primary-color: #1a1a1a;
    --secondary-color: #333333;
    --accent-color: #ffd700;
    --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;
    --radius-xl: 16px;
}

* { 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: RIPPLE EFFECT */
.preloader-ripple {
    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-ripple.hidden {
    opacity: 0;
    pointer-events: none;
}
.ripple-container {
    position: relative;
    width: 100px;
    height: 100px;
    margin-bottom: 20px;
}
.ripple {
    position: absolute;
    border: 4px solid var(--primary-color);
    opacity: 1;
    border-radius: 50%;
    animation: rippleAnim 1.2s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}
.ripple:nth-child(2) {
    animation-delay: -0.6s;
}
@keyframes rippleAnim {
    0% { top: 50px; left: 50px; width: 0; height: 0; opacity: 1; }
    100% { top: 0; left: 0; width: 100px; height: 100px; opacity: 0; }
}
.preloader-logo { height: 120px; }


/* ===== HEADER ===== */
.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 ===== */
.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; margin-right: var(--space-lg); }
.breaking-ticker { flex: 1; overflow: hidden; color: white; }
.ticker-item { display: inline-block; padding: 0 var(--space-md); }

/* ===== CAROUSEL + SIDEBAR LAYOUT ===== */
/* BENTO GRID LAYOUT */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 200px;
    gap: var(--space-md);
}

.bento-item {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
}

.bento-item:hover { transform: scale(1.02); z-index: 10; }

.bento-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

.bento-item.tall {
    grid-column: span 1;
    grid-row: span 2;
}

.bento-item.wide {
    grid-column: span 2;
    grid-row: span 1;
}

.bento-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bento-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--space-md);
    color: white;
}

.bento-overlay h3 {
    font-size: 1.1rem;
    margin-bottom: var(--space-xs);
    line-height: 1.3;
}

.bento-overlay .category-badge {
    position: static;
    margin-bottom: var(--space-xs);
    width: fit-content;
}

@media (max-width: 1024px) {
    .bento-grid { grid-template-columns: repeat(2, 1fr); }
    .bento-item.large, .bento-item.wide { grid-column: span 2; }
    .bento-item.tall { grid-row: span 1; }
}

@media (max-width: 480px) {
    .bento-grid { grid-template-columns: 1fr; }
    .bento-item.large, .bento-item.wide { grid-column: span 1; }
}


/* News Grid Section */
.news-section {
    padding: var(--space-2xl) 0;
    border-top: 1px solid var(--border-color);
}

.section-title {
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: var(--space-xl);
    position: relative;
    padding-bottom: var(--space-md);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent-color);
}

.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);
    line-height: 1.3;
}

.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;
}

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

/* Footer */
.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: 120px; 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: 120px;
    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;
}

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

/* Responsive */
@media (max-width: 1024px) {
    .carousel-sidebar-layout {
        grid-template-columns: 1fr;
    }
    .carousel-sidebar {
        max-height: none;
    }
    .news-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .carousel-slide {
        height: 350px;
    }
    .carousel-overlay h2 {
        font-size: 1.5rem;
    }
    .news-grid-3 {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .carousel-slide {
        height: 280px;
    }
    .carousel-overlay h2 {
        font-size: 1.2rem;
    }
    .carousel-overlay p {
        font-size: 0.9rem;
    }
}
