/* Footer styles for the static site.
 *
 * The markup in src/components/Footer.astro uses only `sitep-*` class names,
 * so this file is the single source of truth for the footer — the theme's
 * `.widget` / `.grve-footer-bar` / `[data-align-center]` rules no longer
 * apply and there is nothing to fight. `#grve-footer` and `.grve-container`
 * are kept so the footer keeps the site's page width and stacking context.
 *
 * Loaded after the theme styles. */

.sitep-footer {
  --sitep-footer-bg: #0d4772; /* the theme's footer navy */
  --sitep-footer-bg-dark: #0a3557;
  --sitep-footer-text: #c3d5e6;
  --sitep-footer-muted: #8fa8c0;
  --sitep-footer-accent: #37a5c6;
  --sitep-footer-rule: rgba(255, 255, 255, 0.14);

  background-color: var(--sitep-footer-bg);
  color: var(--sitep-footer-text);
  font-size: 14px;
  line-height: 1.65;
}

/* ---- Columns ---- */
.sitep-footer .sitep-footer-main {
  padding: 64px 0 48px;
}
.sitep-footer .sitep-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px 30px;
  align-items: start;
}
.sitep-footer .sitep-footer-col {
  min-width: 0; /* let long words wrap instead of stretching the track */
}

/* ---- Titles ---- */
.sitep-footer .sitep-footer-title {
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--sitep-footer-rule);
  color: #ffffff;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ---- Masthead logo ---- */
.sitep-footer .sitep-footer-brand {
  display: inline-block;
  margin: 0 0 40px;
}
.sitep-footer .sitep-footer-logo {
  display: block;
  width: 190px;
  height: auto;
}

/* ---- Offices ---- */
.sitep-footer .sitep-footer-address {
  margin-bottom: 22px;
}
.sitep-footer .sitep-footer-address:last-child {
  margin-bottom: 0;
}
.sitep-footer .sitep-footer-address strong {
  display: block;
  margin-bottom: 4px;
  color: #ffffff;
  font-weight: 600;
}
.sitep-footer .sitep-footer-address p {
  margin: 0;
}

/* ---- Links ---- */
.sitep-footer a {
  color: var(--sitep-footer-text);
  text-decoration: none;
  transition: color 0.2s ease;
}
.sitep-footer a:hover,
.sitep-footer a:focus-visible {
  color: #ffffff;
}

.sitep-footer .sitep-footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
}
.sitep-footer .sitep-footer-links li {
  margin-bottom: 10px;
}
.sitep-footer .sitep-footer-links li::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--sitep-footer-accent);
  vertical-align: middle;
}
.sitep-footer .sitep-footer-links span {
  color: var(--sitep-footer-muted);
}

/* ---- Partners: uniform logo plates ---- */
.sitep-footer .sitep-footer-partners {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
/* The three partner logos are multi-coloured artwork drawn for a light
 * background, so they sit on white plates rather than being knocked out —
 * uniform plates keep the row tidy despite the differing aspect ratios. */
.sitep-footer .sitep-partner-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 62px;
  padding: 8px 14px;
  border-radius: 4px;
  background: #ffffff;
  opacity: 0.92;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.sitep-footer .sitep-partner-logo:hover,
.sitep-footer .sitep-partner-logo:focus-visible {
  opacity: 1;
  transform: translateY(-1px);
}
.sitep-footer .sitep-partner-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* ---- Search ----
 * The theme styles every input/button under `#grve-theme-wrapper` (a stray
 * 20px input margin-bottom, 15px button padding and a #1f3893 button
 * background), which broke the control out of its frame. These selectors
 * lead with #grve-footer so they match that id-level specificity — footer.css
 * loads last, so the tie resolves here. */
#grve-footer.sitep-footer .sitep-footer-search-box {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  transition: border-color 0.2s ease;
}
#grve-footer.sitep-footer .sitep-footer-search-box:focus-within {
  border-color: var(--sitep-footer-accent);
}
#grve-footer.sitep-footer .sitep-footer-search-box input {
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  height: 100%;
  margin: 0;
  padding: 0 14px;
  border: none;
  outline: none;
  background: transparent;
  color: #ffffff;
  font-size: 14px;
  line-height: normal;
}
#grve-footer.sitep-footer .sitep-footer-search-box input::placeholder {
  color: var(--sitep-footer-muted);
}
#grve-footer.sitep-footer .sitep-footer-search-box button {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 100%;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: var(--sitep-footer-accent);
  cursor: pointer;
  transition: background 0.2s ease;
}
#grve-footer.sitep-footer .sitep-footer-search-box button:hover {
  background: #2b8ba9;
}
#grve-footer.sitep-footer .sitep-footer-search-box button svg {
  fill: #ffffff;
}

/* ---- Bottom bar ---- */
.sitep-footer .sitep-footer-bar {
  padding: 22px 0;
  border-top: 1px solid var(--sitep-footer-rule);
  background: var(--sitep-footer-bg-dark);
}
.sitep-footer .sitep-footer-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.sitep-footer .sitep-footer-copyright {
  margin: 0;
  color: var(--sitep-footer-muted);
  font-size: 13px;
}
.sitep-footer .sitep-footer-copyright a {
  color: var(--sitep-footer-text);
}
.sitep-footer .sitep-footer-divider {
  margin: 0 5px;
  color: rgba(255, 255, 255, 0.28);
}

.sitep-footer .sitep-footer-social {
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sitep-footer .sitep-footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  font-size: 15px;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.sitep-footer .sitep-footer-social a:hover {
  background: var(--sitep-footer-accent);
  border-color: var(--sitep-footer-accent);
  color: #ffffff;
}

/* ---- Utilities ---- */
.sitep-footer .sitep-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Responsive ---- */
@media (max-width: 1023px) {
  .sitep-footer .sitep-footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 36px 30px;
  }
  .sitep-footer .sitep-footer-main {
    padding: 48px 0 40px;
  }
}
@media (max-width: 599px) {
  .sitep-footer .sitep-footer-grid {
    grid-template-columns: 1fr;
  }
  .sitep-footer .sitep-footer-bar-inner {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
}
