/* ==================================================
   Interactive Bathroom Renovations -- portfolio page section.
   Brand tokens: orange / ink / Apple font, matching the homepage.
   Fully isolated (all:revert) so legacy portfolio.css, style.css and
   the global bathroom-styles.css can't bleed in. Every rule is scoped
   under #bathroom-renovations. SVG children are excluded from the reset
   (all:revert would erase a path's geometry).
   ================================================== */
#bathroom-renovations,
#bathroom-renovations *:not(svg *) { all: revert; box-sizing: border-box; }

#bathroom-renovations {
    --bx-font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
    --bx-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    --bx-orange: #ff5e14;
    --bx-orange-light: #ff7c3d;
    --bx-ink: #14161a;
    --bx-muted: #6b7280;
    --bx-line: #e9eaee;
    display: block;
    padding: 24px 24px 90px;
    background: #fff;
    font-family: var(--bx-font);
    color: var(--bx-ink);
}

#bathroom-renovations svg, #bathroom-renovations svg * {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#bathroom-renovations .bx-wrap { display: block; max-width: 1180px; margin: 0 auto; }

/* ---------- Heading ---------- */
#bathroom-renovations .bx-head { display: block; text-align: center; margin: 0 auto 48px; max-width: 700px; }

#bathroom-renovations .bx-cap {
    display: block;
    margin-bottom: 14px;
    font-family: var(--bx-mono);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--bx-ink);
}

#bathroom-renovations .bx-title {
    display: block;
    margin: 0 0 12px;
    font-size: clamp(28px, 3.4vw, 42px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--bx-ink);
}

#bathroom-renovations .bx-sub {
    display: block;
    margin: 0 0 20px;
    font-size: 15.5px;
    font-weight: 300;
    line-height: 1.7;
    color: var(--bx-muted);
}

#bathroom-renovations .bx-hint {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border: 1px solid var(--bx-line);
    border-radius: 999px;
    background: #fafafa;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--bx-muted);
}

#bathroom-renovations .bx-hint-dot {
    position: relative;
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bx-orange);
}

#bathroom-renovations .bx-hint-dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1.5px solid var(--bx-orange);
    opacity: 0;
    animation: bxPing 2s ease-out infinite;
}

/* ---------- Grid ---------- */
#bathroom-renovations .bx-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    align-items: stretch;
}

#bathroom-renovations .bx-item { display: block; min-width: 0; }

/* ---------- Card ---------- */
#bathroom-renovations .bx-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--bx-line);
    height: 100%;
    border-radius: 22px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

#bathroom-renovations .bx-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 50px rgba(20, 22, 26, 0.1);
}

#bathroom-renovations .bx-stage {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #eef0f2;
}

#bathroom-renovations .bx-layer {
    position: absolute;
    inset: 0;
    display: block;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.55s ease, visibility 0.55s;
}

#bathroom-renovations .bx-layer.is-active { opacity: 1; visibility: visible; }

#bathroom-renovations .bx-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Floating After | Before switch (After first) */
#bathroom-renovations .bx-toggle {
    position: absolute;
    left: 50%;
    bottom: 16px;
    z-index: 6;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(20, 22, 26, 0.5);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

#bathroom-renovations .bx-thumb {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc(50% - 4px);
    border-radius: 999px;
    background: #fff;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

#bathroom-renovations .bx-toggle[data-state="before"] .bx-thumb { transform: translateX(100%); }

#bathroom-renovations .bx-tab {
    position: relative;
    z-index: 1;
    min-width: 84px;
    padding: 8px 18px;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--bx-font);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: color 0.3s ease;
}

#bathroom-renovations .bx-tab.is-active { color: var(--bx-ink); }

/* ---------- Hotspots ---------- */
#bathroom-renovations .bx-spots { position: absolute; inset: 0; display: block; pointer-events: none; }

#bathroom-renovations .bx-hotspot {
    position: absolute;
    z-index: 4;
    display: block;
    width: 0;
    height: 0;
    pointer-events: auto;
    outline: none;
}

#bathroom-renovations .bx-hotspot.is-open,
#bathroom-renovations .bx-hotspot:hover { z-index: 20; }

#bathroom-renovations .bx-dot {
    position: absolute;
    left: -8px;
    top: -8px;
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    opacity: 0.85;
    transition: transform 0.25s ease, opacity 0.25s ease, background 0.25s ease;
}

#bathroom-renovations .bx-dot::before {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: var(--bx-orange);
    opacity: 0.9;
}

#bathroom-renovations .bx-dot::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    opacity: 0;
    animation: bxPing 2.6s ease-out infinite;
}

#bathroom-renovations .bx-hotspot:hover .bx-dot,
#bathroom-renovations .bx-hotspot.is-open .bx-dot,
#bathroom-renovations .bx-hotspot:focus-visible .bx-dot { transform: scale(1.25); opacity: 1; background: rgba(255, 255, 255, 0.95); }

#bathroom-renovations .bx-tip {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 172px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 12px;
    background: rgba(20, 22, 26, 0.5);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 6px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

#bathroom-renovations .bx-hotspot.bx-tip-left .bx-tip { transform: translate(-22px, 6px); }
#bathroom-renovations .bx-hotspot.bx-tip-right .bx-tip { transform: translate(calc(-100% + 22px), 6px); }
#bathroom-renovations .bx-hotspot.bx-tip-below .bx-tip { bottom: auto; top: 20px; }

#bathroom-renovations .bx-hotspot:hover .bx-tip,
#bathroom-renovations .bx-hotspot.is-open .bx-tip,
#bathroom-renovations .bx-hotspot:focus-visible .bx-tip {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

#bathroom-renovations .bx-hotspot.bx-tip-left:hover .bx-tip,
#bathroom-renovations .bx-hotspot.bx-tip-left.is-open .bx-tip,
#bathroom-renovations .bx-hotspot.bx-tip-left:focus-visible .bx-tip { transform: translate(-22px, 0); }

#bathroom-renovations .bx-hotspot.bx-tip-right:hover .bx-tip,
#bathroom-renovations .bx-hotspot.bx-tip-right.is-open .bx-tip,
#bathroom-renovations .bx-hotspot.bx-tip-right:focus-visible .bx-tip { transform: translate(calc(-100% + 22px), 0); }

#bathroom-renovations .bx-tip-cat {
    display: block;
    margin-bottom: 4px;
    font-family: var(--bx-mono);
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--bx-orange-light);
}

#bathroom-renovations .bx-tip-title {
    display: block;
    margin: 0 0 3px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}

#bathroom-renovations .bx-tip-desc {
    display: block;
    margin: 0;
    font-size: 11.5px;
    font-weight: 400;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}

/* ---------- Card body ---------- */
#bathroom-renovations .bx-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 22px 22px 20px;
}

#bathroom-renovations .bx-card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.32;
    letter-spacing: -0.01em;
    color: var(--bx-ink);
}

#bathroom-renovations .bx-card-desc {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 18px;
    font-size: 13.5px;
    font-weight: 300;
    line-height: 1.65;
    color: var(--bx-muted);
}

#bathroom-renovations .bx-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--bx-line);
}

#bathroom-renovations .bx-count {
    font-family: var(--bx-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--bx-muted);
}

#bathroom-renovations .bx-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border: 0;
    border-radius: 999px;
    background: var(--bx-orange);
    color: #fff;
    font-family: var(--bx-font);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.2s ease;
}

#bathroom-renovations .bx-more:hover { background: var(--bx-orange-light); }
#bathroom-renovations .bx-more svg { display: block; width: 13px; height: 13px; transition: transform 0.2s ease; }
#bathroom-renovations .bx-more:hover svg { transform: translateX(3px); }

/* ---------- Load more ---------- */
#bathroom-renovations .bx-loadwrap { display: block; margin-top: 48px; text-align: center; }

#bathroom-renovations .bx-load {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 28px;
    border: 1.5px solid var(--bx-ink);
    border-radius: 999px;
    background: transparent;
    color: var(--bx-ink);
    font-family: var(--bx-font);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

#bathroom-renovations .bx-load:hover { background: var(--bx-ink); color: #fff; }

#bathroom-renovations .bx-load-count {
    font-family: var(--bx-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    opacity: 0.6;
}

#bathroom-renovations .bx-load-short { display: none; }

/* ---------- Empty state ---------- */
#bathroom-renovations .bx-empty {
    display: block;
    max-width: 520px;
    margin: 0 auto;
    padding: 36px 24px;
    border: 1px dashed var(--bx-line);
    border-radius: 18px;
    text-align: center;
    color: var(--bx-muted);
    font-size: 14px;
    line-height: 1.6;
}

#bathroom-renovations .bx-empty strong { display: block; margin-bottom: 6px; font-size: 16px; color: var(--bx-ink); }

@keyframes bxPing {
    0% { transform: scale(0.6); opacity: 0.9; }
    80%, 100% { transform: scale(1.5); opacity: 0; }
}

/* Cancel the page container's 16px gutter so cards sit on the same 16px edge as every other section */
@media (max-width: 768px) {
    #bathroom-renovations { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
}

/* ---------- Tablet: 2 columns ---------- */
@media (max-width: 1024px) {
    #bathroom-renovations .bx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
}

/* ---------- Mobile: 1 column, compact ---------- */
@media (max-width: 680px) {
    #bathroom-renovations { padding-top: 8px; padding-bottom: 60px; }
    #bathroom-renovations .bx-head { margin-bottom: 30px; }
    #bathroom-renovations .bx-cap { font-size: 10.5px; margin-bottom: 10px; }
    #bathroom-renovations .bx-title { font-size: 25px; }
    #bathroom-renovations .bx-sub { font-size: 13.5px; margin-bottom: 16px; }
    #bathroom-renovations .bx-hint { font-size: 11.5px; padding: 7px 14px; }
    #bathroom-renovations .bx-hint-more { display: none; }

    #bathroom-renovations .bx-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    #bathroom-renovations .bx-item:nth-child(n+2) { display: none; }
    #bathroom-renovations .bx-card { border-radius: 18px; }
    #bathroom-renovations .bx-toggle { bottom: 12px; }
    #bathroom-renovations .bx-tab { min-width: 74px; padding: 10px 14px; font-size: 12px; }
    #bathroom-renovations .bx-tip { width: 160px; padding: 9px 11px; }
    #bathroom-renovations .bx-tip-title { font-size: 12.5px; }
    #bathroom-renovations .bx-tip-desc { font-size: 11px; }
    #bathroom-renovations .bx-body { padding: 18px 16px 16px; }
    #bathroom-renovations .bx-card-title { font-size: 15.5px; }
    #bathroom-renovations .bx-card-desc { font-size: 13px; margin-bottom: 14px; }
    #bathroom-renovations .bx-more { padding: 8px 16px; font-size: 12.5px; }

    #bathroom-renovations .bx-loadwrap { margin-top: 32px; }
    #bathroom-renovations .bx-load { padding: 11px 22px; font-size: 13px; }
    #bathroom-renovations .bx-load-full { display: none; }
    #bathroom-renovations .bx-load-short { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
    #bathroom-renovations .bx-dot::after,
    #bathroom-renovations .bx-hint-dot::after { animation: none; }
    #bathroom-renovations .bx-layer,
    #bathroom-renovations .bx-thumb,
    #bathroom-renovations .bx-card { transition: none; }
}
