/* =========================================
   VARIABLES Y SISTEMA DE DISEÑO - Módulo 3
   ========================================= */
:root {
    /* Paleta de Colores Base */
    --bg-color: #05070A;
    --bg-secondary: #0A121A;
    --text-primary: #FFFFFF;
    --text-secondary: #A0ABC0;
    
    /* Acentos - Estilo FSM & GPS Focus */
    --neon-green: #00E676;
    --emerald: #10B981;
    --electric-cyan: #00F0FF;
    --blue-gps: #3B82F6; /* Para mapas / radar */
    --accent-glow: rgba(59, 130, 246, 0.4); 
    --cyan-glow: rgba(0, 240, 255, 0.2);
    
    /* Estado / Utilidades */
    --warning-color: #FFB020;
    --danger-color: #FF3B30;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    
    /* Tipografía */
    --font-main: 'Outfit', sans-serif;
}

/* =========================================
   RESET Y ESTILOS BASE
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Fondo Animado (Orbes de luz) */
.ambient-light {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.5;
    animation: pulse 8s infinite alternate;
}
.light-1 {
    top: -10%; left: -10%;
    width: 60vw; height: 60vw;
    background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, rgba(0,0,0,0) 70%);
}
.light-2 {
    top: 40%; right: -20%;
    width: 60vw; height: 60vw;
    background: radial-gradient(circle, rgba(0,240,255,0.12) 0%, rgba(0,0,0,0) 70%);
    animation-delay: 2s;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.4; }
    100% { transform: scale(1.2); opacity: 0.7; }
}

/* =========================================
   UTILIDADES
   ========================================= */
.text-center { text-align: center; }
.mt-4 { margin-top: 2rem; }
.font-bold { font-weight: 800; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.text-gradient {
    background: linear-gradient(90deg, var(--electric-cyan), var(--blue-gps));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-green {
    background: linear-gradient(90deg, var(--neon-green), var(--emerald));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.glass-card:hover, .hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 32px;
    border-radius: 50px;
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(90deg, var(--blue-gps), var(--electric-cyan));
    color: #fff;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.6);
    transform: scale(1.05);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--electric-cyan);
}

.btn-secondary:hover {
    background: rgba(0, 240, 255, 0.1);
}

.btn-block {
    display: flex;
    width: 100%;
}

/* Animaciones Scroll */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* =========================================
   Navegación
   ========================================= */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 100;
    background: rgba(5, 7, 10, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-links {
    display: flex;
    gap: 32px;
}
.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}
.nav-links a:hover {
    color: var(--electric-cyan);
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
    padding-top: 180px;
    padding-bottom: 100px;
    text-align: center;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
}
.hero .badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 20px;
    color: var(--electric-cyan);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 24px;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}
.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -1px;
}
@media (max-width: 992px) {
    .hero h1 { font-size: 3.2rem; }
}
.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 48px auto;
}
.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Map Dashboard Mockup en Hero */
.map-mockup {
    margin-top: 80px;
    border-radius: 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
    position: relative;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5), 0 0 50px rgba(59, 130, 246, 0.15);
    text-align: left;
}
.map-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px 20px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.map-body {
    padding: 0;
    height: 380px;
    position: relative;
    background: #0f172a; /* Dark map bg */
    background-image: 
        radial-gradient(circle at 100% 150%, #0f172a 24%, #1e293b 24%, #1e293b 28%, #0f172a 28%, #0f172a 36%, #1e293b 36%, #1e293b 40%, transparent 40%, transparent),
        radial-gradient(circle at 0    150%, #0f172a 24%, #1e293b 24%, #1e293b 28%, #0f172a 28%, #0f172a 36%, #1e293b 36%, #1e293b 40%, transparent 40%, transparent),
        radial-gradient(circle at 50%  100%, #1e293b 10%, #0f172a 10%, #0f172a 23%, #1e293b 23%, #1e293b 30%, #0f172a 30%, #0f172a 43%, #1e293b 43%, #1e293b 50%, #0f172a 50%, #0f172a 63%, #1e293b 63%, #1e293b 71%, transparent 71%, transparent),
        radial-gradient(circle at 100% 50%, #1e293b 5%, #0f172a 5%, #0f172a 15%, #1e293b 15%, #1e293b 20%, #0f172a 20%, #0f172a 29%, #1e293b 29%, #1e293b 34%, #0f172a 34%, #0f172a 44%, #1e293b 44%, #1e293b 49%, transparent 49%, transparent),
        radial-gradient(circle at 0    50%, #1e293b 5%, #0f172a 5%, #0f172a 15%, #1e293b 15%, #1e293b 20%, #0f172a 20%, #0f172a 29%, #1e293b 29%, #1e293b 34%, #0f172a 34%, #0f172a 44%, #1e293b 44%, #1e293b 49%, transparent 49%, transparent);
    background-size: 150px 75px;
    display: flex;
}
.map-sidebar {
    width: 250px;
    background: rgba(10, 18, 26, 0.9);
    border-right: 1px solid var(--glass-border);
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 2;
}
.map-route-area {
    flex: 1;
    position: relative;
    overflow: hidden;
}
.tech-card {
    background: rgba(255,255,255,0.05);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    animation: fadeIn 0.5s ease-in-out;
}
.tech-card.active { border-color: var(--blue-gps); background: rgba(59, 130, 246, 0.1); }
.tech-card .status { font-size: 0.75rem; display:flex; align-items:center; gap:5px; margin-top:5px; }

/* Marcadores animadas GPS */
.gps-marker {
    position: absolute;
    width: 14px; height: 14px;
    background: var(--neon-green);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px var(--neon-green);
    z-index: 5;
}
.gps-marker::after {
    content: ''; position: absolute; top: -10px; left: -10px; width: 34px; height: 34px;
    border-radius: 50%; border: 2px solid var(--neon-green);
    animation: ripple 2s infinite ease-out;
}
.gps-marker.marker-blue { background: var(--blue-gps); box-shadow: 0 0 10px var(--blue-gps); }
.gps-marker.marker-blue::after { border-color: var(--blue-gps); }

.route-line {
    position: absolute;
    width: 150px; height: 3px;
    background: linear-gradient(90deg, var(--blue-gps), transparent);
    transform-origin: 0 50%;
    transform: rotate(-25deg);
    top: 50%; left: 30%;
    animation: dashRoute 3s infinite linear;
    opacity: 0.6;
}

@keyframes dashRoute {
    0% { background-position: -150px 0; }
    100% { background-position: 150px 0; }
}

@keyframes ripple {
    0% { transform: scale(0.5); opacity: 1; }
    100% { transform: scale(2); opacity: 0; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* =========================================
   Secciones Generales
   ========================================= */
.section-padding { padding: 100px 0; }
.section-header { text-align: center; margin-bottom: 80px; }
.section-header h2 { font-size: 3rem; margin-bottom: 16px; line-height: 1.2; }
.section-header p { color: var(--text-secondary); font-size: 1.15rem; max-width: 650px; margin: 0 auto; }

/* Grid Cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.icon-box {
    width: 64px; height: 64px; border-radius: 16px;
    background: rgba(59, 130, 246, 0.1); display: flex; align-items: center; justify-content: center;
    margin-bottom: 24px; color: var(--blue-gps);
}
.icon-box.cyan { background: rgba(0, 240, 255, 0.1); color: var(--electric-cyan); }
.icon-box.danger { background: rgba(255, 59, 48, 0.1); color: var(--danger-color); }
.icon-box.warning { background: rgba(255, 176, 32, 0.1); color: var(--warning-color); }
.icon-box.green { background: rgba(0, 230, 118, 0.1); color: var(--neon-green); }

.feature-card h3 { font-size: 1.4rem; margin-bottom: 16px; }
.feature-card p { color: var(--text-secondary); }

/* Caso de Uso - Two columns */
.use-case-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.step-list { display: flex; flex-direction: column; gap: 30px; }
.step-item { display: flex; gap: 20px; }
.step-number {
    width: 40px; height: 40px; flex-shrink: 0;
    background: rgba(59, 130, 246, 0.1); border: 2px solid var(--blue-gps);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: bold; color: var(--blue-gps); font-size: 1.2rem;
}
.step-content h4 { font-size: 1.3rem; margin-bottom: 8px; color: #fff; }
.step-content p { color: var(--text-secondary); }

/* Phone Mockup Right side */
.phone-mockup {
    background: #000;
    border: 12px solid #222;
    border-radius: 40px;
    height: 500px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 40px rgba(59, 130, 246, 0.2);
    display: flex; flex-direction: column;
}
.phone-mockup::before {
    content:''; position:absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 150px; height: 25px; background: #222; border-bottom-left-radius: 15px; border-bottom-right-radius: 15px; z-index:10;
}
.phone-header {
    background: var(--blue-gps); padding: 35px 20px 15px; color: #fff;
    display: flex; justify-content: space-between; align-items: center; font-weight: bold;
}
.phone-body {
    background: #111; flex: 1; padding: 20px;
}
.job-alert {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px; padding: 15px;
    animation: slideUp 0.5s ease-out forwards;
}
@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* CTA Section */
.cta-section {
    background: linear-gradient(180deg, var(--bg-color) 0%, rgba(59, 130, 246, 0.1) 100%);
    text-align: center; position: relative; overflow: hidden; border-top: 1px solid var(--glass-border);
}

/* Footer */
footer { border-top: 1px solid var(--glass-border); padding: 40px 0; text-align: center; color: var(--text-secondary); }

/* Modal */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); backdrop-filter: blur(10px); z-index: 1000;
    display: flex; align-items: center; justify-content: center; opacity: 0;
    pointer-events: none; transition: opacity 0.3s ease;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal-content {
    background: var(--bg-secondary); border: 1px solid var(--glass-border); padding: 40px;
    border-radius: 24px; width: 90%; max-width: 500px; position: relative;
    transform: translateY(20px); transition: transform 0.3s ease; box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}
.modal-overlay.active .modal-content { transform: translateY(0); }
.close-modal {
    position: absolute; top: 20px; right: 20px; background: none; border: none;
    color: var(--text-secondary); cursor: pointer; padding: 5px; display: flex;
}
.close-modal:hover { color: var(--text-primary); }
.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; margin-bottom: 8px; color: var(--text-secondary); font-size: 0.9rem;}
.form-group input {
    width: 100%; padding: 12px 16px; background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border); border-radius: 8px; color: #fff;
    font-family: var(--font-main); outline: none; transition: border-color 0.3s;
}
.form-group input:focus { border-color: var(--blue-gps); }

@keyframes spin { 100% { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }

/* Responsive */
@media (max-width: 992px) {
    .use-case-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero p { font-size: 1.1rem; }
    .hero-buttons { flex-direction: column; }
    .grid-3 { grid-template-columns: 1fr; }
    .map-sidebar { display: none; }
    .section-header h2 { font-size: 2.2rem; }
}
