:root {
    --bg-color: #f4f4f5; /* Fondo casi blanco puro */
    --text-dark: #333333;
    --text-light: #ffffff;
    --accent-blue: #86b4bc; /* Azul suave botón */
    --accent-dark: #5c5c5c; /* Botón Login oscuro suave */
    --satoshi: 'Satoshi', sans-serif;
    
    /* Paleta de colores reservada para usarse más adelante */
    --brand-pink: #e38494;
    --brand-purple: #a997bf;
    --brand-blue: #99bed0;
    --brand-yellow: #e9c068;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--satoshi);
    background-color: var(--bg-color);
    color: var(--text-dark);
    height: 100vh;
    overflow-x: hidden;
}

/* --- BARRA DE NAVEGACIÓN --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5rem; /* Menos margen superior */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100; /* Por encima del mega-menu para que siempre sea visible */
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

#main-logo {
    height: 40px;
    width: auto;
}

.logo-text {
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    line-height: 0.9;
    color: var(--text-dark);
}

.logo-text span {
    font-weight: 300;
    font-size: 1.4rem;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    margin-right: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #000000; /* Textos del menú en negro */
    font-weight: 400;
    font-size: 1.05rem;
    opacity: 0.7;
    transition: opacity 0.2s, color 0.2s;
}

.nav-links a:hover {
    opacity: 1;
    color: #000000; /* Rollover en negro */
}

.nav-actions {
    display: flex;
}

.btn-login {
    background-color: var(--accent-dark);
    color: white;
    border: none;
    padding: 0.5rem 1.5rem; /* Más pequeño */
    border-radius: 50px;    /* Totalmente redondeado */
    font-family: var(--satoshi);
    font-weight: 400;       /* Grosor rebajado */
    cursor: pointer;
    font-size: 1rem;        /* Letra igual */
    transition: background-color 0.2s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.btn-login:hover {
    background-color: #333;
}

/* --- SECCIÓN HERO --- */
.hero {
    position: relative;
    padding: 8rem 5rem; /* Padding superior e inferior iguales para centrado global, y evita colisión con header */
    min-height: 100vh;            /* Permite crecer en móviles, evita solapamientos */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Manejo de la Imagen de Fondo */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center; /* Centrar la imagen en la pantalla */
}

/* Contenido Principal (Texto y Botones) */
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
}

.kicker {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

.kicker strong {
    font-weight: 700;
}

.headline {
    font-size: 4.0rem; /* Tamaño de typografia bajado */
    font-weight: 400; /* Texto fino blanco */
    line-height: 1.1;
    color: var(--text-light);
    margin-bottom: 3rem;
    letter-spacing: -1px;
}

.headline span {
    font-weight: 700; /* Las palabras "Simplifica" y "automatiza" resaltadas */
}

.hero-buttons {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.btn-primary {
    background-color: var(--accent-dark);
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-family: var(--satoshi);
    font-weight: 400;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    background-color: #333;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.btn-text {
    text-decoration: none;
    color: var(--text-light); 
    font-weight: 400;         
    font-size: 1.05rem;       /* Tamaño igual al del menú */
    transition: opacity 0.2s, color 0.2s; 
}

.btn-text:hover {
    opacity: 1;
    color: #000000;           /* Mismo rollover que el menú */
}

/* --- MODAL POP-UP --- */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s, opacity 0.3s;
}

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

.modal-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px); /* Efecto difuminado como en la imagen */
}

.modal-container {
    position: relative;
    background: white;
    width: 850px;
    max-width: 95%;
    border-radius: 20px;
    display: flex;
    box-shadow: 0 30px 60px rgba(0,0,0,0.2);
    overflow: hidden;
    z-index: 1001;
    transform: translateY(20px) scale(0.98);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.active .modal-container {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
    z-index: 1002;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: #000;
}

/* Modal Left (Image Side) */
.modal-left {
    width: 42%;
    background-image: url('./assets/IMG_Form_Nuntia.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.modal-left-content {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0; left: 0;
}

.left-logo {
    position: absolute;
    top: 2.5rem;
    left: 2.5rem;
    width: 130px; /* Tamaño adecuado para el logo top-left */
    height: auto;
}

/* Modal Right (Form Side) */
.modal-right {
    width: 58%;
    padding: 3.5rem 4rem;
}

.modal-right h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--text-dark);
    letter-spacing: -0.5px;
}

.modal-subtitle {
    font-size: 1rem;
    color: #666;
    margin-bottom: 2.5rem;
    line-height: 1.5;
}

.demo-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dark);
}

.form-group .opcional {
    color: #999;
    font-weight: 400;
    float: right;
    font-size: 0.85rem;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: var(--satoshi);
    font-size: 0.95rem;
    color: var(--text-dark);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
    width: 100%;
}

.form-group textarea {
    resize: vertical;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    border-color: #5b3ce6;
    box-shadow: 0 0 0 3px rgba(91, 60, 230, 0.1);
}

.form-group input::placeholder, 
.form-group textarea::placeholder {
    color: #bbb;
}

.btn-submit {
    background-color: var(--accent-dark);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem; /* Ajustado para formulario, un poco más alto que el login */
    border-radius: 50px;
    font-family: var(--satoshi);
    font-weight: 400;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.btn-submit:hover {
    transform: translateY(-2px);
    background-color: #333;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

/* --- MEGA MENU WORKERS --- */
.mega-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 40;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

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

.mega-menu {
    position: fixed;
    top: 0; /* Arranca desde el borde superior de la página */
    left: 0;
    width: 100%;
    background: #ffffff; /* Fondo blanco puro */
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    z-index: 50;
    
    /* La animación "Brutal" tipo Google/Apple */
    transform: translateY(-15px) scale(0.99);
    opacity: 0;
    visibility: hidden;
    transform-origin: top center;
    /* Spring smooth cubic-bezier curve para ese deslizado fluido */
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.4s ease, visibility 0.4s ease;
}

.mega-menu.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

.mega-content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 8rem 5rem 3.5rem; /* Padding-top generoso para que el contenido quede debajo del header */
}

.mega-grid {
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.mega-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-dark);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 140px;
}

.mega-item:hover {
    transform: translateY(-6px);
}

.mega-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.8rem;
    background: none; /* Sin fondo CSS, el SVG trae el suyo propio */
}

.mega-item:hover .mega-icon {
    filter: brightness(0.97); /* Sutil oscurecimiento al pasar el ratón */
}

.mega-icon img {
    width: 60px; /* El SVG ocupa todo el contenedor */
    height: auto;
}

.mega-text {
    text-align: center;
}

.mega-text h4 {
    font-family: var(--satoshi);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.15rem;
    letter-spacing: -0.3px;
    color: #000;
}

.mega-text p {
    font-size: 0.8rem;
    color: #555;
    margin: 0;
}

/* Los fondos pastel ya están incluidos dentro de los propios archivos SVG */

/* ================================= */
/* LOGIN MODAL                       */
/* ================================= */
#login-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#login-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.login-card {
    background: #1a1a2e;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 48px 40px;
    width: 400px;
    max-width: 90vw;
    text-align: center;
    color: #fff;
    position: relative;
    transform: translateY(20px) scale(0.96);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}

#login-modal.active .login-card {
    transform: translateY(0) scale(1);
}

.login-card input:focus {
    border-color: rgba(139,92,246,0.5) !important;
    box-shadow: 0 0 0 2px rgba(139,92,246,0.15);
}
