/*
 * RideXpress -- Legacy SEO/content-body family: Design 2.0 body redesign
 * Wave 42 Final Pass, item 1
 *
 * WHY THIS FILE EXISTS
 * Track B/C (earlier this wave) redesigned the hero, booking widget, trust
 * section, FAQ, related-routes and closing CTA that wrap every one of the
 * ~8,798 pages in this family (see airportbase.html / outstationbase.html).
 * What sits BETWEEN those -- the page's own article body, rendered by each
 * child template's own {% block airport_content / oustation_content %} --
 * was deliberately left untouched by every prior track (airportbase.html's
 * own header comment: "Nothing here can restyle a legacy element on the
 * ~8,804 pages this reaches"). That content is still 100% legacy markup: a
 * sidebar, an article image, and article prose using a small, fixed set of
 * class names with NO Design 2.0 treatment. This file is that treatment.
 *
 * WHAT WAS ACTUALLY WRONG, confirmed by rendering real pages, not just
 * reading source -- three real defects, not just "looks dated":
 *   1. .service-single-area had NO background rule anywhere in this repo --
 *      it silently inherited body,html{background-color:#000}, so the
 *      article region rendered as plain text on raw black.
 *   2. .widget-title carries a pre-existing color:var(--color-dark)!important
 *      (dark navy). With no card background behind it, that was dark-navy
 *      text on a black page -- a real contrast/legibility bug, not merely
 *      "unstyled".
 *   3. h1..h6 in this family inherit style.css's sitewide
 *      h1,h2,h3,h4,h5,h6{color:var(--color-white)} (plus one explicit
 *      .service-details h3{color:#fff}). That is only readable BECAUSE the
 *      page background is black; fixing defect #1 without also overriding
 *      heading color here would make every heading vanish.
 * A fourth, smaller issue fixed in passing: .service-details-img img had NO
 * rule at all on the ~528 pages where the image sits as a SIBLING of
 * .service-details rather than a descendant -- style.css's pre-existing
 * `.service-details img{height:20%;width:100%}` only ever matched pages
 * where the image nests INSIDE .service-details, and even there
 * `height:20%` is a no-op/distorting rule with no defined parent height.
 *
 * COVERAGE, verified by grepping the full template tree with exact
 * class-token matching before writing a single rule below (not assumed --
 * an early pass at this comment wrongly guessed the sibling-image
 * structure was the majority case; it is not, see below):
 *   .service-single-area   8,797 of 8,798 files; NEVER nests or repeats
 *   .service-sidebar       same reach; repeats 2-3x on ~435 pages (a
 *                           richer sub-layout used under templates/website/
 *                           seo/stephen-seo/, ~1,824 files, that renders
 *                           several related-link cards in a row instead of
 *                           one sidebar)
 *   .widget.category / .widget-title / .category-list
 *   .service-details-img / .service-details -- DOUBLE/MULTI-NESTED
 *                           (.service-details > .service-details, or
 *                           siblings each with a nested .service-details)
 *                           on 8,267 of the 8,795 files that have any
 *                           .service-details at all -- the DOMINANT
 *                           pattern across the whole family, not a minor
 *                           "outstation" special case. Only 528 files use
 *                           the simpler single/sibling structure. Every
 *                           rule below that touches .service-details is
 *                           written per-descendant-tag (h1..h6/p/ul/a),
 *                           NEVER as a background/border/padding on the
 *                           class itself, so nesting depth cannot compound
 *                           a card-in-a-card. See the section 4 comment.
 *   .featured-snippets      repeats independently on 55 pages with >1 FAQ
 *                           block; also never nests inside itself.
 *
 * WHAT THIS FILE DELIBERATELY DOES NOT DO: edit any of the ~8,798 template
 * files, change any URL/canonical/sitemap/robots/structured-data/per-page
 * copy, or touch the already-redesigned hero/booking widget/trust/FAQ/
 * related/CTA sections (design-system/journey-patterns.css and the
 * _journey_page_*.html partials render those as DOM siblings of the
 * content this file targets, never as descendants of it).
 *
 * All colors below use the *theme-adaptive* token aliases (--rx-color-text,
 * --rx-color-surface[-alt], --rx-color-border, --rx-color-accent-strong) --
 * confirmed against tokens.css's dark-mode blocks before use. --rx-color-ink
 * and --rx-color-brand-strong were deliberately AVOIDED for text/background
 * here: both are static (never redefined under prefers-color-scheme:dark or
 * [data-theme="dark"]), so using them would silently repeat this exact wave's
 * own dark-mode-header bug (dark-on-dark text) the moment a visitor's OS is
 * in dark mode. Literal fallbacks match each token's :root (light) value,
 * for the rare case tokens.css fails to load, per the convention already
 * established in website/partials/_journey_page_tail.html.
 *
 * Loaded by airportbase.html and outstationbase.html's extra_css block,
 * after tokens/components/patterns/journey-patterns.css -- see those two
 * files' header comments, updated alongside this file.
 */

/* ---------- 1. Outer section: fix the raw-black-background defect ----------
   Confirmed 0/8,798 files nest or repeat .service-single-area -- safe to
   background once. Uses the SAME token _journey_page_tail.html already uses
   for the Design 2.0 sections rendered immediately after this content
   (.rx-seo-page__sections), so the page's own body content and the shared
   tail sections now form one continuous light band instead of a jarring
   black-to-cream seam. Setting color here is required, not decorative:
   style.css's sitewide body{color:var(--body-text-color)} (#d2d6e0, a light
   grey-blue tuned for a dark page) is illegible against this new light
   background; every descendant that doesn't set its own color inherits
   this instead. */
.service-single-area {
  background: var(--rx-color-surface-alt, #F7F6F3);
  color: var(--rx-color-text, #132435);
}

/* Links and icons anywhere in this family -- one rule instead of repeating
   per sub-section, since every target below (.category-list, prose links,
   the two internal-link <ul>s, FAQ links) is a descendant of this same
   wrapper and none of Track A/B's already-redesigned components (hero,
   booking widget, trust/FAQ/related/CTA) live inside it. brand-strong's
   *adaptive alias* is used deliberately (see file header) so link color
   stays readable in both themes: #7A5F09 on the light cream/white surfaces
   above, #C9A227 on the dark surfaces below. */
.service-single-area a {
  color: var(--rx-color-accent-strong, #7A5F09);
}
.service-single-area a:hover {
  color: var(--rx-color-text, #132435);
}
.service-single-area a i {
  color: var(--rx-color-accent-strong, #7A5F09);
}

/* ---------- 2. Sidebar card ----------
   Same recipe as components.css's own .rx-card (background/border/radius/
   shadow/padding tokens) so this reads as the same card language used
   everywhere else in Design 2.0, not a one-off. Repeats safely -- confirmed
   it never nests inside itself, including on the ~435 pages that render it
   2-3 times in a row (the stephen-seo related-link-card layout). */
.service-sidebar {
  background: var(--rx-color-surface, #FFFFFF);
  border: 1px solid var(--rx-color-border, #E2E0EB);
  border-radius: var(--rx-radius-lg, 12px);
  box-shadow: var(--rx-shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.06));
  padding: var(--rx-space-6, 24px);
  margin-bottom: var(--rx-space-6, 24px);
}
.service-single-area .row > [class*="col-"] > .service-sidebar:last-child {
  margin-bottom: 0;
}
/* .widget carries its OWN sitewide card treatment (style.css:
   background:var(--theme-bg-light), 30px padding, 10px radius, 30px
   bottom margin -- shared with the blog sidebar widgets Track D already
   redesigned separately, so it cannot be restyled globally here). Left
   alone, that pre-existing treatment nests a second, near-identical card
   inside the one .service-sidebar just added above -- confirmed by
   rendering, not assumed: a visible card-in-a-card, not a subtle
   difference. Neutralized here, scoped to this family only, so
   .service-sidebar is the single card. */
.service-sidebar .widget {
  background: transparent;
  padding: 0;
  border-radius: 0;
  margin-bottom: 0;
}

.service-sidebar .widget-title {
  font-size: var(--rx-text-lg, 1.125rem);
  /* Overrides style.css's pre-existing color:var(--color-dark)!important --
     see file header defect #2. --color-dark is a STATIC legacy variable
     with no dark-mode counterpart; left alone, it would sit dark-navy-on-
     dark-navy the moment this card's own background inverts for dark mode.
     Only !important can beat !important, so this narrow, documented use
     mirrors legacy-design2-bridge.css's own precedent (that file's
     focus-visible override) rather than introducing a new pattern. */
  color: var(--rx-color-text, #132435) !important;
}

.service-sidebar .category-list a {
  display: block;
  padding: 10px 0;
  font-weight: var(--rx-weight-medium, 500);
  border-bottom: 1px solid var(--rx-color-border, #E2E0EB);
}
.service-sidebar .category-list a:last-child {
  border-bottom: none;
}
.service-sidebar .category-list a:hover {
  padding-left: 10px;
}
/* A minority of the richer stephen-seo pages list related links in a bare
   <div> with no .category-list wrapper class at all -- give plain links
   inside a .widget.category the identical treatment so both markup shapes
   read as the same component. */
.service-sidebar .widget.category > div > a {
  display: block;
  padding: 10px 0;
  font-weight: var(--rx-weight-medium, 500);
  border-bottom: 1px solid var(--rx-color-border, #E2E0EB);
}
.service-sidebar .widget.category > div > a:last-child {
  border-bottom: none;
}
.service-sidebar .widget.category > div > a:hover {
  padding-left: 10px;
}

/* ---------- 3. Article hero image ----------
   Targets the WRAPPER class rather than "img inside .service-details" --
   reaches the image identically whether it sits as a SIBLING of
   .service-details (~528 pages) or nested inside it (the dominant,
   ~8,267-page pattern), where style.css's pre-existing `.service-details
   img` rule only ever matched the latter. height:auto replaces that rule's
   `height:20%` (a no-op/distorting percentage with no defined parent
   height) so the image keeps its real aspect ratio instead of only working
   by accident on most of the family. */
.service-details-img img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--rx-radius-lg, 12px);
  box-shadow: var(--rx-shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.06));
}

/* ---------- 4. Article body typography ----------
   Deliberately scoped to h1..h6/p/ul/li BY TAG under .service-details,
   NEVER to .service-details itself -- this content nests two (or more)
   deep on 8,267 of the 8,795 pages that have a .service-details at all,
   and a box/padding/background rule placed on the class itself would
   double into a card-in-a-card on the majority of the family, not an
   edge case. Per-tag rules don't compound this way: an h2 two levels deep
   still matches the selector once.

   font-size is intentionally left unset here. Most of these headings
   already carry a Bootstrap .fs-* utility (font-size set with !important,
   confirmed in bootstrap.min.css), which page authors used to fake a
   consistent visual scale across genuinely inconsistent heading levels
   (h1 through h6 all used for what is really one flat "subhead" level on
   some pages). Setting font-size here would fight that !important on
   pages that have it and do nothing on pages that don't -- i.e. it would
   make the visual hierarchy LESS consistent, not more. Color, weight,
   spacing and line-height have no such per-page utility fighting them, so
   those are set uniformly instead. */
.service-details h1,
.service-details h2,
.service-details h3,
.service-details h4,
.service-details h5,
.service-details h6 {
  color: var(--rx-color-text, #132435);
  font-family: var(--rx-font-display, 'Space Grotesk', sans-serif);
  font-weight: var(--rx-weight-bold, 700);
  line-height: var(--rx-leading-tight, 1.2);
  margin-top: var(--rx-space-8, 32px);
}
.service-details h1:first-child,
.service-details h2:first-child {
  margin-top: 0;
}

.service-details p {
  color: var(--rx-color-text, #132435);
  font-family: var(--rx-font-body, 'Inter', sans-serif);
  font-size: var(--rx-text-base, 1rem);
  line-height: var(--rx-leading-loose, 1.8);
  max-width: 68ch;
  margin-bottom: var(--rx-space-4, 16px);
}
.service-details p a {
  font-weight: var(--rx-weight-medium, 500);
}

/* The two plain <ul> "related pages" lists every page in this family
   carries (a mid-article list plus a closing list before the contact
   line) -- give them the same list-link treatment as the sidebar's
   .category-list so the two internal-link patterns on the page read as
   one system. No link, URL or list item is removed, added or reordered --
   display/spacing only. */
.service-details ul {
  margin: var(--rx-space-2, 8px) 0 var(--rx-space-6, 24px);
  padding: 0;
  max-width: 68ch;
}
.service-details ul li {
  padding: 8px 0;
  border-bottom: 1px solid var(--rx-color-border, #E2E0EB);
}
.service-details ul li:last-child {
  border-bottom: none;
}

/* ---------- 5. FAQ card ----------
   Same card recipe as section 2, as its own rule rather than a shared
   selector: .featured-snippets sits INSIDE .service-details, so sharing a
   selector would need to fight section 4's "no box on .service-details
   itself" rule above. Repeats independently (55 pages render more than one
   FAQ block) and never nests inside itself. h2..h6 are all covered because
   the FAQ question heading level genuinely varies by page (h3 in the
   airport lineage, h4/h5/h6 elsewhere) -- confirmed by direct inspection. */
.featured-snippets {
  background: var(--rx-color-surface, #FFFFFF);
  border: 1px solid var(--rx-color-border, #E2E0EB);
  border-radius: var(--rx-radius-lg, 12px);
  box-shadow: var(--rx-shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.06));
  padding: var(--rx-space-6, 24px);
  margin: var(--rx-space-8, 32px) 0;
}
.featured-snippets h2,
.featured-snippets h3,
.featured-snippets h4,
.featured-snippets h5,
.featured-snippets h6 {
  margin-top: var(--rx-space-6, 24px);
}
.featured-snippets > h2:first-child,
.featured-snippets > h3:first-child,
.featured-snippets > h4:first-child,
.featured-snippets > h5:first-child,
.featured-snippets > h6:first-child {
  margin-top: 0;
}
.featured-snippets p {
  max-width: none;
}

/* ====================================================================
   6. REPRESENTATIVE-SAMPLE MARKUP MIGRATION (Workstream B) -- rx-*
   named equivalents for the article prose + content image this file's
   sections 3-4 above already re-themed under the legacy .service-details
   / .service-details-img class names.

   PURELY ADDITIVE. Nothing above this point is edited -- the ~8,79X
   pages still rendering .service-single-area/.service-sidebar/
   .service-details/.featured-snippets markup are byte-for-byte
   unaffected, because none of them reference the new selectors below.
   Only the small representative sample migrated this cycle (their own
   template files replace .service-details/.service-details-img with
   these rx-* class names; everything else -- .rx-card, .rx-card__title,
   .rx-stack, .rx-nav-item, .rx-table, .rx-seo-page__sections -- is
   already defined in components.css/this file's own Track B partial and
   needs no new CSS at all).

   NOT reusing patterns.css's existing .rx-article-layout (built for
   blog_detail.html): that component is content-column-first/sidebar-
   second (2fr 1fr) and collapses to one column at 767px, matching
   blog's own original Bootstrap order. This family's original order is
   the OPPOSITE -- col-xl-4 (sidebar) THEN col-xl-8 (content), i.e.
   sidebar on the left in the NARROW column -- and Bootstrap's lg
   breakpoint (992px) is where those columns actually stack, not 768px.
   Modifying .rx-article-layout to fit would change blog_detail.html's
   layout too (out of scope); a second, purpose-built grid class below
   keeps this family's on-screen position and responsive collapse point
   byte-for-byte where they already are today. */
.rx-seo-article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--rx-space-6, 24px);
  align-items: start;
}
@media (min-width: 992px) {
  .rx-seo-article-layout {
    /* Matches the original col-xl-4/col-lg-4 (sidebar) + col-xl-8/
       col-lg-8 (content) ratio -- 4/12 : 8/12 == 1fr : 2fr. */
    grid-template-columns: 1fr 2fr;
  }
}

/* Values below are IDENTICAL to sections 3-4's .service-details rules,
   not a redesign -- this only gives the migrated markup an rx-* class
   name to match instead of the legacy one. See docs/program/
   seo-representative-sample-migration.md section 5 for the full
   component-mapping table this pairs with.

   The base color here (found live, not assumed) is NOT redundant with
   the h1..h6/p rules below: .service-single-area's own rule (section 1
   above) set `color` once at the OUTER wrapper and let every descendant
   -- including tags with no rule of their own here, like a pricing
   <table>'s <td>/<th> cells, or a plain-<p> section a page author wrapped
   in Bootstrap's .text-dark instead of .service-details -- inherit it.
   .rx-seo-page__sections (the wrapper this migration's markup now sits
   in) only sets `background`, never `color` -- it does not need to, its
   own sections (trust/FAQ/related/CTA) style every element explicitly.
   Without a color here, bangalore-cab.html's pricing-table cells and its
   full-width "Book a Cab"/"Places to visit"/"Things to Know" sections
   (originally inheriting dark text from a `.widget...text-dark` wrapper
   this migration replaced with .rx-card, which deliberately sets no text
   color of its own) rendered in the page's default light, dark-page-
   tuned body color on a light card -- confirmed via live contrast check,
   not assumed. */
.rx-seo-article__body {
  color: var(--rx-color-text, #132435);
}

.rx-seo-article__body h1,
.rx-seo-article__body h2,
.rx-seo-article__body h3,
.rx-seo-article__body h4,
.rx-seo-article__body h5,
.rx-seo-article__body h6 {
  color: var(--rx-color-text, #132435);
  font-family: var(--rx-font-display, 'Space Grotesk', sans-serif);
  font-weight: var(--rx-weight-bold, 700);
  line-height: var(--rx-leading-tight, 1.2);
  margin-top: var(--rx-space-8, 32px);
}
.rx-seo-article__body h1:first-child,
.rx-seo-article__body h2:first-child {
  margin-top: 0;
}

.rx-seo-article__body p {
  color: var(--rx-color-text, #132435);
  font-family: var(--rx-font-body, 'Inter', sans-serif);
  font-size: var(--rx-text-base, 1rem);
  line-height: var(--rx-leading-loose, 1.8);
  max-width: 68ch;
  margin-bottom: var(--rx-space-4, 16px);
}
.rx-seo-article__body p a {
  font-weight: var(--rx-weight-medium, 500);
}

.rx-seo-article__body ul {
  margin: var(--rx-space-2, 8px) 0 var(--rx-space-6, 24px);
  padding: 0;
  max-width: 68ch;
}
.rx-seo-article__body ul li {
  padding: 8px 0;
  border-bottom: 1px solid var(--rx-color-border, #E2E0EB);
}
.rx-seo-article__body ul li:last-child {
  border-bottom: none;
}

.rx-seo-article__body a {
  color: var(--rx-color-accent-strong, #7A5F09);
}
.rx-seo-article__body a:hover {
  color: var(--rx-color-text, #132435);
}
.rx-seo-article__body a i {
  color: var(--rx-color-accent-strong, #7A5F09);
}

/* A .rx-card (FAQ block, related-link block) nested inside the prose gets
   the same "first heading has no extra top gap" treatment .featured-snippets
   had -- otherwise every nested card's own opening heading would carry a
   redundant 32px gap on top of the card's own padding. */
.rx-seo-article__body .rx-card h2,
.rx-seo-article__body .rx-card h3,
.rx-seo-article__body .rx-card h4,
.rx-seo-article__body .rx-card h5,
.rx-seo-article__body .rx-card h6 {
  margin-top: var(--rx-space-6, 24px);
}
.rx-seo-article__body .rx-card > h2:first-child,
.rx-seo-article__body .rx-card > h3:first-child,
.rx-seo-article__body .rx-card > h4:first-child,
.rx-seo-article__body .rx-card > h5:first-child,
.rx-seo-article__body .rx-card > h6:first-child {
  margin-top: 0;
}
.rx-seo-article__body .rx-card p {
  max-width: none;
}

/* Content image -- identical treatment to .service-details-img img
   (section 3 above), addressed directly at the <img> since the migrated
   markup no longer needs a dedicated wrapper div around it. */
.rx-seo-article__body img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--rx-radius-lg, 12px);
  box-shadow: var(--rx-shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.06));
  margin-bottom: var(--rx-space-8, 32px);
}
