* { margin:0; padding:0; box-sizing:border-box; }
body { font-family: Arial, sans-serif; background: #f8fafc; color: #1e293b; line-height: 1.6; display: flex; flex-direction: column; min-height: 100vh; }

/* Navegación */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 8%;
    
    /* Estas 3 líneas son las que mantienen el nav fijo */
    position: sticky;
    top: 0;
    z-index: 1000; /* Asegura que el nav quede por encima de todo el contenido */
    
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

nav { display: flex; gap: 20px; }
nav a { text-decoration: none; color: #334155; font-weight: bold; }

/* Hero */
.hero { flex: 1; display: flex; justify-content: center; align-items: center; text-align: center; }
.logo .firma { font-size: 50px; font-style: italic; font-family: serif; }
.logo .nombre { font-size: 18px; letter-spacing: 5px; margin-top: 10px; }
.logo .apellidos { font-size: 12px; letter-spacing: 3px; opacity: 0.6; }

/* Footer más delgado */
footer {
    background: #111;
    color: #fff;
    text-align: center;
    padding: 10px 0; /* Reducido para ocupar menos espacio */
    font-size: 12px;
    letter-spacing: 1px;
}

.section-container { 
    padding: 20px 8% 50px 8%; /* Reducimos el padding superior original de 50px ya que el 'main' aporta los 90px */
    max-width: 800px; 
    margin: auto; 
}

.section-container h1 {
    margin-top: 40px; /* Le da un espacio extra al título respecto al menú fijo */
}

main, .section {
    padding-top: 90px; /* Empuja todo el contenido hacia abajo para que no lo tape el nav fixed */
}

.acordeon {
    background: #fff;
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    cursor: pointer;
}

.acordeon:active {
    transform: translateY(3px); /* Mueve el elemento 3px hacia abajo */
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); /* Reduce la sombra para dar efecto de profundidad */
}

.acordeon:hover {
    transform: translateY(-2px); /* Sube ligeramente el botón 2px */
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1); /* Sombra más grande y visible */
}

.acordeon summary {
    font-weight: 500; /* Un poco menos negrita para que sea más suave */
    font-size: 1.1rem;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* CAMBIA ESTO: Agrega summary para que el clic no afecte al texto desplegado */
.acordeon summary:active {
    transform: translateY(2px); 
}

/* Ajuste para que el signo sea sutil y opaco */
.acordeon summary::after {
    content: '+';
    font-size: 1.2rem;
    color: #cbd5e1; /* Un gris claro que se integra con el fondo */
    font-weight: 200; /* Muy delgado */
    opacity: 0.6;    /* Más transparente */
    transition: transform 0.3s ease;
}

/* Al abrir, el signo cambia pero sigue siendo sutil */
.acordeon[open] summary::after {
    content: '−'; /* Usamos el símbolo matemático de resta real */
    color: #94a3b8; /* Un tono un poco más oscuro al abrir */
}

.acordeon p {
    margin-top: 15px;
    color: #475569;
}

.grid-menu { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-top: 40px; }
.card-btn { 
    padding: 40px; border: none; border-radius: 20px; background: #fff; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.05); cursor: pointer; transition: 0.3s;
    font-size: 1.2rem; font-weight: bold;
}
.card-btn:hover { transform: translateY(-10px); background: #f1f5f9; }

.btn-volver { 
    background: none; border: 1px solid #cbd5e1; padding: 8px 16px; 
    border-radius: 8px; cursor: pointer; margin-bottom: 20px;
}
.grid-pilares { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 15px; margin-top: 20px; }

/* Heredamos la estructura de .card-btn, pero le damos un toque especial */
.grid-menu { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 20px; 
    margin-top: 40px; 
}

.card-btn {
    text-decoration: none;
    color: #1e293b;
    text-align: center;
    padding: 30px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
}

.card-btn:hover {
    background: #2563eb;
    color: #fff;
    transform: translateY(-5px);
}

.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-weight: bold; margin-bottom: 5px; color: #334155; }
.form-group input { 
    width: 100%; padding: 12px; border: 1px solid #cbd5e1; 
    border-radius: 10px; box-sizing: border-box;
}
#resultado { border-left: 5px solid #2563eb; background: #f1f5f9; }

.btn {
    display: inline-block;
    padding: 14px 24px;
    background: #2563eb !important; /* El !important fuerza el estilo */
    color: #fff !important;
    text-decoration: none;
    border-radius: 10px !important;
    border: none !important;
    cursor: pointer;
    text-align: center;
}

/* Centrar el título de la tarjeta */
.card h1 {
    text-align: center;
    color: #1e293b;
    margin-bottom: 20px;
}

/* Estilo para las descripciones pequeñas */
.input-desc {
    display: block;
    margin-top: 5px;
    font-size: 0.8rem;
    color: #64748b; /* Un gris más suave que el texto normal */
    font-style: italic;
}

/* Mejora el espacio entre grupos */
.form-group { 
    margin-bottom: 25px; 
}

.btn-secundario {
    background: #e2e8f0;
    color: #475569;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    margin-top: 15px;
    width: 100%;
}
.btn-secundario:hover { background: #cbd5e1; }

/*Pagina de inversión*/
:root {
        --bg-color: #f4f7f6;
        --card-bg: #ffffff;
        --primary: #2ecc71;
        --primary-hover: #27ae60;
        --text-main: #2c3e50;
        --text-muted: #7f8c8d;
        --border-color: #e2e8f0;
    }

    .simulador-wrapper {
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        background-color: var(--bg-color);
        color: var(--text-main);
        padding: 20px;
        box-sizing: border-box;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .simulador-container {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 24px;
        box-sizing: border-box;
    }

    .header {
        text-align: center;
        padding: 10px 0;
    }

    .header h1 {
        margin: 0;
        font-size: 1.8rem;
        color: #1a252f;
    }

    .header p {
        color: var(--text-muted);
        margin: 5px 0 0 0;
    }

    .card {
        background: var(--card-bg);
        border-radius: 16px;
        padding: 24px;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        box-sizing: border-box;
        width: 100%;
    }

    h3 {
        margin-top: 0;
        margin-bottom: 20px;
        color: #1a252f;
        font-size: 1.2rem;
    }

    .form-group {
        margin-bottom: 16px;
    }

    label {
        display: block;
        font-weight: 600;
        margin-bottom: 8px;
        font-size: 0.9rem;
    }

    .input-icon-wrapper {
        position: relative;
        display: flex;
        align-items: center;
        width: 100%;
    }

    .input-icon-wrapper span {
        position: absolute;
        left: 12px;
        color: var(--text-muted);
        font-weight: 600;
    }

    .input-moneda {
        padding-left: 28px !important;
    }

    input {
        width: 100%;
        padding: 12px;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        font-size: 1rem;
        box-sizing: border-box;
        transition: border-color 0.2s;
    }

    input:focus {
        outline: none;
        border-color: var(--primary);
    }

    button {
        width: 100%;
        background-color: var(--primary);
        color: white;
        border: none;
        padding: 14px;
        font-size: 1rem;
        font-weight: bold;
        border-radius: 8px;
        cursor: pointer;
        transition: background-color 0.2s;
        margin-top: 10px;
    }

    button:hover {
        background-color: var(--primary-hover);
    }

    .btn-excel {
        background-color: #1f7244;
        margin-top: 20px;
    }
    .btn-excel:hover {
        background-color: #154c2e;
    }

    .milestones-grid {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .milestone-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 0;
        border-bottom: 1px solid var(--border-color);
    }

    .milestone-item:last-child {
        border-bottom: none;
    }

    .milestone-year {
        font-weight: 600;
        background: #e8f8f0;
        color: var(--primary-hover);
        padding: 4px 10px;
        border-radius: 20px;
        font-size: 0.85rem;
    }

    .milestone-value {
        font-weight: bold;
        font-size: 1.1rem;
    }

    .chart-container {
        position: relative;
        width: 100%;
        height: auto;
    }

    .table-container {
        overflow-x: auto;
        margin-top: 10px;
        width: 100%;
    }

    table {
        width: 100%;
        border-collapse: collapse;
        text-align: left;
        font-size: 0.9rem;
        min-width: 500px;
    }

    th {
        background-color: #f8fafc;
        padding: 12px;
        font-weight: 600;
        border-bottom: 2px solid var(--border-color);
    }

    td {
        padding: 12px;
        border-bottom: 1px solid var(--border-color);
    }

    .hidden {
        display: none;
    }

    textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: sans-serif; /* Hereda la tipografía de tu sitio */
    resize: vertical; /* Permite que el usuario cambie el tamaño solo hacia abajo */
    box-sizing: border-box;
    }

    textarea:focus {
        outline: none;
        border-color: #2563eb; /* O el color principal que uses */
    }

    .btn-atras {
        background: #f1f5f9;
        padding: 8px 16px;
        border-radius: 8px;
        color: #475569;
        transition: background 0.2s;
    }

    .btn-atras:hover {
        background: #e2e8f0;
    }

    .btn-whatsapp {
        display: inline-block;
        padding: 12px 24px;
        background-color: #25d366; /* Color oficial de WhatsApp */
        color: white;
        text-decoration: none;
        border-radius: 8px;
        font-weight: bold;
        transition: background-color 0.3s ease;
    }

    .btn-whatsapp:hover {
        background-color: #128c7e; /* Un tono más oscuro al pasar el mouse */
    }

    #navbar-container {
    position: fixed; /* Hace que el contenedor se quede congelado en la pantalla */
    top: 0;          /* Lo pega al borde superior */
    left: 0;         /* Lo pega al borde izquierdo */
    width: 100%;     /* Asegura que ocupe todo el ancho de la pantalla */
    z-index: 1000;   /* Lo pone por encima de cualquier otro elemento (como el <main>) */
}