/* =============================================
   INDEX.CSS — Estilos base del sitio.
   Aplica a index.html y sirve de base para
   todas las páginas mediante variables.
   ============================================= */

/* --- Variables de tema --- */
:root {
    --bg-color: #ffffff;
    --text-color: #1a1a1a;
    --header-bg: #ffffff;
    --hero-bg-gradient: linear-gradient(135deg, #1a4da1 0%, #0dccf2 100%);
    --card-bg: #f8f9fa;
    --accent-color: #0dccf2;
    --secondary-text: #666666;
    --nav-hover: #1a4da1;
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Newsreader', serif;
}

[data-theme='dark'] {
    --bg-color: #05070a;
    --text-color: #f1f5f9;
    --header-bg: #0a0f1d;
    --hero-bg-gradient: linear-gradient(135deg, #05070a 0%, #1e3a8a 100%);
    --card-bg: #111827;
    --secondary-text: #94a3b8;
    --accent-color: #38bdf8;
}

/* --- Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --- Base --- */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}



/* --- Hero (index.html únicamente) --- */
.index-hero {
    height: 60vh;
    background: var(--hero-bg-gradient);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0 10%;
    color: white;
    position: relative;
    overflow: hidden;
}

.index-hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 10vw, 3.5rem);
    max-width: 600px;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.index-hero p {
    font-size: 1.2rem;
    max-width: 700px;
    opacity: 0.9;
}

/* --- Artículos Destacados (index.html) --- */
.featured-section {
    padding: 4rem 10%;
}

.featured-section h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.article-card {
    background-color: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.article-card:hover {
    transform: translateY(-5px);
}

.article-img {
    height: 200px;
    background-color: #e2e8f0;
    width: 100%;
}

.article-content {
    padding: 1.5rem;
}

.article-content h3 {
    font-family: var(--font-heading);
    margin-bottom: 0.5rem;
}

.article-content p {
    color: var(--secondary-text);
    font-size: 0.9rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .index-hero h1 {
        font-size: 2.5rem;
    }
}