/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Montserrat", Arial, sans-serif;

    background-image: url(/assets/imgs/background/fondo1.jpg);
    background-size: cover;
    background-position-x: center;

    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================= BASE ============================================= */

.main {
    width: 90%;
    max-width: 1400px;
    margin: auto;
    padding: 40px 0;
}

.grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    margin: 10px 0;
}

/* Columnas */
.col-1 { grid-column: span 1; }
.col-2 { grid-column: span 2; }
.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-10 { grid-column: span 10; }
.col-11 { grid-column: span 11; }
.col-12 { grid-column: span 12; }

img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

video {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

/* Lineas del titulo */
hr {
    margin: 20px;
    
    border: none;
    border-top: 4px solid #000;
    height: 1px;
}

/* Back Arrow */
.back_arrow {
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    transition: 0.2s ease;
}

.back_arrow:hover {
    transform: translateY(-5px);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1)) brightness(1.1);
}

p {
    text-align: justify;
    font-size: 18px;
    line-height: 30px;
}

.iframe_pdf {
    width: 100%;
    height: 500px;
    margin-bottom: 10px;
    box-shadow: 0 4px 4px rgba(0,0,0,0.2);
    border-radius: 4px;
}

.borde {
    box-shadow: 0 4px 4px rgba(0,0,0,0.2);
    border-radius: 8px;
}

/* ============================================= HEADER ============================================= */
.header {
    width: 100%;
    background: #154f76;
    color: white;

    box-shadow: 0 4px 8px rgba(0,0,0,0.2);

    transition: all 0.3s ease;
}

#header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Container */
.header_container {
    max-width: 100%;
    padding: 0px 20px;
    height: 80px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    transition: 0.3s ease;
}

/* Left */
.header_left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header_logo {
    width: auto;
    height: 50px;
    border-radius: 6px;

    transition: 0.3s ease;
}

.header_title {
    font-size: 18px;
}

/* Right */
.header_right {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 20px;
}

.header_nav {
    list-style: none;
    display: flex;
    gap: 0px;
    height: 100%;
}

.header_nav li {
    height: 100%;
}

.header_nav a {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 16px;

    text-decoration: none;
    color: white;
    font-weight: 500;
    font-size: 14px;

    border: 2px solid transparent;
    transition: 0.2s;
}

.header_nav a.active {
    background: white;
    color: #154f76;
}

.header_nav a:hover {
    background: white;
    color: #154f76;
}

.header_nav a.active:hover {
    background: #f5f5f5;
}

/* Submenu */

.has_submenu {
    position: relative;
}

.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 2000;

    background: white;
    list-style: none;
    padding: 10px 0;
    width: 100%;

    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);

    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;

    transition: 0.2s ease;
}

.submenu-right {
    top: 0;
    left: 100%;
    margin-left: -10px;
    border-top-right-radius: 8px;
}

.has_submenu > a::after {
    content: " ▼";
    font-size: 10px;
    margin-left: 5px;
}

.has_submenu:hover > .submenu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.submenu li {
    position: relative;
}

.submenu li a {
    display: block;
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.submenu li a:hover {
    background: #f5f5f5;
}

/* Socials */
.socials {
    display: flex;
    align-items: center;
    gap: 12px;
}

.socials img {
    width: 25px;
    height: 25px;
    object-fit: contain;
    transition: 0.1s;
    cursor: pointer;
}

.socials img:hover {
    transform: scale(1.1);
}

/* Tamaños al scrollear */
.header.scrolled .header_container {
    height: 60px;
}

.header.scrolled .header_logo {
    width: auto;
    height: 40px;
}

.header.scrolled .header_title {
    font-size: 18px;
}

/* ============================================= FOOTER ============================================= */
#footer {
    background: #3a3a3a;
    color: white;
    padding: 40px 20px;
}

/* Container */
.footer_container {
    display: flex;
    gap: 10px;
    max-width: 80%;
    margin: auto;
}

/* Columnas */
.footer_maps,
.footer_text,
.footer_image {
    flex: 1;
}

/* Mapas */
.footer_maps {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer_maps iframe {
    width: 80%;
    height: 100%;
    border: none;
    border-radius: 8px;

    transition: 0.2s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.footer_maps iframe:hover {
    transform: translateY(-2px);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1)) brightness(1.1);
}

/* Texto */
.footer_text {
    max-width: fit-content;
    display: flex;
    align-items: center;
    line-height: 1.6;
    font-size: 14px;

    margin-right: 10px;
}

/* Imagen */
.footer_image {
    display: block;
    align-items: center;
    justify-content: center;
}

.footer_image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}


/* ====================================================================================================== */
/*                                               RESPONSIVE                                               */
/* ====================================================================================================== */


.mobile_menu_button {
    display: none;
}

/* TABLET */
@media (max-width: 1024px) {

    .main {
        width: 90%;
    }

    .grid {
        gap: 15px;
    }
}

/* MOVIL */
@media (max-width: 768px) {

    /* ============================================= BASE ============================================= */

    .main {
        width: 90%;
        padding: 20px 0;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Todas las columnas ocupan ancho completo */
    .col-1,
    .col-2,
    .col-3,
    .col-4,
    .col-5,
    .col-6,
    .col-7,
    .col-8,
    .col-9,
    .col-10,
    .col-11,
    .col-12 {
        grid-column: span 1;
        justify-items: center;
        align-items: center;
    }

    hr {
        width: 100%;
    }

    h1 {
        font-size: 24px;
    }

    p {
        font-size: 14px;
        line-height: 24px;
    }

    img {
        max-width: 90%;
    }

    .back_arrow {
        align-items: center;
        justify-content: center;
        width: 80%;
    }

    .iframe_pdf {
        max-height: 50vh;
    }

    /* ============================================= HEADER ============================================= */

    .header_container {
        height: 70px;
        padding: 0px 10px;
    }

    .header_left a {
        max-width: 60%;
        max-height: 60%;
    }

    .header_logo {
        width: 100%;
        height: 100%;
    }

    .header_title {
        display: none;
    }

    /* Ocultar menu normal */
    .header_nav,
    .socials {
        display: none;
    }

    /* Mostrar boton hamburguesa */
    .mobile_menu_button {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;

        width: 40px;
        height: 40px;

        cursor: pointer;
    }

    .mobile_menu_button span {
        width: 100%;
        height: 4px;
        background: white;
        border-radius: 999px;
    }

    .header.scrolled .header_container {
        height: 55px;
    }

    .header.scrolled .header_logo {
        width: 80%;
        height: 80%;
    }

    /* ============================================= FOOTER ============================================= */

    .footer_container {
        flex-direction: column;
        max-width: 100%;
        gap: 30px;
    }

    .footer_maps iframe {
        width: 90%;
        
    }

    .footer_text {
        font-size: 10px;
        max-width: 100%;
        justify-content: center;
    }

    .footer_image {
        text-align: center;
    }

    .footer_image img {
        max-width: 250px;
    }
}

/* ============================================= MOBILE MENU ============================================= */

.mobile_menu {
    position: fixed;
    top: 0;
    right: -100%;

    width: 100%;
    height: 100vh;

    background: #154f76;

    z-index: 5000;

    transition: 0.3s ease;
}

.mobile_menu.active {
    right: 0;
}

.mobile_menu_content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    height: 100%;
    padding: 100px 20px 40px;
}

.mobile_nav {
    list-style: none;
}

.mobile_nav li {
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.mobile_nav a {
    color: white;
    text-decoration: none;
    font-size: 18px;
}

.mobile_submenu_header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 20px 0;
}

.submenu_toggle {
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
}

.mobile_submenu {
    list-style: none;

    max-height: 0;
    overflow: hidden;

    transition: 0.3s ease;
}

.mobile_submenu.active {
    max-height: 500px;
}

.mobile_submenu li {
    border: none;
    padding: 10px 0 10px 20px;
}

.mobile_socials {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.mobile_socials img {
    width: 30px;
    height: 30px;
}