/* --- ESTILOS BASE --- */
* {
    margin: 0;
    padding: 0;

    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html,
body {
    overflow-x: hidden;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;


}

/* --- CABECERA Y MENÚ --- */
header {
    background-color: #1b4332;
    color: #fff;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.logo h1 {
    font-size: 1 rem;
    font-weight: 700;
    letter-spacing: 1 px;
}

nav ul {
    margin-right: 60px;
    display: flex;
    list-style: none;
    gap: 0.50 rem;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.7rem 0.5rem;
    border-radius: 4px;
}

nav a:hover,
nav a.active {
    color: #b7e4c7;
    background-color: rgba(255, 255, 255, 0.1);
}

/* --- HERO / BIENVENIDA --- */
.hero {
    background: linear-gradient(rgba(27, 67, 50, 0.85), rgba(27, 67, 50, 0.85)), url('https://images.unsplash.com/photo-1590283603385-17ffb3a7f29f?auto=format&fit=crop&w=1200&q=80') no-repeat center center/cover;
    color: white;
    text-align: center;
    padding: 4rem 2rem;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/* --- CUERPO PRINCIPAL Y PRESENTACIÓN --- */
main {
    max-width: 1000px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.presentacion {
    background-color: #ffffff;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 4rem;
}

.presentacion h3 {
    color: #1b4332;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    border-bottom: 2px solid #40916c;
    padding-bottom: 0.5rem;
}

.presentacion p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    text-align: justify;
}

/* --- CONTENEDOR NUEVO DE LA IMAGEN (PC) --- */
.presentacion-container {
    display: flex;
    align-items: center;
    gap: 30px;
}

.presentacion-texto {
    flex: 1;
}

.presentacion-imagen {
    flex: 0 0 220px;
    display: flex;
    justify-content: center;
}

.foto-perfil {
    width: 100%;
    max-width: 220px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45), 0 5px 15px rgba(0, 0, 0, 0.25);
    object-fit: cover;
}

.proposito-box {
    background-color: #e9f5ed;
    border-left: 5px solid #2d6a4f;
    padding: 1.5rem;
    margin-top: 2rem;
    border-radius: 0 8px 8px 0;
}

.proposito-box h4 {
    color: #2d6a4f;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.proposito-box a {
    color: #2d6a4f;
    font-weight: bold;
    text-decoration: underline;
}

/* --- SECCIÓN: TARJETAS (GRANITOS) --- */
.granitos-seccion {
    text-align: center;
}

.seccion-titulo {
    color: #1b4332;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.seccion-subtitulo {
    color: #666;
    margin-bottom: 2.5rem;
}

.granitos-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.granito-card {
    background-color: #fff;
    padding: 2.5rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.granito-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #40916c;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.granito-card h4 {
    color: #1b4332;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.granito-card p {
    color: #555;
    font-size: 0.95rem;
}

.granito-card.seleccionada {
    background-color: #e9f5ed;
    border-color: #2d6a4f;
}

/* --- PIE DE PÁGINA --- */
footer {
    text-align: center;
    padding: 2rem;
    background-color: #1b4332;
    color: white;
    margin-top: 4rem;
    font-size: 0.9rem;
}

/* --- ADAPTACIÓN ADICIONAL PARA MÓVILES (RESPONSIVE) --- */
@media screen and (max-width: 768px) {

    /* 👇 ASEGURA EL CENTRADO TOTAL DE "FINANZAS DOMI" 👇 */
    .logo {
        width: 100%;
        display: flex;
        justify-content: center;
        text-align: center;
    }

    .logo h1 {
        margin: 0 auto;
        text-align: center;
    }

    nav ul {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr);
        /* 3 columnas fijas */
        gap: 1rem;
        /* Separación limpia entre filas y columnas */
        padding: 0;
        list-style: none;
        width: 100%;
    }

    nav a,
    nav select {
        display: block;
        text-align: center;
        font-size: 0.9rem;
        /* Un pelín más pequeño para pantallas estrechas */
        padding: 0.5rem 0;
    }

    .presentacion-container {
        flex-direction: column-reverse;
        /* Pone la foto encima del texto en el móvil */
        gap: 20px;
    }

    .presentacion-imagen {
        max-width: 180px;
        width: 100%;

        /* Reducimos el tamaño de la foto en móviles */
    }

    /* 👇 ESTO ES LO QUE FALTA PARA QUE LA FOTO NO SE SALGA A LA DERECHA 👇 */
    .foto-perfil {
        max-width: 180px !important;
        /* Fuerza a la foto a no medir más de 180px */
        width: 100% !important;
        /* La obliga a encogerse si el móvil es muy pequeño */
        height: auto !important;
        /* Mantiene la proporción para que no se deforme */
        margin: 0 auto;
        /* La centra perfectamente */
    }
}