:root {
    --bg-dark: #0a0f1d;
    --bg-card: #111827;
    --primary: #06b6d4;
    --primary-glow: rgba(6, 182, 212, 0.4);
    --neon-pink: #f43f5e;
    --accent-yellow: #f59e0b;
    --text-light: #f3f4f6;
    --text-muted: #9ca3af;
    --border-color: #1f2937;
    --border-neon: rgba(6, 182, 212, 0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Roboto, sans-serif; }
body.cyber-body { background-color: var(--bg-dark); color: var(--text-light); line-height: 1.6; }

.navbar { background: rgba(10, 15, 29, 0.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border-neon); position: sticky; top: 0; z-index: 100; }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 1rem; display: flex; justify-content: space-between; align-items: center; }
.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand h1 { font-size: 1.1rem; }
.neon-text { color: var(--primary); text-shadow: 0 0 10px var(--primary-glow); }
.subtitle { font-size: 0.75rem; color: var(--text-muted); }
.icon-glow { font-size: 1.5rem; filter: drop-shadow(0 0 8px var(--primary)); }
.nav-links a { color: var(--text-light); text-decoration: none; margin-left: 1.25rem; font-size: 0.85rem; transition: 0.3s; }
.nav-links a:hover { color: var(--primary); }

.hero { background: radial-gradient(circle at center, #1e293b 0%, var(--bg-dark) 100%); padding: 3rem 1rem; text-align: center; border-bottom: 1px solid var(--border-color); }
.hero-container { max-width: 800px; margin: 0 auto; }
.badge { background: rgba(6, 182, 212, 0.1); color: var(--primary); border: 1px solid var(--primary); padding: 0.25rem 0.75rem; border-radius: 50px; font-size: 0.75rem; text-transform: uppercase; display: inline-block; margin-bottom: 1rem; }
.hero h2 { font-size: 2rem; margin-bottom: 0.75rem; }
.hero p { color: var(--text-muted); font-size: 0.95rem; }

.section-container { max-width: 1200px; margin: 2rem auto; padding: 0 1rem; }
.max-width { max-width: 1200px; margin: 0 auto; }
.max-width-narrow { max-width: 800px; margin: 0 auto; }
.section-padding { padding: 4rem 1rem; }
.bg-alt {
    background-color: rgba(17, 24, 39, 0.6);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
.text-center { text-align: center; }
.section-sub { color: var(--text-muted); margin-bottom: 2.5rem; font-size: 0.9rem; }

.card { background-color: var(--bg-card); border: 1px solid var(--border-neon); border-radius: 12px; padding: 1.5rem; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5); }
.map-card { padding: 0; overflow: hidden; }

.card-header { padding: 1rem 1.5rem; background: rgba(17, 24, 39, 0.9); border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; }
.pulse-dot { display: inline-block; width: 8px; height: 8px; background-color: var(--neon-pink); border-radius: 50%; margin-right: 8px; box-shadow: 0 0 8px var(--neon-pink); }

.map-viewport { width: 100%; height: 520px; position: relative; }
.map-container { width: 100%; height: 100%; z-index: 1; background: #030712; }

/* Filtro oscuro para Leaflet */
.leaflet-tile-pane { filter: brightness(0.6) invert(1) contrast(1.3) hue-rotate(200deg) saturate(0.5); }
.leaflet-container { background-color: #030712 !important; }

/* HUD Marcos Tácticos */
.hud-overlay { pointer-events: none; position: absolute; inset: 0; z-index: 10; }
.hud-corner { position: absolute; width: 20px; height: 20px; border: 2px solid var(--primary); }
.top-left { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.top-right { top: 10px; right: 10px; border-left: 0; border-bottom: 0; }
.bottom-left { bottom: 10px; left: 10px; border-right: 0; border-top: 0; }
.bottom-right { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }

/* Efecto de Onda de Agua */
@keyframes waterRippleMarker {
    0% { width: 16px; height: 16px; opacity: 1; top: 0px; left: 0px; }
    100% { width: 120px; height: 120px; opacity: 0; top: -52px; left: -52px; }
}
.ripple-wave-1, .ripple-wave-2 { position: absolute; top: 0px; left: 0px; border-radius: 50%; pointer-events: none; z-index: 1; }
.ripple-wave-1 { border: 2px solid var(--primary); background: rgba(6, 182, 212, 0.2); }
.ripple-wave-2 { border: 1px solid var(--neon-pink); background: rgba(244, 63, 94, 0.15); animation-delay: 0.2s !important; }

/* MODAL */
.modal-backdrop { position: fixed; inset: 0; background: rgba(3, 7, 18, 0.85); backdrop-filter: blur(8px); z-index: 1000; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.4s ease; }
.modal-backdrop.active { opacity: 1; pointer-events: auto; }
.modal-window { background: var(--bg-card); border: 1px solid var(--primary); box-shadow: 0 0 30px var(--primary-glow); border-radius: 16px; width: 90%; max-width: 650px; overflow: hidden; transform: scale(0.8) translateY(20px); transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.modal-backdrop.active .modal-window { transform: scale(1) translateY(0); }

.modal-header { padding: 1.25rem; background: rgba(6, 182, 212, 0.1); border-bottom: 1px solid var(--border-neon); display: flex; justify-content: space-between; align-items: center; }
.modal-title-wrap { display: flex; align-items: center; gap: 0.75rem; }
.modal-icon { font-size: 2rem; }
.badge-sm { font-size: 0.65rem; color: var(--primary); letter-spacing: 1px; font-weight: bold; }
.modal-close-btn { background: none; border: none; color: var(--text-muted); font-size: 1.8rem; cursor: pointer; }
.modal-close-btn:hover { color: var(--neon-pink); }

.modal-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 1.25rem; }
.modal-image-wrap { width: 100%; height: 180px; border-radius: 8px; overflow: hidden; position: relative; border: 1px solid var(--border-color); }
.modal-img { width: 100%; height: 100%; background-size: cover; background-position: center; }
.scanline { position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.4) 51%); background-size: 100% 4px; pointer-events: none; }
.modal-desc { font-size: 0.9rem; color: #d1d5db; }

.info-boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.info-box { background: rgba(15, 23, 42, 0.8); border: 1px solid var(--border-color); padding: 0.75rem; border-radius: 8px; }
.box-label { font-size: 0.65rem; color: var(--primary); text-transform: uppercase; font-weight: bold; display: block; }
.box-value { font-size: 0.85rem; font-weight: 600; color: var(--text-light); }
.box-value.highlight { color: var(--accent-yellow); }

.modal-footer { padding: 1rem 1.5rem; background: rgba(15, 23, 42, 0.9); border-top: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; font-size: 0.75rem; color: var(--text-muted); }
.btn-cyan { background: var(--primary); color: #000; font-weight: bold; border: none; padding: 0.5rem 1rem; border-radius: 6px; cursor: pointer; box-shadow: 0 0 10px var(--primary-glow); }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }

.feature-icon { width: 42px; height: 42px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; margin-bottom: 0.75rem; }
.icon-blue { background: rgba(6, 182, 212, 0.15); border: 1px solid var(--primary); }
.icon-green { background: rgba(16, 185, 129, 0.15); border: 1px solid #10b981; }
.icon-pink { background: rgba(244, 63, 94, 0.15); border: 1px solid var(--neon-pink); }

/* Línea de tiempo */
.timeline { position: relative; padding-left: 2rem; border-left: 2px solid var(--border-neon); }
.timeline-item { position: relative; margin-bottom: 2rem; }
.timeline-badge { position: absolute; left: -2.65rem; top: 0; width: 22px; height: 22px; background: var(--primary); color: #000; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: bold; }
.timeline-year { font-weight: bold; color: var(--primary); font-size: 0.85rem; }
.timeline-content h4 { font-size: 1rem; margin-bottom: 0.2rem; }
.timeline-content p { font-size: 0.85rem; color: var(--text-muted); }

.footer { text-align: center; padding: 2rem; background: #030712; border-top: 1px solid var(--border-color); font-size: 0.8rem; color: var(--text-muted); }
.footer-sub { font-size: 0.7rem; color: var(--primary); margin-top: 0.25rem; }

/* Adaptación para celulares */
@media (max-width: 768px) {
.nav-container {
flex-direction: column;
align-items: flex-start;
gap: 1rem;
}

.brand h1 {
    font-size: 0.95rem;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    width: 100%;
}

.nav-links a {
    margin-left: 0;
    font-size: 0.8rem;
}

.hero {
    padding: 2rem 1rem;
}

.hero h2 {
    font-size: 1.5rem;
}

.card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.map-viewport {
    height: 400px;
}

.modal-backdrop {
    padding: 0.75rem;
    overflow-y: auto;
}

.modal-window {
    width: 100%;
    max-width: 650px;
    max-height: 94dvh;
    overflow-y: auto;
}

.modal-header {
    padding: 1rem;
}

.modal-body {
    padding: 1rem;
    gap: 1rem;
}

.modal-image-wrap {
    height: 140px;
    flex-shrink: 0;
}

.info-boxes {
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.modal-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 1rem;
}

.btn-cyan {
    width: 100%;
    padding: 0.75rem;
}

.section-padding {
    padding: 2.5rem 1rem;
}

.card {
    padding: 1rem;
}

.map-card {
    padding: 0;
}

}

@media (max-width: 380px) {
.brand {
align-items: flex-start;
}

.brand h1 {
    font-size: 0.85rem;
}

.hero h2 {
    font-size: 1.3rem;
}

.map-viewport {
    height: 340px;
}

.modal-icon {
    font-size: 1.5rem;
}

.badge-sm {
    font-size: 0.55rem;
}

}

.modal-image-wrap {
    height: 240px;
}

.modal-img {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.scanline {
    display: none;
}

.modal-image-wrap {
    position: relative;
    overflow: hidden;
}

.img-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    color: white;
    background: rgba(3, 7, 18, 0.8);
    cursor: pointer;
}

.img-nav.prev {
    left: 8px;
}

.img-nav.next {
    right: 8px;
}

.img-counter {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 3;
    padding: 4px 8px;
    border-radius: 6px;
    color: white;
    background: rgba(3, 7, 18, 0.8);
    font-size: 12px;
}

.img-nav:disabled {
    opacity: 0.35;
    cursor: default;
}

