:root {
    --fuenteHeading: 'PT Sans', sans-serif;
    --fuenteParrafos: 'Open Sans', sans-serif;

    --primario: #784D3C;
    --gris: #e1e1e1;
    --blanco: #ffffff;
    --negro: #000000;
}
html {
    box-sizing: border-box;
    font-size: 62.5%; /* 1 rem = 10px */    
}
*, *:before, *:after {
    box-sizing: inherit;
}
body {
    font-family: var(--fuenteParrafos);
    font-size: 1.6rem;
    line-height: 2;
}

/** Globales **/
.contenedor {
    width: min(90%, 120rem);
    margin: 0 auto;
}
a {
    text-decoration: none;
}
h1, h2, h3, h4 {
    font-family: var(--fuenteHeading);
    line-height: 1.2;
}
h1 {
    font-size: 4.8rem;
}
h2 {
    font-size: 4rem;
}
h3 {
    font-size: 3.2rem;
}
h4 {
    font-size: 2.8rem;
}
img {
    max-width: 100%;
}
/** Utilidades **/
.no-margin {
    margin: 0;
}
.no-padding {
    padding: 0;
}
.centrar-texto {
    text-align: center;
}

/** Header **/
.webp .header {
    background-image: url(../img/banner1.webp);
}
.no-webp .header {
    background-image: url(../img/banner1.jpg);
}
.header {
    height: 60rem;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
}
.header__texto {
   text-align: center;
   color: var(--blanco);
   margin-top: 5rem;
}
@media (min-width: 768px) {
    .header__texto {
        margin-top: 17rem;
    }
}
.barra {
    padding-top: 4rem;
}

@media (min-width: 768px) {
    .barra {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}
.logo {
    color: var(--blanco);
    
}
.logo__nombre {
    font-weight: 400;
}
.logo__bold {
    font-weight: 700;
}
@media (min-width: 768px) {
    .navegacion {
        display: flex;
        gap: 2rem;
    }
}
.navegacion__enlace {
    display: block;
    text-align: center;
    font-size: 1.8rem;
    color: var(--blanco);
}

@media (min-width: 768px) {
    .contenido-principal {
        display: grid;
        grid-template-columns: 2fr 1fr;
        column-gap: 4rem;
    }
}

.entrada {
    border-bottom: 1px solid var(--gris);
    margin-bottom: 2rem;
}
.entrada:last-of-type {
    border: none;
    margin-bottom: 0;
}
.boton {
    display: block;
    font-family: var(--fuenteHeading);
    color: var(--blanco);
    text-align: center;
    padding: 1rem 3rem;
    font-size: 1.8rem;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 2rem;
    border: none;
}

@media (min-width: 768px) {
    .boton {
        display: inline-block;

    }
}
.boton:hover {
    cursor: pointer;
}
.boton--primario {
    background-color: var(--negro);
}
.boton--secundario {
    background-color: var(--primario);
}
.boton--terciario {
    background-color: var(--primario);
}

.cursos {
    list-style: none;
}

.widget-curso {
    border-bottom: 1px solid var(--gris);
    margin-bottom: 2rem;
}
.widget-curso:last-of-type {
    border: none;
    margin-bottom: 0;
}
.widget-curso__label {
    font-family: var(--fuenteHeading);
    font-weight: bold;
}
.widget-curso__info {
    font-weight: normal;
}
.widget-curso__label,
.widget-curso__info {
    font-size: 2rem;
}

.footer {
    background-color: var(--negro);
    padding-bottom: 3rem;
    margin-top: 4rem;
}

/** Sobre Nosotros **/
@media (min-width: 768px) {
    .sobre-nosotros {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        column-gap: 2rem;
    }
}

/** Cursos **/
.curso {
    padding: 3rem 0;
    border-bottom: 1px solid var(--gris);
}
@media (min-width: 768px) {
    .curso {
        display: grid;
        grid-template-columns: 1fr 2fr;
        column-gap: 2rem;
    }
}
.curso:last-of-type {
   border: none;
}
.curso__label {
    font-family: var(--fuenteHeading);
    font-weight: bold;
}
.curso__info {
    font-weight: normal;
}
.curso__label,
.curso__info {
    font-size: 2rem;
}

/** Contacto **/
.contacto-bg {
    background-image: url(../img/contacto.jpg);
    height: 40rem;
    background-size: cover;
    background-repeat: no-repeat;
}

.formulario {
    background-color: var(--blanco);
    margin: -5rem auto 0 auto;
    width: 95%;
    padding: 5rem;
}
.campo {
    display: flex;
    margin-bottom: 2rem;
}
.campo__label {
    flex: 0 0 9rem;
    text-align: right;
    padding-right: 2rem;
}
.campo__field {
    flex: 1;
    border: 1px solid var(--gris);
}
.campo__field--textarea {
    height: 20rem;
}
/* === EFECTOS DE HOVER EN NAVEGACIÓN (HEADER Y FOOTER) === */
.navegacion__enlace {
    padding: 0.8rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

/* Fondo y color al pasar el mouse */
.navegacion__enlace:hover {
    background-color: var(--blanco);
    color: var(--primario);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.navegacion__enlace:hover::after {
    width: 60%;
}

/* === EFECTO EN EL LOGO (NOMBRE DIEGO FARFÁN) === */
.logo__nombre {
    display: inline-block;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden; /* Necesario para el brillo */
}

/* El apellido se separa ligeramente al pasar el mouse */
.logo:hover .logo__bold {
    margin-left: 1rem;
    transition: margin-left 0.4s ease;
}

/* Ligera ampliación del nombre al pasar el mouse */
.logo:hover .logo__nombre {
    transform: scale(1.05);
}

/* === EFECTO DE BRILLO ANIMADO EN EL NOMBRE === */
.logo__nombre::before {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        120deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-20deg);
}

/* El brillo se activa al pasar el mouse */
.logo:hover .logo__nombre::before {
    animation: brillo 1s ease-in-out;
}

/* Animación del reflejo */
@keyframes brillo {
    0% {
        left: -75%;
    }
    100% {
        left: 125%;
    }
}

/* === Carrusel de la sección Sobre mí === */
.carrusel {
    position:relative;
    width: 50%;
    overflow: hidden;
    border-radius: 10px;
}

.carrusel__imagenes {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carrusel__imagenes img {
    width: 100%;
    flex-shrink: 0;
    border-radius: 10px;
}

.carrusel__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 18px;
    border-radius: 50%;
}

.carrusel__btn:hover {
    background-color: rgba(0, 0, 0, 0.6);
}

.carrusel__btn.prev {
    left: 10px;
}

.carrusel__btn.next {
    right: 10px;
}

/* ===== Recuadros tipo botón para secciones del sidebar ===== */
.recuadro {
    border: 2px solid var(--negro);
    padding: 1rem;
    text-align: center;
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
    border-radius: 0.8rem;
    font-family: var(--fuenteHeading);
    background-color: transparent;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

/* Efecto al pasar el mouse: se resalta con color principal */
.recuadro:hover {
    border-color: var(--primario);
    color: var(--primario);
}

/* ===== Recuadros tipo botón para secciones en tec_inf ===== */
.recuadro2 {
    border: 2px solid var(--negro);
    padding: 1rem;
    text-align:left;
    display: inline-block;
    width: auto;
    box-sizing: border-box;
    border-radius: 1.5rem;
    font-family: var(--fuenteHeading);
    background-color: transparent;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

/* Efecto al pasar el mouse */
.boton--terciario:hover {
    background-color: #3ca13c; /* verde */
    transform: scale(1.01);
}

/* ==== Carrusel para la sección inf_tec (una imagen a la vez) ==== */
.carrusel-inf {
    position: relative;
    max-width: 90%;
    margin: 30px auto;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    background-color: #f7f7f7;
}

.carrusel-inf__imagenes {
    display: flex;
    transition: transform 0.6s ease;
    width: 100%;
}

.carrusel-inf__imagenes img {
    width: 100%;
    height: 400px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 10px;
    background-color: #fff;
}

.carrusel-inf__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.5);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 24px;
    padding: 10px 15px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    z-index: 10;
}

.carrusel-inf__btn:hover {
    background-color: rgba(0,0,0,0.8);
}

.carrusel-inf__btn.prev {
    left: 10px;
}

.carrusel-inf__btn.next {
    right: 10px;
}
