* {
    margin: 0;
    padding: 0;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

input,
button,
textarea,
select {
    font: inherit;
}

p {
    text-wrap: pretty;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    text-wrap: balance;
}

a {
    text-decoration: none;
    color: inherit;
}

img,
video,
svg {
    height: auto;
    max-width: 100vw;
    object-fit: cover;
}

:root {
    --bg-light: #eefbfd;
    --bg-dark: #0e2c3e;
    --text-color: #0e2c3e;
    --text-light-color: #eefbfd;
    --back-text: #0e2c3e34;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-light);
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    max-width: 1920px;
    margin: auto;
    line-height: 1.4;
}

header {
    width: 100%;
    height: 150px;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url(./img/portada_malvinas.png) center;
    background-size: cover;
    color: var(--text-light-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
}

header h1 {
    max-width: 350px;
    line-height: 1em;
}

header h2 {
    font-size: 18px;
}

#btn-salir,
#btn-acceder {
    align-self: flex-start;
    color: var(--text-color);
    background-color: var(--bg-light);
    padding-inline: 8px;
    padding-block: 4px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    border: 0;
}

#btn-salir:hover,
#btn-acceder:hover {
    background-color: #d4f3f9;
}

#btn-salir:active,
#btn-acceder:active {
    background-color: var(--bg-dark);
    color: var(--text-light-color);
}

#btn-salir {
    display: none;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

.navbar ul {
    list-style: none;
    display: flex;
    gap: 30px;
    width: 100%;
    justify-content: flex-end;
    font-weight: 300;
    font-size: large;
}

.navbar li a {
    text-decoration: none;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--text-light-color);
    visibility: hidden;
    transform: scaleX(0);
    transition: all 0.3s ease-in-out;
}

nav a:hover::after {
    visibility: visible;
    transform: scaleX(1);
}

.navbar .selected {
    font-weight: 900;
    position: relative;
}

.navbar .selected:hover::before {
    height: 0;
}

.navbar .selected::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--text-light-color);
}

.div-oscuro {
    background-color: var(--bg-dark);
    color: var(--text-light-color);
}

main {
    flex: 1;
}

.main-inicio {
    display: flex;
    /* flex-direction: row;
    flex-wrap: wrap; */
    /* padding-inline: 55px; */
    overflow: hidden; /* Oculta los elementos fuera del viewport */
    scroll-snap-type: x mandatory; /* Habilita el "snap" al deslizar */
    position: relative;
}

.section-inicio {
    padding: 2%;
    width: 100%;
    height: 100vh;
    position: relative;
    scroll-snap-align: start; /* Alinea el scroll con el inicio de cada sección */
    flex: 0 0 100%;
}

.car-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 10px 10px;
    font-size: 50px;
    background-color: var(--bg-dark);
    color: var(--bg-light);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    z-index: 200;
}

.prev {
    left: 10px; /* Botón anterior a la izquierda */
}

.next {
    right: 10px; /* Botón siguiente a la derecha */
}

a.container {
    position: relative;
    display: block;
    height: 90%;
    /* width: 90%; */
    border-radius: 5px;
    transition: box-shadow .3s ease;
    color: var(--text-light-color);
    overflow: hidden;
}

a.container:after {
    content: '';
    position: absolute;
    background: linear-gradient(0deg, rgb(0 0 0) 0%, rgb(0 0 0 / 0%) 100%);
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
}

a.container:hover {
    box-shadow: 4px 5px 8px 0px var(--bg-dark);
}

a.container:hover > img {
    scale: 1.08;
}

.section-inicio h2 {
    /* text-decoration: underline; */
    font-size: 84px;
    position: absolute;
    z-index: 10;
    bottom: 70px;
    left: 10px;
}

.section-inicio img {
    /* border: 1px solid black; */
    width: 100%;
    height: 100%;
    border-radius: 4px;
    position: relative;
    z-index: 0;
    transition: scale .3s ease;
}

.section-inicio p {
    /* text-align: center; */
    position: absolute;
    z-index: 10;
    bottom: 2px;
    height: 60px;
    left: 10px;
    font-size: 20px;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    align-self: flex-end;
    margin-top: 20px;
    position: sticky;
    gap: 15px;
    right: 47%;
    bottom: 50px;
}

.carousel-indicators .dot {
    width: 15px;
    height: 15px;
    background-color: var(--bg-dark);
    border-radius: 50%;
    opacity: .35;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.carousel-indicators .dot.active {
    opacity: 1;
}

footer {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-items: center;
    align-items: center;
}

.footer-info {
    list-style: none;
}

.footer-info li {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-block: 8px;
}

.footer-info i {
    width: 20px;
    text-align: center;
}

footer img {
    width: auto;
    height: 80px;
}

/** Ventana de logueo **/
.overlay,
.popup-imagen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.80);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.overlay p {
    display: none;
    padding-top: 10px;
    color: red;
}

.popup {
    background-color: var(--bg-light);
    width: 350px;
    height: 380px;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    position: relative;
}

.close-pop-up {
    position: absolute;
    top: 0;
    right: 0;
    padding-block: 8px;
    padding-inline: 14px;
    background-color: var(--bg-dark);
    color: var(--text-light-color);
    border: none;
    border-bottom-left-radius: 4px;
    border-top-right-radius: 4px;
    cursor: pointer;
    align-self: center;
}

.popup h2 {
    font-size: 18px;
}

.popup label {
    margin-top: 16px;
    text-align: left;
}

.popup input {
    color: var(--text-color);
    background-color: inherit;
    width: 100%;
    padding: 10px;
    border: 1px solid var(--text-color);
    border-radius: 4px;
}

.popup input:focus {
    outline: 1px solid var(--text-color);
}

.popup a {
    font-size: 14px;
    color: #1f536b;
    text-decoration: none;
}

.popup a:hover {
    text-decoration: underline;
}

#btn-log-in {
    margin-top: 20px;
    padding-block: 12px;
    padding-inline: 18px;
    background-color: var(--bg-dark);
    color: var(--text-light-color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    align-self: center;
}

.popup button:hover {
    background-color: #1e455b;
}

/* Pagina nosotros */

.main-secundario {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: row;
    padding-inline: 50px;
    justify-content: space-evenly;
}

.mostrar-atajos {
    display: none;
}

.selectors {
    width: 200px;
    font-size: 20px;
    margin-block: 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    /* margin-right: 10px; */
    position: relative;
}

.selectors:after {
    content: '';
    position: absolute;
    width: 2px;
    height: 100%;
    right: -20px;
    background-color: var(--bg-dark);
}

.selectors a:hover {
    font-weight: bold;
}

.btn-subir {
    display: none;
    position: fixed;
    bottom: 150px;
    left: 250px;
    padding-block: 8px;
    padding-inline: 14px;
    background-color: var(--bg-dark);
    color: var(--text-light-color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    /* align-self: center; */
}

.section-secundaria {
    width: 65%;
    display: flex;
    flex-direction: column;
    margin-block: 20px;
    padding-inline: 10px;
    gap: 46px;
    font-size: 18px;
}

.section-secundaria h2 {
    margin-bottom: 10px;
    font-size: xxx-large;
}

.article-secundaria {
    margin-bottom: 24px;
}

.article-secundaria h3{
    font-size: x-large;
    margin-bottom: 10px;
    margin-top: 10px;
}

.article-secundaria img{
    width: 600px;
    height: 360px;
}

.article-secundaria p {
    margin-bottom: 5px;
}

/* Pagina Fotos */
.album {
    margin-bottom: 24px;
}

.fotos-album {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.fotos-album img {
    height: 120px;
    width: 120px;
    border-radius: 5px;
    cursor: pointer;
    transition: all .3s ease;
}

.fotos-album img:hover {
    scale: 1.1;
    box-shadow: 2px 2px 10px 1px var(--bg-dark);
}

.expand-image {
    position: fixed;
    border-radius: 10px;
    z-index: 2;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.expand-image img {
    border-radius: inherit;
    width: inherit;
    height: inherit;
    object-fit: contain;
    max-height: 90vh;
}

.next-image {
    right: -50px;
    font-size: 35px;
}

.prev-image {
    left: -50px;
    font-size: 35px;
}

.close-expand{
    font-weight: 900;
    position: absolute;
    top: 0;
    right: 0;
    padding-block: 8px;
    padding-inline: 14px;
    background-color: var(--bg-dark);
    color: var(--text-light-color);
    border: none;
    border-bottom-left-radius: 4px;
    border-top-right-radius: 4px;
    cursor: pointer;
}

/* Formulario subida imagen */

.form-fotos {
    display: flex;
    flex-direction: column;
    padding-inline: 12px;
    font-weight: bold;
}

.popup-imagen-content {
    position: relative;
    background-color: var(--bg-light);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
}

.popup-imagen-content h2 {
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
}

.popup-imagen-content button[type="submit"] {
    padding: 10px;
    border: none;
    cursor: pointer;
    text-align: center;
    margin-top: 20px;
    padding-block: 12px;
    padding-inline: 18px;
    background-color: var(--bg-dark);
    color: var(--text-light-color);
    border-radius: 4px;
    align-self: center;
}

.popup-imagen-content input {
    color: var(--text-color);
    width: 100%;
    padding: 10px;
    border: 1px solid var(--text-color);
    border-radius: 4px;
    background-color: inherit;
    margin-bottom: 20px;
}

.popup-imagen-content input:focus {
    outline: 1px solid var(--text-color);
}

.popup-imagen-content textarea {
    width: 100%;
    height: 4rem;
    background-color: var(--bg-light);
    border: 1px solid var(--text-color);
    border-radius: 4px;
    margin-bottom: 20px;
}

.popup-imagen-content textarea:focus {
    outline: 1px solid var(--text-color);
    border: 1px solid var(--text-color);
}

::file-selector-button {
    color: var(--text-color);
    background-color: var(--bg-light);
    border: 1px solid var(--text-color);
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    padding: 2px;
}

.close-imagen-btn {
    font-weight: 900;
    position: absolute;
    top: 0;
    right: 0;
    padding-block: 8px;
    padding-inline: 14px;
    background-color: var(--bg-dark);
    color: var(--text-light-color);
    border: none;
    border-bottom-left-radius: 4px;
    border-top-right-radius: 4px;
    cursor: pointer;
}

.close-imagen-btn:hover {
    background-color: #1e455b;
}

#menu-hamburguesa {
    display: none;
}

.info-link {
    font-weight: bold;
    font-size: 24px;
}

.info-link:hover {
    text-decoration: underline;
}

.button-link {
    padding-block: 2px;
    padding-inline: 8px;
    background-color: var(--bg-dark);
    color: var(--text-light-color);
    border-radius: 4px;
    text-align: center;
}

.button-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.btn-div {
    display: flex;
    justify-content: flex-end
}

/* Inicio responsive */
@media (width < 768px) {
    header {
        background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url(./img/portada_malvinas.png) center;
        background-size: cover;
    }

    #menu-hamburguesa {
        display: flex;
        width: 56px;
        height: 56px;
        position: absolute;
        right: 12px;
        top: 12px;
        font-size: 40px;
        text-align: center;
        color: var(--bg-dark);
        background-color: var(--bg-light);
        border: 0;
        border-radius: 4px;
        align-items: center;
        justify-content: center;
    }

    @keyframes show {
        from {
            left: 100vw;
        }
    
        to {
            left: 0;
        }
    }

    nav.show {
        display: block;
        z-index: 1000;
        padding-top: 24px;
        width: 100vw;
        height: 100vh;
        top: 150px;
        left: 0;
        animation: show .3s;
    }

    .navbar {
        display: none;
        position: absolute;
    }

    .navbar ul {
        list-style: none;
        display: flex;
        gap: 30px;
        width: 100%;
        font-weight: 300;
        flex-direction: column;
        align-items: flex-end;
        font-size: xx-large;
    }

    .main-inicio {
        padding-inline: revert;
    }

    .mostrar-atajos {
        display: block;
        font-size: large;
        margin-top: 0.5em;

        & i {
            transform: rotate(90deg);
        }
    }

    .selectors.show {
        display: flex;
        width: 80%;
        font-size: 20px;
        padding-block: 20px;
        flex-direction: column;
        gap: 24px;
        align-items: center;
        background-color: var(--back-text);
        color: var(--text-color);
        height: 200px;
        max-height: fit-content;
        overflow: scroll;
        pointer-events: all;
        opacity: 1;
        transition: height .3s;
    }

    .selectors {
        height: 0;
        opacity: 0;
        margin: 0;
        pointer-events: none;
        transition: height .3s;
    }

    .selectors:after {
        display: none;
    }

    .main-secundario {
        padding-inline: 0;
        flex-direction: column;
        align-items: center;
    }

    .section-secundaria {
        width: 90%;
        padding-inline: 0;
    }

    .section-inicio {
        flex-direction: column;
        /* padding: revert; */
        width: revert;
        height: 350px;
        margin-block: 24px;
    }

    .section-inicio h2 {
        font-size: xxx-large;
    }

    .section-inicio p {
        font-size: medium;
    }

    .car-btn {
        display: none;
    }

    .carousel-indicators {
        right: 39%;
        bottom: 10%;
    }

    .btn-subir {
        left: 20px;
        border: 1px solid var(--bg-light);
    }

    .fotos-album {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    footer {
        padding: 20px;
        gap: 16px;
        display: flex;
        justify-items: center;
        align-items: center;
        flex-direction: column;
    }

    .footer-info {
        place-items: center;
    }

}

@media (width < 400px) {
    .fotos-album {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

/** Carrousel de fotos**/
.expand-image button {
    background-color: var(--bg-dark);
    color: var(--text-light-color);
    border: none;
    border-radius: 4px;
    padding: 10px;
    font-size: 1.2rem;
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.expand-image button:hover {
    background-color: #1e455b;
}

.expand-image .prev-image {
    left: 10px;
}

.expand-image .next-image {
    right: 10px;
}

.expand-image .close-expand {
    top: 10px;
    right: 10px;
    transform: none;
    z-index: 11;
    font-size: 1.5rem;
}
