/* =====================================================================
   SERVICE PAGE STYLES
   Used by every page in /services/ plus services.php,
   residential-services.php and commercial-services.php.
   Each block below is an optional section layout a page can use,
   so service pages can differ while sharing one stylesheet.

   1. Intro with aside          .svc-intro
   2. Tier comparison           .tiers
   3. Image strip               .img-strip
   4. Problem list (dark)       .problems
   5. Numbered service index    .svc-index
   6. Category overview cards   .cat-grid
   7. Room / area checklist     .room-table
   8. Brand band                .brand-band
   9. Plans                     .plans
  10. Before / after style pair .pair
  11. Detail rows               .detail-rows
   ===================================================================== */

/* ---------- 1. Intro with aside ---------- */
.svc-intro { display: grid; grid-template-columns: 1.35fr 0.65fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.svc-intro__body h2 { max-width: 24ch; }
.svc-intro__body p { color: var(--muted); }
.svc-intro__body p:first-of-type { font-size: 1.12rem; color: var(--text); }
.svc-aside {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    padding: 28px;
    background: var(--ink);
    color: #c6cdd6;
    border-radius: var(--radius-sm);
}
.svc-aside h3 { color: var(--white); font-size: 1.1rem; }
.svc-aside .check-list { font-size: var(--fs-small); color: #dfe4ea; }
.svc-aside .check-list .icon { background: rgba(244, 182, 63, 0.16); color: var(--amber); }
.svc-aside__call {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--line-dark);
    font-family: var(--font-head);
    font-size: 1.25rem;
    font-weight: var(--fw-semibold);
    color: var(--white);
    text-decoration: none;
}
.svc-aside__call .icon { color: var(--orange); }
.svc-aside__call:hover { color: var(--amber); }

/* ---------- 2. Tier comparison ---------- */
.tiers { display: grid; grid-template-columns: repeat(var(--tiers, 3), 1fr); gap: 0; border: 1px solid var(--line); background: var(--white); }
.tier { position: relative; padding: clamp(24px, 3vw, 40px); border-left: 1px solid var(--line); }
.tier:first-child { border-left: 0; }
.tier__level { display: flex; gap: 4px; margin-bottom: 18px; }
.tier__level span { width: 22px; height: 6px; background: var(--line); border-radius: 1px; }
.tier__level span.is-on { background: var(--orange); }
.tier h3 { font-size: 1.3rem; }
.tier p { font-size: var(--fs-small); color: var(--muted); }
.tier .check-list { margin-top: 16px; }
.tier--featured { background: var(--ink); color: #c6cdd6; }
.tier--featured h3 { color: var(--white); }
.tier--featured p { color: var(--muted-light); }
.tier--featured .check-list { color: #dfe4ea; }
.tier--featured .check-list .icon { background: rgba(244, 182, 63, 0.16); color: var(--amber); }
.tier--featured .tier__level span { background: rgba(255,255,255,0.15); }
.tier--featured .tier__level span.is-on { background: var(--amber); }

/* ---------- 3. Image strip ---------- */
.img-strip { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; }
.img-strip figure { overflow: hidden; border-radius: var(--radius-sm); aspect-ratio: 4 / 3.3; }
.img-strip figure:first-child { aspect-ratio: auto; }
.img-strip img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.img-strip figure:hover img { transform: scale(1.04); }

/* ---------- 4. Problem list ---------- */
.problems { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 48px; list-style: none; counter-reset: prob; }
.problems li {
    position: relative;
    padding: 22px 0 22px 56px;
    border-bottom: 1px solid var(--line-dark);
    counter-increment: prob;
}
.problems li::before {
    content: counter(prob, decimal-leading-zero);
    position: absolute;
    left: 0; top: 22px;
    font-family: var(--font-head);
    font-weight: var(--fw-semibold);
    font-size: 0.9rem;
    color: var(--amber);
}
.problems strong { display: block; margin-bottom: 4px; color: var(--white); font-family: var(--font-head); font-size: 1.08rem; }
.problems span { font-size: var(--fs-small); color: var(--muted-light); }
.section--paper .problems li, .section:not([class*="--"]) .problems li { border-color: var(--line); }

/* ---------- 5. Numbered service index (hub pages) ---------- */
.svc-index { list-style: none; border-top: 2px solid var(--ink); }
.svc-index a {
    display: grid;
    grid-template-columns: 64px 120px 1fr auto;
    align-items: center;
    gap: 24px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    text-decoration: none;
    transition: background 0.25s, padding 0.3s var(--ease);
}
.svc-index__num { font-family: var(--font-head); font-weight: var(--fw-semibold); color: var(--orange-ink); letter-spacing: 0.06em; }
.svc-index__img { width: 120px; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius-sm); }
.svc-index__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.svc-index__text h3 { margin: 0 0 4px; font-size: 1.25rem; }
.svc-index__text p { margin: 0; font-size: var(--fs-small); color: var(--muted); }
.svc-index .icon { width: 22px; height: 22px; color: var(--muted-light); transition: transform 0.25s var(--ease), color 0.2s; }
.svc-index a:hover { background: var(--paper); padding-inline: 16px; }
.svc-index a:hover img { transform: scale(1.08); }
.svc-index a:hover .icon { color: var(--orange); transform: translateX(4px); }

/* ---------- 6. Category overview cards ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cat-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 380px;
    padding: 28px;
    overflow: hidden;
    border-radius: var(--radius-sm);
    color: var(--white);
    text-decoration: none;
    isolation: isolate;
}
.cat-card__img { position: absolute; inset: 0; z-index: -2; }
.cat-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.cat-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(14,18,24,0) 25%, rgba(14,18,24,0.88) 100%); }
.cat-card h3 { color: var(--white); margin-bottom: 6px; }
.cat-card p { margin: 0 0 14px; font-size: var(--fs-small); color: #d4dae1; }
.cat-card .link-arrow { color: var(--white); }
.cat-card:hover { color: var(--white); }
.cat-card:hover .cat-card__img img { transform: scale(1.06); }
.cat-card--wide { grid-column: span 2; }

/* ---------- 7. Room / area checklist ---------- */
.room-table {
    display: grid;
    grid-template-columns: repeat(var(--cols, 3), 1fr);
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
    background: var(--white);
}
.room { padding: 26px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.room h3 { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; }
.room h3 .icon { color: var(--orange); }
.room ul { list-style: none; display: grid; gap: 8px; font-size: var(--fs-small); color: var(--muted); }
.room li { padding-left: 16px; position: relative; }
.room li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 6px; height: 2px; background: var(--orange); }

.room-table--dark { background: transparent; border-color: var(--line-dark); }
.room-table--dark .room { border-color: var(--line-dark); }
.room-table--dark h3 { color: var(--white); }
.room-table--dark h3 .icon { color: var(--amber); }
.room-table--dark ul { color: #c9d3de; }
.room-table--dark li::before { background: var(--amber); }

/* ---------- 8. Brand band ---------- */
.brand-band {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 32px;
    padding: 28px 32px;
    background: var(--white);
    border: 1px solid var(--line);
    border-left: 5px solid var(--orange);
    border-radius: var(--radius-sm);
}
.brand-band__logos { display: flex; align-items: center; gap: 18px; }
.brand-band__logos .brand-logo { height: 76px; }
.brand-band p { margin: 0; color: var(--muted); }
.brand-band strong { display: block; font-family: var(--font-head); font-size: 1.15rem; margin-bottom: 4px; }

/* ---------- 9. Plans ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan {
    display: flex;
    flex-direction: column;
    padding: clamp(26px, 3vw, 38px);
    background: var(--white);
    border: 1px solid var(--line);
    border-top: 4px solid var(--ink);
    border-radius: var(--radius-sm);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.plan:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.plan__icon { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 18px; background: var(--paper); border-radius: var(--radius-sm); color: var(--orange-ink); }
.plan__icon .icon { width: 26px; height: 26px; }
.plan__basis {
    align-self: flex-start;
    margin-bottom: 14px;
    padding: 4px 10px;
    background: var(--ink);
    color: var(--white);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
}
.plan h3 { font-size: 1.35rem; }
.plan > p { font-size: var(--fs-small); color: var(--muted); }
.plan .check-list { margin: 8px 0 28px; }
.plan .btn { margin-top: auto; }
.plan--accent { border-top-color: var(--orange); }

/* ---------- 10. Pair (two related images / columns) ---------- */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pair__item { position: relative; overflow: hidden; border-radius: var(--radius-sm); }
.pair__item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.pair__label {
    position: absolute;
    left: 16px; top: 16px;
    padding: 6px 12px;
    background: var(--ink);
    color: var(--white);
    font-family: var(--font-head);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
}
.pair__label--light { background: var(--amber); color: var(--ink); }

/* ---------- 11. Detail rows (image + text alternating) ---------- */
.detail-rows { display: grid; gap: clamp(48px, 6vw, 88px); }
.detail-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.detail-row:nth-child(even) .detail-row__media { order: 2; }
.detail-row__media { overflow: hidden; border-radius: var(--radius-sm); aspect-ratio: 4 / 3; }
.detail-row__media img { width: 100%; height: 100%; object-fit: cover; }
.detail-row h3 { font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.8rem); }
.detail-row p { color: var(--muted); }
.detail-row .check-list { margin-top: 18px; }

/* Pest icon tiles */
.pest-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pest-tile {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 18px;
    align-items: center;
    padding: 14px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--ink);
    text-decoration: none;
    transition: border-color 0.25s, box-shadow 0.3s var(--ease);
}
.pest-tile:hover { border-color: var(--orange); box-shadow: var(--shadow-sm); color: var(--ink); }
.pest-tile__img { width: 96px; height: 96px; overflow: hidden; border-radius: var(--radius-sm); }
.pest-tile__img img { width: 100%; height: 100%; object-fit: cover; }
.pest-tile h3 { margin: 0 0 4px; font-size: 1.1rem; }
.pest-tile p { margin: 0; font-size: var(--fs-xs); color: var(--muted); line-height: 1.5; }

/* ---------- All-services hub (services.php) ---------- */
.services-hero { padding-block: clamp(48px, 6vw, 88px) clamp(24px, 3vw, 40px); background: var(--paper); border-bottom: 1px solid var(--line); }
.services-hero h1 { max-width: 18ch; }
.services-hero .lead { margin-bottom: 28px; }
.directory { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.directory__group { padding: 26px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.directory__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--ink);
    color: var(--ink);
    text-decoration: none;
}
.directory__head h2 { margin: 0; font-size: 1.3rem; flex: 1; }
.directory__head .icon:first-child { width: 26px; height: 26px; color: var(--orange); }
.directory__head .icon:last-child { width: 18px; height: 18px; color: var(--muted-light); transition: transform 0.25s var(--ease), color 0.2s; }
.directory__head:hover { color: var(--orange-ink); }
.directory__head:hover .icon:last-child { color: var(--orange); transform: translate(2px, -2px); }
.directory__group ul { list-style: none; display: grid; }
.directory__group li a { display: flex; flex-direction: column; padding: 10px 0; border-bottom: 1px solid var(--line); text-decoration: none; transition: padding 0.25s var(--ease); }
.directory__group li:last-child a { border-bottom: 0; }
.directory__group li a span { font-family: var(--font-head); font-weight: var(--fw-semibold); color: var(--ink); }
.directory__group li a small { font-size: var(--fs-xs); color: var(--muted); }
.directory__group li a:hover { padding-left: 6px; }
.directory__group li a:hover span { color: var(--orange-ink); }
.directory__group--cta { display: flex; flex-direction: column; gap: 12px; background: var(--ink); border-color: var(--ink); }
.directory__group--cta h2 { color: var(--white); font-size: 1.3rem; margin-bottom: 8px; }
.directory__group--cta .eyebrow { color: var(--amber); margin: 0; }
.directory__group--cta .eyebrow::before { background: var(--amber); }
.brand-strip--compact { grid-template-columns: 1fr 1fr; }
.brand-strip--compact .brand-strip__item:nth-child(3) { border-left: 0; }
.brand-strip--compact .brand-strip__item:nth-child(n + 3) { border-top: 1px solid var(--line); }

/* Dark task-group variant */
.task-groups--dark { background: var(--line-dark); border-color: var(--line-dark); }
.task-groups--dark .task-group { background: var(--ink); }
.task-groups--dark .task-group:hover { background: var(--navy); }
.task-groups--dark .task-group__icon { background: rgba(255, 255, 255, 0.06); color: var(--amber); }
.task-groups--dark .task-group p { color: var(--muted-light); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .cat-grid { grid-template-columns: repeat(2, 1fr); }
    .cat-card--wide { grid-column: span 2; }
    .plans { grid-template-columns: 1fr; max-width: 640px; }
    .pest-tiles { grid-template-columns: repeat(2, 1fr); }
    .room-table { --cols: 2 !important; }
    .directory { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .svc-intro, .detail-row, .brand-band { grid-template-columns: 1fr; }
    .svc-aside { position: static; }
    .detail-row:nth-child(even) .detail-row__media { order: 0; }
    .tiers { grid-template-columns: 1fr; }
    .tier { border-left: 0; border-top: 1px solid var(--line); }
    .tier:first-child { border-top: 0; }
    .problems { grid-template-columns: 1fr; }
    .img-strip { grid-template-columns: 1fr 1fr; }
    .img-strip figure:first-child { grid-column: span 2; aspect-ratio: 16 / 9; }
    .svc-index a { grid-template-columns: 40px 88px 1fr 24px; gap: 14px; }
    .svc-index__img { width: 88px; }
}
@media (max-width: 600px) {
    .cat-grid, .pest-tiles, .pair, .directory, .brand-strip--compact { grid-template-columns: 1fr; }
    .cat-card--wide { grid-column: auto; }
    .cat-card { min-height: 300px; }
    .room-table { --cols: 1 !important; }
    .svc-index a { grid-template-columns: 72px 1fr 20px; }
    .svc-index__num { display: none; }
    .svc-index__img { width: 72px; }
    .svc-index__text h3 { font-size: 1.05rem; }
}
