/*
 * GeoCentro - Observatorio Geológico y Climático de Centroamérica
 * Core Stylesheet (Vanilla CSS)
 */

:root {
    --bg-dark: #090a0f;
    --bg-dark-gray: #111218;
    --bg-card: rgba(20, 21, 28, 0.65);
    --bg-card-hover: rgba(28, 30, 40, 0.8);
    
    --border-color: rgba(255, 255, 255, 0.07);
    --border-color-hover: rgba(255, 255, 255, 0.15);
    --border-glow: rgba(255, 87, 34, 0.15);
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --accent: #ff5722;        /* Volcano Orange */
    --accent-hover: #ff7043;
    --accent-glow: rgba(255, 87, 34, 0.3);
    
    --danger: #f44336;        /* Seismic Red */
    --warning: #ffb300;       /* Warning Yellow */
    --success: #4caf50;       /* Safe Green */
    --info: #00bcd4;          /* Info Teal */
    
    --font-main: 'Outfit', sans-serif;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --glass-blur: blur(12px);
}

/* Reset & Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: 
        radial-gradient(at 10% 20%, rgba(255, 87, 34, 0.05) 0px, transparent 50%),
        radial-gradient(at 90% 80%, rgba(0, 188, 212, 0.03) 0px, transparent 50%);
    background-attachment: fixed;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: #1f2230;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--accent-hover);
}

button {
    font-family: var(--font-main);
}

/* Common Components */
.card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.card:hover {
    border-color: var(--border-color-hover);
    box-shadow: 0 10px 36px 0 rgba(0, 0, 0, 0.6), 0 0 20px var(--border-glow);
}

.badge {
    background: var(--accent);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Header & Navigation */
.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(9, 10, 15, 0.75);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
}
.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
}
.logo span {
    color: var(--accent);
}
.logo-icon {
    font-size: 1.8rem;
    color: var(--accent);
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

.navbar {
    display: flex;
    gap: 10px;
}
.nav-link {
    color: var(--text-secondary);
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}
.nav-link.active {
    color: var(--text-primary);
    background: rgba(255, 87, 34, 0.15);
    border: 1px solid rgba(255, 87, 34, 0.3);
}

.btn {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}
.btn-primary {
    background: var(--accent);
    color: white;
}
.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 15px var(--accent-glow);
}
.btn-secondary {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}
.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-primary);
}
.btn-sync {
    background: rgba(0, 188, 212, 0.15);
    color: var(--info);
    border: 1px solid rgba(0, 188, 212, 0.3);
}
.btn-sync:hover {
    background: rgba(0, 188, 212, 0.25);
    box-shadow: 0 0 15px rgba(0, 188, 212, 0.3);
}
.btn-block {
    display: flex;
    width: 100%;
    justify-content: center;
}

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Dashboard Hero */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px;
    min-height: calc(100vh - 170px);
}
.dashboard-hero {
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.hero-text h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}
.hero-text p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.stats-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow);
}
.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
}
.stat-icon.sismo {
    background: rgba(244, 67, 54, 0.15);
    color: var(--danger);
    border: 1px solid rgba(244, 67, 54, 0.3);
}
.stat-icon.max-mag {
    background: rgba(255, 179, 0, 0.15);
    color: var(--warning);
    border: 1px solid rgba(255, 179, 0, 0.3);
}
.stat-icon.volcanes {
    background: rgba(255, 87, 34, 0.15);
    color: var(--accent);
    border: 1px solid rgba(255, 87, 34, 0.3);
}
.stat-icon.local {
    background: rgba(0, 188, 212, 0.15);
    color: var(--info);
    border: 1px solid rgba(0, 188, 212, 0.3);
}
.stat-info {
    display: flex;
    flex-direction: column;
}
.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
}
.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Map Section */
.map-section-container {
    margin-bottom: 40px;
}
.section-title-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.section-title-container h2 {
    font-size: 1.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}
.pulse-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--danger);
}
.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.7);
    animation: pulse 1.6s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(244, 67, 54, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(244, 67, 54, 0);
    }
}

.map-layout-grid {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 24px;
}
.map-card {
    padding: 12px;
    position: relative;
}
#main-map {
    height: 520px;
    width: 100%;
    border-radius: calc(var(--radius-md) - 4px);
    z-index: 1;
}

.map-legend {
    position: absolute;
    bottom: 24px;
    left: 24px;
    z-index: 10;
    background: rgba(17, 18, 24, 0.9);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    display: flex;
    gap: 14px;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 500;
    backdrop-filter: var(--glass-blur);
}
.legend-title {
    color: var(--text-secondary);
    font-weight: 700;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.legend-color.val-low { background: var(--success); }
.legend-color.val-med { background: var(--warning); }
.legend-color.val-high { background: var(--danger); }

/* Custom Volcano Markers on Map */
.volcano-marker-wrapper {
    position: relative;
    width: 20px;
    height: 20px;
}
.volcano-marker-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border: 2px solid white;
    border-radius: 50%;
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 12;
    box-shadow: 0 0 4px rgba(0,0,0,0.5);
}
.volcano-marker-pulse {
    width: 20px;
    height: 20px;
    background: rgba(255, 87, 34, 0.45);
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 11;
    animation: markerPulse 1.8s infinite ease-out;
}
@keyframes markerPulse {
    0% {
        transform: scale(0.3);
        opacity: 1;
    }
    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

/* Recent List Panel */
.recent-sismos-panel {
    display: flex;
    flex-direction: column;
    max-height: 544px;
}
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}
.panel-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
}
.sismos-list-scroll {
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 4px;
}

.sismo-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px;
    cursor: pointer;
    transition: var(--transition);
}
.sismo-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}
.sismo-item-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.sismo-item-mag {
    font-size: 1.1rem;
    font-weight: 800;
}
.sismo-item-mag.mag-low { color: var(--success); }
.sismo-item-mag.mag-med { color: var(--warning); }
.sismo-item-mag.mag-high { color: var(--danger); }

.sismo-item-depth {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}
.sismo-item-loc {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sismo-item-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

.loading-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    height: 100px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* News & Tourism Grid */
.news-tourism-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
    margin-bottom: 40px;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}
.section-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-link {
    font-size: 0.9rem;
    font-weight: 600;
}

.news-feed {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.news-card-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
    transition: var(--transition);
}
.news-card-item:hover {
    border-color: rgba(255, 255, 255, 0.12);
}
.news-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}
.news-item-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-primary);
}
.news-item-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}
.news-item-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
.news-item-country-badge {
    display: inline-block;
    font-size: 0.75rem;
    background: rgba(0, 188, 212, 0.1);
    color: var(--info);
    border: 1px solid rgba(0, 188, 212, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    margin-top: 10px;
    font-weight: 600;
}

/* Volcano Tourism */
.tourism-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.tourism-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    overflow: hidden;
    min-height: 120px;
}
.tourism-img-wrapper {
    width: 120px;
    background-size: cover;
    background-position: center;
    position: relative;
    flex-shrink: 0;
}
.tourism-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}
.tourism-badge.safe { background: var(--success); color: white; }
.tourism-badge.caution { background: var(--warning); color: black; }
.tourism-badge.restricted { background: var(--danger); color: white; }

.tourism-info {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.tourism-info h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.tourism-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 8px;
}
.tourism-meta {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}
.tourism-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}
.modal-content {
    position: relative;
    width: 90%;
    max-width: 700px;
    background: var(--bg-dark-gray);
    padding: 24px;
}
.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}
.close-modal:hover {
    color: var(--text-primary);
}

.webcam-container {
    margin: 16px 0;
    background: #000;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.webcam-container img {
    width: 100%;
    height: auto;
    max-height: 400px;
    display: block;
    object-fit: contain;
}
.webcam-status-bar {
    background: #111;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 500;
    border-top: 1px solid var(--border-color);
}
.live-dot-container {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--success);
    font-weight: 700;
}
.live-dot {
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
}
.btn-refresh-webcam {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.btn-refresh-webcam:hover {
    background: rgba(255, 255, 255, 0.1);
}
.webcam-notice {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Historical Page Styles */
.historical-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
}
.page-title-area h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 6px;
}
.page-title-area p {
    color: var(--text-secondary);
}

.historical-layout-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
    align-items: start;
}

/* Filters Sidebar */
.filters-sidebar h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}
.form-group {
    margin-bottom: 18px;
}
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-secondary);
}
.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.9rem;
    transition: var(--transition);
}
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 8px rgba(255, 87, 34, 0.15);
}
.range-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.form-group input[type="range"] {
    width: 100%;
    accent-color: var(--accent);
    margin-top: 6px;
}

.historical-main-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.analytics-charts-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 24px;
}
.chart-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
}
.chart-container {
    position: relative;
    height: 240px;
    width: 100%;
}

/* Data Table */
.table-card {
    display: flex;
    flex-direction: column;
}
.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.table-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
}
.table-responsive {
    width: 100%;
    overflow-x: auto;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.88rem;
}
.data-table th,
.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
}
.data-table th {
    font-weight: 700;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.01);
}
.data-table tbody tr {
    transition: var(--transition);
}
.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.mag-cell {
    font-weight: 800;
}
.depth-cell {
    font-weight: 500;
    color: var(--text-secondary);
}
.country-cell {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.pagination-controls {
    display: flex;
    gap: 6px;
}
.btn-page {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}
.btn-page:hover:not(:disabled) {
    background: var(--accent);
    border-color: var(--accent);
}
.btn-page.active {
    background: var(--accent);
    border-color: var(--accent);
}
.btn-page:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Tools Page Styles */
.tools-grid-top {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.seismogram-card,
.risk-calc-card {
    display: flex;
    flex-direction: column;
}
.card-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.card-header p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.tools-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}
.form-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 12px;
}

.seismogram-display-area {
    margin-top: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.seismogram-img-wrapper {
    background: #000;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    min-height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 8px;
}
.seismogram-img-wrapper img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}
.seismo-placeholder-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    padding: 24px;
}
.seismo-info-box {
    background: rgba(255, 255, 255, 0.02);
    border-left: 3px solid var(--accent);
    padding: 12px 16px;
    margin-top: 12px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.info-tag {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 4px;
}
.seismo-info-box p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Risk Calculator Details */
.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}
.risk-result-area {
    margin-top: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 20px;
    display: flex;
    gap: 20px;
    align-items: center;
}
.gauge-wrapper {
    flex-shrink: 0;
}
.gauge-container {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: #111;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 3px solid var(--border-color);
    overflow: hidden;
}
.gauge-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: var(--accent);
    opacity: 0.2;
    transition: var(--transition);
}
.gauge-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}
.gauge-text .value {
    font-size: 1.4rem;
    font-weight: 800;
}
.gauge-text .label {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-secondary);
}

.risk-details h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 6px;
}
.risk-details p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Volcanic Webcams Grid */
.webcams-section-container {
    width: 100%;
}
.webcam-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
    margin-bottom: 24px;
}

/* Switch component */
.switch-container {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.switch-container input {
    display: none;
}
.switch-slider {
    width: 40px;
    height: 20px;
    background: #2a2c38;
    border-radius: 20px;
    position: relative;
    transition: var(--transition);
}
.switch-slider::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: var(--transition);
}
.switch-container input:checked + .switch-slider {
    background: var(--accent);
}
.switch-container input:checked + .switch-slider::before {
    transform: translateX(20px);
}
.switch-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.webcams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}
.webcam-card-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.webcam-title {
    padding: 10px 14px;
    font-size: 0.95rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.01);
    border-bottom: 1px solid var(--border-color);
}
.webcam-img-box {
    position: relative;
    background: black;
    height: 170px;
    overflow: hidden;
}
.webcam-feed {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.webcam-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    pointer-events: none;
}
.badge-live {
    font-size: 0.65rem;
    font-weight: 700;
    background: var(--success);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
}

.webcam-footer {
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
}
.webcam-timestamp {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}
.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    font-size: 0.9rem;
    transition: var(--transition);
}
.btn-icon:hover {
    color: var(--text-primary);
}

/* Footer Section */
.main-footer {
    background: #07080b;
    border-top: 1px solid var(--border-color);
    padding: 40px 24px 20px 24px;
    margin-top: 60px;
}
.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}
.footer-info h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-primary);
}
.footer-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    max-width: 400px;
}
.footer-links h4 {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 12px;
}
.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.footer-links a {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.footer-links a:hover {
    color: var(--text-primary);
}

.footer-copy {
    grid-column: 1 / -1;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 20px;
    margin-top: 20px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .historical-layout-grid {
        grid-template-columns: 1fr;
    }
    .tools-grid-top {
        grid-template-columns: 1fr;
    }
    .map-layout-grid {
        grid-template-columns: 1fr;
    }
    .recent-sismos-panel {
        max-height: 350px;
    }
    .news-tourism-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 12px 16px;
    }
    .mobile-menu-toggle {
        display: block;
    }
    .navbar {
        display: none; /* Can implement dynamic toggle later */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-dark-gray);
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        padding: 16px;
        box-shadow: var(--shadow);
    }
    .navbar.show {
        display: flex;
    }
    .nav-link {
        width: 100%;
    }
    .header-actions {
        display: none; /* Hide sync button on mobile headers or reposition */
    }
    .stats-summary-grid {
        grid-template-columns: 1fr 1fr;
    }
    .analytics-charts-grid {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .tourism-card {
        flex-direction: column;
    }
    .tourism-img-wrapper {
        width: 100%;
        height: 120px;
    }
    .footer-container {
        grid-template-columns: 1fr;
    }
    #main-map {
        height: 380px;
    }
}
