/*
Theme Name: A-1 Safety Driving School
Theme URI: https://a1safetydriving.com
Author: DriveScout
Author URI: https://drivescout.com
Description: Child theme for A-1 Safety Driving School, built on drivescout-school. Packages, cart and checkout come from the DriveScout Shop plugin (drivescout-shop-page).
Template: drivescout-school
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.3
Text Domain: a1safety
*/

/*
Plain CSS, no build step. Sizes and colours follow the PHP storefront this replaces
(Tailwind classes resolved by hand), so the numbers below are Tailwind's scale:
0.875rem = text-sm, 1.25rem = text-xl, 1.5rem = text-2xl, 1.875rem = text-3xl.

Contents
  1. Tokens
  2. Base
  3. Header and navigation
  4. Heroes
  5. Packages band and DriveScout product cards
  6. Page text and block styles
  7. Home page sections
  8. Inner pages, contact and forms
  9. Shop pages
  10. Footer
*/

/* 1. Tokens ============================================================== */

:root {
  --a1-accent: #a81010;
  --a1-accent-hover: #8a0d0d;
  --a1-accent-light: #c11212;
  --a1-emphasis: #b91c1c;
  --a1-ink: #111827;
  --a1-text: #111827;
  --a1-text-soft: #374151;
  --a1-heading: #1f2937;
  --a1-page-bg: #f0f4f8;
  --a1-dark: #111827;
  --a1-yellow: #fef08a;
  --a1-yellow-pale: #fef9c3;
  --a1-yellow-line: #eab308;
  --a1-hover-bg: #fca5a5;
  --a1-surface: #f3f4f6;
  --a1-line: #e5e7eb;
  --a1-notice-text: #134e4a;

  --a1-font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --a1-radius: 0.125rem;
  --a1-radius-card: 0.5rem;
  --a1-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --a1-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --a1-title-shadow: 1px 1px 20px #000;
  --a1-shell: 80rem;
  --a1-shell-narrow: 56rem;
  --a1-gutter: 1rem;
  --a1-sm: 640px;
}

/* 2. Base ================================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: #fff;
  color: var(--a1-text);
  font-family: var(--a1-font);
  font-size: 1rem;
  line-height: 1.5;
  overflow-wrap: break-word;
}

/* Links take their colour from context, as under the old Tailwind reset. */
a {
  color: inherit;
  text-decoration: none;
}

img,
svg,
iframe,
video {
  max-width: 100%;
}

img {
  height: auto;
}

.icon {
  display: inline-block;
  flex-shrink: 0;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
}

.site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site__main {
  flex: 1 0 auto;
  background: var(--a1-page-bg);
}

.shell {
  width: 100%;
  max-width: var(--a1-shell);
  margin-inline: auto;
  padding-inline: var(--a1-gutter);
}

.shell--narrow {
  max-width: var(--a1-shell-narrow);
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: -9999px;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: #fff;
  color: var(--a1-ink);
  font-weight: 700;
}

.skip-link:focus {
  left: 0.5rem;
}

:focus-visible {
  outline: 2px solid var(--a1-accent);
  outline-offset: 2px;
}

.button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: 0;
  border-radius: var(--a1-radius);
  background: var(--a1-accent);
  box-shadow: var(--a1-shadow);
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
}

.button:hover,
.button:focus-visible {
  background: var(--a1-accent-hover);
  color: #fff;
}

/* 3. Header and navigation =============================================== */

/* Dark bar: menu button, centred logo, and a spacer as wide as the button. */
.site-header__bar {
  background: var(--a1-dark);
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.site-header__row {
  display: flex;
  align-items: center;
  padding-block: 1rem;
}

.site-header__brand {
  display: flex;
  flex: 1;
  justify-content: center;
  min-width: 0;
}

.site-header__brand img {
  display: block;
  width: auto;
  max-width: 100%;
}

@media (min-width: 640px) {
  .site-header__brand img {
    max-width: 24rem;
  }
}

.site-nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: 0.375rem;
  background: transparent;
  color: #9ca3af;
  font-size: 1.5rem;
  cursor: pointer;
}

.site-nav-toggle[hidden] {
  display: none;
}

.site-nav-toggle:hover,
.site-nav-toggle:focus-visible {
  background: #1f2937;
  color: #e5e7eb;
}

/* The menu button is a phone control; from 640px the links are always visible. */
@media (min-width: 640px) {
  .site-nav-toggle {
    display: none;
  }
}

.site-nav-toggle__close,
.is-open .site-nav-toggle__open {
  display: none;
}

.is-open .site-nav-toggle__close {
  display: inline-block;
}

/* Keeps the logo centred while the button takes space on its left (phones, JS on). */
@media (max-width: 639px) {
  .site-header.is-enhanced .site-header__row::after {
    content: "";
    flex: 0 0 2.5rem;
  }
}

/* Yellow link strip. */
.site-nav {
  background: var(--a1-yellow);
}

.site-nav__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: var(--a1-shell);
  margin-inline: auto;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-bottom: 2px solid transparent;
  color: var(--a1-ink);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  transition: color 0.15s, background-color 0.15s;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: var(--a1-hover-bg);
  color: var(--a1-text-soft);
}

.site-nav .current-menu-item > a,
.site-nav a[aria-current="page"] {
  border-bottom-color: var(--a1-accent);
}

/* Phones with JS: the links collapse behind the menu button. */
@media (max-width: 639px) {
  .site-header.is-enhanced .site-nav {
    display: none;
  }

  .site-header.is-enhanced.is-open .site-nav {
    display: block;
  }

  .site-nav__inner,
  .site-nav ul {
    display: block;
  }

  .site-nav__inner {
    padding-block: 0.5rem 1rem;
  }

  .site-nav a {
    display: block;
    margin-top: 0.25rem;
    padding: 0.5rem 1rem 0.5rem 0.75rem;
    border-bottom: 0;
    border-left: 4px solid transparent;
    font-size: 1rem;
    line-height: 1.5rem;
    color: var(--a1-text-soft);
  }

  .site-nav a:hover,
  .site-nav a:focus-visible {
    border-left-color: #d1d5db;
    color: var(--a1-ink);
  }

  .site-nav .current-menu-item > a,
  .site-nav a[aria-current="page"] {
    border-left-color: var(--a1-accent);
    background: rgb(255 255 255 / 0.6);
    color: var(--a1-accent);
  }
}

/* 4. Heroes ============================================================== */

/* The gradient over the photo, with the brand-red rule underneath. */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem var(--a1-gutter);
  border-bottom: 4px solid var(--a1-accent);
  background-color: #404047;
  background-image: linear-gradient(129deg, rgb(64 64 71 / 0.67) 42%, rgb(0 156 255 / 0.51)), var(--hero-image);
  background-position: 0 0, 50% 50%;
  background-size: auto, cover;
  color: #fff;
  text-align: center;
}

.hero--inner {
  min-height: 12rem;
  padding-block: 1.5rem;
}

.hero--home {
  min-height: 18rem;
}

.hero__inner {
  width: 100%;
  max-width: var(--a1-shell);
}

.hero__title {
  margin: 0;
  font-size: 2.25rem;
  font-weight: 400;
  line-height: 1.15;
  text-shadow: var(--a1-title-shadow);
}

.hero--home .hero__title {
  font-size: 1.5rem;
}

.hero__subtitle {
  display: block;
  margin-top: 0.5rem;
  font-size: 1.25rem;
}

/* Hidden on phones, as on the old site, to keep the tall hero short. */
.hero__lead {
  display: none;
  max-width: 56rem;
  margin: 1.25rem auto 0;
  font-size: 1.25rem;
  line-height: 1.6;
}

.hero__button {
  display: inline-block;
  margin-top: 1.25rem;
  padding: 0.75rem 2rem;
  border-radius: var(--a1-radius);
  background: var(--a1-accent);
  box-shadow: var(--a1-shadow-xl);
  color: #fff;
  font-weight: 600;
  text-transform: uppercase;
}

.hero__button:hover,
.hero__button:focus-visible {
  background: var(--a1-accent-hover);
}

.hero__call {
  margin: 1.5rem 0 0;
  text-shadow: var(--a1-title-shadow);
}

.hero__call-question {
  display: block;
  font-size: 1.5rem;
}

.hero__call strong {
  display: block;
  margin-top: 0.5rem;
  font-size: 1.875rem;
  line-height: 1.25;
}

.hero__call a:hover,
.hero__call a:focus-visible {
  text-decoration: underline;
}

@media (min-width: 640px) {
  .hero {
    padding-block: 2rem;
  }

  .hero--inner {
    min-height: 12rem;
  }

  .hero--home {
    min-height: 24rem;
  }

  .hero__title,
  .hero--home .hero__title {
    font-size: 3rem;
  }

  .hero__lead {
    display: block;
  }

  .hero__call {
    margin-top: 1rem;
  }

  .hero__call-question {
    display: inline;
  }

  .hero__call strong {
    display: inline;
    margin: 0;
    font-size: 1.5rem;
  }

  .hero--inner .hero__call-question,
  .hero--inner .hero__call strong {
    font-size: 1.875rem;
  }
}

@media (max-width: 639px) {
  .hero--inner .hero__call-question,
  .hero--inner .hero__call strong {
    font-size: 1.25rem;
  }
}

/* 5. Packages band and DriveScout product cards ========================== */

.packages {
  padding: 2rem 0 0;
  background: var(--a1-dark);
  color: #fff;
}

.packages__header {
  margin-bottom: 2rem;
  text-align: center;
}

.packages__title {
  margin: 0 0 1rem;
  font-size: 1.875rem;
  font-weight: 600;
  line-height: 2.25rem;
  text-transform: uppercase;
}

.packages__intro {
  max-width: var(--a1-shell-narrow);
  margin: 0 auto 0.75rem;
}

.packages__cta {
  margin: 2rem 0 0;
  padding-bottom: 2rem;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
}

.packages__cta a {
  display: inline-block;
}

.packages__cta a:hover,
.packages__cta a:focus-visible {
  text-decoration: underline;
}

/* The theme's own fallback, or the plugin's (from the release after 0.2.33). */
.packages__notice,
.packages .drivescout-products-unavailable {
  max-width: var(--a1-shell-narrow);
  margin: 0 auto;
  padding: 1rem;
  background: #fff;
  color: var(--a1-ink);
  text-align: center;
}

.packages__notice a,
.packages .drivescout-products-unavailable a {
  color: var(--a1-accent);
  font-weight: 700;
  text-decoration: underline;
}

/*
Product cards are the plugin's [drivescout_products] markup:
  #drivescout-app .drivescout-products > .ds_card
    > .ds_card-header, .ds_card-body (.product-name, .product-description, .price),
      .ds_card-footer > button.add-to-cart
Every rule carries the #drivescout-app .drivescout-products prefix so it outranks the
plugin's own #drivescout-app rules (blue button, blue strip, square corners).
Layout follows the old products-grid.php: two columns from 640px, red bar on top, the
name and description centred, a large price, and the button on a grey footer.
*/
#drivescout-app .drivescout-products {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3rem;
  align-items: stretch;
}

@media (min-width: 640px) {
  #drivescout-app .drivescout-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
  }
}

#drivescout-app .drivescout-products .ds_card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--a1-radius);
  background: #fff;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  color: var(--a1-ink);
  text-align: center;
}

#drivescout-app .drivescout-products .ds_card-header {
  /* !important: the plugin sets a 15px height inline. */
  height: 1.5rem !important;
  background: var(--a1-accent);
}

#drivescout-app .drivescout-products .ds_card-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 0.75rem;
}

#drivescout-app .drivescout-products .product-name {
  margin: 0 0.5rem 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #f3f4f6;
  color: var(--a1-heading);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 2rem;
}

#drivescout-app .drivescout-products .product-description {
  margin: 0 0 1.5rem;
  color: var(--a1-ink);
  font-size: 1rem;
  line-height: 2;
  overflow-wrap: anywhere;
}

#drivescout-app .drivescout-products .product-description p {
  margin: 0 0 0.5rem;
}

#drivescout-app .drivescout-products .price {
  margin: auto 0 0.5rem;
  color: var(--a1-ink);
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 2.5rem;
}

#drivescout-app .drivescout-products .ds_card-footer {
  padding: 2rem 1rem;
  border-top: 2px solid #f3f4f6;
  background: var(--a1-surface);
  text-align: center;
}

#drivescout-app .drivescout-products .add-to-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border: 0;
  border-radius: var(--a1-radius);
  background: var(--a1-accent);
  box-shadow: var(--a1-shadow-xl);
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
}

#drivescout-app .drivescout-products .add-to-cart:hover,
#drivescout-app .drivescout-products .add-to-cart:focus-visible {
  background: var(--a1-accent-hover);
  color: #fff;
}

#drivescout-app .drivescout-products .add-to-cart:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

/* 6. Page text and block styles ========================================== */

.entry-content {
  color: var(--a1-text);
  line-height: 1.625;
}

.entry-content > :first-child {
  margin-top: 0;
}

.entry-content > :last-child {
  margin-bottom: 0;
}

.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content figure {
  margin: 0 0 1rem;
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.5rem;
}

.entry-content li {
  margin-bottom: 0.5rem;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin: 2rem 0 0.75rem;
  color: var(--a1-ink);
  font-weight: 600;
  line-height: 1.3;
}

.entry-content h2 {
  font-size: 1.875rem;
}

.entry-content h3 {
  font-size: 1.5rem;
}

.entry-content h4 {
  font-size: 1.25rem;
}

.entry-content a:not(.wp-block-button__link) {
  color: var(--a1-accent);
  text-decoration: underline;
}

.entry-content a:not(.wp-block-button__link):hover {
  color: var(--a1-accent-hover);
}

.entry-content img {
  max-width: 100%;
  height: auto;
}

.entry-content strong {
  font-weight: 700;
}

.entry-content mark,
.a1s-highlight {
  padding: 0.5rem;
  background: var(--a1-yellow);
  color: var(--a1-emphasis);
  font-weight: 700;
}

.has-text-align-center {
  text-align: center;
}

.has-text-align-left {
  text-align: left;
}

.wp-block-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.wp-block-button__link {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--a1-radius);
  background: var(--a1-accent);
  box-shadow: var(--a1-shadow);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
}

.wp-block-button__link:hover,
.wp-block-button__link:focus-visible {
  background: var(--a1-accent-hover);
  color: #fff;
}

.wp-block-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 0 0 1rem;
}

.wp-block-column {
  flex: 1 1 100%;
  min-width: 0;
}

@media (min-width: 782px) {
  .wp-block-columns {
    flex-wrap: nowrap;
  }

  .wp-block-column {
    flex: 1 1 0;
  }
}

.wp-block-image img {
  display: block;
}

.wp-block-image.aligncenter,
.wp-block-image .aligncenter {
  margin-inline: auto;
  text-align: center;
}

.wp-block-image.aligncenter img {
  margin-inline: auto;
}

/* Notice: the yellow box on the old checkout. Pick it in the Group block's Styles. */
.is-style-a1s-notice {
  position: relative;
  margin: 0 0 1.5rem;
  padding: 0.75rem 1rem 0.75rem 3.5rem;
  border-top: 4px solid var(--a1-yellow-line);
  border-radius: 0 0 0.25rem 0.25rem;
  background: var(--a1-yellow-pale);
  box-shadow: var(--a1-shadow);
  color: var(--a1-notice-text);
  text-align: left;
}

.is-style-a1s-notice::before {
  content: "";
  position: absolute;
  top: 0.9rem;
  left: 1rem;
  width: 1.5rem;
  height: 1.5rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23eab308' d='M2.93 17.07A10 10 0 1 1 17.07 2.93 10 10 0 0 1 2.93 17.07zm12.73-1.41A8 8 0 1 0 4.34 4.34a8 8 0 0 0 11.32 11.32zM9 11V9h2v6H9v-4zm0-6h2v2H9V5z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.is-style-a1s-notice > :last-child {
  margin-bottom: 0;
}

/* Card: white panel under a brand-red bar. */
.is-style-a1s-card {
  margin: 0 0 1rem;
  padding: 2rem;
  border-top: 1.5rem solid var(--a1-accent);
  border-radius: 0.5rem 0.5rem 0 0;
  background: #fff;
  color: var(--a1-ink);
}

.is-style-a1s-card > :last-child {
  margin-bottom: 0;
}

.is-style-a1s-narrow {
  max-width: 600px;
  margin-inline: auto;
  text-align: left;
}

/* White box on a dark section ("We do NOT guarantee passing the road test"). */
.is-style-a1s-white-box {
  margin: 0 0 2rem;
  padding: 1rem;
  background: #fff;
  color: var(--a1-ink);
  text-align: center;
}

.is-style-a1s-white-box > * {
  margin: 0;
}

/* Badge row: award badges and seals, centred and wrapping. */
.is-style-a1s-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 2rem;
  margin: 1.5rem 0 0;
}

.is-style-a1s-badges figure,
.is-style-a1s-badges p {
  margin: 0;
}

.is-style-a1s-badges img {
  display: block;
  max-width: 100%;
  height: auto;
}

/*
Security seal (RapidScanSecure) slot. The old site loaded the seal from a third-party
script; it is NOT included here. Awaiting the school's confirmation (COPY_REVIEW.md
question 21). When confirmed, put the seal inside an element with this class.
*/
.a1s-seal-rapidscansecure-pending {
  max-width: 200px;
}

.is-style-a1s-section-title,
.is-style-a1s-section-title-plain {
  margin: 0 0 2rem;
  padding: 1rem;
  font-size: 1.875rem;
  font-weight: 600;
  line-height: 2.25rem;
  text-align: center;
}

.is-style-a1s-section-title {
  text-transform: uppercase;
}

.is-style-a1s-session-heading {
  margin: 1.5rem 0;
  color: var(--a1-yellow);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.75rem;
  text-transform: uppercase;
}

.is-style-a1s-centered {
  text-align: center;
}

/* 7. Home page sections ================================================== */

/*
Every top-level block on the home page is centred in the shell by padding, not by
max-width, so a Dark section group can paint the full screen width while its content
stays aligned with everything else.
*/
.page-content--home {
  background: var(--a1-page-bg);
}

.hero + .page-content--home {
  padding-top: 1rem;
}

.page-content--home:last-child {
  padding-bottom: 1rem;
}

.page-content--home > * {
  padding-inline: max(var(--a1-gutter), calc((100% - var(--a1-shell)) / 2 + var(--a1-gutter)));
}

/* The old lists put their bullets inside the text, so wrapped lines tuck under them. */
.page-content--home ul,
.page-content--home ol {
  padding-left: 0;
  list-style-position: inside;
}

.page-content--home li {
  margin-bottom: 0.5rem;
}

/* Dark section: the band behind booking tips, price list, programs and hours. */
.is-style-a1s-dark {
  margin: 1.5rem 0 0;
  padding-top: 1.5rem;
  padding-bottom: 2rem;
  background: var(--a1-dark);
  color: #fff;
}

.is-style-a1s-dark > :first-child {
  margin-top: 0;
}

.is-style-a1s-dark li,
.is-style-a1s-dark p {
  color: inherit;
}

/*
Headings on the dark band: `.entry-content h2/h3` colours them dark ink with a higher
specificity than the block styles alone, which left them invisible on the dark background.
*/
.is-style-a1s-dark .is-style-a1s-section-title,
.is-style-a1s-dark .is-style-a1s-section-title-plain {
  color: #fff;
}

.is-style-a1s-dark .is-style-a1s-session-heading {
  color: var(--a1-yellow);
  font-weight: 400;
}

.entry-content .is-style-a1s-dark a:not(.wp-block-button__link) {
  color: var(--a1-yellow);
}

.entry-content .is-style-a1s-dark .is-style-a1s-card a:not(.wp-block-button__link),
.entry-content .is-style-a1s-dark .is-style-a1s-white-box a:not(.wp-block-button__link) {
  color: var(--a1-accent);
}

.is-style-a1s-dark .is-style-a1s-card,
.is-style-a1s-dark .is-style-a1s-card p,
.is-style-a1s-dark .is-style-a1s-card li {
  color: var(--a1-ink);
}

.is-style-a1s-dark .is-style-a1s-card + .is-style-a1s-section-title,
.is-style-a1s-dark .is-style-a1s-card + .is-style-a1s-section-title-plain {
  margin-top: 3rem;
}

/*
The dark section carries on seamlessly through the packages band: the text before the
marker, the band and the text after it are three siblings, so the joins lose their gaps.
*/
.packages + .page-content--home > .is-style-a1s-dark:first-child {
  margin-top: 0;
  padding-top: 0;
}

/*
flow-root keeps the last block's bottom margin inside the dark section. Without it, and
with no bottom padding, that margin collapses through the section and shows the light
page background as a pale bar above the packages.
*/
.page-content--home:has(+ .packages) > .is-style-a1s-dark:last-child {
  display: flow-root;
  padding-bottom: 0;
}

.page-content--home:has(+ .packages) > .is-style-a1s-dark:last-child > :last-child {
  margin-bottom: 0;
}

/* Why choose: two centred lists, loose line height. */
.is-style-a1s-two-lists {
  margin-bottom: 1rem;
  text-align: center;
  line-height: 2;
}

.is-style-a1s-two-lists ul {
  margin: 0;
}

@media (min-width: 640px) {
  .page-content--home > .wp-block-heading:first-child,
  .page-content--home > .is-style-a1s-section-title:first-child {
    margin-top: 2rem;
  }

  .is-style-a1s-dark {
    margin-top: 4rem;
    padding-top: 4rem;
  }
}

/* 8. Inner pages, contact and forms ====================================== */

.page-body {
  padding: 2rem 0 3rem;
  background: var(--a1-page-bg);
}

.content-card {
  padding: 1.25rem;
  border-radius: var(--a1-radius-card);
  background: #fff;
  box-shadow: var(--a1-shadow);
}

@media (min-width: 640px) {
  .content-card {
    padding: 2rem;
  }
}

.content-card__title,
.contact__name,
.contact-form__title {
  margin: 0 0 1rem;
  color: var(--a1-ink);
  font-weight: 600;
  line-height: 1.3;
}

.content-card__title {
  font-size: 1.875rem;
}

.contact__name,
.contact-form__title {
  font-size: 1.5rem;
}

.contact__list {
  margin: 0 0 1.5rem;
}

.contact__list dt {
  margin-top: 0.75rem;
  font-weight: 700;
}

.contact__list dd {
  margin: 0;
}

.contact__list a,
.contact__extra a {
  color: var(--a1-accent);
  text-decoration: underline;
}

.contact-form {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--a1-line);
}

.dss-form__row {
  display: grid;
  gap: 0 1rem;
}

@media (min-width: 640px) {
  .dss-form__row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.dss-form__field {
  margin: 0 0 1rem;
}

.dss-form__field label {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--a1-text-soft);
  font-size: 0.875rem;
  font-weight: 500;
}

.dss-form input[type="text"],
.dss-form input[type="email"],
.dss-form input[type="tel"],
.dss-form textarea {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  background: #fff;
  color: var(--a1-ink);
  font: inherit;
}

.dss-form input:focus,
.dss-form textarea:focus {
  border-color: var(--a1-accent);
  outline: 2px solid var(--a1-accent);
  outline-offset: -1px;
}

.dss-form [aria-invalid="true"] {
  border-color: #dc2626;
}

.dss-form__error {
  display: block;
  margin-top: 0.25rem;
  color: #dc2626;
  font-size: 0.875rem;
}

/* The honeypot stays off-screen; display:none would let simple bots skip it. */
.dss-form__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-notice {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid #a7f3d0;
  border-radius: var(--a1-radius-card);
  background: #ecfdf5;
  color: #065f46;
}

.form-notice p {
  margin: 0;
}

.form-notice--error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

/* 9. Shop pages ========================================================== */

.shop-page {
  padding: 2rem 0 2.5rem;
  background: var(--a1-page-bg);
}

/* The cart's Checkout button: the old site made it mint green. */
#drivescout-cart-wrapper .go-to-checkout {
  display: block;
  width: 100%;
  padding: 0.5rem;
  border-radius: var(--a1-radius);
  background: hsl(156 73% 74%);
  box-shadow: var(--a1-shadow-xl);
  color: hsl(170 97% 15%);
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
}

#drivescout-cart-wrapper .go-to-checkout:hover {
  background: hsl(156 73% 68%);
}

/* 10. Footer ============================================================= */

.site-footer {
  padding: 1.5rem 0;
  background: #fff;
  color: var(--a1-text-soft);
  font-size: 0.875rem;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.site-footer__menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.5rem;
  margin: 0 0 0.75rem;
  padding: 0;
  list-style: none;
}

.site-footer__menu a {
  display: inline-block;
  padding-block: 0.25rem;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--a1-accent);
  text-decoration: underline;
}

.site-footer__tagline {
  margin-bottom: 0.5rem;
}
