/* =============================================================
   Bayside AC — Before & After Gallery
   Self-contained styles. Zero overlap with main.css / pages-addon.css.
   All selectors prefixed .bac-ba-* to avoid any collision.
   ============================================================= */

/* ── Section wrapper (homepage + page shared) ── */
.bac-ba-section {
    padding: var(--bac-section-lg) var(--bac-px);
    background: var(--bac-bg);
}

.bac-ba-header {
    text-align: center;
    margin-bottom: 48px;
}

.bac-ba-header h2 {
    font-family: var(--bac-fh);
    font-size: clamp(22px, 3vw, 34px);
    font-weight: 600;
    color: var(--bac-dark);
    line-height: 1.25;
    margin-bottom: 14px;
}

.bac-ba-header p {
    font-size: 16px;
    color: var(--bac-muted);
    font-weight: 300;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ── Card grid ── */
.bac-ba-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 900px) {
    .bac-ba-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 580px) {
    .bac-ba-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Card ── */
.bac-ba-card {
    background: #fff;
    border: 1px solid var(--bac-border);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.bac-ba-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ── Split image wrapper ── */
.bac-ba-imgs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
}

.bac-ba-img-wrap {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #e6eae8;
}

.bac-ba-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Divider line between before/after */
.bac-ba-divider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background: #fff;
    z-index: 3;
    transform: translateX(-50%);
}

/* ── Before / After pill labels ── */
.bac-ba-pill {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    z-index: 2;
    font-family: var(--bac-fb);
}

.bac-ba-pill--before {
    background: #fff;
    color: var(--bac-dark);
    border: 1px solid var(--bac-border);
}

.bac-ba-pill--after {
    background: var(--bac-red);
    color: #fff;
}

/* ── Card body ── */
.bac-ba-body {
    padding: 16px 20px 20px;
}

.bac-ba-body h3 {
    font-family: var(--bac-fs);
    font-size: 17px;
    font-weight: 600;
    color: var(--bac-dark);
    margin-bottom: 6px;
    line-height: 1.3;
}

.bac-ba-body p {
    font-size: 13px;
    color: var(--bac-muted);
    line-height: 1.65;
    margin: 0;
    font-weight: 300;
}

/* ── CTA row below grid (homepage section) ── */
.bac-ba-cta-row {
    margin-top: 40px;
    text-align: center;
}

/* ── Standalone page: hero ── */
.bac-ba-page-hero {
    background: var(--bac-navy);
    padding: clamp(40px, 6vw, 72px) var(--bac-px);
}

.bac-ba-page-hero h1 {
    font-family: var(--bac-fh);
    font-size: clamp(24px, 3.5vw, 38px);
    font-weight: 600;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 10px;
}

.bac-ba-page-hero p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 16px;
    font-weight: 300;
    max-width: 600px;
    margin: 0;
    line-height: 1.7;
}

/* ── Filter bar ── */
.bac-ba-filter-bar {
    background: #fff;
    border-bottom: 1px solid var(--bac-border);
    padding: 14px var(--bac-px);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.bac-ba-filter-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--bac-muted);
    font-family: var(--bac-fb);
    margin-right: 4px;
    white-space: nowrap;
}

.bac-ba-filter-btn {
    font-size: 12px;
    font-weight: 600;
    font-family: var(--bac-fb);
    padding: 7px 16px;
    border-radius: 20px;
    border: 1px solid var(--bac-border);
    background: var(--bac-bg);
    color: var(--bac-dark);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.bac-ba-filter-btn:hover,
.bac-ba-filter-btn.is-active {
    background: var(--bac-blue);
    color: #fff;
    border-color: var(--bac-blue);
}

/* ── Gallery sections (standalone page) ── */
.bac-ba-gallery-wrap {
    padding: var(--bac-section-md) var(--bac-px);
    background: #fff;
}

.bac-ba-gallery-heading {
    font-family: var(--bac-fh);
    font-size: clamp(18px, 2.5vw, 26px);
    font-weight: 600;
    color: var(--bac-dark);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--bac-border);
}

.bac-ba-gallery-group {
    margin-bottom: 56px;
}

.bac-ba-gallery-group:last-child {
    margin-bottom: 0;
}

/* Gallery cards use smaller body text */
.bac-ba-gallery-card .bac-ba-body h3 {
    font-size: 15px;
}

.bac-ba-gallery-card .bac-ba-body p {
    font-size: 12px;
}

/* hide groups when filtered out */
.bac-ba-gallery-group[data-hidden="true"] {
    display: none;
}

/* ── Standalone page CTA strip ── */
.bac-ba-page-cta {
    background: var(--bac-blue);
    padding: 28px var(--bac-px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.bac-ba-page-cta p {
    color: #fff;
    font-size: 17px;
    font-family: var(--bac-fh);
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
}

@media (max-width: 640px) {
    .bac-ba-page-cta {
        flex-direction: column;
        text-align: center;
    }
}
