/* Wrapper layout */
#ctp-wrapper {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

/* Top tabs */
#ctp-top-tabs {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
    margin-bottom: 10px;
    padding: 0 10px;
    box-sizing: border-box;
}

#ctp-top-tabs-btns-wrapper {
    display: flex;
    flex-wrap: wrap;
    padding: 20px 0;
    border-radius: 15px;
    box-shadow: 2px 2px #ccc;
    margin-bottom: 30px;
}

.ctp-top-tab-links-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0 20px;
    max-width: 150px;
}

.ctp-top-tab-links-wrapper img {
    max-width: 100px;
    cursor: pointer;
}

button.ctp-top-tab {
    border: 0;
    background-color: transparent;
}

#ctp-left-tabs-wrapper label {
    font-weight: bold;
    color: black;
    font-size: 1.2em;
    padding-right: 10px;
    white-space: nowrap;
}

.ctp-top-tab, .ctp-left-tab {
    cursor: pointer;
    display: block;
    margin: 5px;
}

.ctp-top-tab.active, .ctp-left-tab.active {
    background-color: #dedede !important;
}

/* Left tab area (desktop) */
#ctp-left-tabs {
    width: 200px;
    margin-right: 20px;
    margin-top: 10px;
}

#ctp-left-tabs button {
    border: 0;
    background-color: transparent;
    padding-left: 0;
    margin-left: -5px;
    padding: 5px;
}

/* Left tab select (mobile) */
#ctp-left-tabs-select {
    display: none;
    margin: 0;
    padding: 5px;
    width: auto;
}

/* Content area */
#ctp-content-area {
    flex: 1;
}

/* Multi-column layout for images */
.ctp-image-grid {
    column-count: 3;
    column-gap: 10px;
}

.ctp-grid-item {
    break-inside: avoid;
    margin-bottom: 10px;
}

.ctp-grid-item img {
    width: 100%;
    height: auto;
    display: block;
}

/*---Light box for carousel of images---*/

/* Overlay background */
.ctp-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Image styling */
.ctp-lightbox-img {
    max-width: 90%;
    max-height: 80vh;
    transition: all 0.3s ease;
}

/* Prev / Next Buttons */
.ctp-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    user-select: none;
    z-index: 10000;
}

.ctp-lightbox-prev { left: 20px; }
.ctp-lightbox-next { right: 20px; }

/* Close button */
.ctp-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    z-index: 10000;
}


/* Responsive changes for mobile */
@media (max-width: 768px) {
    #ctp-wrapper {
        flex-direction: column;
    }

    #ctp-top-tabs {
        padding: 0 10px;
        box-sizing: border-box;
    }

    #ctp-top-tabs-btns-wrapper {
        display: grid;
        grid-template-columns: repeat(3, 1fr); /* 3 items per row */
        gap: 10px;
        width: 100%;
        padding: 20px 0;
        box-sizing: border-box;
        margin-bottom: 30px;
    }

    .ctp-top-tab-links-wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        padding: 0; /* Remove horizontal padding */
        width: 100%; /* Ensure grid column fit */
        box-sizing: border-box;
        text-align: center;
    }

    .ctp-top-tab-links-wrapper img {
        max-width: 80px; /* Slightly smaller for mobile */
        height: auto;
        cursor: pointer;
        display: block;
    }

    .ctp-top-tab {
        width: 100%;
        max-width: 100px;
    }

    #ctp-left-tabs-wrapper {
        display: flex;
        justify-content: left;
    }

    #ctp-left-tabs {
        display: none;
    }

    #ctp-left-tabs-select {
        display: block;
    }

    #ctp-content-area {
        margin-top: 20px;
    }

    .ctp-image-grid {
        column-count: 2;
    }
}

}
