/* =========================================================
   CARRUSEL
   =========================================================
*/

.carousel-container {
    margin: 0 auto 50px auto;
    background: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.carousel {
    overflow: hidden;
    position: relative;
    width: 100%;
}

.carousel-track {
    display: flex;
    flex-wrap: nowrap;
    transition: transform 0.3s ease-in-out;
    width: 100%;
}

.carousel-item {
    min-width: 100%;
    user-select: none;
    text-align: center;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    max-height: 100%;
}

.carousel-item-vertical {
    min-width: 100%;
    user-select: none;
    text-align: center;
    aspect-ratio: 9 / 16;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    max-height: 100%;
}

.carousel-item-cuadrado {
    min-width: 100%;
    user-select: none;
    text-align: center;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    max-height: 100%;
}

.carousel-item a {
    display: block;
    width: 100%;
    height: 100%;
}

.carousel-item img,
.carousel-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
    outline: none;
}

.carousel-item audio {
    width: 90%;
    margin-top: 10px;
    border-radius: 5px;
    outline: none;
}

.carousel-item-vertical a {
    display: block;
    width: 100%;
    height: 100%;
}

.carousel-item-vertical img,
.carousel-item-vertical video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
    outline: none;
}

.carousel-item-vertical audio {
    width: 90%;
    margin-top: 10px;
    border-radius: 5px;
    outline: none;
}

.carousel-item-cuadrado a {
    display: block;
    width: 100%;
    height: 100%;
}

.carousel-item-cuadrado img,
.carousel-item-cuadrado video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
    outline: none;
}

.carousel-item-cuadrado audio {
    width: 90%;
    margin-top: 10px;
    border-radius: 5px;
    outline: none;
}

/* Botones de navegación */
.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 24px;
    padding: 10px;
    cursor: pointer;
    border-radius: 50%;
    user-select: none;
    transition: background 0.3s;
    z-index: 10;
}

.carousel-button:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-button.prev {
    left: 10px;
}

.carousel-button.next {
    right: 10px;
}

/* =========================================================
   LIGHTBOX
   =========================================================
*/

.lightbox-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.lightbox-overlay.hidden {
    display: none;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
}

.lightbox-content {
    position: relative;
    z-index: 1;
    max-width: 92vw;
    max-height: 92vh;
    padding: 10px;
    display: grid;
    gap: 5px;
    background: rgba(0, 0, 0, 0.418);
    border-radius: 15px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

.lightbox-media {
    width: 100%;
    max-height: 72vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-media img,
.lightbox-media video,
.lightbox-media audio {
    width: 100%;
    max-width: 100%;
    max-height: 72vh;
    display: block;
    border-radius: 10px;
}

.lightbox-image {
    max-width: 100%;
    max-height: 72vh;
    margin: 0 auto;
    display: block;
    border-radius: 10px;
}

.lightbox-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    font-size: 24px;
    gap: 5px;
    flex-wrap: wrap;
}

.lightbox-close,
.lightbox-nav {
    position: absolute;
    border: none;
    color: #fff;
    background: rgba(0, 0, 0, 0.56);
    padding: 10px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.lightbox-close:hover,
.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.18);
}

.lightbox-close {
    top: 10px;
    right: 10px;
}

.lightbox-nav.prev {
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-nav.next {
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

/* =========================================================
   LAYOUTS DE PORTFOLIO (grillas de carruseles)
   =========================================================
*/

.portfolio-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    align-items: start;
    margin-top: 10px;
    max-width: 100%;
    overflow: hidden;
}

.portfolio-column {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: rgba(255, 255, 255, 0.15);
    border: 5px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 10px;
    overflow: hidden;
    max-width: 100%;
}

.portfolio-column.uno {
    border-color: #ff0000;
}

.portfolio-column.dos {
    border-color: #ffff00;
}

.portfolio-column.tres {
    border-color: #0000ff;
}

.portfolio-column.cuatro {
    border-color: #00ff00;
}

.portfolio-column.cinco {
    border-color: #9900ff;
}

.portfolio-column.seis {
    border-color: #ff9900;
}

.portfolio-column.carousel {
    width: 100%;
}

.orientation-subgroups {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    width: 100%;
    overflow: hidden;
}

.orientation-subgroup {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 20px;
    overflow: hidden;
    width: 100%;
}