/* ===============================
    Elementos básicos y estructura
   =============================== */

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "SeoulNamsan CB", sans-serif;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
    /* ocupa el espacio restante entre header y footer */
    display: flex;
    flex-direction: column;
}

footer {
    margin-top: auto;
    /* fuerza que siempre esté abajo */
    background-color: #482420;
    color: white;
    border-top: white 3px solid;
    padding: 40px 20px;
}

/* HEADER */
.spacer {
    height: 145px;
    /* altura igual a la del header */
    background-color: #482420;
    transition: all 0.4s ease;
}

header {
    background-color: #482420;
    padding-top: 20px;
    padding-bottom: 20px;
    position: fixed;
    width: 100%;
    z-index: 1000;
    transition: all 0.4s ease;
}

/* Media query para header en pantallas pequeñas */
@media (max-width: 768px) {
    .spacer {
        height: 200px;
    }

    header {
        font-size: 0.7em;
        padding-top: 15px;
        padding-bottom: 15px;

        .logo {
            width: 140px;
            height: auto;
        }
    }
}

header.scrolled {
    padding: 5px 0;
    background-color: #331814;
}

nav>ul {
    display: flex;
    justify-content: center;
    /* Centra horizontalmente */
    align-items: center;
    list-style-type: none;
    padding: 0;
    margin: 0 auto;
    /* Asegura centrado */
    gap: 60px;
    /* espacio entre elementos */
    width: fit-content;
    /* Ajusta el bloque al contenido */
    transition: all 0.4s ease;
}


nav>ul>li a {
    position: relative;
    padding-bottom: 5px;
    /* espacio para la línea */
    display: inline-block;
    box-sizing: border-box;
    /* incluye padding en el cálculo de altura */
}

nav>ul>li a.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 4px;
    /* grosor de la línea */
    background-color: #D6A85E;
}



nav>ul>li {
    display: flex;
    align-items: center;
}


nav>ul>li>a {
    text-decoration: none;
    color: white;
    font-size: 2em;
    transition: all 0.3s ease;
}

header.scrolled nav>ul>li>a {
    font-size: 1.4em;
}

.logo {
    width: 200px;
    height: auto;
    transition: all 0.4s ease;
}


header.scrolled .logo {
    width: 130px;
}


/* ===============================
    Sección de información general
   =============================== */

.general_info {
    background-color: #181A1B;
    color: white;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: stretch;
    /* Estira los hijos a la misma altura */
    gap: 50px;
    padding: 50px;
}

.general_info div {
    display: flex;
    flex-direction: column;
    width: 40%;
    height: auto;
    /* La altura será dictada por .general_info */
}

.general_info .image_container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.general_info .about_us_image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ajusta la imagen al contenedor */
    border-radius: 10px;
    /* opcional */
}

/* Capa roja encima */
.general_info .image_overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1E0101;
    opacity: 0.3;
    /* ajusta la opacidad según sea necesario */
    border-radius: 10px;
    /* coincide con la imagen */
    pointer-events: none;
    /* para que la capa no bloquee clicks */
}

.text_content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* cambia de center a flex-start para poner el texto arriba */
    padding: 30px;
    /* padding interno para situar el texto dentro de la caja */
    border: 5px solid white;
    border-radius: 20px;
    box-sizing: border-box;
    /* para que el padding no aumente el ancho */
    height: 100%;
    /* ocupa toda la altura de la sección */
}

.text_content h1,
.text_content h3,
.text_content p {
    justify-self: flex-start;
    padding-left: 15px;
}

.text_content h1 {
    padding-top: 15px;
    font-family: 'Kings', cursive;
    /* comillas simples o dobles, ambas funcionan */
    font-size: 3em;
    font-weight: normal;
    margin: 0;
}

.text_content h3 {
    font-size: 3em;
    margin: 10px 0 5px 0;
    font-style: italic;
    font-family: 'Teachers';
}

.text_content p {
    font-size: 2em;
    margin: 0 0 20px 0;
    font-style: italic;
    font-family: 'Teachers';
}

.highlight {
    color: #D6A85E;
}

/* Media query para pantallas pequeñas */
@media (max-width: 1000px) {
    .general_info {
        flex-direction: column;
        padding: 20px;
    }

    .general_info div {
        width: 100%;
    }

    .text_content h1 {
        font-size: 2em;
    }

    .text_content h3 {
        font-size: 1.5em;
    }

    .text_content p {
        font-size: 1.2em;
    }
}


/* ===============================
        Sección de historia
   =============================== */

.story {
    background-color: #1F2223;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 50px;
    padding: 50px;
    padding-top: 80px;
    padding-bottom: 80px;
    font-family: 'Montserrat', sans-serif;
}

/* Espaciado consistente entre líneas y párrafos */
.story .text_container p,
.story .text_container h2 {
    font-size: 1.35em;
    margin: 5px 0; /* margen vertical pequeño y consistente */
    line-height: 2; /* espacio entre líneas */
}

.part1,
.part2 {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: stretch;
    gap: 50px;
    width: 100%;
}

/* Contenedores de imagen */
.part1 .img_container {
    width: 25%;
    display: flex;
    justify-content: flex-start; /* corregido: solo un valor */
}

.part2 .img_container {
    width: 25%;
    display: flex;
    justify-content: flex-end;
}

/* Contenedores de texto */
.part1 .text_container,
.part2 .text_container {
    width: 65%;
    display: flex;
    flex-direction: column;
    justify-content: center; /* centrado vertical */
    border: 3.5px solid white;
    box-sizing: border-box;
    padding: 50px 45px;
}

/* Media query para pantallas pequeñas */
@media (max-width: 1000px) {
    .story {
        padding: 20px;
    }

    .part1,
    .part2 {
        gap: 30px;
    }

    .part1 .img_container,
    .part2 .img_container,
    .part1 .text_container,
    .part2 .text_container {
        width: 100%;
    }

    .part1 .img_container,
    .part2 .img_container {
        justify-content: center;
    }

    .part1 .text_container,
    .part2 .text_container {
        padding: 30px 20px;
    }

    .story .text_container p,
    .story .text_container h2 {
        font-size: 1.1em;
        line-height: 1.6;
    }
}


/* ===============================
   SECCIÓN DE FOOTER
   =============================== */
/* Footer principal */
footer {
    display: flex;
    justify-content: center;
    /* distribuye secciones */
    align-items: flex-start;
    /* alinea verticalmente al inicio */
    flex-direction: column;
    background-color: #482420;
    color: white;
    padding: 50px 0;
    /* padding superior e inferior */
    box-sizing: border-box;
    gap: 0;
    padding-bottom: 0;
}

footer .footer_top {
    display: flex;
    flex-direction: row;
    justify-content: center;
    /* espacio entre secciones */
    align-items: center;
    /* alinea verticalmente al inicio */
    width: 100%;
    box-sizing: border-box;
}

footer .footer_bottom {
    text-align: center;
    margin-top: 30px;
    font-size: 1em;
    color: #D6A85E;
    font-family: "Montserrat", sans-serif;
    background-color: #331814;
    width: 100%;
    padding-top: 20px;
    padding-bottom: 20px;
}

footer .credit {
    font-size: 0.9em;
    color: white;
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
}

/* Secciones con ancho relativo */
footer .info_footer,
footer .contact {
    flex: 0 0 25%;
    /* 25% cada una */
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0px 20px;
    box-sizing: border-box;
}

footer .info_footer {
    padding-right: 0px;
    padding-left: 5%;
}

footer .contact {
    padding-left: 0px;
    padding-right: 5%;
}

/* Info footer */
.info_footer h3,
.info_footer p {
    margin: 0;
    margin-top: 20px;
}

/* Galería */
.galeria {
    flex: 0 0 40%;
    /* galería 40% */
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0 20px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    justify-items: center;
    width: 100%;
}

.galeria img {
    margin-top: 20px;
    width: 90%;
    height: auto;
    display: block;
}

/* Textos y títulos */
footer p {
    margin: 0;
    font-size: 1.3em;
    line-height: 1.6;
    font-family: "Montserrat", sans-serif;
}

footer h3 {
    margin-top: 0;
    font-size: 1.4em;
    font-family: "Montserrat", sans-serif;
}

/* Footer social icons */
.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.footer-social a img {
    background-color: white;
    border-radius: 10px;
    width: 50px;
    height: 50px;
    filter: grayscale(100%);
    transition: transform 0.3s, filter 0.3s;
}

.footer-social a img:hover {
    transform: scale(1.2);
    filter: grayscale(0%);
}

/* Contacto */

.contact h3 {
    margin: 0;
    margin-top: 20px;
}


/* ===== MEDIA QUERIES ===== */
@media (max-width: 1000px) {
    footer .footer_top {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    footer .info_footer,
    footer .contact,
    footer .galeria-section {
        flex: 1 1 100%;
        width: 100%;
        margin-bottom: 30px;
        padding: 0;
    }

    .contact {
        padding: 0;
    }

    .galeria {
        grid-template-columns: 1fr;
        /* 1 columna */
    }

    .footer-social {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    footer p {
        font-size: 1.1em;
    }

    footer h3 {
        font-size: 1.1em;
    }

    .footer-social a img {
        width: 40px;
        height: 40px;
    }
}

