/* =====================================================================
 * KS-FOOTER-V1 — Footer polish (2026-05-13)
 *
 * The footer is on every page — small wins compound. Tighten:
 *   - Cleaner 5-col grid (already in custom-v8.css) with proper rhythm
 *   - Newsletter input + button styled to match the design system
 *   - Footer link hover state (subtle orange)
 *   - Trust badges below newsletter (icons row)
 *   - "Bottom strip" copyright line + payment icons in slim divider
 *   - Mobile: accordion-style collapsed sections (CSS-only, details/summary)
 * ===================================================================== */

#footer,
.ks-footer,
body footer#footer {
  --ks-footer-bg: #0f172a;
  --ks-footer-text: #cbd5e1;
  --ks-footer-text-muted: #94a3b8;
  --ks-footer-text-bright: #f1f5f9;
  --ks-footer-border: rgba(255, 255, 255, 0.08);
  --ks-primary: #f97316;
  --ks-primary-hover: #ea580c;
  background: var(--ks-footer-bg);
  color: var(--ks-footer-text);
  padding: 48px 0 0;
  margin-top: 64px;
  border-top: 1px solid var(--ks-footer-border);
}

#footer a,
.ks-footer a,
body footer#footer a {
  color: var(--ks-footer-text);
  text-decoration: none;
  transition: color 0.15s;
}
#footer a:hover,
.ks-footer a:hover {
  color: var(--ks-primary);
}

/* =============================================================
 * FOOTER MAIN GRID
 * ============================================================= */
#footer .ks-footer-grid,
#footer .footer-grid,
#footer .footer-columns,
#footer .container > .row:first-of-type {
  display: grid !important;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr !important;
  gap: 32px !important;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 40px;
}

@media (max-width: 991px) {
  #footer .ks-footer-grid,
  #footer .footer-grid,
  #footer .container > .row:first-of-type {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 24px !important;
    padding: 0 16px 32px !important;
  }
}
@media (max-width: 575px) {
  #footer .ks-footer-grid,
  #footer .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
}

/* Each column */
#footer .ks-footer-col,
#footer .footer-column,
#footer .footer-grid > div,
#footer .links {
  background: transparent;
  padding: 0;
  margin: 0;
}

/* Column title */
#footer .ks-footer-col-title,
#footer .footer-column h3,
#footer .footer-column h4,
#footer .footer-column .title,
#footer .links .h3,
#footer .links h3 {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: var(--ks-footer-text-bright) !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  margin: 0 0 14px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  cursor: default;
}

/* Column links list */
#footer .ks-footer-col ul,
#footer .footer-column ul,
#footer .links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
#footer .ks-footer-col li,
#footer .footer-column li,
#footer .links li {
  margin: 0 0 8px;
  padding: 0 !important;
  border: 0 !important;
}
#footer .ks-footer-col li a,
#footer .footer-column li a,
#footer .links li a {
  font-size: 13.5px;
  color: var(--ks-footer-text);
  line-height: 1.5;
  display: inline-block;
}

/* =============================================================
 * BRAND COLUMN (first) — logo + tagline + social
 * ============================================================= */
#footer .ks-footer-brand,
#footer .footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
#footer .ks-footer-brand .ks-footer-logo,
#footer .footer-brand img.logo {
  max-height: 36px;
  width: auto;
}
#footer .ks-footer-brand p,
#footer .footer-brand p {
  font-size: 13.5px;
  color: var(--ks-footer-text);
  line-height: 1.5;
  margin: 0;
}
#footer .ks-footer-social,
#footer .footer-social {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
#footer .ks-footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ks-footer-text);
  transition: background 0.15s, color 0.15s;
}
#footer .ks-footer-social a:hover {
  background: var(--ks-primary);
  color: #fff;
}

/* =============================================================
 * NEWSLETTER — if present (ps_emailsubscription hook)
 * ============================================================= */
#footer .block-newsletter,
#footer .ps_emailsubscription {
  margin: 24px 0 0;
}
#footer .block-newsletter form,
#footer .ps_emailsubscription form {
  display: flex;
  gap: 8px;
  max-width: 360px;
}
#footer .block-newsletter input[type="email"],
#footer .block-newsletter input[type="text"],
#footer .ps_emailsubscription input[type="email"],
#footer .ps_emailsubscription input[type="text"] {
  flex: 1;
  height: 42px !important;
  padding: 0 14px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  border-radius: 8px !important;
  color: var(--ks-footer-text-bright) !important;
  font-size: 14px !important;
  outline: none !important;
}
#footer .block-newsletter input::placeholder,
#footer .ps_emailsubscription input::placeholder {
  color: var(--ks-footer-text-muted);
}
#footer .block-newsletter input:focus,
#footer .ps_emailsubscription input:focus {
  border-color: var(--ks-primary) !important;
  background: rgba(255, 255, 255, 0.10) !important;
}
#footer .block-newsletter button,
#footer .ps_emailsubscription button[type="submit"] {
  height: 42px !important;
  padding: 0 16px !important;
  background: var(--ks-primary) !important;
  border: 0 !important;
  border-radius: 8px !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
#footer .block-newsletter button:hover,
#footer .ps_emailsubscription button:hover {
  background: var(--ks-primary-hover) !important;
}

/* =============================================================
 * BOTTOM STRIP — copyright + payment icons + legal links
 * ============================================================= */
#footer .ks-footer-bottom,
#footer .footer-bottom,
#footer .container > .row:last-of-type {
  border-top: 1px solid var(--ks-footer-border);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  max-width: 1280px;
  margin: 0 auto;
  font-size: 12.5px;
  color: var(--ks-footer-text-muted);
  flex-wrap: wrap;
}

#footer .ks-footer-copyright,
#footer .footer-copyright {
  margin: 0;
  flex: 1 0 auto;
}

#footer .ks-footer-legal-links,
#footer .footer-legal {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
#footer .ks-footer-legal-links a {
  font-size: 12.5px;
  color: var(--ks-footer-text-muted);
}

/* Payment icons row */
#footer .ks-footer-payments,
#footer .payment-icons,
#footer [class*="payment-icon"] {
  display: flex;
  gap: 8px;
  align-items: center;
}
#footer .ks-footer-payments img,
#footer .payment-icons img {
  height: 22px;
  width: auto;
  opacity: 0.7;
  filter: grayscale(0.3) brightness(1.1);
  transition: opacity 0.15s, filter 0.15s;
}
#footer .ks-footer-payments img:hover {
  opacity: 1;
  filter: grayscale(0);
}

/* =============================================================
 * MOBILE — accordion-style collapsed columns
 *
 * Use details/summary if the markup supports it. Otherwise leave
 * columns stacked vertically.
 * ============================================================= */
@media (max-width: 575px) {
  #footer { padding: 32px 0 0; margin-top: 40px; }
  #footer details.ks-footer-col {
    background: transparent;
    border-bottom: 1px solid var(--ks-footer-border);
    padding: 14px 16px;
  }
  #footer details.ks-footer-col summary {
    list-style: none;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ks-footer-text-bright);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  #footer details.ks-footer-col summary::-webkit-details-marker { display: none; }
  #footer details.ks-footer-col summary::after {
    content: '+';
    font-size: 18px;
    font-weight: 400;
    color: var(--ks-footer-text-muted);
    transition: transform 0.18s;
  }
  #footer details.ks-footer-col[open] summary::after { content: '−'; }
  #footer details.ks-footer-col[open] ul { margin-top: 10px; }
}

/* =============================================================
 * SCREENWORKS — trust strip embedded in footer (if present)
 * ============================================================= */
#footer .ks-footer-trust-strip,
#footer .footer-trust-strip {
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid var(--ks-footer-border);
  border-bottom: 1px solid var(--ks-footer-border);
  padding: 20px 24px;
  margin: 0 0 32px;
}
#footer .ks-footer-trust-strip .container {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  text-align: center;
}
@media (max-width: 767px) {
  #footer .ks-footer-trust-strip .container {
    grid-template-columns: repeat(2, 1fr);
  }
}
#footer .ks-footer-trust-strip-item {
  font-size: 12.5px;
  color: var(--ks-footer-text);
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}
#footer .ks-footer-trust-strip-item img {
  width: 28px;
  height: 28px;
  opacity: 0.85;
}
