/* RESET BASICO ----------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* LAYOUT GENERAL --------------------------------------- */
html, body {
    overscroll-behavior: none;
}

body {
    font-family: Arial, sans-serif;
    background: #000000;
    color: #ffffff;
    transition: background-color 0.3s ease;
}

body.lightbox-open {
    overflow: hidden;
    background-color: #000000 !important;
}

body.lightbox-open #contenido,
body.lightbox-open #portada,
body.lightbox-open #footer {
    opacity: 0.02;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

body.lightbox-open #contenido {
    opacity: 0.25;
    transition: opacity 0.4s ease;
}

/* PORTADA ---------------------------------------------- */
#portada {
    width: 100%;
    aspect-ratio: 1920 / 900;
    min-height: 300px;
    max-height: 600px;
    background-image: url("../images/bg/Main.jpg");
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

/* MENU ------------------------------------------------- */
#menu-wrapper {
    width: 100%;
    position: relative;
    height: var(--menu-h, 0px);
}

#menu {
    width: 100%;
    text-align: center;
    padding: 20px 0;
    background: #000000;
    position: relative;
    z-index: 101;
}

#menu.flotante {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100 !important;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.3s ease-in-out;
}

.menu-hidden {
    transform: translateY(-100%);
}

.div-border-gradient {
    position: relative;
    padding: 12px 0;
}

.div-border-gradient::before,
.div-border-gradient::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(
        to right,
        black 5%,
        #350001 30%,
        #7d090c 50%,
        #350001 70%,
        black 95%
    );
}

.div-border-gradient::before { top: 0; }
.div-border-gradient::after  { bottom: 0; }

#menu a {
    font-family: "Montserrat", Arial;
    font-weight: 500;
    letter-spacing: 1px;
    color: #3c3c3c;
    text-decoration: none;
    margin: 0 30px;
    font-size: 0.9em;
    transition: color 0.3s ease;
}

#menu a.white {
    color: #cfcfcf;
    font-weight: 500;
}

@media (hover: hover) {
    #menu a:hover {
        color: #7d090c;
        opacity: 0.7;
    }
}

/* CONTENIDO PRINCIPAL ---------------------------------- */
#contenido {
    width: 90%;
    max-width: 1500px;
    margin: 1em auto;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 10px 0;
}

.fila {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
}

.cuadro {
    position: relative;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    outline: 1px solid #0d0d0d;
    cursor: pointer;
}

.loading-gif {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.4);
    pointer-events: none;
}

.ratio-16-9 { aspect-ratio: 16 / 9; }
.ratio-1-1  { aspect-ratio: 1 / 1; }
.ratio-4-5  { aspect-ratio: 4 / 5; }
.ratio-9-16 { aspect-ratio: 9 / 16; }
.ratio-2-1 { aspect-ratio: 2 / 1; }
.ratio-3-1 { aspect-ratio: 3 / 1; }
.ratio-24-1 { aspect-ratio: 2.4 / 1; }

.cuadro-texto-variable {
    width: 100% !important;
    padding: 80px;
    background-color: rgba(0,0,0,0.7);
    color: white;
    font-size: 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    outline: none;
}

.cuadro-texto-variable h2 {
    color: #cfcfcf;
    font-family: 'Montserrat';
    font-size: 0.75em;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.cuadro-texto-variable p {
    color: #7b7a7a;
    font-family: 'Montserrat';
    font-size: 0.55em;
    font-weight: 400;
    line-height: 1.5em;
    margin-bottom: 10px;
    max-width: 350px;
}

/* FOOTER ----------------------------------------------- */
#footer {
    width: 100%;
    padding: 40px 0;
}

#mail {
    align-items: center;
    background-color: rgba(10, 10, 10, 0.5);
    backdrop-filter: blur(10px);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    bottom: 0px;
    cursor: pointer;
    display: flex;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.65em;
    font-weight: 400;
    height: 40px;
    justify-content: center;
    letter-spacing: 0.15em;
    padding: 0 20px;
    position: fixed;
    right: 20px;
    z-index: 9999;
}

/* LIGHTBOX --------------------------------------------- */
#lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000 !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    touch-action: none;
    overflow: hidden;
}

#lightbox::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200%;
    background: rgba(0, 0, 0, 0.98);
    z-index: -1;
    pointer-events: none;
}

#lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-inner {
    position: relative;
    width: 95%;
    height: 90%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.lightbox-image {
    max-width: 100%;
    max-height: 85%;
    object-fit: contain;
    transform: scale(0.95);
    transition: transform 0.5s ease;
    user-select: none;
    -webkit-user-drag: none;
}

#lightbox.active .lightbox-image {
    transform: scale(1);
}

.lightbox-close {
    margin-bottom: 20px;
    font-family: 'Montserrat';
    font-size: 0.7em;
    letter-spacing: 0.2em;
    cursor: pointer;
    opacity: 0.7;
    padding: 10px;
    -webkit-tap-highlight-color: transparent;
}

/* RESPONSIVE ------------------------------------------- */
@media (max-width: 768px) {
    .fila {
        flex-direction: row;
        flex-wrap: wrap;
    }
    #portada {
        aspect-ratio: auto;
        min-height: 45vh;
        background-size: cover;
    }
    .cuadro { width: 100% !important; }
    .cuadro.mobile-50 { width: 50% !important; }
}