/**
 * Projects & Gallery — Shree Vishnu Foundations
 * Linked from projects.html and gallery.html
 */

/* Top banner (Our Projects page) */
.projects-top-banner {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 45%, #c41e3a 100%);
    color: #fff;
    padding: 2.75rem 1rem 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.projects-top-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.9;
    pointer-events: none;
}
.projects-top-banner .container { position: relative; z-index: 1; }
.projects-top-banner h1 {
    margin: 0 0 0.75rem;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: 0.02em;
}
.projects-top-banner .banner-deco {
    display: block;
    margin: 0.5rem auto 0;
    max-width: 220px;
    height: auto;
    opacity: 0.95;
}
.projects-top-banner .banner-sub {
    margin: 1rem auto 0;
    max-width: 640px;
    font-size: 1rem;
    opacity: 0.92;
    line-height: 1.55;
}

/* Section blocks on projects page */
.svf-projects-block {
    padding: 2.5rem 0 1rem;
}
.svf-projects-block:nth-of-type(even) {
    background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
}
.svf-section-title {
    text-align: center;
    font-size: 1.65rem;
    font-weight: 700;
    color: #222;
    margin: 0 0 0.5rem;
    letter-spacing: 0.03em;
}
.svf-section-title + .wprt-lines {
    margin-bottom: 1.75rem;
}

/* Responsive project card grid */
.svf-proj-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.35rem;
    padding: 0.5rem 0 2.5rem;
}

.svf-proj-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.08);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}
.svf-proj-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 45px rgba(196, 30, 58, 0.15);
}

/* Uniform thumbnail size — every image uses the same 4:3 box (width follows grid; height matches width) */
.svf-proj-card a.svf-proj-lightbox {
    display: block;
    width: 100%;
    overflow: hidden;
    border-radius: 14px 14px 0 0;
}
.svf-proj-img-wrap {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 75%; /* 4:3 ratio — identical frame for all thumbnails */
    overflow: hidden;
    background: #e5e5e5;
}
.svf-proj-img-wrap img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important; /* override theme img { height: auto } */
    max-width: none !important;
    object-fit: cover;
    object-position: center;
    display: block;
    vertical-align: top;
    transition: transform 0.45s ease;
}
.svf-proj-card:hover .svf-proj-img-wrap img {
    transform: scale(1.05);
}
.svf-proj-caption {
    padding: 1rem 1.1rem 1.2rem;
    /* font-size: 0.95rem; */
    font-weight: 600;
    color: #333;
    line-height: 1.45;
    min-height: 3.2em;
    border-top: 3px solid #c41e3a;
}

/* Gallery page — filter bar */
#svf-gallery-wrap .wprt-project {
    padding-bottom: 3rem;
}
#project-filter.svf-gallery-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem;
    margin-bottom: 2rem !important;
    padding: 0 0.5rem;
}
#project-filter.svf-gallery-filters .cbp-filter-item {
    border-radius: 999px !important;
    padding: 0.55rem 1.35rem !important;
    font-weight: 600;
    /* font-size: 0.9rem; */
    letter-spacing: 0.02em;
    border: 2px solid #ddd !important;
    background: #fff !important;
    color: #444 !important;
    transition: all 0.25s ease;
    margin: 0 !important;
}
#project-filter.svf-gallery-filters .cbp-filter-item:hover {
    border-color: #c41e3a !important;
    color: #c41e3a !important;
}
#project-filter.svf-gallery-filters .cbp-filter-item.cbp-filter-item-active {
    background: linear-gradient(135deg, #c41e3a, #e85d6f) !important;
    border-color: #c41e3a !important;
    color: #fff !important;
}

/* Gallery intro */
.svf-gallery-intro {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 0.5rem;
    color: #555;
    line-height: 1.7;
    font-size: 1.02rem;
}

@media (max-width: 767px) {
    .svf-proj-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .projects-top-banner {
        padding: 2rem 0.75rem 2.25rem;
    }
}
