/* ===============================
    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;
}

/* =============================
   FORMULARIO
   =============================== */

.main_div {
    background-color: #181A1B;
    color: white;
    padding: 40px 60px;

    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 30px;
}

.main_div article {
    width: 40%;
}

.formulario form {
    display: flex;
    flex-direction: column;
    justify-self: flex-end;
    padding-right: 20px;
    padding-top: 0px;
    gap: 30px;
    margin-top: 20px;
    width: 100%;
     height: auto;
}

.formulario form>input,
.formulario form>select,
.formulario form>div>input {
    padding: 20px;
    font-size: 1em;
    border: none;
    background-color: #999999;
    color: white;
    font-family: "Montserrat", sans-serif;
    opacity: 0.8;
    font-weight: 600;
}

.formulario form>div>input::placeholder,
.formulario form>input::placeholder {
    color: white;
    opacity: 0.7;
    font-weight: 600;
}

.formulario form>select {
    appearance: none;
    /* elimina estilos por defecto */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('img/dropdown-arrow.png');
    /* agrega una flecha personalizada */
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 25px;
    padding-right: 30px;
    /* espacio para la flecha */
}

.formulario form>button {
    margin-top: 15px;
    padding: 15px;
    font-size: 1.2em;
    background-color: #482420;
    color: white;
    font-weight: bold;
    border: none;
    cursor: pointer;
    margin-bottom: 40px;
}

.formulario form>div {
    display: flex;
    flex-direction: row;
    gap: 20px;
}

.formulario form>div>input {
    width: 50%;
}

.subject {
    height: 300px;
}

.submit_btn {
    width: 50%;
}

/* =============================
   Zona info y formulario
   =============================== */

.contact_section {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    background-color: #1F2223;
    color: white;
    padding: 60px 40px;
    box-sizing: border-box;
}



.contact_section > * {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}


/* Bloque de información */
.info_contact {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 0 20px;
    box-sizing: border-box;
    height: auto;
}


/* Bloque del formulario */
.contact_form {
    flex: 1; /* igual ancho y altura que info_contact */
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
    box-sizing: border-box;
    border: 3px solid white;
    background-color: #181A1B;
    border-radius: 8px;
}

/* =============================
   Tipografía y texto
   =============================== */

.info_contact h1 {
    font-size: 2.8em;
    margin-bottom: 25px;
    font-family: 'Teachers', cursive;
    font-weight: 600;
    letter-spacing: 1px;
    margin-top: 20px;
}

.info_contact h3 {
    font-size: 1.6em;
    margin-bottom: 15px;
    font-family: 'Teachers', cursive;
    font-weight: 600;
    letter-spacing: 1px;
}

.info_contact p,
.address ul li {
    font-size: 1.3em;
    line-height: 1.6;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    margin: 0;
}

ul {
    list-style-type: none;
    padding: 0;
    margin: 0 0 40px 0;
}

@media (max-width: 1000px) {
    .main_div {
        flex-direction: column;
        align-items: center;
    }

    .submit_btn {
        margin-bottom: 0px;
    }

    .info_contact {
        padding-bottom: 20px;
    }

    .main_div article,
    .formulario form {
        width: 100%;
    }

    .formulario form>div>input,
    .submit_btn {
        width: 100%;
    }
}

/* =============================
   Mapa responsivo
   =============================== */

.map_container {
    position: relative;
    width: 100%;
    height: 300px; /* Ajusta la altura a tu gusto */

    border-radius: 8px; /* opcional */
}

.map_container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ===============================
   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;
    }
}

