* {
    box-sizing: border-box;
}

.gallery-section {
    text-align: center;
    padding: 20px 20px;
    background-color: #fff;
}

.tab-container {
    display: flex;
    justify-content: center;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 60px;
}

.tab-button {
    background-color: transparent;
    border: none;
    outline: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 1.2em;
    color: rgb(9, 0, 48);
    position: relative;
    margin: 0 10px;
    transition: color 0.3s;
}

.tab-button.active {
    color: green;
    font-weight: bold;
}

.tab-button.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 3px;
    background-color: green;
    border-radius: 5px;
    margin: 0 auto;
}

.tab-button:focus {
    outline: none;
}

.tab-content {
    display: none; /* Keeps gallery content hidden */
}

.tab-content.active {
    display: block;
}

.gallery-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.gallery-item {
    width: 300px; /* Fixed width for larger screens */
    padding: 5px;
    flex: 1 1 auto; /* Allow flexibility for responsiveness */
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.image-preview {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.image-preview img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 5px;
}

.close-button {
    position: absolute;
    top: 20px;
    right: 30px;
    background-color: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .tab-button {
        font-size: 1em; /* Reduce font size on mobile */
        padding: 8px 10px; /* Adjust padding */
    }

    .gallery-item {
        width: 150px; /* Adjust width for mobile */
    }
}

@media (max-width: 480px) {
    .gallery-item {
        width: 100%; /* Full width on smaller screens */
        padding: 10px 0; /* Adjust padding */
    }

    .tab-button {
        margin: 0 5px; /* Reduce margin */
    }

    .tab-button.active {
        font-weight: normal; /* Adjust font weight for better visibility */
    }
}


.prev-button, .next-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: transparent;
    color: rgb(255, 255, 255);
    font-size: 2em;
    border: 2px;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    z-index: 1001;
}

.prev-button {
    left: 20px;
}

.next-button {
    right: 20px;
}



/*******************************/
/******* gallery Header CSS *******/
/*******************************/
.gallery-header {
    position: relative;
    margin-bottom: 30px;
    text-align: center;
    background: linear-gradient(rgba(68, 68, 68, 0.192), rgba(54, 54, 54, 0.253)), url(https://organiainnovationlab.blob.core.windows.net/organia/galleryheader.jpg);
    background-repeat: no-repeat; /* Prevent image from repeating */
    background-size: cover; /* Ensures the image covers the entire area */
    height: 525px; /* Set a fixed height for the header */
    display: flex; /* Use flexbox for centering content */
    flex-direction: column; /* Stack items vertically */
    justify-content: center; /* Center vertically */
    align-items: center; /* Center horizontally */
}

.gallery-header h2 {
    position: relative;
    color: #00b14a;
    font-size: 60px;
    font-weight: 700;
    margin: 20px 0; /* Adjusted margins for heading */
    padding-bottom: 5px;
    text-align: center; /* Center text */
}

.gallery-header h2::after {
    position: absolute;
    content: "";
    width: 100px;
    height: 2px;
    left: calc(50% - 50px);
    bottom: -10px; /* Position the line closer to the heading */
    background: #00b14a;
}

.gallery-header a {
    position: relative;
    padding: 0 12px;
    font-size: 22px;
    color: #ffffff;
}

.gallery-header a:hover {
    color: #00b14a;
}

.gallery-header a::after {
    position: absolute;
    content: "/";
    width: 8px;
    height: 8px;
    top: -2px;
    right: -7px;
    text-align: center;
    color: #ffffff;
}

.gallery-header a:last-child::after {
    display: none;
}

@media (max-width: 991.98px) {
    .gallery-header {
        height: auto; /* Allow height to adjust based on content */
        padding: 40px 0; /* Adjust padding for smaller devices */
        background-size: cover; /* Maintain full image visibility */
    }
    
    .gallery-header h2 {
        font-size: 45px; /* Smaller font size for headings */
        margin: 10px 0; /* Reduced margin for smaller devices */
    }
    
    .gallery-header a {
        font-size: 20px; /* Smaller font size for links */
    }
}

@media (max-width: 767.98px) {
    .gallery-header {
        width: 100vw; /* Full width of the viewport */
        height: 100vw; /* Square height based on viewport width */
        padding: 0; /* Remove extra padding for mobile */
        background-size: cover; /* Maintain full image visibility */
    }
    
    .gallery-header h2 {
        font-size: 30px; /* Further reduce font size for small devices */
        margin: 5px 0; /* Further reduced margin for small devices */
    }
    
    .gallery-header a {
        font-size: 18px; /* Further reduce font size for links */
    }
}


/*******************************/
/******* gallery Header scroll CSS *******/
/*******************************/


.scrollable-tab-container {
    display: flex;
    justify-content: center; /* Center the tab container horizontally */
    align-items: center; /* Center the tab container vertically */
    overflow: hidden; /* Hide scrollbar */
    width: 100%; /* Ensure it takes the full width of the container */
    padding: 0; /* Remove extra padding */
    margin-bottom: 30px;
}

.tab-container {
    display: flex;
    justify-content: center; /* Center the tabs horizontally */
    align-items: center; /* Align tabs vertically */
    overflow-x: auto; /* Allow horizontal scrolling */
    white-space: nowrap; /* Prevent wrapping of content */
    scroll-behavior: smooth; /* Smooth scrolling for scroll events */
    -ms-overflow-style: none; /* Hide scrollbar in Internet Explorer */
    scrollbar-width: none; /* Hide scrollbar in Firefox */
    cursor: grab; /* Indicate that the user can grab and drag */
    transition: transform 0.2s ease; /* Smooth transition when dragging */
    padding-left: 0; /* Remove any unwanted padding */
    width: fit-content; /* Shrink the container width to fit content */
    margin: 0 auto; /* Center the tab container within its parent */
}

.tab-container::-webkit-scrollbar {
    display: none; /* Hide scrollbar in WebKit browsers (Chrome, Safari) */
}

.tab-button {
    flex-shrink: 0; /* Prevent shrinking of the button */
    padding: 10px 20px;
    border: none;
    background-color: #ffffff;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
    margin: 0 5px; /* Add spacing between buttons */
    text-align: center; /* Center text within the buttons */
}

.tab-button:hover {
    background-color: #ddd;
}
