/* ========================================
   Central México - 4-Column Grid Layout
   ======================================== */

:root {
    --primary-color: #004a99;
    --secondary-color: #007bff;
    --accent-color: #ffb700;
    --background-color: #f5f7fa;
    --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: 1400px; margin: 0 auto; padding: 0 var(--space-lg); }

/* PRELOADER: PROGRESS CIRCLE */
.preloader-progress-circle {
    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-progress-circle.hidden {
    opacity: 0;
    pointer-events: none;
}
.progress-ring {
    position: relative;
    margin-bottom: 20px;
}
.progress-ring-bg {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 8;
}
.progress-ring-circle {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 565.48;
    stroke-dashoffset: 565.48;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-dashoffset 0.1s linear;
}
.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: var(--font-secondary);
}
.preloader-logo {
    height: 120px;
    margin-top: 20px;
}


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

/* 4-COLUMN GRID LAYOUT STYLES */
.grid-4-layout {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

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

.grid-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.grid-card img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.grid-card:hover img {
    transform: scale(1.1);
}

.grid-card-content {
    padding: var(--space-md);
}

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

.grid-card h3 {
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.grid-card .card-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Hero Card for Grid Layout */
.hero-grid {
    grid-column: span 2;
    grid-row: span 2;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

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

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

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

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

.hero-grid-overlay h2 {
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: 800;
    margin: var(--space-sm) 0;
}

.hero-grid-overlay p {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: var(--space-md);
}

.hero-grid-meta {
    display: flex;
    gap: var(--space-lg);
    font-size: 0.85rem;
    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: 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;
}

.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: 1200px) {
    .grid-4-layout {
        grid-template-columns: repeat(3, 1fr);
    }
    .hero-grid {
        grid-column: span 3;
        grid-row: 1;
    }
}

@media (max-width: 768px) {
    .grid-4-layout {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-grid {
        grid-column: span 2;
    }
    .hero-grid-overlay h2 {
        font-size: 1.5rem;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .grid-4-layout {
        grid-template-columns: 1fr;
    }
    .hero-grid {
        grid-column: span 1;
    }
}
