/* ========== ESTILOS DEL MENÚ DE NAVEGACIÓN ========== */
/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1a1a2e;
    overflow-x: hidden;
}

/* ========== BARRA DE NAVEGACIÓN SUPERIOR ========== */
.navbar-top {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: #18392e;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 10000;
    backdrop-filter: blur(2px);
    border-bottom: 1px solid #4a8a3f;
}

.nav-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    position: relative;
}

/* Título Armoniza con color amarillo anaranjado */
.nav-logo {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: 'Roboto', 'Montserrat', sans-serif;
    background: linear-gradient(135deg, #ffb32b, #f5a623);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    z-index: 10001;
}

.nav-logo:hover {
    transform: scale(1.02);
    filter: brightness(1.2);
}

/* ========== BOTÓN HAMBURGUESA SIN CONTORNO ========== */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 0;
    cursor: pointer;
    z-index: 10001;
    padding: 8px;
    gap: 5px;
    transition: all 0.3s ease;
}

.hamburger-btn:hover {
    background: transparent;
    transform: scale(1.1);
}

/* Líneas del botón hamburguesa en color amarillo anaranjado */
.hamburger-line {
    display: block;
    width: 24px;
    height: 3px;
    background-color: #f5a623;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Animación del botón hamburguesa cuando está activo */
.hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
    background-color: #ffb32b;
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    background-color: #ffb32b;
}

/* ========== ENLACES DE NAVEGACIÓN ========== */
.nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-link {
    color: #c0c0c0;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 300;
    padding: 8px 8px;
    transition: all 0.2s ease;
    position: relative;
    letter-spacing: 0.3px;
    cursor: pointer;
    font-family: 'Roboto', 'Segoe UI', sans-serif;
}

.nav-link:hover {
    color: #ffffff;
}

/* Color personalizado para el enlace ReciproCalc */
#navReciprocalc {
    color: #ffb32b;
}

#navReciprocalc:hover {
    color: #ffcc66;
}

/* ========== MENÚ MÓVIL ========== */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 16px;
    }
    
    .nav-logo {
        font-size: 1.4rem;
    }
    
    /* Mostrar botón hamburguesa en móvil */
    .hamburger-btn {
        display: flex;
    }
    
    /* Ocultar menú por defecto en móvil */
    .nav-links {
        position: fixed;
        top: 60px;
        right: -100%;
        width: 280px;
        height: calc(100vh - 60px);
        background: #18392e;
        flex-direction: column;
        gap: 0;
        padding: 20px 0;
        transition: right 0.3s ease;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
        border-left: 1px solid #4a8a3f;
        z-index: 10000;
        overflow-y: auto;
    }
    
    /* Mostrar menú cuando está activo */
    .nav-links.active {
        right: 0;
    }
    
    .nav-link {
        width: 100%;
        padding: 16px 24px;
        font-size: 1rem;
        font-weight: 400;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        transition: all 0.2s ease;
    }
    
    .nav-link:hover {
        background: rgba(245, 166, 35, 0.15);
        color: #ffb32b;
        padding-left: 28px;
    }
    
    /* Overlay para cerrar el menú al hacer clic fuera */
    .nav-overlay {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        height: calc(100vh - 60px);
        background: rgba(0, 0, 0, 0.5);
        z-index: 9999;
        transition: opacity 0.3s ease;
    }
    
    .nav-overlay.active {
        display: block;
    }
}

/* Ajustes para pantallas muy pequeñas */
@media (max-width: 480px) {
    .nav-links {
        width: 100%;
    }
    
    .hamburger-line {
        width: 22px;
        height: 2.5px;
    }
}

/* ========== AJUSTES DEL CONTAINER PRINCIPAL ========== */
.container {
    margin-top: 0;
    position: relative;
    z-index: 1;
    height: calc(100vh - 60px);
    margin-top: 60px;
}

.canvas-container {
    height: 100%;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.canvas-container canvas {
    display: block;
}

.form-container {
    height: 100%;
}

/* Ajustar el toggle-sidebar */
.toggle-sidebar {
    top: 80px;
}

@media (max-width: 768px) {
    .toggle-sidebar {
        top: 75px;
    }
}

/* Mantener todos los estilos originales de la app */
.fondo-gris {
    background-color: #34622b;
}

/* Asegurar que los modales tengan z-index mayor */
.modal-overlay {
    z-index: 10001;
}

/* ========== OVERLAY DEL MENÚ MÓVIL ========== */
.nav-overlay {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: calc(100vh - 60px);
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.nav-overlay.active {
    display: block;
}