/* ===================================
   VARIABLES Y RESETEOS GLOBALES
   =================================== */

:root {
    --fuentePrincipal: 'Poppins', sans-serif;
    --blanco: #FFF;
    --principalColorFuente: #fe8e17;
    --colorSecundario: #f3efef;
    --gold: #BBA53D;
    --colorPrimario: #037bc0;
    --colorOscuro: #061f28;
    --colorSecundarioDark: #064b72;
}

html {
    box-sizing: border-box;
    font-size: 62.5%;
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    background-color: var(--colorOscuro);
    font-family: var(--fuentePrincipal);
    font-size: 2rem;
    line-height: 2;
    color: var(--colorSecundario);
    align-items: center;
}

/* ===================================
   ESTILOS GLOBALES
   =================================== */

h1, h2, h3 {
    font-family: var(--fuentePrincipal);
    font-style: normal;
    font-weight: 600;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 4rem;
}

h3 {
    font-size: 3rem;
}

a {
    text-decoration: underline; 
    color: var(--gold);
}
a:hover {
    text-decoration: underline;   /* mantiene el subrayado */
    color: var(--principalColorFuente);           /* sigue dorado, sin cambiar a azul */
    opacity: 0.85;                /* leve cambio visual al pasar el mouse */
}

/* ===================================
   UTILIDADES
   =================================== */

.contenedor {
    max-width: 1200px;
    margin: 0 auto;
}

.text-center {
    text-align: center;
}

.max-width-30 {
    max-width: 20rem;
}

/* ===================================
   HEADER Y NAVEGACIÓN
   =================================== */

header {
    display: flex;              /* convierte el header en contenedor flex */
    justify-content: center;    /* centra horizontalmente todo su contenido */
    align-items: center;        /* centra verticalmente */
}

.nombresergio {
        margin-top: 4rem;
    font-weight: bold;
    font-size: 2.4rem;
    text-align: center;
    color: var(--colorPrimario);   /* Sergio en azul */
    display: inline-flex;          /* logo + texto en línea */
    align-items: center;           /* centrado vertical */
    /*justify-content: center;       /* centrado horizontal */
    /*width: auto;                   /* evita que se expanda */
    gap: 0;                        /* elimina espacio automático */
}

.nombresergio .logo {
    height: 8.4rem;                /* tamaño proporcional */
    width: auto;
    max-height: 7.4rem;
    max-width: 7.4rem;
    object-fit: contain;
    display: inline;               /* se comporta como letra */
    vertical-align: middle;
    margin-right: -0.9rem;         /* une logo con “ergio” */
    position: relative;
    top: 0.1rem;                   /* ajuste fino vertical */
}

.logo-container img.logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* asegura que se ajuste sin deformarse */
}


.nombresergio span {
   color: var(--principalColorFuente); /* Aguilar Alejandre en naranja */
    font-weight: lighter;
    margin-left: 1rem;               /* espacio entre “ergio” y apellido */
}

.contenedor-navegacion {
    border-top: 1px solid #e1e1e1;
}

.nav-principal {
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
}

/* Botón Hamburguesa (oculto en pantallas grandes) */
.menu_boton {
    display: none;
    font-size: 2rem;
    background: none;
    border: none;
    color: var(--gold);
    cursor: pointer;
    text-align: center;
}

/* ===================================
   IMAGEN Y CONTENEDOR
   =================================== */

.fondoImagen {
    width: 840px;
    height: 880px;
    display: flex;
    flex-direction: row;
    justify-content: center;   /* centra todo el contenido */ /*justify-content: space-around; */
    align-items: flex-start;   /* mantiene arriba */ /*align-items: center; */
    margin: 0 auto;            /* asegura centrado */ /*overflow: hidden; */
}

.dimensiones {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    align-content: center;
    justify-items: center;
}

/* ===================================
   CARD (Página Principal)
   =================================== */

.card-title {
    color: #bd6b0d;
    font-size: 1em;
    line-height: normal;
    font-weight: 700;
    margin-bottom: 0.5em;
}

.small-desc {
    font-size: 1em;
    font-weight: 400;
    line-height: 1.5em;
    color: #452c2c;
}

.go-corner {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    width: 2em;
    height: 2em;
    overflow: hidden;
    top: 0;
    right: 0;
    background: linear-gradient(135deg, #6293c8, #384c6c);
    border-radius: 0 4px 0 32px;
}

.go-arrow {
    margin-top: -4px;
    margin-right: -4px;
    color: white;
    font-family: courier, sans;
}

.card {
    display: block;
    position: relative;
    width: 800px !important;
    max-width: 800px;
    max-height: 820px;
    background-color: #f2f8f9;
    border-radius: 10px;
    padding: 2em 1.2em;
    margin: 12px;
    text-decoration: none;
    z-index: 0;
    overflow: hidden;
    background: linear-gradient(to bottom, #064b72, #037bc0);
    font-family: Arial, Helvetica, sans-serif;
}

.card:before {
    content: '';
    position: absolute;
    z-index: -1;
    top: -16px;
    right: -16px;
    background: linear-gradient(135deg, #364a60, #384c6c);
    height: 48px;
    width: 52px;
    border-radius: 32px;
    transform: scale(1);
    transform-origin: 50% 50%;
    transition: transform 0.35s ease-out;
}

.card:hover:before {
    transform: scale(28);
}

.card:hover .small-desc {
    transition: all 0.5s ease-out;
    color: rgba(255, 255, 255, 0.8);
}

.card:hover .card-title {
    transition: all 0.5s ease-out;
    color: #ffffff;
}

/* ===================================
   STEPPER (Página de Skills)
   =================================== */

/*.stepper-box {
    background-color: var(--colorPrimario);
    border-radius: 12px;
    padding: 32px;
    width: 600px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}*/
.stepper-box {
    max-width: 600px;
    margin: 0 auto; /* centra el stepper */
    background: linear-gradient(
        to bottom,
        #064b72,   /* azul muy oscuro, sobrio */
        #092935    /* azul petróleo que armoniza con el logo y el nombre */
    );
    border-radius: 12px;
    padding: 32px;
    width: 600px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.stepper-step {
    display: flex;
    margin-bottom: 32px;
    position: relative;
}

.stepper-step:last-child {
    margin-bottom: 0;
}

.stepper-line {
    position: absolute;
    left: 19px;
    top: 40px;
    bottom: -32px;
    width: 2px;
    background-color: #e2e8f0;
    z-index: 1;
}

.stepper-step:last-child .stepper-line {
    display: none;
}

.stepper-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    z-index: 2;
}

.stepper-completed .stepper-circle {
    background-color: #0f172a;
    color: white;
}

.stepper-active .stepper-circle {
    border: 2px solid #0f172a;
    color: #0f172a;
}

.stepper-pending .stepper-circle {
    border: 2px solid #e2e8f0;
    color: #94a3b8;
}

.stepper-content {
    flex: 1;
}

.stepper-title {
    font-weight: 800;
    margin-bottom: 4px;
    color: #ffffff !important;   /* títulos en blanco puro */
}

.stepper-completed .stepper-title {
    color: #0f172a;
}

.stepper-active .stepper-title {
    color: #0f172a;
}

.stepper-pending .stepper-title {
    color: #94a3b8;
}

.stepper-status {
    font-size: 13px;
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    margin-top: 4px;
    background-color: #1a2e36; /* gris azulado tenue */
    color: #cfd8dc;            /* texto secundario gris claro */
}

.stepper-completed .stepper-status {
    background-color: #dcfce7;
    color: #163823;
}

.stepper-active .stepper-status {
    background-color: #dbeafe;
    color: #1d4ed8;
}

.stepper-pending .stepper-status {
    background-color: #f1f5f9;
    color: #64748b;
}

.stepper-time {
    font-size: 12px;
    color: #cfd8dc;   /* gris claro para fechas *//* color: #3e434b; */
    margin-top: 4px;
}

.stepper-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 32px;
}

.stepper-button,
.stepper-button-primary {
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid #ffffff;   /* borde blanco *//*border: 1px solid #e2e8f0;*/
    background-color: #1a2e36;   /* gris azulado tenue *//*background-color: #94a3b8;*/
    color: #ffffff;              /* texto blanco */
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.3s ease, opacity 0.3s ease;
}

.stepper-button:hover,
.stepper-button-primary:hover {
    background-color: #cfd8dc;   /* gris claro al hover */
    color: #061f28 !important;              /* texto oscuro para contraste */
    opacity: 0.9;
}
/*.stepper-button-primary {
    background-color: #0f172a;
    color: white;
    border-color: #0f172a;
}*/

/* ===================================
   ACORDEÓN (Página CV)
   =================================== */

.accordion-container {
    max-width: 800px;
    margin: 5rem auto;
    padding: 0 2rem;
}

.accordion-item {
    background-color: var(--colorPrimario);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.accordion-header {
    padding: 2rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    font-weight: bold;
    font-size: 2rem;
}

.accordion-content {
    padding: 0 2rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
    background-color: var(--colorOscuro);
    color: #fff;
}

.accordion-item.active .accordion-content {
    max-height: 500px;
    padding: 2rem;
}

.accordion-item.active .accordion-header {
    background-color: var(--colorSecundarioDark);
    color: #fe8e17; /* título en naranja */
}

.chevron::before {
    content: '▼';
    transition: transform 0.3s ease;
    display: inline-block;
}

.accordion-item.active .chevron::before {
    transform: rotate(180deg);
    color: #fe8e17; /* flecha en naranja */
}

/* ===================================
   FOOTER
   =================================== */

.footer {
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
    font-size: 1.4rem;
    color: #94a3b8;
}

.footer-contenedor {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-info {
    margin-bottom: 1rem;
}

.footer-info a {
    color: var(--gold);
    margin: 0 1rem;
}

.copyright {
    margin: 0;
}

/* ===================================
   MEDIA QUERIES (RESPONSIVE)
   =================================== */

@media (max-width: 768px) {
    /* Mostrar botón hamburguesa */
    .menu_boton {
        display: block;
        margin: 1rem auto;
    }

    /* Menú colapsable */
    .nav-principal {
        display: none;
        flex-direction: column;
        background-color: var(--colorOscuro);
        padding: 1rem;
        text-align: center;
    }

    .nav-principal a {
        padding: 1rem 0;
        border-bottom: 1px solid var(--gold);
        color: var(--gold);
        font-size: 1.8rem;
    }

    .nav-principal.mostrar {
        display: flex;
    }

    /* Adaptar imagen */
    .fondoImagen {
        width: 100%;
        height: auto;
        justify-content: center;
        align-items: center;
        overflow: hidden;
        flex-direction: column;
    }

    /* Adaptar card */
    .card {
        width: 90% !important;
        max-width: 90%;
    }

    /* Adaptar stepper */
    .stepper-box {
        width: 90%;
        padding: 1.5rem;
    }
}

/* Ajustando texto */
/* Estilo para los párrafos dentro de la card */
.text-paragraph {
    text-align: justify;       /* Justifica el texto */
    margin-bottom: 1.2rem;     /* Crea el espacio entre párrafos */
    line-height: 1.6;          /* Mejora la legibilidad (espaciado entre líneas) */
    hyphens: auto;             /* (Opcional) ayuda a que las palabras se corten mejor al justificar */
}

/* Aseguramos que el contenedor principal permita la lectura */
.small-desc {
    color: #faa70e;            /* O el color que prefieras */
    font-size: 1.9rem;         /* Tamaño de fuente adecuado para una card */
}

/* Estética extra para las negritas */
.text-paragraph b {
    color: #49290c;               /* Resalta un poco más las negritas */
    font-weight: 600;
}

/* ===================================
   ADICIONES: VISIBILIDAD MULTI-PÁGINA STEPPER
   =================================== */

.stepper-page {
    width: 100%;
    animation: fadeInStepper 0.3s ease-in-out;
}

@keyframes fadeInStepper {
    from { opacity: 0; transform: translateY(2px); }
    to { opacity: 1; transform: translateY(0); }
}