/* ═══════════════════════════════════════════════════
   Service-Area Pages — Shared Components
   Builds on styles.css tokens + service.css (sp-*) system.
   Prefix: ar-
   ═══════════════════════════════════════════════════ */

/* ── Image Placeholder (developer-facing) ──
   Replace each .ar-ph with a real <img> of the same aspect ratio.
   data-intended-image describes the photo that should go here. */
.ar-ph {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 1.5rem;
    text-align: center;
    border-radius: var(--radius-lg);
    border: 2px dashed rgba(27, 67, 50, 0.28);
    background:
        repeating-linear-gradient(135deg, rgba(27, 67, 50, 0.035) 0 12px, transparent 12px 24px),
        var(--bg-subtle);
    color: var(--text-muted);
    overflow: hidden;
}

.ar-ph svg {
    width: 38px;
    height: 38px;
    color: var(--primary-light);
    opacity: 0.55;
}

.ar-ph-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary);
}

.ar-ph-desc {
    font-size: 0.8rem;
    line-height: 1.55;
    max-width: 340px;
}

.ar-ph--wide { aspect-ratio: 16 / 9; }

/* Placeholder on dark hero */
.ar-ph--dark {
    border-color: rgba(255, 255, 255, 0.22);
    background:
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 12px, transparent 12px 24px),
        rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.6);
    min-height: 300px;
}

.ar-ph--dark svg { color: var(--accent-light); }
.ar-ph--dark .ar-ph-label { color: var(--accent-light); }

/* ── At-a-Glance Strip (below hero) ── */
.ar-glance {
    background: var(--card);
    border-bottom: 1px solid var(--card-border);
}

.ar-glance-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
}

@media (min-width: 900px) {
    .ar-glance-list { grid-template-columns: repeat(4, 1fr); }
}

.ar-glance-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.15rem 1rem;
    border-right: 1px solid var(--card-border);
}

.ar-glance-item:last-child { border-right: 0; }

@media (max-width: 899px) {
    .ar-glance-item:nth-child(2) { border-right: 0; }
    .ar-glance-item:nth-child(-n+2) { border-bottom: 1px solid var(--card-border); }
}

@media (max-width: 420px) {
    .ar-glance-list { grid-template-columns: 1fr; }
    .ar-glance-item { border-right: 0; border-bottom: 1px solid var(--card-border); }
    .ar-glance-item:last-child { border-bottom: 0; }
}

.ar-glance-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: rgba(27, 67, 50, 0.08);
    color: var(--primary);
}

.ar-glance-icon svg { width: 19px; height: 19px; }

.ar-glance-item strong {
    display: block;
    font-size: 0.85rem;
    color: var(--text);
    line-height: 1.3;
}

.ar-glance-item span,
.ar-glance-item a {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.ar-glance-item a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.ar-glance-item a:hover { color: var(--cta); }

/* ── Editorial lead block with side note ── */
.ar-lead {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}

@media (min-width: 960px) {
    .ar-lead { grid-template-columns: 1.4fr 0.8fr; gap: 3rem; }
}

.ar-lead .sp-content { max-width: none; margin: 0; }

.ar-note {
    background: var(--bg-alt);
    border: 1px solid var(--card-border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.ar-note h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.6rem;
}

.ar-note p {
    font-size: 0.86rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}

.ar-note p:last-child { margin-bottom: 0; }

.ar-note a {
    color: var(--primary);
    font-weight: 700;
}

/* ── Dark band section (water path) ── */
.ar-band {
    position: relative;
    padding: 5rem 0;
    background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 70%, #0a1a10 100%);
    color: #fff;
    overflow: hidden;
}

@media (max-width: 767px) {
    .ar-band { padding: 3.25rem 0; }
}

.ar-band .sp-label {
    background: rgba(212, 160, 23, 0.15);
    border-color: rgba(212, 160, 23, 0.3);
    color: var(--accent-light);
}

.ar-band .sp-title { color: #fff; }
.ar-band .sp-title .text-accent { color: var(--accent-light); }
.ar-band .sp-subtitle { color: rgba(255, 255, 255, 0.7); }

.ar-path {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    counter-reset: arpath;
}

@media (min-width: 768px) {
    .ar-path { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1100px) {
    .ar-path { grid-template-columns: repeat(4, 1fr); }
}

.ar-path-step {
    position: relative;
    padding: 1.5rem 1.35rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    counter-increment: arpath;
}

.ar-path-step::before {
    content: counter(arpath, decimal-leading-zero);
    display: block;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: var(--accent-light);
    margin-bottom: 0.6rem;
}

@media (min-width: 1100px) {
    .ar-path-step:not(:last-child)::after {
        content: '';
        position: absolute;
        top: 50%;
        right: -0.85rem;
        width: 0.7rem;
        height: 0.7rem;
        border-top: 2px solid var(--accent);
        border-right: 2px solid var(--accent);
        transform: translateY(-50%) rotate(45deg);
    }
}

.ar-path-step h3 {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.4rem;
}

.ar-path-step p {
    font-size: 0.85rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.7);
}

.ar-band-text {
    max-width: 780px;
    margin: 2.5rem auto 0;
}

.ar-band-text p {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 0.875rem;
}

.ar-band-text p:last-child { margin-bottom: 0; }

/* ── Safety callout ── */
.ar-safety {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.25rem 1.4rem;
    background: var(--cta-soft);
    border: 1px solid rgba(194, 69, 45, 0.25);
    border-radius: var(--radius);
    margin-bottom: 1.75rem;
}

.ar-safety svg {
    width: 24px;
    height: 24px;
    min-width: 24px;
    color: var(--cta);
    margin-top: 2px;
}

.ar-safety p {
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.7;
}

.ar-safety strong { color: var(--cta-dark); }

/* ── Ground observation list ── */
.ar-observe {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 720px) {
    .ar-observe { grid-template-columns: repeat(2, 1fr); }
}

.ar-observe li {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
    padding: 1rem 1.1rem;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    font-size: 0.88rem;
    line-height: 1.65;
    color: var(--text-muted);
}

.ar-observe li svg {
    width: 20px;
    height: 20px;
    min-width: 20px;
    color: var(--primary-light);
    margin-top: 2px;
}

.ar-observe li strong { color: var(--text); }

.ar-after-note {
    margin-top: 1.25rem;
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ── Service rows (linked list of repair types) ── */
.ar-rows {
    list-style: none;
    border-top: 1px solid var(--card-border);
}

.ar-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.35rem 2rem;
    padding: 1.35rem 0;
    border-bottom: 1px solid var(--card-border);
}

@media (min-width: 768px) {
    .ar-row { grid-template-columns: 260px 1fr; align-items: baseline; }
}

.ar-row h3 {
    font-family: var(--font-display);
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.ar-row h3::before {
    content: '';
    width: 8px;
    height: 8px;
    min-width: 8px;
    border-radius: 2px;
    background: var(--accent);
    transform: rotate(45deg);
}

.ar-row p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.72;
}

.ar-row a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid rgba(27, 67, 50, 0.3);
}

.ar-row a:hover {
    color: var(--accent-dark);
    border-bottom-color: var(--accent-dark);
}

/* ── Compare intro and inline links ── */
.sp-compare-col a {
    color: var(--primary);
    font-weight: 700;
}

.ar-compare-foot {
    max-width: 780px;
    margin: 1.75rem auto 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.75;
}

.ar-compare-foot a {
    color: var(--primary);
    font-weight: 700;
}

/* ── Visible focus for all interactive elements on area pages ── */
.ar-page a:focus-visible,
.ar-page button:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ── Back to Top ── */
.ar-btt {
    position: fixed;
    right: 16px;
    bottom: 76px; /* clears the 60px mobile sticky CTA bar */
    z-index: 990;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s, background 0.2s;
}

.ar-btt.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ar-btt:hover { background: var(--accent-dark); }

.ar-btt svg { width: 20px; height: 20px; }

@media (min-width: 1024px) {
    .ar-btt { right: 24px; bottom: 24px; }
}

@media (prefers-reduced-motion: reduce) {
    .ar-btt { transition: none; }
    html { scroll-behavior: auto; }
}

@media print {
    .ar-btt, .ar-ph { display: none; }
}
