@import url('https://fonts.googleapis.com/css2?family=Zilla+Slab:wght@900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400&display=swap');

*,
*:before,
*:after {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* Esto asegura que el padding no afecte el ancho total */
}

main {
    flex: 1;
}

html, body {
    min-height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Altura mínima de la ventana del navegador */
}

:root {
    --principal: #f26522;
    --negro: #000000;
    --blanco: #ffffff;
}

.header {
    background-color: var(--principal);
    height: 6.5rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav a {
    color: var(--blanco);
    font-family: 'Zilla Slab', serif;
    text-decoration: none;
    font-size: 1.5rem;
    line-height: 6.5rem;
    font-weight: 600;
    transition: 300ms ease-out;
}

nav a:hover {
    color: var(--negro);
}

.contenedor-nav {
    width: 85%;
}

.nav {
    display: flex;
    flex-direction: row-reverse;
    gap: 6rem;
}

.contenedor-repensar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35%;
    height: 100%;
    text-align: center;
}

.contenedor-repensar p {
    font-size: 1.8rem;
    font-family: 'Zilla Slab', serif;
    font-weight: 900;
    text-transform: uppercase;
}

.layout {
    display: grid;
    width: 100%;
    height: 100%;
}

.contenedor-principal {
    display: grid;
    grid-template-areas: "izquierda derecha";
    grid-template-columns: 45% 55%;
    min-height: calc(100vh - 6.5rem - 8rem); /* Resta la altura del header y del footer */
    width: 100%; /* Asegura que ocupe todo el ancho disponible */
    position: relative; /* Mantiene la posición relativa pero respeta el flujo del documento */
}

.izquierda {
    grid-area: izquierda;
    display: flex;
    align-items: center;
    justify-content: center;
}

.derecha {
    grid-area: derecha;
    display: flex;
    justify-content: center;
}

.principal {
    font-size: 3rem;
    font-family: 'Zilla Slab', serif;
    font-weight: 900;
    text-transform: uppercase;
}

.izquierda p {
    color: #f26522;
    font-size: 1.2rem;
    font-family: 'Roboto', sans-serif;
}

.izquierda-contenido {
    width: 100%;
    margin-left: 12vh;
    display: flex;
    flex-direction: column;
    align-items: baseline;
    text-align: start;
}

@media (min-width: 1024px) and (max-width: 1440px) {
    .footer {
        position: relative;
        background-image: url(../img/footer.png);
        background-size: cover;
        background-position: inherit;
        height: 8rem;
        width: 100%;
    }
}

.footer {
    padding-bottom: 100px;
    position: relative;
    bottom: 0;
    background-image: url(../img/sf.png);
    background-position: inherit;
    height: 3em;
    width: 100%;
}

.flex-img {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    height: 100%;
}

.flex-img .contenedor-img {
    flex: 1 1 50%;
    box-sizing: border-box;
    padding: 10px;
    opacity: 0;
    transform: translateX(-100%);
}

.animate-in {
    animation: slideInOpacity 0.5s forwards;
}

@keyframes slideInOpacity {
    0% {
        opacity: 0;
        transform: translateX(-100%);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.contenedor-img img {
    width: 50%;
    height: auto;
    display: block; /* Ensures the image is treated as a block element */
    margin: 0 auto; /* Horizontally centers the image */
    opacity: 1;
    transition: opacity 0.5s ease; /* Add transition effect */
}

.contenedor-img:hover img {
    opacity: 0.7; /* Change opacity on hover */
}

h3 {
    text-align: center;
    font-family: 'Zilla Slab', serif;
}

.bbook {
    background-color: red; /* Red background */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 5vh; /* Full viewport height */
    width: 100vw; /* Full viewport width */
}

.bbook span {
    font-size: 1em; /* Large font size */
    animation: colorChange 2s linear infinite; /* Color change animation */
}

@keyframes colorChange {
    0%, 50% {
        color: white; /* Color white */
    }
    50%, 100% {
        color: yellow; /* Color yellow */
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: center;
        height: auto;
    }

    .contenedor-nav {
        width: 100%;
        order: 2; /* Mueve el contenedor-nav abajo */
        display: flex;
        justify-content: center;
    }

    .nav {
        flex-direction: column;
        gap: 1rem;
    }

    .contenedor-repensar {
        width: 100%;
        padding: 1rem 0;
        order: 1; /* Mueve el contenedor-repensar arriba */
    }

    .contenedor-principal {
        grid-template-areas:
            "izquierda"
            "derecha";
        grid-template-columns: 1fr;
    }

    .izquierda {
        padding: 2rem;
        text-align: center;
    }

    .izquierda-contenido {
        margin-left: 0;
        align-items: center;
    }

    .principal {
        font-size: 2rem;
    }

    .derecha {
        padding: 2rem;
    }

    .contenedor-img img {
        width: 80%;
    }

    .footer {
        height: auto;
        padding: 2rem 0;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .contenedor-principal {
        grid-template-columns: 1fr;
        grid-template-areas:
            "izquierda"
            "derecha";
    }

    .izquierda, .derecha {
        padding: 2rem;
        text-align: center;
    }

    .izquierda-contenido {
        margin-left: 0;
        align-items: center;
    }

    .principal {
        font-size: 2.5rem;
    }

    .contenedor-img img {
        width: 60%;
    }

    .footer {
        height: 6rem;
    }
}
