/* 1. RESET Y BASES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden; /* Evita scroll lateral molesto */
}

/* 2. NAVEGACIÓN (Escritorio) */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky; /* Se queda arriba al bajar */
    top: 0;
    z-index: 100;
}

.logo-img {
    height: 45px; /* Ajuste ideal para logos en barra */
    display: block;
}

.logo-text {
    display: none; /* Solo para móvil */
    font-weight: bold;
    font-size: 1.3rem;
    color: #287AFF;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: 0.3s;
}

.nav-links a:hover {
    color: #287AFF;
}

.menu-toggle {
    display: none;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
}

/* 3. BOTONES */
.btn-primary, .btn-large {
    background: #287AFF;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.1rem;
}

.btn-primary:hover, .btn-large:hover {
    background: #1a56b3; /* Un azul más oscuro, no morado, para consistencia */
    transform: translateY(-2px);
}

/* 4. HERO SECTION */
.hero {
    text-align: center;
    padding: 80px 5%;
    background: linear-gradient(to bottom, #f9f9ff, #fff);
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem); /* Tamaño fluido según pantalla */
    margin-bottom: 1px;
}

.gradient-text {
    /* background: linear-gradient(90deg, #00c4cc, #8b3dff); */
    background: #1a56b3;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 30px;
}

/* 5. GRID DE CARACTERÍSTICAS */
.features {
    padding: 60px 5%;
    text-align: center;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.card {
    padding: 30px;
    border: 1px solid #eee;
    text-align: justify;
    border-radius: 10px;
    transition: 0.3s;
}

.card-title {
    text-align: center;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

/* 6. MODAL (CONTACTO) */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content-box {
    background: white;
    width: 90%;
    max-width: 550px;
    margin: 5% auto;
    border-radius: 15px;
    position: relative;
    box-shadow: 0 5px 30px rgba(0,0,0,0.3);
    animation: aparecer 0.3s ease-out;
}

.close-btn {
    position: absolute;
    right: 20px; top: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #888;
}

@keyframes aparecer {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* 7. AJUSTES RESPONSIVE (CELULARES) */
@media (max-width: 768px) {
    .navbar {
        justify-content: center; /* Centra el logo */
        position: relative;
    }

    .menu-toggle {
        display: block;
        position: absolute; /* Lo mueve a la derecha sin afectar al logo centrado */
        right: 20px;
    }

    .nav-links {
        display: none; /* Empieza oculto */
        flex-direction: column;
        position: absolute;
        top: 60px; /* Ajusta según el alto de tu barra */
        left: 0;
        width: 100%;
        background: white;
        padding: 30px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        z-index: 1000;
    }

    /* ESTO ES LO QUE FALTA: Cuando JS agrega la clase 'active', el menú se muestra */
    .nav-links.active {
        display: flex;
    }
}