/* ==========================================================================
   Rapid Plumber Mission Viejo CA — Service Page Styles
   Adapted from the service-page design reference. Loaded after site.css.
   ========================================================================== */

.service-page { background: var(--white); }

/* ---------- Service hero ---------- */
.sp-hero {
    position: relative;
    overflow: hidden;
    padding: 56px 0 72px;
    background: linear-gradient(135deg, #102A60 0%, var(--navy) 45%, var(--navy-deep) 100%);
    color: rgba(255, 255, 255, 0.78);
}
.sp-hero::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%3Cpath d='M30 0L60 30L30 60L0 30Z' fill='none' stroke='rgba(255,255,255,0.035)' stroke-width='1'/%3E%3C/svg%3E");
    pointer-events: none;
}
.sp-hero::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--teal) 0%, var(--teal-bright) 50%, var(--navy-soft) 100%);
}
.sp-hero .container { position: relative; z-index: 1; }
.sp-hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.sp-hero .breadcrumbs li,
.sp-hero .breadcrumbs li + li::before { color: rgba(255, 255, 255, 0.45); }
.sp-hero .breadcrumbs a { color: rgba(255, 255, 255, 0.72); }
.sp-hero .breadcrumbs a:hover { color: var(--white); }
.sp-hero .breadcrumbs [aria-current] { color: var(--teal-bright); }
.sp-hero h1 {
    color: var(--white);
    font-size: clamp(2rem, 4.4vw, 3.15rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.13;
    margin-bottom: 18px;
}
.sp-hero h1 span { color: var(--teal-bright); }
.sp-hero-desc { font-size: 1.08rem; max-width: 600px; margin-bottom: 28px; color: rgba(255, 255, 255, 0.8); }
.sp-hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.sp-hero-points { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 28px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.14); font-size: 0.9rem; }
.sp-hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.sp-hero-points svg { width: 16px; height: 16px; fill: var(--teal-bright); flex-shrink: 0; }
.sp-hero-media { position: relative; }
.sp-hero-card {
    position: absolute;
    left: -28px;
    bottom: -26px;
    max-width: 280px;
    padding: 18px 20px;
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--text-light);
    box-shadow: var(--shadow-lg);
    font-size: 0.88rem;
    line-height: 1.55;
}
.sp-hero-card strong { display: block; font-family: var(--font-heading); font-size: 0.98rem; margin-bottom: 4px; }

/* ---------- Sections ---------- */
.sp-section { padding: 76px 0; }
.sp-alt { background: var(--off-white); }
.sp-mist { background: var(--mist); }
.sp-dark { background: linear-gradient(140deg, var(--navy) 0%, var(--navy-deep) 100%); color: rgba(255, 255, 255, 0.8); }
.sp-dark h2, .sp-dark h3, .sp-dark strong { color: var(--white); }

.sp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    margin-bottom: 12px;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    color: var(--teal-ink);
    background: var(--teal-tint);
    border-radius: 20px;
}
.sp-badge.navy { color: var(--navy); background: rgba(10, 31, 78, 0.07); }
.sp-dark .sp-badge { color: var(--teal-bright); background: rgba(0, 168, 154, 0.16); }
.sp-title { font-size: clamp(1.55rem, 3vw, 2.15rem); font-weight: 800; letter-spacing: -0.015em; margin-bottom: 14px; }
.sp-subtitle { font-size: 1.02rem; color: var(--text-light); max-width: 720px; margin-bottom: 36px; }
.sp-dark .sp-subtitle { color: rgba(255, 255, 255, 0.7); }
.sp-head-center { text-align: center; }
.sp-head-center .sp-subtitle { margin-left: auto; margin-right: auto; }

/* ---------- Long-form layout with sticky aside ---------- */
.sp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 56px; align-items: start; }
.sp-aside { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 20px; }
.sp-aside-card { padding: 26px; border-radius: var(--radius-lg); background: var(--navy); color: rgba(255, 255, 255, 0.8); box-shadow: var(--shadow-lg); }
.sp-aside-card h2 { color: var(--white); font-size: 1.2rem; margin-bottom: 8px; }
.sp-aside-card p { font-size: 0.92rem; margin-bottom: 18px; }
.sp-aside-card .btn + .btn { margin-top: 10px; }
.sp-aside-card .aside-mail { display: block; margin-top: 14px; font-size: 0.86rem; color: rgba(255, 255, 255, 0.7); text-align: center; }
.sp-aside-card .aside-mail a { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.sp-aside-links { padding: 22px 24px; border-radius: var(--radius-lg); background: var(--white); border: 1px solid var(--border); }
.sp-aside-links h2 { font-size: 0.82rem; letter-spacing: 1.6px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px; }
.sp-aside-links a { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; font-weight: 600; font-size: 0.93rem; color: var(--navy); border-bottom: 1px solid var(--border); }
.sp-aside-links li:last-child a { border-bottom: 0; }
.sp-aside-links a::after { content: '→'; color: var(--teal-ink); transition: transform var(--t-fast); }
.sp-aside-links a:hover { color: var(--teal-ink); }
.sp-aside-links a:hover::after { transform: translateX(3px); }

/* Prose inside service pages */
.sp-prose h2 { font-size: clamp(1.45rem, 2.7vw, 1.9rem); font-weight: 800; margin: 48px 0 14px; letter-spacing: -0.015em; }
.sp-prose h2:first-child { margin-top: 0; }
.sp-prose h3 { font-size: 1.15rem; margin: 26px 0 8px; }
.sp-prose ul { margin: 0 0 1.1rem; display: grid; gap: 8px; }
.sp-prose ul li { position: relative; padding-left: 26px; }
.sp-prose ul li::before { content: ''; position: absolute; left: 4px; top: 0.7em; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.sp-prose figure { margin: 30px 0; }

/* ---------- Symptom cards ---------- */
.sp-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.sp-cards.three { grid-template-columns: repeat(3, 1fr); }
.sp-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 30px 28px;
    border-radius: var(--radius-lg);
    background: var(--white);
    border: 1px solid var(--border);
    box-shadow: 0 2px 10px rgba(6, 21, 53, 0.03);
    overflow: hidden;
    transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}
.sp-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--teal), var(--teal-bright)); transform: scaleX(0); transform-origin: left; transition: transform var(--t-base); }
.sp-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(0, 168, 154, 0.3); }
.sp-card:hover::before { transform: scaleX(1); }
.sp-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.sp-card-icon { width: 50px; height: 50px; border-radius: 12px; display: grid; place-items: center; background: var(--teal-tint); transition: background var(--t-base); }
.sp-card-icon svg { width: 24px; height: 24px; fill: var(--teal-ink); }
.sp-card:hover .sp-card-icon { background: var(--teal); }
.sp-card:hover .sp-card-icon svg { fill: var(--navy-ink); }
.sp-card-tag { font-family: var(--font-heading); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--text-light); background: var(--off-white); border: 1px solid var(--border); border-radius: 6px; padding: 4px 10px; }
.sp-card-tag.alert { color: var(--warn); background: var(--warn-tint); border-color: rgba(180, 82, 31, 0.2); }
.sp-card h3 { font-size: 1.18rem; margin-bottom: 10px; line-height: 1.35; }
.sp-card p { font-size: 0.95rem; color: var(--text-light); }
.sp-card-tip { margin-top: 16px; padding: 12px 14px; border-radius: 8px; background: var(--off-white); border: 1px dashed var(--border); font-size: 0.86rem; line-height: 1.55; color: var(--text-light); }
.sp-card-tip strong { color: var(--navy); }

/* ---------- Vertical flow / diagnostic sequence ---------- */
.sp-flow { position: relative; display: grid; gap: 0; max-width: 860px; }
.sp-flow-step { position: relative; display: grid; grid-template-columns: 64px 1fr; gap: 24px; padding-bottom: 34px; }
.sp-flow-step:last-child { padding-bottom: 0; }
.sp-flow-step::before { content: ''; position: absolute; left: 31px; top: 60px; bottom: 0; width: 2px; background: linear-gradient(var(--teal), rgba(0, 168, 154, 0.15)); }
.sp-flow-step:last-child::before { display: none; }
.sp-flow-num { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: var(--navy); color: var(--teal-bright); font-family: var(--font-heading); font-size: 1.35rem; font-weight: 800; }
.sp-dark .sp-flow-num { background: var(--teal); color: var(--navy-ink); }
.sp-flow-body h3 { font-size: 1.18rem; margin: 6px 0 8px; }
.sp-flow-body p { color: var(--text-light); font-size: 0.97rem; }
.sp-dark .sp-flow-body p { color: rgba(255, 255, 255, 0.72); }

/* ---------- Horizontal numbered layer cards ---------- */
.sp-layers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.sp-layer { position: relative; padding: 30px 28px; border-radius: var(--radius-lg); background: var(--white); border: 1px solid var(--border); overflow: hidden; }
.sp-layer-mark { position: absolute; right: 18px; top: 6px; font-family: var(--font-heading); font-size: 4.6rem; font-weight: 900; line-height: 1; color: rgba(10, 31, 78, 0.05); pointer-events: none; }
.sp-layer-kicker { display: block; font-family: var(--font-heading); font-size: 0.76rem; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--teal-ink); margin-bottom: 8px; }
.sp-layer h3 { font-size: 1.16rem; margin-bottom: 10px; position: relative; }
.sp-layer p { font-size: 0.95rem; color: var(--text-light); position: relative; }

/* ---------- Decision matrix ---------- */
.sp-decision { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-md); background: var(--white); }
.sp-decision-col { padding: 34px 32px; }
.sp-decision-col + .sp-decision-col { border-left: 1px solid var(--border); }
.sp-decision-col h3 { display: flex; align-items: center; gap: 10px; font-size: 1.22rem; margin-bottom: 16px; }
.sp-decision-col h3::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--teal); flex-shrink: 0; }
.sp-decision-col.alt { background: var(--off-white); }
.sp-decision-col.alt h3::before { background: var(--navy); }
.sp-decision-col ul { display: grid; gap: 12px; }
.sp-decision-col li { position: relative; padding-left: 26px; font-size: 0.96rem; color: var(--text); line-height: 1.6; }
.sp-decision-col li::before { content: '—'; position: absolute; left: 0; color: var(--teal-ink); font-weight: 700; }
.sp-decision-col.alt li::before { color: var(--navy); }
.sp-decision-foot { grid-column: 1 / -1; padding: 22px 32px; background: var(--navy); color: rgba(255, 255, 255, 0.82); font-size: 0.95rem; }
.sp-decision-foot strong { color: var(--teal-bright); }

/* ---------- Route-elsewhere callouts ---------- */
.sp-routes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.sp-route {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 26px 24px;
    border-radius: var(--radius-lg);
    background: var(--white);
    border: 1px solid var(--border);
    border-left: 5px solid var(--teal);
    transition: box-shadow var(--t-base), transform var(--t-base);
}
.sp-route:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.sp-route .sp-route-if { font-family: var(--font-heading); font-size: 0.76rem; letter-spacing: 1.3px; text-transform: uppercase; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; }
.sp-route h3 { font-size: 1.06rem; margin-bottom: 8px; }
.sp-route p { font-size: 0.93rem; color: var(--text-light); flex-grow: 1; }
.sp-route a { margin-top: 14px; font-family: var(--font-heading); font-weight: 700; color: var(--teal-ink); }
.sp-route a::after { content: ' →'; }
.sp-route a:hover { color: var(--navy); }

/* ---------- Fixture guide (toilet & faucet) ---------- */
.sp-fixture { border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--white); overflow: hidden; box-shadow: var(--shadow-sm); }
.sp-fixture + .sp-fixture { margin-top: 28px; }
.sp-fixture-head { display: flex; align-items: center; gap: 16px; padding: 22px 28px; background: var(--navy); }
.sp-fixture-head svg { width: 30px; height: 30px; fill: var(--teal-bright); flex-shrink: 0; }
.sp-fixture-head h3 { color: var(--white); font-size: 1.35rem; margin: 0; }
.sp-fixture-body { display: grid; grid-template-columns: 1fr 1fr; }
.sp-fixture-item { padding: 24px 28px; border-bottom: 1px solid var(--border); }
.sp-fixture-item:nth-child(odd) { border-right: 1px solid var(--border); }
.sp-fixture-item h4 { font-size: 1.05rem; margin-bottom: 6px; }
.sp-fixture-item p { font-size: 0.94rem; color: var(--text-light); }
.sp-fixture-item .likely { display: block; margin-top: 10px; font-size: 0.84rem; color: var(--teal-ink); font-weight: 700; }

/* ---------- Info strip / callout ---------- */
.sp-callout { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 22px 24px; margin: 28px 0; border-radius: var(--radius-md); background: var(--mist); border-left: 4px solid var(--teal); }
.sp-callout svg { width: 28px; height: 28px; fill: var(--teal-ink); margin-top: 2px; }
.sp-callout.warn { background: var(--warn-tint); border-left-color: var(--warn); }
.sp-callout.warn svg { fill: var(--warn); }
.sp-callout h3 { font-size: 1.04rem; margin-bottom: 4px; }
.sp-callout p { font-size: 0.95rem; color: var(--text); }

/* Two-column media/text */
.sp-split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.sp-split.reverse > :first-child { order: 2; }

/* ---------- Mid-page CTA ---------- */
.sp-mid-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px 30px; margin-top: 40px; border-radius: var(--radius-lg); background: var(--white); border: 1px solid var(--border); border-left: 5px solid var(--teal); box-shadow: var(--shadow-sm); }
.sp-mid-cta h3 { font-size: 1.15rem; margin-bottom: 4px; }
.sp-mid-cta p { font-size: 0.94rem; color: var(--text-light); }
.sp-mid-cta .btn { flex-shrink: 0; }

/* ---------- Related services ---------- */
.sp-related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.sp-related a { display: flex; flex-direction: column; gap: 6px; padding: 24px; border-radius: var(--radius-lg); background: var(--white); border: 1px solid var(--border); transition: border-color var(--t-base), box-shadow var(--t-base), transform var(--t-base); }
.sp-related a:hover { border-color: var(--teal); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.sp-related strong { font-family: var(--font-heading); font-size: 1.06rem; }
.sp-related span { font-size: 0.9rem; color: var(--text-light); }

/* ---------- Final CTA banner ---------- */
.sp-cta { padding: 0 0 80px; background: var(--white); }
.sp-cta.on-alt { background: var(--off-white); }
.sp-cta-box {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 32px;
    align-items: center;
    padding: 46px 48px;
    border-radius: var(--radius-xl);
    background: var(--teal);
    color: var(--navy-ink);
}
.sp-cta-box::after { content: ''; position: absolute; right: -60px; bottom: -90px; width: 280px; height: 280px; border-radius: 50%; border: 36px solid rgba(255, 255, 255, 0.16); }
.sp-cta-box > * { position: relative; z-index: 1; }
.sp-cta-box h2 { color: var(--navy-ink); font-size: clamp(1.5rem, 3vw, 2.05rem); margin-bottom: 8px; }
.sp-cta-box p { color: var(--navy-ink); opacity: 0.88; max-width: 620px; }
.sp-cta-actions { display: flex; flex-direction: column; gap: 10px; }
.sp-cta-box .btn-outline { border-color: rgba(1, 26, 75, 0.35); color: var(--navy-ink); }
.sp-cta-box .btn-outline:hover { background: var(--white); border-color: var(--white); color: var(--navy-ink); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .sp-hero-grid,
    .sp-layout,
    .sp-split { grid-template-columns: 1fr; gap: 40px; }
    .sp-split.reverse > :first-child { order: 0; }
    .sp-hero-card { left: 12px; }
    .sp-aside { position: static; grid-template-columns: 1fr 1fr; }
    .sp-cards.three,
    .sp-routes,
    .sp-related { grid-template-columns: repeat(2, 1fr); }
    .sp-cta-box { grid-template-columns: 1fr; }
    .sp-cta-actions { flex-direction: row; flex-wrap: wrap; }
}

@media (max-width: 768px) {
    .sp-hero { padding: 40px 0 56px; }
    .sp-hero-actions .btn { width: 100%; }
    .sp-hero-card { position: static; max-width: none; margin-top: 14px; }
    .sp-section { padding: 58px 0; }
    .sp-aside,
    .sp-cards,
    .sp-cards.three,
    .sp-layers,
    .sp-routes,
    .sp-related,
    .sp-decision,
    .sp-fixture-body { grid-template-columns: 1fr; }
    .sp-decision-col + .sp-decision-col { border-left: 0; border-top: 1px solid var(--border); }
    .sp-decision-col,
    .sp-decision-foot { padding: 26px 22px; }
    .sp-fixture-item:nth-child(odd) { border-right: 0; }
    .sp-fixture-head,
    .sp-fixture-item { padding-left: 22px; padding-right: 22px; }
    .sp-flow-step { grid-template-columns: 50px 1fr; gap: 16px; }
    .sp-flow-num { width: 50px; height: 50px; border-radius: 14px; font-size: 1.15rem; }
    .sp-flow-step::before { left: 24px; top: 50px; }
    .sp-mid-cta { flex-direction: column; align-items: flex-start; padding: 22px; }
    .sp-mid-cta .btn { width: 100%; }
    .sp-cta-box { padding: 32px 24px; }
    .sp-cta-actions .btn { width: 100%; }
}
