/* ==========================================================================
   pages/contact.css
   Page-specific overrides only. This file must never redefine a
   component's core look (that belongs in components.css) — it may
   only add layout-specific spacing/positioning unique to this page.

   Stage 6 responsive corrections (Contact Us only). Every rule is scoped to
   this page's own sections so no other page is affected.
   ========================================================================== */

/* 1. Placeholder positioning defect (branch card cover and CTA band media):
   .img-placeholder collapsed to its icon height instead of filling the
   aspect-box's reserved ratio. Pin it to the box. No image is added. */
.branch-card__media .img-placeholder,
.cta-band__media .img-placeholder {
  position: absolute;
  inset: 0;
}

/* 2. Form / contact-information columns.
   At 768-991px the two-column layout (1.3fr / 1fr) made the form column
   about 430px: the two-up field rows were ~200px wide (placeholders such as
   "Enter company name (optional)" were cut off) and the information card was
   so narrow that the e-mail address broke one character from its end. The
   columns now stack below 992px, where both have room. */
@media (max-width: 991px) {
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 2b. 992-1199px: the two-up "Company Name" field was ~200px wide and its
   placeholder "Enter company name (optional)" was cut off. Give the form
   column a little more of the row in this range. */
@media (min-width: 992px) and (max-width: 1199px) {
  .contact-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  }
}

/* 3. Contact details in the cards are links (tel:, mailto:). They keep the
   surrounding text colour; underline on hover shows they are interactive,
   and long addresses may still break rather than overflow. (The hero's own
   quick links use the soft teal effect in 3a instead of an underline.) */
.info-card__list a:hover {
  text-decoration: underline;
}
.info-card__list a {
  overflow-wrap: anywhere;
}

/* 3a. CONTACT HERO quick links ("Call Us", "Email Us") — scoped to .page-banner--contact.
   A soft translucent-teal pill on hover/focus, a slight lift in colour and a gentle icon
   nudge instead of an underline. The padding is present in every state (only background,
   colour and the icon's transform change), so hovering never shifts the layout; the row/column
   gaps are reduced by the amount of padding added so the row keeps its original rhythm.
   The destinations (tel:/mailto:) are untouched. */
.page-banner--contact .page-banner__quicklinks {
  gap: var(--space-2) var(--space-3);
  margin-left: calc(-1 * var(--space-3)); /* keeps the text aligned with the heading above */
}
.page-banner--contact .page-banner__quicklink {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
}
.page-banner--contact .page-banner__quicklink[href] {
  background-color: transparent;
  text-decoration: none;
  transition: background-color var(--transition-base), color var(--transition-base);
}
.page-banner--contact .page-banner__quicklink[href]:hover,
.page-banner--contact .page-banner__quicklink[href]:focus,
.page-banner--contact .page-banner__quicklink[href]:focus-visible,
.page-banner--contact .page-banner__quicklink[href]:active {
  text-decoration: none;
}
.page-banner--contact .page-banner__quicklink[href] i,
.page-banner--contact .page-banner__quicklink[href] svg {
  transition: transform var(--transition-base), color var(--transition-base);
}
.page-banner--contact .page-banner__quicklink[href]:hover,
.page-banner--contact .page-banner__quicklink[href]:focus-visible {
  background-color: rgba(15, 150, 160, 0.2); /* --color-teal-500 at 20% on the navy banner */
  color: var(--color-teal-100);
}
.page-banner--contact .page-banner__quicklink[href]:hover i,
.page-banner--contact .page-banner__quicklink[href]:hover svg,
.page-banner--contact .page-banner__quicklink[href]:focus-visible i,
.page-banner--contact .page-banner__quicklink[href]:focus-visible svg {
  color: var(--color-teal-100);
  transform: translateX(2px);
}
/* Clear keyboard focus: a solid light ring that follows the rounded shape. */
.page-banner--contact .page-banner__quicklink[href]:focus-visible {
  outline: 2px solid var(--color-white);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .page-banner--contact .page-banner__quicklink[href],
  .page-banner--contact .page-banner__quicklink[href] i,
  .page-banner--contact .page-banner__quicklink[href] svg {
    transition: none;
  }
  .page-banner--contact .page-banner__quicklink[href]:hover i,
  .page-banner--contact .page-banner__quicklink[href]:hover svg,
  .page-banner--contact .page-banner__quicklink[href]:focus-visible i,
  .page-banner--contact .page-banner__quicklink[href]:focus-visible svg {
    transform: none; /* colour change remains; the movement is dropped */
  }
}

/* 4. CTA band squeeze at 768-991px (same fix as the About page): the text
   column was only 134-172px wide beside the fixed 320px media box. */
@media (min-width: 768px) and (max-width: 991px) {
  .cta-band--full .cta-band__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(200px, 280px);
    grid-template-areas:
      "text media"
      "action media";
    column-gap: var(--space-6);
    row-gap: var(--space-4);
    align-items: center;
    justify-content: stretch;
  }
  .cta-band--full .cta-band__text {
    grid-area: text;
    max-width: none;
  }
  .cta-band--full .cta-band__action {
    grid-area: action;
    justify-self: start;
  }
  .cta-band--full .cta-band__media {
    grid-area: media;
    width: 100%;
    max-width: none;
  }
}
