.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 20px auto;
    width: 100%;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    aspect-ratio: 4 / 3;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #222;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

.gallery-item-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0));
    padding: 30px 15px 15px 15px;
    color: white;
    transition: background 0.3s ease;
}

.gallery-item .comparison-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.gallery-item:hover .gallery-item-caption {
    background: linear-gradient(to top, rgba(2, 145, 189, 0.9), rgba(0,0,0,0));
}

.gallery-item-caption h5 {
    font-family: 'Ethnocentric', sans-serif;
    font-size: 16px;
    margin: 0 0 5px 0;
    color: white;
}

.gallery-item-caption p {
    font-family: 'Dunbar', sans-serif;
    margin: 0;
    font-size: 14px;
    color: white;
    opacity: 0.8;
}

img-comparison-slider {
    max-width: 100%;
    --divider-width: 3px;
    --divider-color: #0291bd; /* Your brand blue */
    --handle-size: 40px;
    --handle-color: #0291bd;
    --handle-background-color: #333;
    --handle-border-color: #0291bd;
    border-radius: 8px;
    overflow: hidden; /* Ensures corners are rounded */
}

/* === MODAL STYLING (Same as before) === */
.modal-content {
    background-color: #333;
    color: #f1f1f1;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.modal-header { border-bottom: 1px solid #555; }
.modal-header .close { color: white; opacity: 0.7; text-shadow: none; }
.modal-header .close:hover { opacity: 1; }
.modal-body { padding: 25px; } /* Give slider some space */
.modal-footer {
    border-top: 1px solid #555;
    display: flex;
    justify-content: flex-end;
    align-items: center; 
    gap: 15px;
}
.modal-footer p {
    margin: 0; 
    font-size: 16px;
    font-family: Dunbar, sans-serif;
}
.modal-footer a {
    display: inline-block;
}
.modal-footer .btn-primary { background-color: #0291bd; border-color: #0291bd; }
.modal-footer .btn-primary:hover { background-color: #74d3f1; border-color: #74d3f1; }

.modal-title {
    font-family: Dunbar;
}

/* Make sure this keyframe animation is in your CSS */
@keyframes slide-reveal {
    0% {
        clip-path: polygon(0 0, 0% 0, 0% 100%, 0 100%);
    }
    50% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    100% {
        clip-path: polygon(0 0, 0% 0, 0% 100%, 0 100%);
    }
}

@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on tablet */
    }
}

@media (max-width: 768px) {

    .gallery-grid {
        grid-template-columns: 1fr;
    }

}
