/* --- Gallery Page Specific Styles --- */

.gallery-intro-section {
    background-color: #fff;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.gallery-intro-section h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #333;
}

.gallery-intro-section p {
    color: #555;
    line-height: 1.7;
    max-width: 800px;
    margin: 0 auto 15px auto;
}

.gallery-grid-section {
    padding: 20px 0;
}

.gallery-grid-section .row {
    justify-content: center;
    /* Center the grid items if there are not enough to fill the row */
    display: flex;
    flex-wrap: wrap;
    /* justify-content: space-between; */
    gap: 20px;
}

/* Styling for each project thumbnail container */
.gallery-grid-section .col-lg-4,
.gallery-grid-section .col-md-6,
.gallery-grid-section .col-sm-12 {
    position: relative;
    /* Needed for absolute positioning of overlay */
    overflow: hidden;
    /* Ensures overlay stays within bounds */
    border-radius: 8px;
    /* Consistent rounded corners */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
}

.gallery-grid-section .col-lg-4:hover,
.gallery-grid-section .col-md-6:hover,
.gallery-grid-section .col-sm-12:hover {
    transform: translateY(-5px);
    /* Lift effect on hover */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.gallery-thumbnail {
    width: 100%;
    height: 250px;
    /* Fixed height for consistent thumbnails */
    object-fit: cover;
    /* Ensures images fill the space without distortion */
    border-radius: 8px;
    /* Match parent container */
    display: block;
}

/* Project title overlay on hover */
.project-title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    /* Semi-transparent dark background */
    color: #fff;
    padding: 15px 10px;
    text-align: center;
    opacity: 0;
    /* Hidden by default */
    transform: translateY(100%);
    /* Start off-screen */
    transition: opacity 0.3s ease, transform 0.3s ease;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.gallery-grid-section .col-lg-4:hover .project-title-overlay,
.gallery-grid-section .col-md-6:hover .project-title-overlay,
.gallery-grid-section .col-sm-12:hover .project-title-overlay {
    opacity: 1;
    /* Show on hover */
    transform: translateY(0);
    /* Slide up into view */
}

.project-title-overlay h3 {
    font-size: 1.25rem;
    margin-bottom: 5px;
    color: #fff;
}

.project-title-overlay p {
    font-size: 0.85rem;
    margin-bottom: 0;
    color: #ccc;
}

/* Before & After Section */
.before-after-section {
    background-color: #f9f9f9;
    padding: 40px;
    margin-top: 30px;
    border-radius: 8px;
    text-align: center;
}

.before-after-section h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #333;
}

.before-after-section .twentytwenty-container {
    margin: 0 auto;
    max-width: 400px;
    /* Constrain the slider width */
}

.before-after-section .row {
    align-items: center;
    /* Center the grid items if there are not enough to fill the row */
    /* flex-wrap: wrap; */
    /* justify-content: space-between; */
    /* gap: 20px; */
    /* Adds space between columns */
}

/* Ensure images within the TwentyTwenty container are responsive */
.twentytwenty-container img {
    width: 100%;
    height: auto;
}