* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100vh;
    scroll-behavior: smooth;
}

header {
    background-color: #001a2c;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    position: fixed;
    top: 0;
    height: 10vh;
    width: 100%;
    z-index: 1000;
    align-items: center;
}

h2,
h3 {
    color: #5FA8D3;
}

a {
    color: white;
    text-decoration: none;
}

nav a {
    font-size: 1.2rem;
    padding: 12px 12px;
    margin: 10px 10px;
    /* Espacio entre los botones */
    border-radius: 5px;
    transition: background-color 0.3s;

}

nav a:hover {
    background-color: #062247;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: center;
}

nav ul li {
    display: inline;
    margin-right: 15px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 80px 20px;
    background-color: #031b36;
    text-align: center;
}


.Flex {
    display: flex;
    align-items: center;
    justify-content: center;
}

.FlexRow {
    display: flex;
    flex-direction: row;
}

.FlexColumn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}


.ContenedorFoto {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
    position: relative;
}

.ContenedorFoto img {
    width: 200px;
    /* Tamaño fijo */
    height: auto;
    /* Mantiene proporción */
    object-fit: cover;
    /* Recorta si es necesario para encajar */
    position: relative;
    /* Fija la posición dentro del contenedor */
    border-radius: 10px;
}

.contenedorCards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    margin-top: 2rem;
}

.cardFlex {
    flex: 0 1 500px;
    border-radius: 5px;
    color: black;
    overflow: hidden;
    position: relative;
}

.cardFlex ul {
    display: flex;
    width: 400%;
    animation: slide 20s infinite alternate ease-in-out;
}

.cardFlex li,
.cardFlex img {
    width: 100%;
    list-style: none;
    position: relative;
    cursor: pointer;
}

.cardFlex li img,
.cardFlex img {
    transition: filter 0.3s ease;
}

.cardFlex li:hover img,
.cardFlex:hover img {
    filter: brightness(30%);
}

.texto-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    gap: 1rem;
    padding: 1rem;
}

.cardFlex li:hover .texto-card,
.cardFlex:hover .texto-card {
    opacity: 1;
    pointer-events: auto;
}

.card-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

@keyframes slide {
    0% {
        margin-left: 0;
    }

    20% {
        margin-left: 0;
    }

    25% {
        margin-left: -100%;
    }

    45% {
        margin-left: -100%;
    }

    50% {
        margin-left: -200%;
    }

    70% {
        margin-left: -200%;
    }

    75% {
        margin-left: -300%;
    }

    100% {
        margin-left: -300%;
    }
}

#Inicio {
    gap: 250px;
}

#Inicio a img:hover {
    background-color: #003f88;
}

.ContenedorRedes img {
    width: 40px;
    height: 40px;
    border-radius: 25%;
    padding: 5px;
}

#SobreMi {
    justify-content: center;
    gap: 2rem;
    padding-top: 120px;
}

#Informacion {
    width: 50%;
}

#Inicio h3 {
    color: #5FA8D3;
}

.btnCeleste {
    font-family: Nunito;
    color: white;
    padding: 10px;
    background-color: #5fa8d3;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btnCeleste:hover {
    box-shadow: -4px 4px 8px rgba(0, 173, 255, 0.3);
    transform: translate(2px, -2px);
}

.btnBlanco {
    font-family: Nunito;
    color: black;
    padding: 10px;
    background-color: white;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btnBlanco:hover {
    box-shadow: -4px 4px 8px rgba(0, 173, 255, 0.3);
    transform: translate(2px, -2px);
}

.disabled {
    cursor: not-allowed;
    opacity: 0.7;
    pointer-events: none;
    /* Evita que se pueda hacer clic */
}

#Contacto {
    align-items: center;
    justify-content: space-evenly;
    width: 100%;
}

#Formulario {
    min-height: 80vh;
    width: 100%;
    padding: 0;
    justify-content: space-evenly;
    align-items: center;
}

#Formulario form {
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 500px;
    min-width: 280px;
}


#Formulario input,
#Formulario textarea {
    font-family: Nunito;
    font-size: clamp(0.9rem, 2vw, 1rem);
    width: 100%;
    color: white;
    margin: 10px 0;
    border-radius: 4px;
    border: 2px solid white;
    background-color: transparent;
    padding: 10px;
}

#Formulario input:focus,
#Formulario textarea:focus {
    outline: none;
    border-color: #5fa8d3;
}

textarea::placeholder,
input::placeholder {
    font-family: Nunito;
    font-size: clamp(0.9rem, 2vw, 1rem);
    color: rgba(255, 255, 255, 0.7);
}

#Redes {
    align-items: start;
    justify-content: center;
    padding: 1rem;
    gap: 2rem;
    min-width: 200px;
}

#Redes a,
#Redes span {
    display: flex;
    align-items: center;
}

#Redes img,
#Redes i {
    width: 40px;
    height: 40px;
    border-radius: 25%;
    padding: 5px;
}

#Redes span {
    height: auto;
}

#Redes a :hover {
    background-color: #003f88;
}

#Redes > div {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
}

footer {
    display: flex;
    flex-direction: row;
    min-height: 10vh;
    padding: 1rem;
    align-items: center;
    text-align: center;
    justify-content: center;
    background-color: #031b36;
    color: white;
}

footer h4 {
    font-size: clamp(0.8rem, 2vw, 1rem);
    line-height: 1.4;
}

textarea {
    height: 25vh;
    min-height: 100px;
    resize: vertical;
    overflow: visible;
    /* Mostrar barras desplazadoras cuando sea necesario */
}

.libre-baskerville-regular {
    font-family: "Nunito", serif;
    font-weight: 400;
    font-style: normal;
}


.carousel {
    overflow: hidden;
    width: 50%;
    padding: 2rem 0;
}

.carousel-track {
    display: flex;
    width: fit-content;
    animation: scroll 25s linear infinite;
}

.carousel img {
    height: 5rem;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s;
    display: block;
    flex: 0 0 auto;
    margin: 0 20px;
}

.carousel img:hover {
    transform: scale(1.1);
}

@keyframes scroll {
    0% {
        transform: translateX(0%);
    }

    100% {
        transform: translateX(-50%);
    }
}


@media screen and (max-width: 768px) {
    header {
        padding: 0.5rem;
        flex-direction: column;
        height: auto;
        min-height: 80px;
        gap: 0.5rem;
    }
    
    header h1 {
        margin-left: 0;
    }
    
    nav ul {
        gap: 10px;
    }
    
    nav ul li {
        margin-right: 5px;
    }
    
    section {
        padding: 100px 15px 60px;
    }
    
    #Inicio {
        padding: 120px 15px 60px;
    }
    
    #SobreMi {
        padding: 140px 15px 80px;
    }
    
    .FlexRow {
        flex-direction: column;
        gap: 1rem;
    }
    
    .contenedorCards {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    #Contacto {
        flex-direction: column;
        gap: 2rem;
    }
}

@media screen and (max-width: 480px) {
    header {
        padding: 0.5rem;
    }
    
    section {
        padding: 100px 10px 40px;
    }
    
    #Inicio {
        padding: 120px 10px 40px;
        gap: 20px;
    }
    
    #SobreMi {
        padding: 140px 10px 60px;
    }
    
    #Informacion {
        padding: 0 10px;
    }
    
    .cardFlex {
        height: 200px;
    }
    
    .texto-card {
        padding: 0.5rem;
        gap: 0.5rem;
    }
    
    .texto-card p {
        font-size: 0.8rem;
    }
    
    #Formulario form {
        min-width: 250px;
    }
    
    .btnCeleste, .btnBlanco {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .carousel img {
        height: 2.5rem;
        margin: 0 15px;
    }
    
    #Redes > div {
        gap: 0.5rem;
    }
}