/* ==========================================================
   FOOTER — COMPONENT STYLES (ACCESSIBLE)
   - Turquoise background (brand)
   - ALL footer text = black (contrast passes)
   - Newsletter input stays dark with white text
   ========================================================== */

/* ======================================================
   0) GLOBAL SAFETY NET (wins against old/footer/plugin rules)
   - Force readable text + links in footer
   - DO NOT touch form inputs text color (handled below)
   ====================================================== */
.site-footer{
  background:var(--color-primary-dark);
  color:var(--color-dark);
  padding:40px 0 0;
  border-top:1px solid rgba(0,0,0,0.10);
}

/* Make common text elements inherit BLACK (kills random white/opacity) */
.site-footer :where(p,li,span,strong,em,small,label,h1,h2,h3,h4,h5,h6){
  color:inherit;
  opacity:1;
}

/* Links must also be BLACK (including strong/span inside links) */
.site-footer a,
.site-footer a:visited{
  color:var(--color-dark) !important;
  opacity:1 !important;
}

.site-footer a :where(span,strong,em){
  color:inherit !important;
}

/* ======================================================
   1) TOP GRID
   ====================================================== */
.footer-top{
  display:grid;
  align-items:start;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:32px;
  padding-bottom:22px;
}

.footer-col{
  min-width:0;
}

.footer-links,
.footer-social{
  list-style:none;
  margin:0;
  padding:0;
}

.footer-links li,
.footer-social li{
  list-style:none;
  margin:0;
  padding:0;
}

.footer-links li::marker,
.footer-social li::marker{
  content:"";
}

/* Footer column headings */
.site-footer .footer-col-title{
  font-size:16px;
  font-weight:900;
  line-height:1.25;
  margin:0 0 14px;
  color:var(--color-dark);
}

/* Only keep this if you REALLY still have a newsletter column inside footer */
.site-footer .footer-col-title--newsletter{
  font-size:17px;
  line-height:1.35;
  max-width:520px;
}

/* Footer brand/logo sizing fix */
.footer-brandmeta .footer-logo,
.footer-brandmeta .footer-logo a,
.footer-brandmeta .footer-logo .custom-logo-link{
  display:inline-block;
  max-width:160px;
}

.footer-brandmeta .footer-logo img,
.footer-brandmeta .footer-logo .custom-logo{
  display:block;
  width:auto;
  height:48px;
  max-width:160px;
}

/* ======================================================
   2) LOGO + INTRO TEXT
   ====================================================== */
.footer-newsletter .footer-logo img,
.footer-newsletter .footer-logo .custom-logo{
  height:48px;
  width:auto;
  max-width:160px;
  margin-bottom:12px;
  display:block;
  border-radius:0;
}

.footer-news-title{
  font-size:17px;
  line-height:1.45;
  margin-bottom:8px;
  max-width:460px;
  color:var(--color-dark);
}

/* ======================================================
   2B) BRAND / META (RIGHT COLUMN)
   - Logo + copyright + CSS badge grouped together
   ====================================================== */
.footer-brandmeta{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  text-align:left;
}

/* Brand column heading (aligns with other footer headings) */
.footer-brandmeta .footer-brand-title{
  margin:0 0 14px;
  text-align:left;
}

.footer-brandmeta .footer-logo img,
.footer-brandmeta .footer-logo .custom-logo{
  height:48px;
  width:auto;
  max-width:160px;
  margin:0 0 12px 0;
  display:block;
}

.footer-brandmeta .footer-meta{
  margin-top:6px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:10px;
}

.footer-brandmeta .footer-copy{
  margin:0;
  font-size:13px;
  font-weight:800;
}

.footer-brandmeta .footer-validator{
  margin:0;
}

.footer-brandmeta .footer-validator img{
  display:block;
  margin-left:0;
}

/* ======================================================
   3) NEWSLETTER (Contact Form 7)
   ====================================================== */
.footer-news-form{
  max-width:460px;
  margin-bottom:8px;
}

.footer-news-form .wpcf7{
  margin:0;
}

.footer-news-form .wpcf7-form{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}

/* Tight, predictable vertical rhythm inside the newsletter block */
.footer-news-form .wpcf7-form p{
  margin:0 0 10px !important;
}

.footer-news-form .wpcf7-form p:last-child{
  margin-bottom:0 !important;
}

/* Fix weird empty gap under intro paragraph */
.footer-news-form .wpcf7-form > p:not(:has(label)):not(:has(input)):not(:has(.wpcf7-acceptance)){
  margin-bottom:10px !important;
}

.footer-news-form .wpcf7-form > p:has(.wpcf7-acceptance){
  margin-top:6px !important;
  margin-bottom:10px !important;
}

.footer-news-form .wpcf7-form > p:has(input.wpcf7-submit){
  margin-top:12px !important;
}

/* Make newsletter consent line more compact and avoid height mismatch */
.footer-news-form .wpcf7-form > p{
  margin:0;
}

/* Place submit before consent visually (keeps footer compact).
   Note: Visual order differs from source order. */
.footer-news-form .wpcf7-form > p:has(input.wpcf7-submit){
  order:3;
}

.footer-news-form .wpcf7-form > p:has(.wpcf7-acceptance){
  order:4;
  flex:1 1 260px; /* stays inline when space allows */
  margin-top:2px;
}

.footer-news-form .wpcf7-acceptance label{
  display:inline-flex;
  align-items:flex-start;
  gap:10px;
  font-size:13px;
  line-height:1.25;
  font-weight:800;
  margin:0 !important;
}

.footer-news-form .wpcf7-acceptance input[type="checkbox"]{
  margin-top:2px;
}

/* If the row gets tight, force consent to the next line (desktop-ish widths) */
@media (max-width:1200px){
  .footer-news-form .wpcf7-form > p:has(.wpcf7-acceptance){
    flex-basis:100%;
  }
}
.footer-news-form .wpcf7-form p{
  margin:0;
}

.footer-news-form label{
  display:block;
  margin-bottom:6px;
  font-size:14px;
  font-weight:800;
  color:var(--color-dark) !important;
  background:transparent !important;
  opacity:1 !important;
}

/* Email input stays dark with white text (passes contrast INSIDE the field) */
.footer-news-form input[type="email"]{
  flex:1 1 220px;
  width:100%;
  background:rgba(0,0,0,.22);
  border:1px solid rgba(0,0,0,.22);
  padding:9px 12px;
  border-radius:12px;
  color:var(--color-white);
  font-size:15px;
  box-sizing:border-box;
}

.footer-news-form input[type="email"]::placeholder{
  color:rgba(255,255,255,0.90);
}

/* Submit = orange + black text (brand + accessible) */
.footer-news-form input[type="submit"]{
  flex:0 0 auto;
  padding:9px 14px;
  border-radius:999px;
  border:none;
  background:var(--color-gold);
  color:var(--color-dark);
  font-size:15px;
  font-weight:900;
  cursor:pointer;
  white-space:nowrap;
  box-shadow:0 10px 20px rgba(0,0,0,.15);
}

.footer-news-form input[type="submit"]:hover,
.footer-news-form input[type="submit"]:focus{
  outline:3px solid var(--color-dark);
  outline-offset:3px;
  text-decoration:none;
}

/* Keep the submit button clickable even if CF7 marks it disabled */
.footer-news-form .wpcf7-submit[disabled],
.footer-news-form .wpcf7-submit[aria-disabled="true"],
.footer-news-form input[type="submit"][disabled],
.footer-news-form input[type="submit"][aria-disabled="true"]{
  pointer-events:auto !important;
  cursor:pointer !important;
  opacity:1 !important;
}

.footer-news-form .wpcf7-not-valid-tip{
  color:#7A0000;
  font-size:13px;
  margin-top:4px;
  font-weight:800;
  opacity:1;
}

.footer-news-form .wpcf7-response-output{
  margin:8px 0 0;
  padding:0;
  border:none;
  font-size:13px;
  color:var(--color-dark);
  opacity:1;
}

.footer-news-privacy{
  font-size:14px;
  max-width:460px;
  line-height:1.5;
  color:var(--color-dark);
  opacity:1; /* IMPORTANT: opacity causes WAVE contrast fails */
}

.footer-news-privacy a{
  color:var(--color-dark) !important;
  text-decoration:underline;
  text-underline-offset:2px;
  text-decoration-color:rgba(0,0,0,.55);
  font-weight:900;
}

.footer-news-privacy a:hover,
.footer-news-privacy a:focus{
  text-decoration-color:var(--color-gold);
}

.footer-links a{
  color:var(--color-dark) !important;
  text-decoration:none !important;
  font-size:15px;
  line-height:1.4;
  font-weight:900;
  opacity:1;
  display:inline-block;
  position:relative;
  padding:6px 0;
}

.footer-links a::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:-6px;
  height:4px;
  background:var(--color-gold);
  border-radius:999px;
  opacity:0;
  transform:scaleX(.55);
  transform-origin:left;
  transition:transform var(--anim-speed-fast) var(--anim-ease),
             opacity var(--anim-speed-fast) var(--anim-ease);
  box-shadow:0 0 0 2px rgba(17,17,17,.12);
}

.footer-links a:hover::after,
.footer-links a:focus-visible::after{
  opacity:1;
  transform:scaleX(1);
}

.footer-links a.is-current::after,
.footer-links a[aria-current="page"]::after{
  opacity:1;
  transform:scaleX(1);
}

.footer-links a:focus-visible{
  outline:3px solid var(--color-dark);
  outline-offset:4px;
  border-radius:8px;
}

.footer-social a{
  display:inline-flex;
  align-items:center;
  gap:10px;
  color:var(--color-dark) !important;
  text-decoration:none !important;
  font-size:15px;
  font-weight:900;
  line-height:1.2;
  opacity:1;
  position:relative;
  padding:6px 0;
}

.footer-social a::after{
  content:"";
  position:absolute;
  left:30px; /* icon(20) + gap(10) */
  right:0;
  bottom:-6px;
  height:4px;
  background:var(--color-gold);
  border-radius:999px;
  opacity:0;
  transform:scaleX(.55);
  transform-origin:left;
  transition:transform var(--anim-speed-fast) var(--anim-ease),
             opacity var(--anim-speed-fast) var(--anim-ease);
  box-shadow:0 0 0 2px rgba(17,17,17,.12);
}

.footer-social a:hover::after,
.footer-social a:focus-visible::after{
  opacity:1;
  transform:scaleX(1);
}

.footer-social a:focus-visible{
  outline:3px solid var(--color-dark);
  outline-offset:4px;
  border-radius:8px;
}

/* ======================================================
   6) FOOTER META
   - Handled inside .footer-brandmeta
   ====================================================== */

/* ======================================================
   7) RESPONSIVE
   ====================================================== */
@media (max-width:1024px){
  .footer-top{
    grid-template-columns:1fr 1fr;
    gap:30px;
  }
}

@media (max-width:600px){
  .site-footer{
    padding-top:40px;
  }

  .footer-top{
    grid-template-columns:1fr;
    gap:26px;
    padding-bottom:28px;
  }

  .footer-news-title{
    font-size:16px;
  }

  .footer-news-privacy{
    display:block;
    -webkit-line-clamp:unset;
    overflow:visible;
  }

  .footer-news-form .wpcf7-form{
    flex-direction:column;
    align-items:stretch;
  }

  .footer-news-form input[type="submit"]{
    width:100%;
    text-align:center;
  }
}

/* ======================================================
   8) CF7 HARD OVERRIDES (must win)
   ====================================================== */
.site-footer .wpcf7 input[type="email"]{
  background:rgba(0,0,0,.22) !important;
  color:var(--color-white) !important;
  border:1px solid rgba(0,0,0,.22) !important;
}

.site-footer .wpcf7 input[type="email"]::placeholder{
  color:rgba(255,255,255,.90) !important;
}

.site-footer .wpcf7 input.wpcf7-submit{
  background:var(--color-gold) !important;
  color:var(--color-dark) !important;
  border:none !important;
  font-weight:900 !important;
}

.site-footer .wpcf7 input.wpcf7-submit:hover,
.site-footer .wpcf7 input.wpcf7-submit:focus{
  outline:3px solid var(--color-dark) !important;
  outline-offset:3px !important;
}

/* Remove weird empty square (fieldset + list markers) */
.site-footer .footer-news-form fieldset,
.site-footer .footer-news-form .footer-news-form-inner{
  border:0 !important;
  margin:0 !important;
  padding:0 !important;
  min-inline-size:0 !important;
}

.site-footer .footer-news-form legend{
  border:0 !important;
  padding:0 !important;
  margin:0 0 12px !important;
  color:var(--color-dark) !important;
  background:transparent !important;
}

.site-footer .wpcf7 ul,
.site-footer .wpcf7 ol,
.site-footer .wpcf7 li{
  list-style:none !important;
  margin:0 !important;
  padding:0 !important;
}

/* =========================
   Newsletter (footer link only)
   ========================= */
.footer-mini-news{
  margin:0 0 10px;
  font-size:14px;
  line-height:1.35;
  max-width:320px;
}

.footer-news-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight:900;
  text-decoration:underline;
  text-underline-offset:3px;
}

.footer-news-link:hover,
.footer-news-link:focus{
  outline:3px solid var(--color-dark);
  outline-offset:3px;
}
