/* ========================================
   Actualidad Sin Fronteras - Base Styles
   ======================================== */

:root {
    --text-color: #134e4a;
    --text-muted: #2dd4bf;
    --border-color: #99f6e4;
    --card-bg: #ffffff;
    --background-color: #ecfeff;
    --site-primary: #0e7490;
    --site-secondary: #2dd4bf;
    --site-light: #99f6e4;
    --site-bg: #ecfeff;
    --site-text: #134e4a;

    --font-primary: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-secondary: 'DM Sans', 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(14, 116, 144, 0.08);
    --shadow-md: 0 4px 6px rgba(14, 116, 144, 0.1);
    --shadow-lg: 0 10px 20px rgba(14, 116, 144, 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-primary); background: var(--background-color); color: var(--text-color); line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: all 0.3s ease; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--space-lg); }

/* Responsive container */
@media (max-width: 768px) {
    .container { padding: 0 var(--space-md); }
}

/* Card base styles */
.news-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}
.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.news-card .news-content {
    padding: var(--space-md);
}
.news-card .news-category {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--site-primary);
    margin-bottom: 8px;
}
.news-card .news-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-color);
    line-height: 1.3;
}
.news-card .news-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Hero card */
.hero-card {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-lg);
}
.hero-card img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}
.hero-card .hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-xl);
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
}
.hero-card .hero-content h2 {
    font-size: 1.8em;
    margin-bottom: var(--space-sm);
}

/* News grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
}

/* Main content */
.main-content {
    padding: var(--space-xl) 0;
}

/* News section */
.news-section {
    padding: var(--space-xl) 0;
}

/* Loader */
#site-preloader {
    position: fixed; inset: 0; background: var(--bg); z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    flex-direction: column; transition: opacity 0.5s, visibility 0.5s;
}
#site-preloader.hidden { opacity: 0; visibility: hidden; }
.loader {
    width: 48px; height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--site-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Header */
#site-header {
    background: linear-gradient(135deg, var(--site-primary) 0%, var(--site-secondary) 100%);
    padding: var(--space-md) 0;
}

/* Footer */
#site-footer {
    background: linear-gradient(180deg, var(--text-color) 0%, var(--site-primary) 100%);
    color: rgba(255,255,255,0.85);
    padding: 50px 20px 30px;
    text-align: center;
    margin-top: 60px;
}

/* Section title */
.section-title {
    font-size: 1.5em;
    margin-bottom: 24px;
    color: var(--text-color);
    font-weight: 800;
    position: relative;
    padding-bottom: 10px;
    text-align: center;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 4px;
    background: var(--site-primary);
    border-radius: 2px;
}

/* Category badge */
.category-tag {
    display: inline-block;
    background: var(--site-light);
    color: var(--site-primary);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

/* Button */
.btn-primary {
    display: inline-block;
    padding: 12px 28px;
    background: var(--site-primary);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 700;
    transition: all 0.3s;
    border: 2px solid var(--site-primary);
    margin-top: 8px;
}
.btn-primary:hover {
    background: transparent;
    color: var(--site-primary);
}

/* Latest container for hero articles */
#latest-container {
    margin-bottom: var(--space-xl);
}
#latest-container .hero-card {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-lg);
}
#latest-container .hero-card img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    transition: transform 0.3s ease;
}
#latest-container .hero-card:hover img {
    transform: scale(1.02);
}
#latest-container .hero-card .hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-xl);
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
    color: white;
}
#latest-container .hero-card .hero-content h2 {
    font-size: 1.8em;
    margin-bottom: var(--space-sm);
    font-weight: 800;
    line-height: 1.2;
}
#latest-container .hero-card .hero-content p {
    font-size: 1rem;
    opacity: 0.9;
}
