/* ================================================================
   nitroair.css — Estilos específicos de la app NitroAir
   Depende de /css/global.css (glass, glass-card, btn-primary, font Outfit)
   Paleta alineada con slate-900 (#0f172a) del sitio principal.
   ================================================================ */

/* === VARIABLES === */
:root {
    --nitro-space-dark: #0a0e27;
    --nitro-space-blue: #1a1f3a;
    --nitro-space-purple: #1e1b4b;
    --nitro-accent: #3b82f6;        /* blue-500 del sitio */
    --nitro-accent-soft: #60a5fa;   /* blue-400 */
    --nitro-cyan: #06b6d4;
    --nitro-success: #22c55e;
    --nitro-warning: #fbbf24;
    --nitro-danger: #ef4444;
    --nitro-text: #e2e8f0;
    --nitro-text-muted: #94a3b8;
    --nitro-gradient-space: linear-gradient(180deg, #0a0e27 0%, #1a1f3a 50%, #1e1b4b 100%);
    --nitro-gradient-accent: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    --nitro-glow-blue: 0 0 20px rgba(59, 130, 246, 0.45);
    --nitro-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === FUENTE OUTFIT (el sitio ya la carga, pero por si se visita aislado) === */
body.nitro-body {
    font-family: 'Outfit', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #0f172a;
    color: var(--nitro-text);
    overflow-x: hidden;
}

/* === HERO ESPACIAL === */
.space-hero-wrapper {
    position: relative;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 6rem 1rem 3rem;
    background: var(--nitro-gradient-space);
    overflow: hidden;
    isolation: isolate;
}

.space-hero-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(2px 2px at 20% 30%, #fff, transparent),
        radial-gradient(1px 1px at 40% 70%, #fff, transparent),
        radial-gradient(2px 2px at 60% 20%, #fff, transparent),
        radial-gradient(1px 1px at 80% 50%, #fff, transparent),
        radial-gradient(2px 2px at 15% 80%, #fff, transparent),
        radial-gradient(1px 1px at 90% 90%, #fff, transparent),
        radial-gradient(1px 1px at 50% 50%, #fff, transparent),
        radial-gradient(2px 2px at 30% 10%, #fff, transparent),
        radial-gradient(1px 1px at 70% 60%, #fff, transparent);
    background-repeat: repeat;
    background-size: 400px 400px;
    opacity: 0.5;
    animation: nitroMoveStars 120s linear infinite;
    z-index: -1;
}

.space-hero-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 60%, rgba(59, 130, 246, 0.18) 0%, transparent 60%);
    pointer-events: none;
    z-index: -1;
}

@keyframes nitroMoveStars {
    from { transform: translateY(0); }
    to { transform: translateY(-400px); }
}

/* Estrellas individuales animadas (span .star en HTML) */
.floating-stars {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.floating-stars .star {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
    animation: nitroTwinkle 3s ease-in-out infinite;
}

.floating-stars .star:nth-child(1)  { top: 10%;  left: 8%;  animation-delay: 0s; }
.floating-stars .star:nth-child(2)  { top: 20%;  left: 80%; animation-delay: 0.3s; }
.floating-stars .star:nth-child(3)  { top: 35%;  left: 15%; animation-delay: 0.6s; }
.floating-stars .star:nth-child(4)  { top: 50%;  left: 90%; animation-delay: 0.9s; }
.floating-stars .star:nth-child(5)  { top: 65%;  left: 25%; animation-delay: 1.2s; }
.floating-stars .star:nth-child(6)  { top: 75%;  left: 70%; animation-delay: 1.5s; }
.floating-stars .star:nth-child(7)  { top: 85%;  left: 40%; animation-delay: 1.8s; }
.floating-stars .star:nth-child(8)  { top: 15%;  left: 60%; animation-delay: 2.1s; }
.floating-stars .star:nth-child(9)  { top: 30%;  left: 45%; animation-delay: 2.4s; }
.floating-stars .star:nth-child(10) { top: 45%;  left: 5%;  animation-delay: 2.7s; }
.floating-stars .star:nth-child(11) { top: 55%;  left: 55%; animation-delay: 0.15s; }
.floating-stars .star:nth-child(12) { top: 70%;  left: 85%; animation-delay: 0.45s; }
.floating-stars .star:nth-child(13) { top: 25%;  left: 30%; animation-delay: 0.75s; }
.floating-stars .star:nth-child(14) { top: 40%;  left: 72%; animation-delay: 1.05s; }
.floating-stars .star:nth-child(15) { top: 90%;  left: 12%; animation-delay: 1.35s; }

@keyframes nitroTwinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.4); }
}

.hero-icon-large {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--nitro-accent-soft);
    text-shadow: 0 0 30px rgba(96, 165, 250, 0.7);
}

.hero-icon-large .orbit-ring {
    position: absolute;
    border: 1px solid rgba(96, 165, 250, 0.35);
    border-radius: 50%;
    animation: nitroRotate 12s linear infinite;
}

.hero-icon-large .orbit-ring:not(.ring-2) {
    inset: 0;
    border-top-color: var(--nitro-accent);
    border-right-color: transparent;
    border-bottom-color: var(--nitro-accent);
    border-left-color: transparent;
}

.hero-icon-large .orbit-ring.ring-2 {
    inset: -20px;
    border-left-color: var(--nitro-cyan);
    border-right-color: var(--nitro-cyan);
    border-top-color: transparent;
    border-bottom-color: transparent;
    animation-duration: 20s;
    animation-direction: reverse;
}

@keyframes nitroRotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.hero-title-large {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    text-align: center;
    margin: 0 0 1.25rem;
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.hero-title-large .gradient-text {
    display: block;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #f472b6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hero-title-large .subtitle-hero {
    display: block;
    font-size: 0.55em;
    font-weight: 400;
    color: var(--nitro-text-muted);
    margin-top: 0.5rem;
    letter-spacing: 0.04em;
}

.hero-description {
    max-width: 640px;
    margin: 0 auto 2rem;
    text-align: center;
    color: var(--nitro-text-muted);
    font-size: 1.1rem;
    line-height: 1.65;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.btn-hero {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1.8rem;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--nitro-transition);
    overflow: hidden;
}

.btn-primary-hero {
    background: var(--nitro-gradient-accent);
    color: #fff;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.35);
}

.btn-primary-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.55);
}

.btn-secondary-hero {
    background: rgba(255, 255, 255, 0.06);
    color: var(--nitro-text);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
}

.btn-secondary-hero:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.btn-hero .btn-glow {
    position: absolute;
    inset: -2px;
    background: inherit;
    filter: blur(12px);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s;
}

.btn-hero:hover .btn-glow {
    opacity: 0.6;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    max-width: 900px;
    margin: 0 auto;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.5rem;
    border-radius: 14px;
    min-width: 180px;
}

.stat-item i {
    font-size: 2rem;
    color: var(--nitro-accent-soft);
}

.stat-item .stat-info strong {
    display: block;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--nitro-text);
}

.stat-item .stat-info span {
    font-size: 0.85rem;
    color: var(--nitro-text-muted);
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 5rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--nitro-accent-soft);
    font-size: 1.6rem;
    animation: nitroBounce 2s ease-in-out infinite;
    opacity: 0.7;
}

@keyframes nitroBounce {
    0%, 100% { transform: translate(-50%, 0); }
    50%      { transform: translate(-50%, 12px); }
}

/* Waves */
.wave-effect {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    line-height: 0;
    pointer-events: none;
}

.wave-effect svg {
    width: 100%;
    height: 100px;
    display: block;
}

/* === SUB-NAV (barra secundaria sticky bajo el header global) === */
.nitro-subnav {
    position: sticky;
    top: 80px; /* deja espacio al header global */
    z-index: 30;
    backdrop-filter: blur(14px);
    background: rgba(15, 23, 42, 0.75);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nitro-subnav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.6rem 1.5rem;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.nitro-subnav-inner::-webkit-scrollbar { display: none; }

.nitro-subnav a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.95rem;
    border-radius: 10px;
    color: var(--nitro-text-muted);
    font-weight: 500;
    font-size: 0.92rem;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--nitro-transition);
}

.nitro-subnav a:hover {
    color: var(--nitro-text);
    background: rgba(255, 255, 255, 0.05);
}

.nitro-subnav a.active {
    color: var(--nitro-text);
    background: rgba(59, 130, 246, 0.15);
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.35);
}

/* === STATUS CARDS === */
.status-section {
    padding: 3rem 1.5rem 2rem;
}

.status-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.status-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 16px;
    border-left: 4px solid transparent;
    transition: var(--nitro-transition);
}

.status-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.status-info h3 {
    margin: 0 0 0.35rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--nitro-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.status-value {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--nitro-text);
    line-height: 1.1;
}

.status-label {
    font-size: 0.85rem;
    color: var(--nitro-text-muted);
    margin-top: 0.25rem;
}

/* === MAP SECTION === */
.map-section {
    padding: 3rem 1.25rem 4rem;
}

.map-shell {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.map-header {
    text-align: center;
    padding: 0 0.5rem;
}

.map-header h2 {
    font-size: clamp(1.75rem, 3.5vw, 2.25rem);
    font-weight: 700;
    margin: 0 0 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--nitro-text);
}

.map-header h2 i { color: var(--nitro-accent-soft); }

.map-header p {
    color: var(--nitro-text-muted);
    margin: 0;
    max-width: 640px;
    margin-inline: auto;
    font-size: 0.95rem;
}

/* Toolbar con dos filas: selectores arriba, acciones abajo */
.map-toolbar {
    padding: 1.1rem 1.25rem;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.map-toolbar-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: flex-end;
}

.map-toolbar-selectors { border-bottom: 1px solid rgba(255, 255, 255, 0.06); padding-bottom: 0.9rem; }
.map-toolbar-actions { justify-content: flex-start; }

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1 1 200px;
    min-width: 160px;
}

.control-group-slider { flex: 2 1 260px; }

.control-group label {
    font-size: 0.78rem;
    color: var(--nitro-text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.control-group label i { color: var(--nitro-accent-soft); }

.opacity-badge {
    margin-left: auto;
    background: rgba(59, 130, 246, 0.15);
    color: var(--nitro-accent-soft);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.control-select,
.control-input {
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--nitro-text);
    font-family: inherit;
    font-size: 0.92rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    cursor: pointer;
}

.control-select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2394a3b8'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 20px;
    padding-right: 2.2rem;
}

.control-select option {
    background: #0f172a;
    color: var(--nitro-text);
}

.control-select:hover,
.control-input:hover { border-color: rgba(96, 165, 250, 0.3); }

.control-select:focus,
.control-input:focus {
    outline: none;
    border-color: var(--nitro-accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.control-slider {
    accent-color: var(--nitro-accent);
    height: 6px;
    cursor: pointer;
}

/* Botones de la toolbar */
.map-toolbar .btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.1rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(30, 41, 59, 0.7);
    color: var(--nitro-text);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--nitro-transition);
    white-space: nowrap;
    flex: 0 0 auto;
}

.map-toolbar .btn i { color: var(--nitro-accent-soft); transition: color 0.2s; }

.map-toolbar .btn:hover {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.35);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.12);
}

.map-toolbar .btn-ghost { background: rgba(255, 255, 255, 0.04); }

.map-toolbar .btn-accent {
    background: var(--nitro-gradient-accent);
    border-color: transparent;
    color: #fff;
}
.map-toolbar .btn-accent i { color: #fff; }
.map-toolbar .btn-accent:hover { box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4); }
.map-toolbar .btn-accent.active { background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%); }
.map-toolbar .btn-accent.active:hover { box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4); }

.map-toolbar .btn-success {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.35);
    color: #86efac;
}
.map-toolbar .btn-success i { color: #86efac; }
.map-toolbar .btn-success:hover { background: rgba(34, 197, 94, 0.2); border-color: var(--nitro-success); }

.heatmap-badge {
    position: absolute;
    top: -7px;
    right: -7px;
    background: var(--nitro-danger);
    color: #fff;
    font-size: 0.58rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    letter-spacing: 0.08em;
    animation: nitroPulse 2s ease-in-out infinite;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.45);
}

@keyframes nitroPulse {
    0%, 100% { transform: scale(1);   opacity: 1; }
    50%      { transform: scale(1.15); opacity: 0.85; }
}

/* Contenedor del mapa + overlay lateral */
.map-stage { position: relative; }

.map-container {
    height: 620px;
    min-height: 500px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
    background: #0f172a;
}

/* Leaflet: zoom, atribución y controles con look oscuro */
.leaflet-bar {
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
}

.leaflet-bar a,
.leaflet-bar a:hover {
    background: rgba(15, 23, 42, 0.9) !important;
    color: var(--nitro-text) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(10px);
    transition: background 0.2s;
}

.leaflet-bar a:hover {
    background: rgba(59, 130, 246, 0.25) !important;
    color: #fff !important;
}

.leaflet-bar a:last-child { border-bottom: none !important; }

.leaflet-container a.leaflet-popup-close-button {
    color: var(--nitro-text-muted) !important;
    padding: 6px 10px 0 0 !important;
    font-size: 1.3rem;
}

.leaflet-container a.leaflet-popup-close-button:hover {
    color: var(--nitro-danger) !important;
    background: transparent !important;
}

.leaflet-control-attribution {
    background: rgba(15, 23, 42, 0.85) !important;
    color: var(--nitro-text-muted) !important;
    border-radius: 6px 0 0 0 !important;
    backdrop-filter: blur(10px);
    font-size: 0.7rem !important;
}

.leaflet-control-attribution a {
    color: var(--nitro-accent-soft) !important;
}

/* Marker por defecto con un pequeño glow para que destaque sobre el satelital */
.leaflet-marker-icon {
    filter: drop-shadow(0 2px 8px rgba(59, 130, 246, 0.6));
}

.map-overlay {
    position: fixed;
    top: 96px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding: 1.5rem;
    border-radius: 16px;
    transform: translateX(calc(100% + 40px));
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 500;
    opacity: 0;
    pointer-events: none;
}

.map-overlay.active {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.overlay-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: var(--nitro-text);
    cursor: pointer;
    transition: var(--nitro-transition);
}

.overlay-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--nitro-danger);
}

.overlay-content h3 {
    margin: 0 0 1rem;
    font-size: 1.15rem;
    color: var(--nitro-text);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.info-panel-placeholder {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--nitro-text-muted);
}

.info-panel-placeholder i {
    font-size: 2.5rem;
    color: var(--nitro-accent-soft);
    display: block;
    margin-bottom: 0.75rem;
}

/* Detail sections dentro del overlay (viene de JS) */
.location-details .detail-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    margin-bottom: 0.6rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    font-size: 0.9rem;
}

.location-details .detail-item i { color: var(--nitro-accent-soft); }
.location-details .detail-item strong { color: var(--nitro-text); min-width: 120px; }

.location-details .detail-section {
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
}

.location-details .detail-section h4 {
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.location-details .pm-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
}

.location-details .pm-item {
    padding: 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    text-align: center;
}

.location-details .pm-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--nitro-accent-soft);
}

.location-details .pm-label {
    font-size: 0.75rem;
    color: var(--nitro-text-muted);
    margin-top: 0.25rem;
}

.location-details .aod-value {
    text-align: center;
    font-size: 2.4rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.location-details .aod-category {
    text-align: center;
    font-weight: 600;
    padding: 0.5rem;
    border-radius: 8px;
    margin-top: 0.5rem;
}

/* === LEAFLET POPUP PERSONALIZADO === */
.leaflet-popup-content-wrapper.custom-popup,
.leaflet-popup-content-wrapper {
    background: rgba(15, 23, 42, 0.96);
    color: var(--nitro-text);
    border-radius: 14px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0;
}

.leaflet-popup-content {
    margin: 0;
    padding: 1rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    line-height: 1.5;
}

.leaflet-popup-tip {
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.leaflet-popup-close-button { color: var(--nitro-text-muted) !important; }

.nitro-popup { display: flex; flex-direction: column; gap: 0.75rem; }

.nitro-popup-header {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nitro-popup-header-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--nitro-accent-soft);
    font-size: 0.88rem;
    margin-bottom: 0.25rem;
}

.nitro-popup-header-coords {
    font-size: 0.82rem;
    color: var(--nitro-text-muted);
    font-family: ui-monospace, monospace;
}

.nitro-popup-aqi {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border-left: 4px solid;
}

.nitro-popup-aqi-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--nitro-text-muted); }
.nitro-popup-aqi-value { font-size: 1.1rem; font-weight: 700; margin-top: 0.15rem; }
.nitro-popup-aqi-icon { font-size: 2rem; }

.nitro-popup-source {
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    border: 1px solid;
    font-size: 0.82rem;
}

.nitro-popup-source-title { display: flex; align-items: center; gap: 0.35rem; margin-bottom: 0.25rem; }
.nitro-popup-source-detail { color: var(--nitro-text-muted); }
.nitro-popup-source-desc { font-size: 0.76rem; color: var(--nitro-text-muted); margin-top: 0.25rem; font-style: italic; }

.nitro-popup-timestamp { font-size: 0.78rem; color: var(--nitro-text-muted); }

.nitro-popup-grid-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: var(--nitro-accent-soft);
    font-size: 0.88rem;
    margin-top: 0.25rem;
}

.nitro-popup-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.nitro-popup-cell {
    padding: 0.65rem 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.nitro-popup-cell-label {
    font-size: 0.7rem;
    color: var(--nitro-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nitro-popup-cell-value { font-size: 1.05rem; font-weight: 700; margin: 0.15rem 0; }
.nitro-popup-cell-desc { font-size: 0.72rem; color: var(--nitro-text-muted); }

.nitro-popup-health {
    padding: 0.85rem;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.nitro-popup-health-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--nitro-accent-soft);
    font-size: 0.88rem;
    margin-bottom: 0.35rem;
}

.nitro-popup-health-name { font-weight: 600; margin-bottom: 0.25rem; }
.nitro-popup-health-message { font-size: 0.85rem; color: var(--nitro-text-muted); }

.nitro-popup-note {
    padding: 0.6rem 0.75rem;
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 8px;
    font-size: 0.75rem;
    color: var(--nitro-text-muted);
}

.nitro-popup-close {
    width: 100%;
    padding: 0.55rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--nitro-text);
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--nitro-transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.nitro-popup-close:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: var(--nitro-danger);
    color: var(--nitro-danger);
}

/* === CHARTS SECTION === */
.charts-section {
    padding: 3rem 1.5rem;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    text-align: center;
    margin: 0 0 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: var(--nitro-text);
}

.section-title i { color: var(--nitro-accent-soft); }

.charts-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.chart-card {
    padding: 1.25rem;
    border-radius: 16px;
    min-height: 340px;
    position: relative;
}

.chart-card h4 {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    color: var(--nitro-text);
}

.chart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 280px;
    color: var(--nitro-text-muted);
    gap: 0.75rem;
}

.chart-empty i { font-size: 2.5rem; color: var(--nitro-accent-soft); opacity: 0.5; }

.chart-card canvas { max-height: 300px; }

/* === INFO SECTION === */
.info-section {
    padding: 3rem 1.5rem;
}

.info-grid {
    max-width: 1280px;
    margin: 0 auto 3rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.info-card {
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.info-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    font-weight: 600;
}

.info-header i { font-size: 1.5rem; }
.info-header h3 { margin: 0; font-size: 1.1rem; }

.info-header.pm25 { background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%); }
.info-header.pm10 { background: linear-gradient(135deg, #06b6d4 0%, #0e7490 100%); }
.info-header.pm1  { background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%); }
.info-header.aod  { background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%); }

.info-body {
    padding: 1.25rem 1.5rem;
    flex: 1;
    font-size: 0.92rem;
}

.info-body p { margin: 0 0 0.75rem; color: var(--nitro-text-muted); }
.info-body p strong { color: var(--nitro-text); }

.info-body ul {
    margin: 0 0 1rem;
    padding-left: 1.2rem;
    color: var(--nitro-text-muted);
}

.info-body ul li { margin-bottom: 0.35rem; }

/* Escalas de salud */
.health-scale {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.health-scale h4 {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    color: var(--nitro-text);
}

.scale-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.4rem;
    border-radius: 8px;
    font-size: 0.82rem;
    color: #fff;
}

.scale-range { font-weight: 700; font-family: ui-monospace, monospace; min-width: 80px; }

.scale-item.good              { background: rgba(34, 197, 94, 0.75); }
.scale-item.moderate          { background: rgba(251, 191, 36, 0.75); color: #1e293b; }
.scale-item.unhealthy-sensitive { background: rgba(251, 146, 60, 0.8); }
.scale-item.unhealthy         { background: rgba(239, 68, 68, 0.8); }
.scale-item.very-unhealthy    { background: rgba(168, 85, 247, 0.8); }
.scale-item.hazardous         { background: rgba(127, 29, 29, 0.9); }

/* Alert box */
.alert-box {
    display: flex;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    margin-top: 1rem;
    font-size: 0.85rem;
}

.alert-box.warning {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.alert-box i { color: var(--nitro-warning); font-size: 1.2rem; flex-shrink: 0; }
.alert-box p { margin: 0; color: var(--nitro-text); }

/* === RECOMMENDATIONS === */
.recommendations-section { max-width: 1280px; margin: 3rem auto 0; }

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.recommendation-card {
    padding: 1.5rem;
    border-radius: 16px;
    border-top: 4px solid transparent;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.recommendation-card .rec-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
}

.recommendation-card h3 { margin: 0; font-size: 1.1rem; color: var(--nitro-text); }
.recommendation-card ul { margin: 0; padding-left: 1.15rem; color: var(--nitro-text-muted); font-size: 0.9rem; }
.recommendation-card ul li { margin-bottom: 0.35rem; }

.recommendation-card.green  { border-top-color: var(--nitro-success); }
.recommendation-card.green  .rec-icon { background: var(--nitro-success); }
.recommendation-card.yellow { border-top-color: var(--nitro-warning); }
.recommendation-card.yellow .rec-icon { background: var(--nitro-warning); color: #1e293b; }
.recommendation-card.orange { border-top-color: #fb923c; }
.recommendation-card.orange .rec-icon { background: #fb923c; }
.recommendation-card.red    { border-top-color: var(--nitro-danger); }
.recommendation-card.red    .rec-icon { background: var(--nitro-danger); }
.recommendation-card.purple { border-top-color: #a855f7; }
.recommendation-card.purple .rec-icon { background: #a855f7; }
.recommendation-card.maroon { border-top-color: #7f1d1d; }
.recommendation-card.maroon .rec-icon { background: #7f1d1d; }

/* === ABOUT SECTION === */
.about-section { padding: 3rem 1.5rem; }

.about-content {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.about-text, .about-tech { padding: 2rem; border-radius: 16px; }

.about-text h3, .about-tech h3 {
    margin: 0 0 1rem;
    color: var(--nitro-accent-soft);
    font-size: 1.3rem;
}

.about-text h4 {
    margin: 1.25rem 0 0.5rem;
    color: var(--nitro-text);
    font-size: 1rem;
}

.about-text p, .about-text ul li { color: var(--nitro-text-muted); }
.about-text strong { color: var(--nitro-text); }

.acknowledgment {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.08);
    border-left: 3px solid var(--nitro-accent);
    border-radius: 8px;
    font-size: 0.85rem;
}

.acknowledgment p { margin: 0; }

.tech-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.tech-item {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    text-align: center;
    transition: var(--nitro-transition);
}

.tech-item:hover {
    background: rgba(59, 130, 246, 0.08);
    transform: translateY(-3px);
}

.tech-item i {
    font-size: 2rem;
    color: var(--nitro-accent-soft);
    margin-bottom: 0.5rem;
    display: block;
}

.tech-item h4 { margin: 0.25rem 0; font-size: 0.95rem; color: var(--nitro-text); }
.tech-item p { margin: 0; font-size: 0.8rem; color: var(--nitro-text-muted); }

/* === MODAL (leyenda) === */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    padding: 1rem;
}

.modal.active { opacity: 1; visibility: visible; }

.modal-content {
    max-width: 600px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 16px;
    transform: scale(0.95);
    transition: transform 0.3s;
}

.modal.active .modal-content { transform: scale(1); }

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--nitro-text);
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: none;
    color: var(--nitro-text);
    cursor: pointer;
    transition: var(--nitro-transition);
}

.modal-close:hover { background: rgba(239, 68, 68, 0.15); color: var(--nitro-danger); }

.modal-body { padding: 1.5rem; color: var(--nitro-text); }
.modal-body h4 { color: var(--nitro-accent-soft); margin: 1rem 0 0.5rem; }
.modal-body ul { color: var(--nitro-text-muted); padding-left: 1.2rem; }

.legend-header { margin-bottom: 1rem; }
.legend-header p { color: var(--nitro-text-muted); margin: 0.35rem 0 0; }
.legend-image { text-align: center; margin: 1rem 0; }
.legend-info, .legend-guide { margin: 1rem 0; padding: 1rem; background: rgba(255,255,255,0.04); border-radius: 10px; }

/* === LOADING OVERLAY === */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 39, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.loading-overlay.active { opacity: 1; visibility: visible; }

.loading-spinner {
    padding: 2rem 3rem;
    border-radius: 16px;
    text-align: center;
    color: var(--nitro-text);
}

.loading-spinner i { font-size: 3rem; color: var(--nitro-accent-soft); margin-bottom: 1rem; }
.loading-spinner p { margin: 0; font-weight: 500; }

/* === REVEAL ANIMATIONS (activadas por JS con .active) === */
.reveal,
.reveal-left,
.reveal-right,
.reveal-scale {
    opacity: 0;
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

.reveal        { transform: translateY(30px); }
.reveal-left   { transform: translateX(-40px); }
.reveal-right  { transform: translateX(40px); }
.reveal-scale  { transform: scale(0.94); }

.reveal.active,
.reveal-left.active,
.reveal-right.active,
.reveal-scale.active {
    opacity: 1;
    transform: none;
}

/* Icon animations */
.icon-spin       { animation: nitroRotate 8s linear infinite; }
.icon-bounce     { animation: nitroIconBounce 2.5s ease-in-out infinite; }
.icon-pulse-glow { animation: nitroIconPulse 2s ease-in-out infinite; }

@keyframes nitroIconBounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

@keyframes nitroIconPulse {
    0%, 100% { filter: drop-shadow(0 0 4px rgba(96, 165, 250, 0.5)); }
    50%      { filter: drop-shadow(0 0 16px rgba(96, 165, 250, 0.9)); }
}

/* === PARTICLES (generadas por wow-interactions.js) === */
.particles-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.particle {
    position: absolute;
    background: rgba(96, 165, 250, 0.6);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(96, 165, 250, 0.4);
    animation: nitroParticleFloat 20s linear forwards;
}

@keyframes nitroParticleFloat {
    0%   { transform: translate(0, 0);                  opacity: 0; }
    10%  {                                              opacity: 0.9; }
    90%  {                                              opacity: 0.9; }
    100% { transform: translate(var(--tx), var(--ty));  opacity: 0; }
}

/* === RIPPLE (botones) === */
.btn-wow { position: relative; overflow: hidden; }

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    transform: scale(0);
    animation: nitroRipple 0.6s linear;
    pointer-events: none;
}

@keyframes nitroRipple {
    to { transform: scale(3); opacity: 0; }
}

/* === TOASTS (generados por JS) === */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    color: var(--nitro-text);
    border-left: 4px solid var(--nitro-accent);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    transform: translateX(calc(100% + 3rem));
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10001;
    max-width: 360px;
}

.toast.show { transform: translateX(0); }

.toast-success { border-left-color: var(--nitro-success); }
.toast-error   { border-left-color: var(--nitro-danger); }
.toast-warning { border-left-color: var(--nitro-warning); }
.toast-info    { border-left-color: var(--nitro-accent); }

.toast-success i { color: var(--nitro-success); }
.toast-error   i { color: var(--nitro-danger); }
.toast-warning i { color: var(--nitro-warning); }
.toast-info    i { color: var(--nitro-accent); }

/* === FOOTER LOCAL (resumen interno, opcional debajo del global) === */
.nitro-credits {
    max-width: 1280px;
    margin: 2rem auto 0;
    padding: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--nitro-text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .map-section { padding: 2.5rem 1rem 3rem; }
    .map-container { height: 520px; }
}

@media (max-width: 768px) {
    .space-hero-wrapper { min-height: 70vh; padding: 5rem 1rem 2rem; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .btn-hero { justify-content: center; }
    .hero-stats { flex-direction: column; align-items: stretch; }

    .map-section { padding: 2rem 0.75rem 2.5rem; }
    .map-container { height: 440px; min-height: 380px; }
    .map-toolbar { padding: 0.9rem; }
    .map-toolbar .btn span { display: none; } /* solo iconos en mobile */
    .map-toolbar .btn { padding: 0.6rem 0.8rem; }
    .map-toolbar .btn i { font-size: 1.05rem; }
    .map-toolbar-actions { justify-content: space-between; }

    .map-overlay {
        top: auto;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        max-height: 65vh;
        border-radius: 16px 16px 0 0;
        transform: translateY(100%);
    }
    .map-overlay.active { transform: translateY(0); }

    .status-grid { grid-template-columns: 1fr; }
    .nitro-popup-grid { grid-template-columns: 1fr; }
    .tech-grid { grid-template-columns: 1fr; }
    .nitro-subnav { top: 64px; }
}

@media (max-width: 480px) {
    .hero-icon-large { width: 100px; height: 100px; font-size: 3rem; }
    .map-toolbar { padding: 0.75rem; }
    .control-group { flex: 1 1 100%; min-width: 0; }
    .map-header h2 { font-size: 1.5rem; }
    .map-container { height: 380px; }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .space-hero-wrapper::before,
    .floating-stars .star,
    .icon-spin, .icon-bounce, .icon-pulse-glow,
    .heatmap-badge {
        animation: none !important;
    }

    .reveal, .reveal-left, .reveal-right, .reveal-scale {
        opacity: 1;
        transform: none;
    }

    .particle { display: none; }
}
