/* ==========================================================================
   components.css — styles extracted from the JSX during the PHP/SSR port.
   Holds: TopNav, Footer responsive, @keyframes, and hover/focus states that
   could not live as inline styles. Loaded after globals.css.
   ========================================================================== */

/* ---------- TopNav (from topnav.jsx) ---------- */
.topnav {
  position: sticky; top: 0; z-index: 80; height: 52px;
  background: rgba(255, 255, 255, 0.6);
  border-bottom: 1px solid transparent;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  transition: background var(--dur-base) var(--ease-apple),
              border-color var(--dur-base) var(--ease-apple);
}
.topnav.is-scrolled {
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--border-1);
}
.topnav__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.topnav__logo { display: inline-flex; align-items: center; color: var(--ha-ink-2); }
.topnav__logo:hover { text-decoration: none; }
.topnav__logo-mark { display: inline-block; width: 120px; height: 36.5px; background: currentColor; }
.topnav__links { display: flex; gap: 28px; }
.topnav__link {
  color: var(--ha-ink-2); font-size: 14px; font-weight: 400; opacity: 0.78;
  position: relative; padding-bottom: 4px;
  transition: opacity var(--dur-base) var(--ease-apple);
}
.topnav__link:hover { opacity: 1; text-decoration: none; }
.topnav__link.is-active { font-weight: 600; opacity: 1; }
.topnav__underline { position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--ha-ink-2); border-radius: 2px; }
.topnav__cta { display: flex; gap: 14px; align-items: center; }

/* Hamburger toggle — hidden on desktop, shown on mobile. */
.topnav__toggle { display: none; }
.topnav__mobile { display: none; }

@media (max-width: 720px) {
  .topnav__links { display: none; }

  .topnav__toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 40px; height: 40px; padding: 0; margin: 0;
    background: transparent; border: 0; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .topnav__toggle-bar {
    display: block; width: 22px; height: 2px; border-radius: 2px;
    background: var(--ha-ink-2);
    transition: transform var(--dur-base) var(--ease-apple),
                opacity var(--dur-base) var(--ease-apple);
  }
  .topnav.is-open .topnav__toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .topnav.is-open .topnav__toggle-bar:nth-child(2) { opacity: 0; }
  .topnav.is-open .topnav__toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .topnav__mobile {
    display: flex; flex-direction: column;
    position: absolute; top: 52px; left: 0; right: 0;
    padding: 4px var(--gutter) 14px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border-1);
  }
  .topnav__mobile[hidden] { display: none; }
  .topnav__mobile-link {
    color: var(--ha-ink-2); font-size: 16px; padding: 13px 2px;
    border-bottom: 1px solid var(--ha-line-soft); opacity: 0.85;
  }
  .topnav__mobile-link:last-child { border-bottom: 0; }
  .topnav__mobile-link.is-active { font-weight: 600; opacity: 1; }
}

/* ---------- Global presence office grid (from global-presence.php) ---------- */
/* Eight office/address cards: 4 → 2 → 1 columns. */
.gp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
}
@media (max-width: 900px) {
  .gp-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .gp-grid { grid-template-columns: 1fr; }
}

/* ---------- Footer responsive (from footer.jsx) ---------- */
/* Once the wide 5-column layout collapses, the brand/offices block moves to its
   own full-width row on top, and the link columns flow beneath it (2 → 1 cols).
   The brand block must never sit on the same row as a link column. */
@media (max-width: 860px) {
  .footer__grid { grid-template-columns: repeat(2, 1fr) !important; }
  .footer__grid > :first-child { grid-column: 1 / -1; }
}
/* Small phones: keep the two link columns (labels are short), just tighten the
   gap so they breathe at ~375px and below. */
@media (max-width: 520px) {
  .footer__grid { gap: 24px 20px !important; }
}

/* ---------- Section keyframes ported from JSX <style> blocks ---------- */
/* (appended per-section during the section port) */
