.container-fluid {
    padding-left: 40px;
    padding-right: 40px;
}

.gallery-container {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(211px, 1fr));
    gap: 15px;
    max-width: 100%;
    margin: 0 auto;
    justify-content: center;
}

@media (min-width: 1600px) {
    .gallery-container {
        max-width: 80%;
    }
}

@media(max-width: 475px) {
    .before-after {
        height: 140px !important;
    }
}

/* Standard Gallery Images */
.gallery-img {
    width: 100%;
    height: 211px;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s ease-in-out;
}

.image-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0);
    color: white;
    padding: 5px 10px;
    font-size: 14px;
    font-weight: 300;
    border-radius: 5px;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

/* Before & After Container */
.before-after {
    position: relative;
    width: 100%;
    height: 190px;
    cursor: pointer;
    overflow: hidden;
    border-radius: 12px 12px 0px 0px;
}

.before-after-bottom-text{
    border-radius: 0px 0px 12px 12px;
    background: aliceblue;
    padding: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.before-after img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
}

/* Before & After Images */
.before,
.after {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease-in-out;
    /* opacity: 0; */
}

/* Show First Image Initially */
.before:first-child,
.after:first-child {
    opacity: 1;
}

@media (max-width: 768px) {
    .container-fluid {
        padding-left: 20px;
        padding-right: 20px;
    }

    .gallery-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Popup */
.popup-overlay {
    visibility: hidden;
    opacity: 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: visibility 0s linear 0.3s, opacity 0.3s ease-in-out;
}

.popup-overlay.show {
    visibility: visible;
    opacity: 1;
    transition: visibility 0s linear 0s, opacity 0.3s ease-in-out;
}

.popup-content {
    background: white;
    padding: 48px;
    max-width: 600px;
    width: 90%;
    text-align: center;
    border-radius: 20px;
    position: relative;
}

.popup-title {
    line-height: 40px;
}

.popup-description {
    font-family: 'Ubuntu', sans-serif;
    color: #363636;
    line-height: 30px;
}

.popup-quote-btn {
    border-radius: 12px;
    padding: 10px 40px 10px 40px;
    font-size: 20px;
}

.close-popup {
    position: absolute;
    top: 12px;
    right: 20px;
    font-size: 24px;
    color: #262626;
    cursor: pointer;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    background-color: white;
    margin: auto;
    max-width: 90%;
    width: 1000px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    padding: 20px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    height: auto;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close {
    position: absolute;
    right: 20px;
    top: 26px;
    font-size: 30px;
    font-weight: bold;
    color: red;
    cursor: pointer;
    z-index: 10;
}

.modal-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e5e5;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #333;
}

.price-range {
    font-size: 16px;
    color: #666;
    margin-right: 20px;
}

.image-container {
    display: flex;
    gap: 15px;
    overflow-y: auto;
    flex-direction: row;
    flex: 1;
    padding: 10px 5px;
    margin-top: 10px;
    min-height: 200px;
    max-height: calc(85vh - 120px);
}

.before, .after {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-height: 100%;
}

.before h3, .after h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #444;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
    overflow-y: auto;
    height: auto;
    flex: 1;
    max-height: calc(85vh - 180px);
    padding: 5px;
}

.image-grid a {
    display: block;
    height: 120px;
    overflow: hidden;
    border-radius: 6px;
    transition: transform 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.image-grid a:hover {
    transform: scale(1.03);
}

.image-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.divider {
    width: 2px;
    background-color: #e5e5e5;
    align-self: stretch;
    margin: 0 5px;
    flex-shrink: 0;
}

.no-scroll {
    overflow: hidden;
}

@media (max-width: 768px) {
    .image-container {
        flex-direction: column;
        max-height: 70vh;
    }
    
    .divider {
        width: 100%;
        height: 2px;
        margin: 10px 0;
    }
    
    .modal-content {
        padding: 15px;
        max-height: 90vh;
        width: 95%;
    }
    
    .image-grid {
        max-height: 30vh;
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .image-grid a {
        height: 100px;
    }
    
    .before, .after {
        min-height: 180px;
    }
    
    .modal-header {
        margin-bottom: 10px;
        padding-bottom: 10px;
    }
    
    .modal-header h2 {
        font-size: 20px;
    }
}

/* LightGallery Custom Styles */
.lg-outer .lg-sub-html {
    font-size: 16px;
    font-weight: 500;
    padding: 10px;
    background: rgba(0, 0, 0, 0.7);
    bottom: 60px;
}

.lg-outer .lg-thumb-item.active, 
.lg-outer .lg-thumb-item:hover {
    border-color: #262626;
}

/* Responsive */
@media (max-width: 768px) {
    .popup-content {
        width: 90%;
    }

    .popup-quote-btn {
        font-size: 16px;
    }
    .scroll-btn{
        display: none !important;
    }
}

/* Container for the tabs */
.tabs-wrapper {
    overflow-x: scroll;
    white-space: nowrap;
    flex-grow: 1;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
    cursor: grab;
    width: 100%;
    display: flex;
}

.tabs-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    position: relative;
}

.tabs-wrapper::-webkit-scrollbar {
    display: none;
}

.tabs {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    justify-content: center;
}

.tab {
    display: inline-block;
    background: #F6F6F6;
    border: 1px solid rgb(217, 217, 217);
    border-radius: 20px;
    padding: 10px 18px;
    color: #262626;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: 0.3s ease-in-out;
}

.tab.active {
    background: #262626;
    color: white;
    transform: scale(1);
    border: 1px solid #262626;
}

.scroll-btn {
    color: #262626;
    border: 1px solid #262626;
    border-radius: 50%;
    font-size: 16px;
    font-weight: 300;
    cursor: pointer;
    pointer-events: all;
    background: white;
    transition: 0.3s ease-in-out;
    opacity: 1;
}

.scroll-btn[disabled] {
    opacity: 0.3;
    cursor: not-allowed;
}

.scroll-btn i {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;

}

.scroll-btn:hover,
.scroll-btn:active {
    background: #262626 !important;
    color: white !important;

}

/* Loader */
.loader-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    background: #fff;
    position: relative;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 9999;
}

.loader {
    position: relative;
    width: 42px;
    height: 42px;
}

.dot {
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: #262626;
    border-radius: 50%;
    opacity: 0.2;
    transition: opacity 0.3s;
}

@keyframes fade {
    0% { opacity: 1; }
    100% { opacity: 0.2; }
}

.load-more-wrapper {
    grid-column: 1 / -1; /* Makes sure it spans full width of the grid */
    text-align: center;
    margin-top: 20px;
    width: 100%; /* Ensures it takes full width */
}

.load-more{
    border: none;
    background: none;
}
.load-more:hover {
    background-color: #fff;
    color: #FD760D;
    transition: 0.3s ease;
}

.small-loader {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid #262626; /* Only top border visible */
    border-radius: 50%;
    display: inline-block;
    margin-left: 8px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
