:root {
    --fondo: #070914;
    --texto: #ffffff;
    --texto-suave: #9ca3af;
    --rosa: #e879f9;
    --azul: #67e8f9;

    /* Tamaño de las tarjetas del carrusel */
    --ancho-tarjeta: 240px;
    --alto-tarjeta: 160px;

    /* Distancia de las tarjetas respecto al centro del círculo */
    --radio-carrusel: 390px;
}

main {
    flex: 1;
    /* border: solid 2px yellow; */
    /* margin-left: 280px; */

}

/**************************************/
button,
img {
    -webkit-user-select: none;
    user-select: none;
}

button {
    font: inherit;
}

/* =========================================================
   3. ESCENA Y CARRUSEL 3D
   ========================================================= */
.zona-carrusel {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 530px;
    cursor: grab;
    touch-action: none;
    /* Permite controlar el arrastre táctil con JS */
    outline: none;
}

.zona-carrusel.arrastrando {
    cursor: grabbing;
}

.zona-carrusel:focus-visible {
    outline: 2px solid var(--azul);
    outline-offset: -8px;
}

.escena {
    position: relative;
    width: 100%;
    height: 430px;
    /* Sin perspectiva, la profundidad translateZ no sería visible */
    perspective: 1100px;
}

.carrusel {
    /* border: solid 2px yellow; */
    position: absolute;
    left: 50%;
    top: 50%;
    width: var(--ancho-tarjeta);
    height: var(--alto-tarjeta);
    /* Mantiene a los hijos dentro del espacio tridimensional */
    transform-style: preserve-3d;
    transform: translate(-50%, -50%) rotateX(-7deg) rotateY(0deg);
    will-change: transform;
}

.tarjeta {
    position: absolute;
    inset: 0;
    overflow: hidden;
    padding: 0;
    color: white;
    text-align: left;
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 18px;
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.55);
    cursor: pointer;
    /* Evita mostrar la cara trasera cuando una tarjeta pasa por detrás */
    backface-visibility: hidden;
}

.tarjeta:hover,
.tarjeta:focus-visible {
    border-color: var(--azul);
    outline: none;
}

.tarjeta img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    pointer-events: none;
    transition: transform 0.45s, filter 0.45s;
}

.tarjeta:hover img {
    transform: scale(1.08);
    filter: brightness(1.12);
}

.tarjeta__texto {
    position: absolute;
    inset: auto 0 0;
    padding: 45px 15px 14px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.92));
    pointer-events: none;
}

.tarjeta__numero {
    display: block;
    margin-bottom: 3px;
    color: var(--azul);
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.tarjeta__titulo {
    font-weight: bold;
}

.sombra-carrusel {
    position: absolute;
    left: 50%;
    top: 63%;
    width: min(820px, 82vw);
    height: 120px;
    border: 1px solid rgba(232, 121, 249, 0.15);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 70px rgba(217, 70, 239, 0.14);
    transform: translate(-50%, 0);
}

/* =========================================================
    CONTROLES
   ========================================================= */
.controles {
    position: relative;
    z-index: 10;
    display: flex;
    /* flex-wrap: wrap; */
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: -40px;
    flex-wrap: wrap;
    /* border: solid 2px yellow; */
}

.pagina-actual {
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .13);
    color: white;
    font-weight: 600;
    min-width: 100px;
    text-align: center;

}

.boton,
.ayuda {
    margin: 0;
    padding: 11px 18px;
    color: white;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 999px;
    backdrop-filter: blur(12px);
}

.boton {
    display: flex;
    gap: 9px;
    cursor: pointer;
}

.boton:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(232, 121, 249, 0.55);
}

.ayuda {
    color: var(--texto-suave);
}

/* =========================================================
   5. MODAL CON LA IMAGEN AMPLIADA
   ========================================================= */
.modal {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(12px);
    animation: aparecer 0.25s ease;
}

/* Es importante mantener esta regla después de .modal */
.modal[hidden] {
    display: none;
}

.modal__contenido {
    max-width: 95vw;
    max-height: 90vh;
    margin: 0;
    overflow: hidden;
    background: #090d1a;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 24px;
    box-shadow: 0 0 75px rgba(217, 70, 239, 0.25);
    animation: ampliar 0.32s ease;
}

.modal__contenido img {
    display: block;
    max-width: 100%;
    max-height: 73vh;
    margin: auto;
    object-fit: contain;
}

.modal__contenido figcaption {
    padding: 15px 20px;
}

.modal__contenido small {
    color: var(--rosa);
    letter-spacing: 3px;
    text-transform: uppercase;
}

.modal__contenido h2 {
    margin: 5px 0;
}

.modal__contenido p {
    margin: 0;
    color: var(--texto-suave);
    font-size: 13px;
}

.cerrar-modal {
    position: absolute;
    z-index: 2;
    top: 18px;
    right: 18px;
    width: 48px;
    height: 48px;
    color: white;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.25s, background 0.25s;
}

.cerrar-modal:hover {
    background: #c026d3;
    transform: rotate(90deg);
}

@keyframes aparecer {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes ampliar {
    from {
        opacity: 0;
        transform: scale(0.75);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* =========================================================
   6. ADAPTACIÓN A MÓVILES
   Reducimos tarjetas y radio para que el círculo quepa mejor.
   ========================================================= */
@media (max-width: 700px) {
    :root {
        --ancho-tarjeta: 185px;
        --alto-tarjeta: 130px;
        --radio-carrusel: 270px;
    }

    .pagina {
        padding-inline: 8px;
    }

    .zona-carrusel {
        min-height: 430px;
    }

    .escena {
        height: 350px;
        perspective: 850px;
    }

    .controles {
        margin-top: 20px;
    }

    .tarjeta__texto {
        padding: 32px 10px 9px;
        font-size: 13px;
    }

    .sombra-carrusel {
        background: transparent;

    }
}

@media (max-width: 420px) {
    :root {
        --ancho-tarjeta: 150px;
        --alto-tarjeta: 105px;
        --radio-carrusel: 220px;
    }

    .etiqueta {
        letter-spacing: 3px;
    }

    .sombra-carrusel {
        background: transparent;

    }
}

/* Respeta a usuarios que prefieren menos animaciones */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/**************************/
h1 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    /*margin-bottom: 1rem;
    margin-top: 1rem; */
}


.sidebar {
    position: fixed;
    top: 24px;
    left: 24px;
    bottom: 32px;
    width: 280px;
    padding: 0 16px;
    display: none;
    flex-direction: column;
    /*gap: 8px;
    border-radius: 34px;
    backdrop-filter: blur(30px);*/

}

.sidebar.active {
    display: none;
}

.sidebar ul {
    /* display: flex;
    flex-direction: column; */
    list-style: none;
    /*margin: 0;
    width: 100%;*/
}

.nav {
    flex: 1;
}



/* aside {

    color: #ffffff91;
    text-transform: uppercase;
    justify-content: center;

} */

.sub-menu {
    /* border: brown 2px solid; */
    margin: 5px 0 0 25px;
    display: grid;
    width: 100%;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.5s;
    /**/
}

.sub-menu.active {
    grid-template-rows: 1fr;
}

.sub-menu ul {
    overflow: hidden;
    /*transform: translate(26px);*/
}

/* .sub-menu input {
    padding-left: 48px;
}

.sub-menu input::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 24px;
    translate: 0 -50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: rgb(255, 255, 255 / 35%);
} 

.open {
    display: block;
}*/

/*galeria de imagenes*/
/* .gallery {
    flex: 1;
    padding: 20px;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

.card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
} */


@media(max-width:1100px) {
    /* .sidebar {
        display: flex;
    } */

    /* .sub-menu ul {
        transform: translate(0);
    } */


    .footer {
        width: 100%;
        margin-left: 0;
        flex: 0;
    }

    .servicios {
        display: none;
    }

    .footer-container {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        gap: 20px;
    }

    .footer-column {
        margin: 0;
        font-size: 8px;
    }

    .footer-brand img {
        margin: 0 0 0 20px;
        display: block;

    }

    .social-links {
        display: flex;
        justify-content: center;
        margin: 0 55px 0 0;
    }

    .social-links i {
        font-size: 10px;

    }

    .social-links a {
        width: 30px;
        height: 30px;

    }

    .footer-bottom p {
        font-size: 8px;
    }
}

@media(max-width:916px) {
    /* main {
        padding-top: 70px;
        padding-bottom: 70px
    } */

    .sidebar-header {
        /* border: #ff0101 1px solid; */
        display: none;
    }

    .sidebar {
        /* border: #ff0101 1px solid; */
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        border-radius: 0;
        height: 40%;
    }

    /* .sub-menu{
        display: none;
    } */

    aside li {
        padding: 0;
    }

    .gold-btn,
    .plata-btn {
        min-height: 25px;
        font-size: .70rem;
        letter-spacing: normal;
        gap: 1px;
        padding: 10px;

    }

    /* .nav>li {
        position: relative;
    }*/

    .sub-menu {
        /* width: 80%; */
        margin: 10px 0 0 25px;
    }

    .mobile-header {

        display: none;
        justify-content: space-between;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 60px;
        padding: 0 16px;
        background-color: #1a1a1a;
        color: white;
        z-index: 1000;
    }

    /* .sub-menu ul {
        transform: translate(0);
    } */




}