:root {
    --color-primario: #003366;           /* Azul principal (para botones, títulos) */
    --color-secundario-oscuro: #2c3e50;  /* Azul-gris oscuro (para el footer) */
    --color-texto: #333333;              /* Texto principal oscuro */
    --color-texto-secundario: #555;     /* Texto gris más claro */
    
    --color-fondo-principal: #f4f7f9;    /* Gris-azulado claro para el fondo del BODY */
    --color-fondo-alterno: #FFFFFF;     /* Blanco puro para secciones alternas */
    --color-superficie: #FFFFFF;        /* Blanco para las tarjetas */
    --color-borde: #dfe6ec;              /* Borde gris-azulado sutil */
}

body {
    font-family: 'Lato', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.7;
    color: var(--color-texto);
    background-color: var(--color-fondo-principal); 
}

h1, h2, h3 {
    font-family: 'Merriweather', serif;
    color: var(--color-primario);
    font-weight: 500;
}

h4 {
    font-family: 'Merriweather', serif;
    color: var(--color-primario);
    font-weight: 700;
    font-size: 1.3em;
    margin-top: 0;
}
.text {
  text-align: justify;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

header {
    background: var(--color-superficie); 
    padding: 20px 0;
    border-bottom: 1px solid var(--color-borde); 
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo {
    font-size: 1.5em;
    font-family: 'Merriweather', serif;
    color: var(--color-primario);
    text-decoration: none;
    font-weight: 700;
}

header nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
}

header nav li {
    margin-left: 25px;
}

header nav a {
    text-decoration: none;
    color: var(--color-texto-secundario);
    font-weight: 700;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 5px; 
}

header nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-primario);
    transition: width 0.3s ease-out;
}

header nav a:hover::after {
    width: 100%;
}

header nav a:hover {
    color: var(--color-primario);
}

.hero {
    background-color: var(--color-fondo-principal); 
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.8em;
    margin-bottom: 20px;
} 

.hero p {
    font-size: 1.2em;
    color: var(--color-texto-secundario); 
    max-width: 700px;
    margin: 0 auto 30px auto;
}


.btn {
    background-color: var(--color-primario);
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 51, 102, 0.15);
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #004a8d;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 51, 102, 0.25);
}

/* --- Secciones Generales --- */
section {
    padding: 60px 0;
}

#sobre-mi, #proceso {
    background-color: var(--color-fondo-alterno); 
    border-top: 1px solid var(--color-borde);
    border-bottom: 1px solid var(--color-borde);
}


section h2 {
    text-align: center;
    font-size: 2.2em;
    margin-bottom: 50px;
    position: relative;
    padding-bottom: 15px; 
}

section h2::after {
    content: '';
    position: absolute;
    width: 60px; 
    height: 3px; 
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-primario);
    opacity: 0.3; 
}

/* --- Sobre Mí --- */
#sobre-mi .content {
    display: flex;
    align-items: flex-start;
    gap: 40px;
}

#sobre-mi .text {
    flex: 2;
}

#sobre-mi .credentials {
    flex: 1;
    background: var(--color-fondo-principal); 
    border: 1px solid var(--color-borde);
    padding: 25px;
    border-radius: 8px;
}

#sobre-mi .credentials h3 {
    margin-top: 0;
    border-bottom: 2px solid var(--color-primario);
    padding-bottom: 10px;
}

#sobre-mi .credentials ul {
    list-style: none;
    padding-left: 0;
}

#sobre-mi .credentials li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
}

#sobre-mi .credentials li::before {
    font-family: "Font Awesome 6 Free"; 
    content: '\f0a3'; 
    font-weight: 900; 
    position: absolute;
    left: 0;
    top: 2px; 
    color: var(--color-primario);
    font-size: 1.1em;
}

/* --- Mi Enfoque (Servicios) --- */
.enfoque-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.enfoque-card {
    background: var(--color-superficie); 
    border: 1px solid var(--color-borde); 
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03); 
    transition: all 0.3s ease;
}

.enfoque-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
}

.enfoque-card h3 {
    font-size: 1.4em;
    margin-top: 0;
}

.filosofia-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.filosofia-card {
    background: var(--color-fondo-alterno); 
    border: 1px solid var(--color-borde);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.filosofia-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
}

.filosofia-card h3 {
    font-size: 1.4em;
    margin-top: 0;
    margin-bottom: 15px;
}

.filosofia-card .fa-solid {
    font-size: 2.5em;
    color: var(--color-primario);
    margin-bottom: 10px;
}

.filosofia-card h4 {
    font-size: 1.4em;
}

.subtitulo-proceso {
    text-align: center;
    font-size: 1.8em;
    font-family: 'Merriweather', serif;
    color: var(--color-texto); 
    margin-bottom: 40px;
}

.proceso-pasos {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    text-align: center;
}

.paso .paso-numero {
    width: 60px;
    height: 60px;
    background-color: var(--color-primario);
    color: white;
    font-size: 2em;
    font-weight: 700;
    font-family: 'Merriweather', serif;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    box-shadow: 0 5px 10px rgba(0, 51, 102, 0.2);
}

/* --- Contacto --- */
.contact-card {
    max-width: 700px;
    margin: 0 auto;
    background: var(--color-superficie); 
    padding: 30px 40px; 
    border-radius: 8px;
    border: 1px solid var(--color-borde);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 700;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box; 
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primario);
    box-shadow: 0 0 5px rgba(0, 51, 102, 0.2);
}

.contact-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}
.oculto {
    display: none;
}
        
/* --- Footer --- */
footer {
    background: var(--color-secundario-oscuro); 
    color: #f4f4f4;
    text-align: center;
    padding: 30px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer p {
    margin: 0;
}

@media (max-width: 768px) {
    .enfoque-grid,
    .filosofia-grid,
    .proceso-pasos {
        grid-template-columns: 1fr;
    }

    #sobre-mi .content {
        flex-direction: column;
    }
    
    header .container {
        flex-direction: column;
        gap: 15px;
    }

    header nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    header nav li {
        margin-left: 10px;
    }

    .contact-card {
        padding: 20px;
    }
}


.preloader {
    position: fixed;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--color-secundario-oscuro); 
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.preloader .fa-spinner {
    font-size: 3em;
    color: var(--color-superficie); 
}

/* --- 2. Ocultar contenido mientras carga --- */
/* Por defecto, todo el contenido principal está oculto */
body:not(.is-loaded) header,
body:not(.is-loaded) section,
body:not(.is-loaded) footer,
body:not(.is-loaded) .back-to-top {
    opacity: 0;
}

body.is-loaded .preloader {
    opacity: 0;
    visibility: hidden; 
    pointer-events: none; 

body.is-loaded header,
body.is-loaded section,
body.is-loaded footer,
body.is-loaded .back-to-top {
    opacity: 1;
    transition: opacity 0.5s ease-in 0.2s; 
}
}
/* --- 4. Estilos del Botón "Back to Top" --- */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: var(--color-primario);
    color: var(--color-superficie);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 51, 102, 0.25);
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1000;
}
.text{
    text-align: justify;
}

.back-to-top.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top:hover {
    background: #004a8d; 
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 51, 102, 0.35);
}
@media (max-width: 768px) {
    .enfoque-grid,
    .filosofia-grid,
    .proceso-pasos {
        grid-template-columns: 1fr;
    }

    #sobre-mi .content {
        flex-direction: column;
    }
    
    header .container {
        flex-direction: column;
        gap: 15px;
    }

    header nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    header nav li {
        margin-left: 10px;
    }

    .contact-card {
        padding: 20px;
    }
    
    .hero h1 {
        font-size: 10vw; 
        line-height: 1.2;
    }
}
