/* ----------------------------------- */
/* 1. On-Page Responsive Grid Layout   */
/* ----------------------------------- */
.como-gallery-container {
    width: 100%;
}

.como-gallery-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    width: 100%;
}

.como-grid-item {
    display: none; /* Hidden by default for JS Load More logic */
    width: 100%;
    aspect-ratio: 1 / 1; 
    overflow: hidden;
}

.como-grid-item.is-visible {
    display: block;
    animation: comoFadeIn 0.5s ease;
}

.como-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.como-grid-item img:hover {
    opacity: 0.8;
    transform: scale(1.06); /* Scales the image up by 6% */
}

/* 3-2 Alternating Layout Logic */
.como-grid-item:nth-child(5n + 1),
.como-grid-item:nth-child(5n + 2),
.como-grid-item:nth-child(5n + 3) {
    grid-column: span 2;
}

.como-grid-item:nth-child(5n + 4),
.como-grid-item:nth-child(5n + 5) {
    grid-column: span 3;
}

/* ----------------------------------- */
/* 2. Load More Button                 */
/* ----------------------------------- */
.como-load-more-btn {
    display: block !important;
    width: max-content !important;
    margin: 40px auto !important; 
    padding: 15px 40px !important;
    background-color: transparent !important;
    color: black!important;
    border: 2px solid #622e88 !important;
    cursor: pointer !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    text-align: center !important;
    transition: background 0.3s !important;
}

.como-load-more-btn:hover {
    background-color:#622e88!important ;
    color:white!important;
}

.como-load-more-btn.is-hidden {
    display: none!important;
}

/* ----------------------------------- */
/* 3. Lightbox Overlay                 */
/* ----------------------------------- */
.como-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000000;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.como-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #ffffff;
    font-size: 40px;
    cursor: pointer;
    z-index: 10;
}

.como-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff;
    font-size: 50px;
    cursor: pointer;
    z-index: 10;
    user-select: none;
    padding: 20px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.como-lightbox-nav:hover {
    opacity: 1;
}

.como-nav-prev { left: 2vw; }
.como-nav-next { right: 2vw; }

/* ----------------------------------- */
/* 4. Lightbox Main Image Area         */
/* ----------------------------------- */
.como-lightbox-main-view {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 60px 0 20px 0;
    box-sizing: border-box;
    overflow: hidden;
}

.como-lightbox-main-view img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ----------------------------------- */
/* 5. Bottom Thumbnail Track           */
/* ----------------------------------- */
.como-lightbox-thumbnail-track {
    height: 120px;
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: #000000;
    overflow-x: auto;
    box-sizing: border-box;
    scroll-behavior: smooth;
    
    /* Hide Scrollbar */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.como-lightbox-thumbnail-track::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

.como-lightbox-thumbnail-track .como-thumb-item {
    height: 90px !important;
    width: 90px !important;
    min-width: 90px !important;
    max-width: 90px !important;
    flex-shrink: 0 !important;
    object-fit: cover !important;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.como-thumb-item:hover,
.como-thumb-item.active {
    opacity: 1;
}

/* ----------------------------------- */
/* 6. Animations                       */
/* ----------------------------------- */
@keyframes comoFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ----------------------------------- */
/* 7. Responsiveness                   */
/* ----------------------------------- */
@media (max-width: 1024px) {
    /* Switch to the 2-1-2 repeating pattern on smaller screens */
    .como-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .como-grid-item:nth-child(3n + 1),
    .como-grid-item:nth-child(3n + 2) {
        grid-column: span 1;
    }

    .como-grid-item:nth-child(3n + 3) {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    /* Keep the same 2-1-2 pattern on mobile */
    .como-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .como-lightbox-nav { 
        font-size: 30px; 
        padding: 10px; 
    }
    .como-nav-prev { left: 0; }
    .como-nav-next { right: 0; }
}