/* Project Gallery Specific Styles */

.project-header {
    background: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.8)), url('https://img.freepik.com/free-photo/architectural-construction-site_23-2149124355.jpg');
    background-size: cover;
    background-position: center;
    padding: 100px 0;
    margin-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.project-header h1 {
    color: #fff;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}

.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
}

.filter-btn {
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.4);
    color: #e2e8f0;
    padding: 10px 18px;
    border-radius: 999px;
    transition: all 0.25s ease;
    font-weight: 600;
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

.gallery-masonry {
    column-count: 3;
    column-gap: 24px;
}

.gallery-item {
    position: relative;
    display: inline-block;
    width: 100%;
    break-inside: avoid;
    margin-bottom: 24px;
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: #0f172a;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.18);
}

.gallery-item img {
    width: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 16px 18px 14px;
    color: #fff;
    font-weight: 700;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.78));
    letter-spacing: 0.02em;
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.38);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: #fff;
    font-size: 1.7rem;
    background: rgba(37, 99, 235, 0.95);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(18px);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay i {
    transform: translateY(0);
}

.gallery-modal-content {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(2, 6, 23, 0.5);
}

.modal-body img {
    width: 100%;
    height: auto;
    display: block;
}

.modal-caption-wrap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.8));
    padding: 24px 28px 20px;
}

.modal-caption-wrap h5 {
    color: #fff;
    margin: 0;
    font-weight: 700;
}

@media (max-width: 991px) {
    .gallery-masonry {
        column-count: 2;
    }
}

@media (max-width: 575px) {
    .gallery-masonry {
        column-count: 1;
    }

    .gallery-filters {
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
}