:root {
    --bg-color: #0f1115;
    --card-bg: #181c24;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --accent-fire: #ef4444;
    --accent-glow: rgba(239, 68, 68, 0.2);
    --border-color: #2b3240;
    --accent-orange: #f97316;
    --accent-green: #22c55e;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header / Hero */
.hero {
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.15) 0%, rgba(15, 17, 21, 0) 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 4rem 0 3.5rem;
    text-align: center;
}

.badge-alert {
    background-color: var(--accent-fire);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 1.25rem;
}

.hero h1 {
    font-family: 'Merriweather', serif;
    font-size: clamp(2.3rem, 5.5vw, 4.2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: #ffffff;
    text-shadow: 0 0 30px var(--accent-glow);
}

.subtitle {
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    color: var(--text-secondary);
    max-width: 620px;
    margin: 0 auto;
    font-weight: 300;
}

/* Header Secundario de Páginas Internas */
.page-section {
    padding-top: 2rem;
}

.page-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.page-header h1 {
    font-family: 'Merriweather', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    color: #ffffff;
    margin: 0.75rem 0 0.5rem;
}

.subtitle-page {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 680px;
    margin: 0 auto;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2.5rem 1.5rem 3.5rem;
}

.manifesto {
    background-color: var(--card-bg);
    border-left: 4px solid var(--accent-fire);
    padding: 2.25rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 2.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.manifesto h2 {
    font-family: 'Merriweather', serif;
    font-size: 1.65rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.manifesto p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.manifesto p:last-child {
    margin-bottom: 0;
}

/* Tarjetas e Interacción */
.interactive-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2.25rem;
    margin-bottom: 2rem;
}

/* Mapa Estilos */
#map {
    width: 100%;
    height: 420px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    margin-bottom: 1.25rem;
}

.map-controls {
    background-color: #0f1115;
    padding: 1.25rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    margin-bottom: 1.25rem;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.btn-play {
    background-color: var(--accent-fire);
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

#timeSlider {
    width: 100%;
    accent-color: var(--accent-fire);
    cursor: pointer;
}

.timeline-ticks {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.map-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.stat-card {
    background-color: #0f1115;
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 6px;
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent-orange);
}

.stat-title {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Formulario Calculadora */
.calculator-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.q-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.6rem;
    display: block;
}

.options-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-btn {
    background-color: #0f1115;
    border: 1px solid var(--border-color);
    padding: 0.85rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.15s;
}

.option-btn:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.btn-submit-calc {
    background-color: var(--accent-fire);
    color: #fff;
    border: none;
    padding: 0.9rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    margin-top: 0.5rem;
}

.result-box {
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.hidden { display: none; }

.gauge-bar-bg {
    width: 100%;
    height: 10px;
    background-color: #2b3240;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 0.4rem;
}

.gauge-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-green), #eab308, var(--accent-orange), var(--accent-fire));
    transition: width 0.6s ease;
}

.gauge-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.result-details {
    background-color: #0f1115;
    padding: 1.25rem;
    border-radius: 6px;
    border-left: 4px solid var(--accent-fire);
}

.result-details h4 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.result-details ul {
    margin-top: 0.5rem;
    padding-left: 1.2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Grid Info */
.grid-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 8px;
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.card ul {
    list-style-position: inside;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.card li {
    margin-bottom: 0.5rem;
}

/* News Section */
.news-section {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 2.25rem;
    border-radius: 8px;
    margin-bottom: 2.5rem;
}

.news-section h3 {
    font-family: 'Merriweather', serif;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.news-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.news-container {
    margin-bottom: 1.5rem;
}

.loading-text {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.9rem;
}

.news-fallback a {
    color: var(--accent-fire);
    text-decoration: none;
    font-weight: 600;
}

.news-fallback a:hover {
    text-decoration: underline;
}

/* Navegación Discreta Inferior */
.bottom-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem 0 0.5rem;
    border-top: 1px solid var(--border-color);
}

.btn-bottom {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.btn-bottom:hover {
    color: var(--accent-fire);
}

.actions-divider {
    color: var(--border-color);
    font-size: 0.75rem;
}

.back-link-wrapper {
    margin-top: 2rem;
    text-align: center;
}

.btn-back {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s;
}

.btn-back:hover {
    color: var(--accent-fire);
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 0;
    text-align: center;
    background-color: #0b0d10;
}

.footer-initiative {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.footer-initiative strong {
    color: #ffffff;
}

.footer-sub {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

@media (max-width: 600px) {
    .bottom-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .actions-divider {
        display: none;
    }
}