/* Sawa Coco — Footer layout fixes
   Migrated verbatim from font-system.css (Phase 2 footer work).
   Preserves Blocksy footer backgrounds (light tan main + dark patterned bottom).
   Background rules (background-color / background-image) live in the theme's
   global.css and are intentionally NOT touched here.
   Fixes inter-widget spacing, logo sizing, and main-footer typography. */

/* Logo responsive sizing - prevent oversized image from dominating column */
[data-footer*="type-1"] .ct-footer [data-column="widget-area-1"] figure img {
  max-width: 260px;
  height: auto;
  display: block;
}

/* Align footer content width with the rest of the site.
   The footer rows use Blocksy's full-width container (100vw - 60px); constrain the
   inner content to the same boxed width the header/page use (--theme-normal-container-max-width,
   1290px) and center it. The textured background sits on the full-width [data-row], not on
   this inner container, so it is unaffected and still spans edge to edge. */
[data-footer*="type-1"] .ct-footer [data-row] .ct-container-fluid {
  max-width: var(--theme-normal-container-max-width);
  margin-inline: auto;
}

/* A. Inter-widget spacing: feed Blocksy's own variable (theme default is 40px),
   and top-align the columns so they don't stretch to equal height. */
[data-footer*="type-1"] .ct-footer [data-row*="middle"] [data-column] {
  --widgets-gap: 10px;
  align-self: flex-start;
}

/* C. Main-footer typography: one body size for text/links/lists + one heading step.
   Scoped to the middle row only — the bottom row (tagline + copyright) is untouched. */
[data-footer*="type-1"] .ct-footer [data-row*="middle"] p,
[data-footer*="type-1"] .ct-footer [data-row*="middle"] li,
[data-footer*="type-1"] .ct-footer [data-row*="middle"] a {
  font-size: var(--fs-sm);
  line-height: var(--lh-base);
}

[data-footer*="type-1"] .ct-footer [data-row*="middle"] h4 {
  font-size: var(--fs-md);
}

/* Bottom bar: make the tagline match the copyright (same size/line-height/margin).
   Left/right alignment is intentional (opposite ends of the bar) and kept as-is. */
[data-footer*="type-1"] .ct-footer [data-row*="bottom"] p {
  font-size: var(--fs-xs);
  line-height: var(--lh-base);
  margin: 0;
}

/* Keep footer paragraphs tidy; last paragraph in a widget has no trailing gap. */
[data-footer*="type-1"] .ct-footer p {
  margin-bottom: 0.5rem;
  margin-top: 0;
}

[data-footer*="type-1"] .ct-footer .ct-widget p:last-child {
  margin-bottom: 0;
}

/* D. Footer widget lists — moved from per-element inline styles into classes
   (Phase 3d component standardization). These reproduce the former inline rules
   exactly, so the change is render-neutral. The h4 (margin-top:0) and link
   (text-decoration:none; color:inherit) inline styles were dropped because the
   global `h4` and `a` rules in typography.css already provide them. */
.footer-contact ul,
.footer-pages-widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-contact li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px;
}

.footer-contact li:last-child {
  margin-bottom: 0;
}

/* Icon column in each contact row (the leading <span> wrapping the <i>). */
.footer-contact li > span {
  width: 24px;
  margin-right: 10px;
}
