@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@200;300;400;500;600;700;800;900&display=swap');

/* ============================================
    VARIABLES
============================================ */

:root {
    --color-black: #000;
    --color-off: #999;
    --color-white: #fff;
    --color-bone: #F2F1E7;
    --color-orange: #F26E21;
    --color-yellow: #F2AF21;
    --color-gray: #888;
    --fw-medium: 600;
    --radius: 3px;
}

/* ========================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    color: var(--color-text);
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bone);
    font-size: 14px;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: start;
}

/* ============================================
    NAV
============================================ */

nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--color-yellow);
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    transition: background-color 0.4s ease;
}

nav.color {
    background-color: var(--color-yellow);
}

#menu {
    width: 90dvw;
    max-width: 1080px;
    margin: 0 auto;
    padding: 12px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: width 0.3s ease, margin-top 0.2s ease, margin-bottom 0.5s ease;
}

#menu.show {
    margin-top: 40px;
    margin-bottom: 40px;
}

#bird {
    opacity: 0;
    height: 50px;
    width: auto;
    transform: translateY(2px);
    transition: opacity 0.6s ease, height 0.3s ease-in-out;
}

#menu.show #bird {
    height: 70px;
}

/* Solo el ul principal en fila */
#menu>ul {
    display: flex;
    gap: 20px;
    list-style: none;
}


#menu a {
    text-decoration: none;
    text-transform: uppercase;
    color: var(--color-white);
    font-weight: var(--fw-medium);
    transition: color 0.3s ease;
}

/* Los submenús en columna */
.dropdown-menu {
    display: flex;
    flex-direction: column;
    list-style: none;
    max-height: 0;
    overflow: hidden;
    gap: 10px;
    transition: max-height 0.3s ease;
}

.dropdown>a::after {
    content: " ⌄";
    display: inline-block;
    margin-left: 6px;
    transform: translateY(-4px);
}

.dropdown-menu>li:first-child {
    margin-top: 10px;
}

.dropdown-menu.show {
    max-height: 300px;
    transition: max-height 1s ease-out;
}

#movil {
    display: none;
    width: 30px;
    height: auto;
    transition: color 0.3s ease;
}

#menu-movil {
    display: none;
}

#menu-movil ul {
    width: 100%;
    text-align: left;
}

/* ========================= */

h1 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
}

h2 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 20px;
    text-transform: uppercase;
}

h3 {
    font-size: 16px;
    font-weight: 500;
}


p {
    font-weight: 400;
    line-height: 1.7;
    margin-bottom: 20px;
}

section p {
    text-align: justify;
}

#convocatoria p:last-of-type {
    margin-bottom: 0;
}

.medium {
    font-weight: var(--fw-medium);
}

.page {
    width: 90dvw;
    max-width: 1080px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    transition: width 0.3s ease;
    min-height: 100dvh;
    /*que ocupe toda la pantalla*/
}

.page section:first-of-type {
    margin-top: 100px;
}

#header {
    width: 100%;
    display: flex;
    justify-content: center;
}

#header img {
    width: 300px;
    height: auto;
    margin-bottom: 40px;
}

/* ============================================
    BOTONES INSCRIPCION
============================================ */

#botonera {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 40px;
}

.btn {
    font-size: 14px;
    font-weight: var(--fw-medium);
    padding: 15px 30px;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    display: inline-block;
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0);
    transform: translateY(0);
    transition: box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease, max-width 0.3s ease, max-height 0.3s ease, margin 0.3s ease, padding 0.3s ease;
}

.btn-yellow {
    color: var(--color-white);
    background-color: var(--color-yellow);

    border: none;
    outline: none;
    z-index: 10;
}

.btn-orange {
    color: var(--color-white);
    background-color: var(--color-orange);
    z-index: 10;
}

.btn-gray {
    margin-left: -14px;
    opacity: 0;
    max-width: 0;
    padding: 0;
    pointer-events: none;

    color: var(--color-white);
    background-color: var(--color-gray);
    z-index: 1;
}

.btn-gray.visible {
    margin-left: 0;
    opacity: 1;
    max-width: 200px;
    padding: 15px 30px;
    pointer-events: auto;
}

/* ============================================
    CAROUSEL
============================================ */

#hero-carousel {
    position: relative;
    /* Si querés que ocupe todo el ancho podés sacar o subir el max-width */
    max-width: 1080px;
    aspect-ratio: 16/9;
    height: auto;
    overflow: hidden;
    border-radius: var(--radius);
    margin-bottom: 40px;
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.carousel-track img {
    width: 100%;
    min-width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.4);
    border: none;
    padding: 14px 16px;
    cursor: pointer;
    border-radius: 999px;
    transition: background-color 0.3s ease;
    z-index: 10;
}

.carousel-btn img {
    width: 14px;
    height: 14px;
}

.carousel-btn-prev img {
    padding-top: 2px;
    padding-right: 2px;
}

.carousel-btn-next img {
    padding-top: 2px;
    transform: scaleX(-1);
}

.carousel-btn-prev {
    left: 30px;
}

.carousel-btn-next {
    right: 30px;
}

.carousel-dots {
    position: absolute;
    pointer-events: none;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.carousel-dot.active {
    background-color: var(--color-white);
}

/* ============================================
    SPONSORS
============================================ */
#footer-placeholder {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: auto;
}

#sponsors {
    width: 70%;
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-top: 50px;
    transition: width 0.3s ease;
}

.sponsors-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 4 columnas iguales */
    align-items: center;
    gap: 20px;
}

.sponsors-row:first-child {
    grid-template-columns: 1.7fr 1fr 1fr 1fr;
}

.sponsors-row img {
    width: 100%;
    height: 50px;
    object-fit: contain;
    opacity: 0.6;
}

.sponsors-row:last-child img:nth-child(3) {
    height: 60px;
}

/* ============================================
    HOVERS solo en DESK
============================================ */

@media (hover: hover) and (pointer: fine) {
    .btn:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        transform: translateY(-5px);
    }

    .carousel-btn:hover {
        background-color: rgba(0, 0, 0, 0.7);
    }

    #movil:hover {
        filter: invert(1);
    }

    #menu a:hover,
    #menu-movil a:hover {
        color: var(--color-black);
    }
}

/* ========================= */


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

@media(max-width: 620px) {
    nav #menu {
        transform: translateY(-1px);
        width: 100%;
    }

    #movil {
        display: flex;
        cursor: pointer;
    }

    .page {
        width: 100%;
        padding: 40px;
        margin: 0;
    }

    #hero-carousel {
        aspect-ratio: 4/3;
    }

    .carousel-btn {
        display: none;
    }

    #botonera {
        flex-direction: column;
        align-items: center;
    }

    .btn-gray {
        max-height: 0;
        margin-top: -14px;
        margin-left: 0;
    }

    .btn-gray.visible {
        max-height: 100px;
        margin-top: 0;
    }

    .sponsors-row:first-child img:nth-child(3),
    .sponsors-row:first-child img:nth-child(4) {
        height: 35px;
    }

    .sponsors-row:last-child img:nth-child(3) {
        height: 50px;
    }

    /*MENU MOVIL*/
    /* Ocultar menu desktop */
    nav #menu>ul {
        display: none;
    }

    /* Mostrar container mobile pero colapsado */
    #menu-movil {
        display: flex;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.7s ease-in-out;
    }

    #menu-movil ul {
        list-style: none;
        display: flex;
        flex-direction: column;
    }

    /* Agrega espacio solo a los ul hijos de menu-movil */
    #menu-movil>ul {
        gap: 20px;
        padding: 0 40px 30px 40px;
    }

    /* Agrega espacio solo a los ul hijos de .dropdown-movil */
    .dropdown-movil>ul {
        gap: 20px;
    }

    #menu-movil.show {
        max-height: 1000px;
        /* mayor al contenido real */
    }

    #menu-movil a {
        text-decoration: none;
        text-transform: uppercase;
        color: var(--color-white);
        font-weight: var(--fw-medium);
        transition: color 0.3s ease;
    }

    /* Submenús colapsados por defecto */
    .dropdown-menu-movil {
        list-style: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.7s ease-in-out;
    }

    .dropdown-movil>a::after {
        content: " ⌄";
        display: inline-block;
        margin-left: 6px;
        transform: translateY(-4px);
    }

    .dropdown-menu-movil>li:first-child {
        margin-top: 20px;
    }

    .dropdown-menu-movil.show-submenu {
        max-height: 300px;
    }

    /* Flecha o indicador visual (opcional) */
    .dropdown-movil>a {
        cursor: pointer;
    }

    #header img {
        width: 200px;
        height: auto;
    }
}

@media(max-width: 1080px) {
    #sponsors {
        width: 98%;
    }
}


/* ========================= */

/* SECCIONES */
#secciones {
    width: 100%;

}

#secciones ul {
    list-style: none;
    padding: 0;
    margin: 0;
    margin-bottom: 20px;
}

#secciones ul li::before {
    content: "— ";
    margin-right: 10px;
}

footer {
    margin-top: 40px;
    color: var(--color-off);
    font-size: 12px;
    text-align: center;
}