/*
Theme Name: The French Translator
Theme URI: https://example.com/
Author: Hugo
Description: Custom theme based on the provided homepage design (hero teal gradient, services cards, why-us section, CTA, anthracite footer) with Polylang language switcher.
Version: 1.0.2
Text Domain: the-french-translator
*/

:root{
  --bg: #ffffff;
  --text: #0f172a;          /* slate-900 */
  --muted: #475569;         /* slate-600 */
  --muted-2: #64748b;       /* slate-500 */
  --border: #e2e8f0;        /* slate-200 */
  --panel: #f8fafc;         /* slate-50 */

  --teal-600:#0d9488;
  --teal-700:#0f766e;
  --teal-100:#ccfbf1;
  --cyan-700:#0e7490;

  --footer:#0b1220;         /* deep anthracite */
  --footer-2:#0f172a;

  --radius: 16px;
  --shadow: 0 10px 30px rgba(2, 6, 23, 0.10);
}

*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: var(--panel);
  color: var(--text);
  line-height: 1.6;
}
img{max-width:100%;height:auto;}
a{color:inherit;}

.container{
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner{
  height: 80px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
}
.brand{
  display:flex;
  align-items:center;
  gap: 12px;
  text-decoration:none;
}
.brand img{width:48px;height:48px;}
.brand span{font-weight: 650; font-size: 20px; color: var(--text);}

.nav-wrap{display:flex;align-items:center;gap: 18px;}
.primary-nav{display:none;}
.primary-nav ul{list-style:none;margin:0;padding:0;display:flex;align-items:center;gap: 26px;}
.primary-nav a{text-decoration:none;color:#334155;transition:color .15s ease;}
.primary-nav a:hover{color: var(--teal-600);}
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a{color: var(--teal-600);}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 16px;
  border-radius: 12px;
  text-decoration:none;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
}
.btn:active{transform: translateY(1px);}
.btn-primary{background: var(--teal-600); color:white;}
.btn-primary:hover{background: var(--teal-700);}
.btn-light{background: white; color: var(--teal-600);}
.btn-light:hover{background: #f1f5f9;}
.btn-outline{background: transparent; border-color: rgba(255,255,255,.9); color: white;}
.btn-outline:hover{background: rgba(255,255,255,.10);}

.mobile-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: white;
}

/* Language switcher */
.lang{
  position: relative;
}
.lang-button{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: white;
  cursor:pointer;
}
.lang-flag{width:18px;height:12px;border-radius:2px;display:inline-block;overflow:hidden;}
.lang-flag img{width:100%;height:100%;object-fit:cover;display:block;}
.lang-code{font-weight:700;font-size:12px;letter-spacing:.04em;color:#334155;}
.lang-caret{opacity:.6;}
.lang-menu{
  position:absolute;
  right:0;
  top: calc(100% + 10px);
  min-width: 160px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 8px;
  display:none;
}
.lang.open .lang-menu{display:block;}
.lang-menu a{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 10px;
  text-decoration:none;
  color: #334155;
}
.lang-menu a:hover{background: rgba(13,148,136,.08); color:#0f172a;}
.lang-menu .is-active{background: rgba(13,148,136,.12);}

/* Mobile menu */
.mobile-nav{
  display:none;
  padding: 10px 0 18px;
}
.mobile-nav.open{display:block;}
.mobile-nav a{
  display:block;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration:none;
  color:#334155;
}
.mobile-nav a:hover{background: rgba(13,148,136,.08);}

/* Sections */
.section{padding: 80px 0; background: white;}
.section-muted{background: var(--panel);}

.hero{
  background: linear-gradient(135deg, var(--teal-600), var(--cyan-700));
  color: white;
}
.hero .hero-inner{
  padding: 96px 0;
  display:grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items:center;
}
.hero h1{font-size: clamp(36px, 4vw, 64px); line-height: 1.05; margin:0 0 18px; font-weight:800;}
.hero p{font-size: 20px; color: rgba(204,251,241,.95); margin:0 0 26px; max-width: 54ch;}
.hero-actions{display:flex;flex-wrap:wrap;gap: 14px;}
.hero-card{
  display:none;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.20);
  border-radius: 20px;
  padding: 32px;
}
.hero-icon{
  width: 180px;
  height: 180px;
  margin: 0 auto;
  opacity: .85;
}

.section-title{text-align:center;margin-bottom: 54px;}

/* ==========================================================
   Gutenberg Patterns (tft-* classes)
   ----------------------------------------------------------
   The homepage template uses the tft-* class naming.
   These styles ensure the Gutenberg patterns match the design.
   ========================================================== */

.tft-container{max-width:1120px;margin:0 auto;padding:0 16px;}

/* ==========================================================
   Header (tft-*)
   ========================================================== */

.tft-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.tft-header__inner{
  height: 80px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
}

.tft-brand__link{display:flex;align-items:center;gap:12px;text-decoration:none;}
.tft-brand__name{font-weight:650;font-size:20px;color:var(--text);}

/* Custom logo sizing */
.tft-brand__logo img,
.tft-brand__logo-img{
  width: 44px;
  height: 44px;
  object-fit: contain;
  display:block;
}

.tft-nav{display:flex;align-items:center;gap: 18px;}
.tft-menu{list-style:none;margin:0;padding:0;display:none;align-items:center;gap:26px;}
.tft-menu a{text-decoration:none;color:#334155;transition:color .15s ease;}
.tft-menu a:hover{color:var(--teal-600);}
.tft-menu .current-menu-item > a,
.tft-menu .current_page_item > a{color:var(--teal-600);}

/* Make the last menu item look like a CTA button (Contact) */
.tft-menu > li:last-child > a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--teal-600);
  color:#fff;
  font-weight:600;
}
.tft-menu > li:last-child > a:hover{background:var(--teal-700);color:#fff;}

.tft-header__actions{display:flex;align-items:center;gap:12px;}

.tft-nav-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  border-radius:10px;
  border:1px solid var(--border);
  background:#fff;
}
.tft-nav-toggle__bars{width:18px;height:12px;position:relative;display:block;}
.tft-nav-toggle__bars::before,
.tft-nav-toggle__bars::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  height:2px;
  background:#0f172a;
  border-radius:2px;
}
.tft-nav-toggle__bars::before{top:0;}
.tft-nav-toggle__bars::after{bottom:0;}

/* Desktop */
@media (min-width: 960px){
  .tft-menu{display:flex;}
  .tft-nav-toggle{display:none;}
}

/* Mobile nav open */
@media (max-width: 959px){
  .tft-nav{position:relative;}
  #primary-nav.is-open .tft-menu{
    display:grid;
    position:absolute;
    right:0;
    top: calc(100% + 12px);
    background:#fff;
    border:1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 10px;
    gap: 6px;
    min-width: 220px;
  }
  #primary-nav.is-open .tft-menu a{
    padding: 10px 12px;
    border-radius: 12px;
    display:block;
  }
  #primary-nav.is-open .tft-menu > li:last-child > a{display:flex;justify-content:center;}
}

/* ==========================================================
   Language dropdown (tft-*)
   ========================================================== */

.tft-lang{position:relative;}
.tft-lang__button{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background:#fff;
  cursor:pointer;
}
.tft-lang__flag{display:inline-flex;align-items:center;}
.tft-lang__flag img{width:18px;height:12px;border-radius:2px;display:block;object-fit:cover;}
.tft-lang__label{font-weight:700;font-size:12px;letter-spacing:.04em;color:#334155;}
.tft-lang__caret{opacity:.6;}
.tft-lang__menu{
  position:absolute;
  right:0;
  top: calc(100% + 10px);
  min-width: 160px;
  background:#fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 8px;
}
.tft-lang__item{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 10px;
  border-radius: 10px;
  text-decoration:none;
  color:#334155;
}
.tft-lang__item:hover{background: rgba(13,148,136,.08); color:#0f172a;}
.tft-lang__item.is-current{background: rgba(13,148,136,.12);}

.tft-btn .wp-block-button__link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 16px;
  border-radius: 12px;
  text-decoration:none;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
}
.tft-btn .wp-block-button__link:active{transform: translateY(1px);}
.tft-btn--light .wp-block-button__link{background:#fff;color:var(--teal-600);}
.tft-btn--light .wp-block-button__link:hover{background:#f1f5f9;}
.tft-btn--outline .wp-block-button__link{background:transparent;border-color:rgba(255,255,255,.9);color:#fff;}
.tft-btn--outline .wp-block-button__link:hover{background:rgba(255,255,255,.10);}

/* Simple utility */
.tft-teal{ color: var(--teal-600); }

.tft-hero{background: linear-gradient(135deg, var(--teal-600), var(--cyan-700)); color:#fff;}
.tft-hero__inner{padding: 96px 0;}
.tft-hero__title{font-size: clamp(36px, 4vw, 64px); line-height:1.05; margin:0 0 18px; font-weight:800;}
.tft-hero__sub{font-size: 20px; color: rgba(204,251,241,.95); margin:0 0 26px; max-width:54ch;}
.tft-hero__actions{gap:14px;}


/* Home hero: earth background on the right column (non-service heroes) */
.tft-hero:not(.tft-hero--service) .tft-hero__visual{
  display:flex;
  justify-content:flex-end;
  width:100%;
  min-height:340px;
  background: url('assets/img/hero-earth-stylized.svg') 60% 60% / 175% no-repeat;
  animation: tftEarthDrift 70s ease-in-out infinite alternate;
}
.tft-hero:not(.tft-hero--service) .tft-hero__visual-box{display:none;}
@keyframes tftEarthDrift{0%{background-position: 58% 62%;}100%{background-position: 62% 60%;}}
@media (prefers-reduced-motion: reduce){
  .tft-hero:not(.tft-hero--service) .tft-hero__visual{animation:none;}
}

.tft-hero__visual-box{
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.20);
  border-radius: 20px;
  padding: 32px;
  max-width: 520px;
  width: 100%;
  display:flex;
  justify-content:center;
  align-items:center;
  position: relative;
  overflow: hidden;
}
.tft-hero__visual-box::before{
  content:"";
  position:absolute;
  inset: -8% -8% -8% -8%;
  background: url('assets/img/world-network.svg') center / contain no-repeat;
  opacity: .14;
  pointer-events:none;
}
.tft-hero__globe{width:180px;height:180px;opacity:.9;position:relative;z-index:1;}

/* Service hero variant (used on service pages) */
.tft-hero--service .tft-hero__visual{display:flex;justify-content:flex-end;}

.tft-hero--service .tft-hero__inner{padding: 72px 0;}
.tft-hero--service .tft-hero__title{font-size: clamp(32px, 3.6vw, 54px);}
.tft-hero--service .tft-hero__sub{font-size: 18px; max-width: 64ch;}
.tft-hero--service .tft-hero__visual-box{max-width: 480px; padding: 28px; border-radius: 24px;}
.tft-hero--service .tft-hero__sub{font-size: 18px; margin-bottom: 0;}
.tft-hero--service .tft-hero__visual-box{max-width: 460px; padding: 28px;}
.tft-hero--service .tft-hero__globe{width: 150px;}

.tft-section{padding: 80px 0; background:#fff;}
.tft-section--muted{background: var(--panel);}
.tft-section__head{text-align:center;margin-bottom:54px;}
.tft-h2{font-size: 34px; margin:0 0 10px; font-weight:800;}
.tft-lead{margin:0 auto;max-width:70ch;color:var(--muted);}

.tft-grid3{gap: 24px;}
.tft-card{
  background: #fff;
  border: 1px solid #e3ebf0;
  border-radius: 18px;
  padding: 32px 28px;
  box-shadow:
    0 8px 24px rgba(15, 23, 42, 0.04),
    0 2px 6px rgba(15, 23, 42, 0.04);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.tft-card:hover{
  transform: translateY(-4px);
  border-color: rgba(13,148,136,.35);
  box-shadow:
    0 14px 36px rgba(15, 23, 42, 0.08),
    0 4px 10px rgba(15, 23, 42, 0.06);
}
.tft-card__icon{
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(13,148,136,.12);
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom: 20px;
  color: var(--teal-600);
}
.tft-card__icon svg{width:26px;height:26px;}
.tft-h3{margin:0 0 8px; font-size: 18px; font-weight:800;}
.tft-card p{margin:0 0 14px;color:var(--muted);}
.tft-link{color: var(--teal-600); text-decoration:none; font-weight:600;}
.tft-link:hover{text-decoration:underline;}

.tft-why{gap:48px;align-items:center;}
.tft-checklist{list-style:none;padding:0;margin: 18px 0 0;}
.tft-checklist li{position:relative;padding-left: 28px;margin: 10px 0;color:#0f172a;}
.tft-checklist li::before{content:""; position:absolute; left:0; top: 6px; width:18px; height:18px; border-radius:999px; background: rgba(13,148,136,.15); border: 2px solid var(--teal-600);} 
.tft-checklist li::after{content:"✓"; position:absolute; left:4px; top: 2px; color: var(--teal-600); font-weight:800; font-size:12px;}

.tft-why__card{
  background: rgba(13,148,136,.08);
  border: 1px solid rgba(13,148,136,.18);
  border-radius: 20px;
  padding: 40px;
  text-align:center;
}
.tft-why__emoji{font-size: 40px; margin-bottom: 10px;}
.tft-why__text{font-weight:800;font-size: 20px; color:#0f172a;}

.tft-cta{background: var(--teal-600); color:#fff;}
.tft-cta__inner{padding: 72px 0; text-align:center;}
.tft-cta__sub{color: rgba(204,251,241,.95); max-width: 70ch; margin: 0 auto 18px;}

/* Footer (tft-*) */
.tft-footer{background: var(--footer-2); color: rgba(255,255,255,.85);}
.tft-footer a{color: rgba(226,232,240,.78); text-decoration:none;}
.tft-footer a:hover{color:#fff;}
.tft-footer h3{margin:0 0 10px; color:#fff; font-size: 14px; letter-spacing: .02em;}

.tft-footer__grid{
  padding: 54px 0;
  display:grid;
  grid-template-columns: 1fr;
  gap: 28px;
  border-bottom: 1px solid rgba(148,163,184,.15);
}

.tft-footer__brand{display:flex; gap: 12px; align-items:center;}
.tft-footer__logo img,
.tft-footer__logo-img{width:36px; height:36px;}
.tft-footer__name{font-weight:700; color:#fff; font-size: 16px;}
.tft-footer__desc{margin: 10px 0 0; color: rgba(226,232,240,.75); font-size: 14px; max-width: 42ch;}

.tft-footer__links{list-style:none; margin:0; padding:0; display:grid; gap: 8px;}
.tft-footer__links a{font-size: 14px;}

.tft-footer__social{display:flex;gap:14px;align-items:center;margin-top:14px}
.tft-footer__social a{display:inline-flex;align-items:center;justify-content:center;color:rgba(255,255,255,.88);text-decoration:none;background:transparent;border:none;padding:0;margin:0;line-height:1}
.tft-footer__social a:hover{color:#fff;transform:translateY(-1px)}
.tft-footer__social svg{width:20px;height:20px;display:block}
.tft-footer__social a{transition:transform .18s ease,color .18s ease}


.tft-footer__langlist{list-style:none; margin:0; padding:0; display:grid; gap: 8px;}
.tft-footer__langlist a{font-size: 14px; display:inline-flex; align-items:center; gap: 8px;}
.tft-footer__langlist .is-active a{color:#fff; font-weight:700;}

.tft-footer__bottom{padding: 18px 0; text-align:center; color: rgba(226,232,240,.60); font-size: 13px;}

@media (min-width: 960px){
  .tft-hero__visual{justify-content:flex-end;}
  .tft-footer__grid{grid-template-columns: 1.2fr 1fr 1fr 1fr 1fr;}
}
.section-title h2{margin:0 0 10px;font-size: clamp(28px, 2.6vw, 40px);}
.section-title p{margin:0 auto;color: var(--muted);font-size: 20px;max-width: 64ch;}

.cards{
  display:grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
.card{
  border: 2px solid var(--border);
  background: white;
  border-radius: 16px;
  padding: 24px;
  transition: border-color .15s ease, transform .12s ease;
}
.card:hover{border-color: rgba(13,148,136,.55); transform: translateY(-2px);}
.card h3{margin: 14px 0 10px; font-size: 20px;}
.card p{margin:0 0 12px;color: var(--muted);}
.card a{color: var(--teal-600); text-decoration:none; font-weight:600;}
.card a:hover{color: var(--teal-700);}
.icon{width:48px;height:48px;color: var(--teal-600);}

.why-grid{display:grid;grid-template-columns: 1fr; gap: 42px; align-items:center;}
.why h2{margin:0 0 14px;font-size: clamp(28px,2.6vw,40px);}
.why p{margin:0 0 22px;color: var(--muted); font-size: 18px;}
.checklist{list-style:none;margin:0;padding:0;display:grid;gap: 14px;}
.checklist li{display:flex;gap: 12px; align-items:flex-start;}
.check{width:24px;height:24px;color: var(--teal-600); margin-top: 2px;}

.why-box{
  background: linear-gradient(135deg, #d9fef8, #d7f4ff);
  border-radius: 20px;
  padding: 32px;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height: 240px;
}
.why-box .emoji{font-size: 56px; margin-bottom: 10px;}
.why-box .line{font-size: 28px; color:#334155; font-weight: 500; text-align:center; line-height: 1.1;}

.cta{
  background: var(--teal-600);
  color: white;
  text-align:center;
}
.cta p{color: rgba(204,251,241,.95); font-size: 20px; margin: 0 0 26px;}
.cta h2{margin:0 0 16px; font-size: clamp(28px,2.6vw,40px);}

/* Footer */
.site-footer{
  background: var(--footer-2);
  color: rgba(255,255,255,.85);
}
.footer-top{padding: 54px 0; border-bottom: 1px solid rgba(148,163,184,.15);}
.footer-grid{display:grid;grid-template-columns: 1fr; gap: 28px;}
.footer-brand{display:flex;gap: 12px; align-items:flex-start;}
.footer-brand img{width:36px;height:36px;}
.footer-brand h3{margin:0;color:white;font-size: 16px;}
.footer-brand p{margin:8px 0 0;color: rgba(226,232,240,.75); font-size: 14px; max-width: 40ch;}

.footer-col h4{margin:0 0 10px; color:white; font-size: 14px; letter-spacing: .02em;}
.footer-col ul{list-style:none;margin:0;padding:0;display:grid;gap: 8px;}
.footer-col a{text-decoration:none;color: rgba(226,232,240,.78); font-size: 14px;}
.footer-col a:hover{color:white;}

.footer-bottom{padding: 18px 0; text-align:center; color: rgba(226,232,240,.60); font-size: 13px;}

/* Content (default pages/posts) */
.content-wrap{background:white;padding: 48px 0;}
.prose{max-width: 780px; margin: 0 auto; padding: 0 16px;}
.prose h1{font-size: 40px; line-height: 1.15; margin-top:0;}
.prose h2{margin-top: 36px;}
.prose p{color:#334155;}

/* Responsive */
@media (min-width: 768px){
  .primary-nav{display:block;}
  .mobile-toggle{display:none;}
  .hero .hero-inner{grid-template-columns: 1.05fr .95fr;}
  .hero-card{display:block;}
  .cards{grid-template-columns: repeat(3, 1fr);} 
  .why-grid{grid-template-columns: 1fr 1fr;}
  .footer-grid{grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;}
  .tft-footer__grid{grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;}
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce){
  *{scroll-behavior:auto;transition:none !important;}
}



/* Intro (col 1) */
.tft-pm__intro{
  background: #ffffff;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
}

.tft-pm__title{
  margin: 0 0 10px;
  line-height: 1.05;
  font-weight: 800;
}

.tft-pm__title-a{ color: #0b1b2a; }     /* dark navy */
.tft-pm__title-b{ color: #0f9d9a; }     /* teal */

.tft-pm__subtitle{
  margin: 0 0 16px;
  color: rgba(11,27,42,.75);
  font-weight: 500;
}

.tft-pm__map img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  opacity: .95;
}

.tft-pm__note{
  margin: 16px 0 0;
  color: rgba(11,27,42,.75);
}
.tft-pm__note strong{
  font-size: 28px;
  color: #0f9d9a;
}

/* Cards (cols 2-4) */
.tft-pm__card{
  background: #0b1b2a; /* dark */
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 16px 40px rgba(0,0,0,.14);
  position: relative;
  overflow: hidden;
}

/* teal glow */
.tft-pm__card::before{
  content:"";
  position:absolute;
  inset:-80px -80px auto auto;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle at center, rgba(15,157,154,.35), rgba(15,157,154,0) 70%);
  transform: translate(20px,-20px);
  pointer-events:none;
}

.tft-pm__icon img{
  display:block;
  filter: drop-shadow(0 6px 18px rgba(15,157,154,.25));
}

.tft-pm__card-title{
  margin: 14px 0 10px;
  color: #ffffff;
  font-weight: 800;
}

.tft-pm__card-text{
  margin: 0;
  color: rgba(255,255,255,.78);
  font-weight: 500;
  line-height: 1.55;
}

@media (max-width: 900px){
  .tft-pm__cols{ gap: 16px; }
  .tft-pm{ padding: 40px 0; }
}



/* Make columns proportions closer to the mockup */
@media (min-width: 1000px){
  .tft-pm__cols{
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr 1fr;
  }
  .tft-pm__cols > .wp-block-column{
    width: auto !important;
    flex-basis: auto !important;
  }
}

/* Intro (col 1) */
.tft-pm__intro{
  background: #ffffff;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
}

.tft-pm__title{
  margin: 0 0 10px;
  line-height: 1.05;
  font-weight: 800;
}

.tft-pm__title-a{ color: #0b1b2a; }
.tft-pm__title-b{ color: #0f9d9a; }

.tft-pm__subtitle{
  margin: 0 0 16px;
  color: rgba(11,27,42,.75);
  font-weight: 500;
}

.tft-pm__map img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  opacity: .95;
}

.tft-pm__note{
  margin: 16px 0 0;
  color: rgba(11,27,42,.75);
}
.tft-pm__note strong{
  font-size: 28px;
  color: #0f9d9a;
}

/* Cards (cols 2-4) */
.tft-pm__card{
  background: #0d2232; /* lighter than previous */
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 16px 40px rgba(0,0,0,.14);
  position: relative;
  overflow: hidden;
}

/* teal glow */
.tft-pm__card::before{
  content:"";
  position:absolute;
  inset:-90px -90px auto auto;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle at center, rgba(15,157,154,.28), rgba(15,157,154,0) 70%);
  transform: translate(26px,-26px);
  pointer-events:none;
}

.tft-pm__icon{
  margin-bottom: 4px;
}
.tft-pm__icon img{
  display:block;
  filter: drop-shadow(0 8px 20px rgba(15,157,154,.22));
}

.tft-pm__card-title{
  margin: 14px 0 10px;
  color: #ffffff;
  font-weight: 800;
}

.tft-pm__card-text{
  margin: 0 0 18px;
  color: rgba(255,255,255,.78);
  font-weight: 500;
  line-height: 1.55;
}

.tft-pm__link{
  margin: 0;
  font-weight: 700;
}
.tft-pm__link a{
  color: #0f9d9a;
  text-decoration: none;
}
.tft-pm__link a:hover{
  text-decoration: underline;
}

@media (max-width: 999px){
  .tft-pm__cols{ gap: 16px; }
  .tft-pm{ padding: 40px 0; }
}


/* ========== TFT Projects & Missions (Pattern) ========== */
.tft-pm{
  padding: 64px 0;
}

.tft-pm > .wp-block-group__inner-container{
  max-width: 1240px;
}

/* Default (editor + small widths): keep Gutenberg columns behaviour */
.tft-pm__cols{
  gap: 24px;
  align-items: stretch;
}

/* Front-end only: force 4 equal columns like the mockup */
body:not(.block-editor-page) .tft-pm__cols{
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* left column same width as cards */
  gap: 24px;
}
body:not(.block-editor-page) .tft-pm__cols > .wp-block-column{
  width: auto !important;
  flex-basis: auto !important;
}

/* Intro (col 1) */
.tft-pm__intro{
  background: #ffffff;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
}

.tft-pm__title{
  margin: 0 0 10px;
  line-height: 1.05;
  font-weight: 800;
}

.tft-pm__title-a{ color: #0b1b2a; }
.tft-pm__title-b{ color: #0f9d9a; }

.tft-pm__subtitle{
  margin: 0 0 16px;
  color: rgba(11,27,42,.75);
  font-weight: 500;
}

.tft-pm__map img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  opacity: .95;
}

.tft-pm__note{
  margin: 16px 0 0;
  color: rgba(11,27,42,.75);
}
.tft-pm__note strong{
  font-size: 28px;
  color: #0f9d9a;
}

/* Cards (cols 2-4) */
.tft-pm__card{
  background: #0d2232; /* lighter than previous */
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 16px 40px rgba(0,0,0,.14);
  position: relative;
  overflow: hidden;
}

/* teal glow */
.tft-pm__card::before{
  content:"";
  position:absolute;
  inset:-90px -90px auto auto;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle at center, rgba(15,157,154,.28), rgba(15,157,154,0) 70%);
  transform: translate(26px,-26px);
  pointer-events:none;
}

.tft-pm__icon{
  margin-bottom: 4px;
}
.tft-pm__icon img{
  display:block;
  filter: drop-shadow(0 8px 20px rgba(15,157,154,.22));
}

.tft-pm__card-title{
  margin: 14px 0 10px;
  color: #ffffff;
  font-weight: 800;
}

.tft-pm__card-text{
  margin: 0 0 18px;
  color: rgba(255,255,255,.78);
  font-weight: 500;
  line-height: 1.55;
}

.tft-pm__link{
  margin: 0;
  font-weight: 700;
}
.tft-pm__link a{
  color: #0f9d9a;
  text-decoration: none;
}
.tft-pm__link a:hover{
  text-decoration: underline;
}

/* Front-end responsive: stack */
@media (max-width: 999px){
  body:not(.block-editor-page) .tft-pm__cols{
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .tft-pm{ padding: 40px 0; }
}


/* Center Projects & Missions (TFT) block */
.tft-pm > .wp-block-group__inner-container{
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}



/* Use a Cover block so the user can set a background image + opacity (Dim ratio) */
.tft-mission-statement.wp-block-cover{
  width: 100%;
  min-height: 0;
  margin-top: 56px;
  margin-bottom: 56px;
  border-radius: 999px 0 0 999px; /* round only on the left */
  overflow: hidden;
  box-shadow: 0 18px 60px rgba(0,0,0,.14);
}

/* Slimmer default */
.tft-mission-statement.wp-block-cover .wp-block-cover__inner-container{
  padding: 34px 28px;
}

/* Gradient overlay (between background image and text) + ultra-slow animation */
.tft-mission-statement.wp-block-cover .wp-block-cover__background{
  background-image: linear-gradient(135deg, #0FA3A0 0%, #0C7F7A 45%, #0B2233 100%) !important;
  background-size: 220% 220%;
  animation: tftGradientShift 55s ease-in-out infinite;
}

/* Optional subtle texture over the gradient */
.tft-mission-statement.wp-block-cover::before{
  content:"";
  position:absolute;
  inset:0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
  opacity: .07;
  mix-blend-mode: overlay;
  pointer-events:none;
  z-index: 1;
}

/* Ensure text sits above */
.tft-mission-statement.wp-block-cover .wp-block-cover__inner-container,
.tft-mission-statement.wp-block-cover .tft-mission-inner{
  position: relative;
  z-index: 2;
}

.tft-mission-inner{
  text-align: center;
  color: #ffffff;
}

.tft-mission-eyebrow{
  margin: 0 0 10px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
}

.tft-mission-text{
  margin: 0 auto;
  max-width: 980px;
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.55;
}

/* Motion accessibility */
@media (prefers-reduced-motion: reduce){
  .tft-mission-statement.wp-block-cover .wp-block-cover__background{
    animation: none;
  }
}

/* Responsive */
@media (max-width: 900px){
  .tft-mission-statement.wp-block-cover{
    border-radius: 28px 0 0 28px;
    margin-top: 36px;
    margin-bottom: 36px;
  }
  .tft-mission-statement.wp-block-cover .wp-block-cover__inner-container{
    padding: 26px 18px;
  }
  .tft-mission-text{
    font-size: 1.15rem;
  }
}

@keyframes tftGradientShift{
  0%{ background-position: 0% 40%; }
  50%{ background-position: 100% 60%; }
  100%{ background-position: 0% 40%; }
}



/* Full-width container so the right side can reach the viewport edge */
.tft-mission-shell{
  margin-top: 56px;
  margin-bottom: 56px;
}

/* Banner itself */
.tft-mission-banner{
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 999px 0 0 999px; /* round only on the left */
  background-image: linear-gradient(135deg, #0FA3A0 0%, #0C7F7A 45%, #0B2233 100%);
  background-size: 220% 220%;
  animation: tftGradientShift 65s ease-in-out infinite;
  box-shadow: 0 18px 60px rgba(0,0,0,.14);
}

/* Slimmer default height */
.tft-mission-banner .tft-mission-inner{
  padding: 30px 28px;
  text-align: center;
  color: #ffffff;
}

/* Optional background image layer (replace the image in editor). */
.tft-mission-bgimg{
  position: absolute;
  inset: 0;
  margin: 0;
  pointer-events: none;
  z-index: 0;
}
.tft-mission-bgimg img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  filter: saturate(0.95) contrast(1.05);
}

/* Opacity utilities for the bg image (change class on the image block): */
.tft-opacity-05 img{ opacity: .05; }
.tft-opacity-10 img{ opacity: .10; }
.tft-opacity-15 img{ opacity: .15; }
.tft-opacity-20 img{ opacity: .20; }
.tft-opacity-30 img{ opacity: .30; }

/* Subtle grain texture on top */
.tft-mission-banner::before{
  content:"";
  position:absolute;
  inset:0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
  opacity: .07;
  mix-blend-mode: overlay;
  pointer-events:none;
  z-index: 1;
}

/* Ensure text sits above background layers */
.tft-mission-banner .tft-mission-inner{
  position: relative;
  z-index: 2;
}

.tft-mission-eyebrow{
  margin: 0 0 10px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
}

.tft-mission-text{
  margin: 0 auto;
  max-width: 980px;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.55;
}

/* Motion accessibility */
@media (prefers-reduced-motion: reduce){
  .tft-mission-banner{ animation: none; }
}

/* Responsive */
@media (max-width: 900px){
  .tft-mission-shell{ margin-top: 36px; margin-bottom: 36px; }
  .tft-mission-banner{ border-radius: 28px 0 0 28px; }
  .tft-mission-banner .tft-mission-inner{ padding: 24px 18px; text-align:left; }
  .tft-mission-text{ font-size: 1.12rem; }
}

@keyframes tftGradientShift{
  0%{ background-position: 0% 40%; }
  50%{ background-position: 100% 60%; }
  100%{ background-position: 0% 40%; }
}


/* ========== TFT Mission Statement (Pattern) ========== */
/* Constrained like other sections (aligned with header/logo) */
.tft-mission-shell{
  margin-top: 56px;
  margin-bottom: 56px;
}

.tft-mission-banner{
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 999px 0 0 999px; /* round only on the left */
  background-image: linear-gradient(135deg, #0FA3A0 0%, #0C7F7A 45%, #0B2233 100%);
  background-size: 220% 220%;
  animation: tftGradientShift 65s ease-in-out infinite;
  box-shadow: 0 18px 60px rgba(0,0,0,.14);
}

/* Slimmer default height */
.tft-mission-banner .tft-mission-inner{
  padding: 30px 28px;
  text-align: center;
  color: #ffffff;
}

/* Background image layer: stays behind text (user replaces the image in editor) */
.tft-mission-banner > figure.tft-mission-bgimg{
  position: absolute !important;
  inset: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  pointer-events: none;
  z-index: 0;
}

.tft-mission-banner > figure.tft-mission-bgimg img{
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block;
  transform: scale(1.02);
  filter: saturate(0.95) contrast(1.05);
}

/* Opacity utilities for the bg image (change class on the image block) */
.tft-opacity-05 img{ opacity: .05; }
.tft-opacity-10 img{ opacity: .10; }
.tft-opacity-15 img{ opacity: .15; }
.tft-opacity-20 img{ opacity: .20; }
.tft-opacity-30 img{ opacity: .30; }

/* Subtle grain texture on top (still under text) */
.tft-mission-banner::before{
  content:"";
  position:absolute;
  inset:0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
  opacity: .07;
  mix-blend-mode: overlay;
  pointer-events:none;
  z-index: 1;
}

/* Ensure text sits above background layers */
.tft-mission-banner .tft-mission-inner{
  position: relative;
  z-index: 2;
}

.tft-mission-eyebrow{
  margin: 0 0 10px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.9;
}

/* Not bold (user request) */
.tft-mission-text{
  margin: 0 auto;
  max-width: 980px;
  font-size: 1.30rem;
  font-weight: 400;
  line-height: 1.55;
}

/* Motion accessibility */
@media (prefers-reduced-motion: reduce){
  .tft-mission-banner{ animation: none; }
}

/* Responsive */
@media (max-width: 900px){
  .tft-mission-shell{ margin-top: 36px; margin-bottom: 36px; }
  .tft-mission-banner{ border-radius: 28px 0 0 28px; }
  .tft-mission-banner .tft-mission-inner{ padding: 24px 18px; text-align:left; }
  .tft-mission-text{ font-size: 1.08rem; }
}

@keyframes tftGradientShift{
  0%{ background-position: 0% 40%; }
  50%{ background-position: 100% 60%; }
  100%{ background-position: 0% 40%; }
}


/* ========== TFT Mission Statement – Alignment Override (v4.1) ========== */
.tft-mission-shell{
  max-width: var(--wp--style--global--content-size);
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.tft-mission-banner{
  margin-left: 0 !important;
}



/* Steps list */
.tft-steps{
  display: grid;
  gap: 18px;
}

.tft-step{
  align-items: flex-start;
  gap: 14px;
  padding: 10px 8px;
  border-radius: 14px;
  transition: transform .18s ease, background-color .18s ease;
}

.tft-step:hover{
  transform: translateY(-1px);
  background: rgba(15,163,160,.06);
}

.tft-step__icon{
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.22), rgba(255,255,255,0) 55%),
              linear-gradient(135deg, #0FA3A0 0%, #0B2233 160%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 46px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 10px 22px rgba(11,34,51,.18);
  overflow: hidden;
}

.tft-step__icon img{
  width: 22px !important;
  height: 22px !important;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: .95;
}

.tft-step__title{
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0b2233;
}

.tft-step__text{
  margin: 0;
  color: #475569;
  font-size: .96rem;
  line-height: 1.55;
}

/* Feature Steps: teal "Learn more" button */
.tft-feature-steps .wp-block-button.is-style-tft-primary .wp-block-button__link{
  background: #0f9d9a;
  color: #fff;
  border-radius: 999px;
  padding: 14px 24px;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 14px 30px rgba(11,34,51,.12);
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}

.tft-feature-steps .wp-block-button.is-style-tft-primary .wp-block-button__link:hover{
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 18px 38px rgba(11,34,51,.16);
}

@media (max-width: 900px){
  .tft-feature-steps{ padding: 44px 0; }
  .tft-feature-steps__cols{ gap: 24px; }
  .tft-feature-steps__text{ max-width: none; }
}


/* ========== TFT Feature Steps (Pattern) ========== */
.tft-feature-steps{
  padding: 64px 0;
}

.tft-feature-steps__cols{
  gap: 20px;
}

/* Teal CTA for the Feature Steps pattern */
.tft-feature-steps .wp-block-button.is-style-tft-primary .wp-block-button__link{
  background: #0f9d9a;
  color: #ffffff;
  border-radius: 999px;
  padding: 14px 22px;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 10px 22px rgba(0,0,0,.18);
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}
.tft-feature-steps .wp-block-button.is-style-tft-primary .wp-block-button__link:hover{
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 14px 28px rgba(0,0,0,.22);
}

.tft-feature-steps__title{
  margin: 0 0 14px;
  font-size: clamp(1.7rem, 2.2vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #0b2233;
}

.tft-feature-steps__text{
  margin: 0 0 24px;
  max-width: 42ch;
  color: #334155;
  font-size: 1rem;
  line-height: 1.65;
}

.tft-steps{
  display: grid;
  gap: 18px;
}

.tft-step{
  align-items: flex-start;
  gap: 14px;
  padding: 10px 8px;
  border-radius: 14px;
  transition: transform .18s ease, background-color .18s ease;
}

.tft-step:hover{
  transform: translateY(-1px);
  background: rgba(15,163,160,.06);
}

figure.tft-step__icon{
  width: 46px !important;
  height: 46px !important;
  min-width: 46px !important;
  min-height: 46px !important;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.22), rgba(255,255,255,0) 55%),
              linear-gradient(135deg, #0FA3A0 0%, #0B2233 160%);
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex: 0 0 46px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 10px 22px rgba(11,34,51,.18);
  overflow: hidden;
  margin: 0 !important;
}

figure.tft-step__icon img{
  width: 22px !important;
  height: 22px !important;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
  opacity: .95;
}

figure.tft-step__icon.tft-icon-colored img{
  filter: none;
  opacity: 1;
}

.tft-step__title{
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0b2233;
}

.tft-step__text{
  margin: 0;
  color: #475569;
  font-size: .96rem;
  line-height: 1.55;
}

@media (max-width: 900px){
  .tft-feature-steps{ padding: 44px 0; }
  .tft-feature-steps__cols{ gap: 24px; }
  .tft-feature-steps__text{ max-width: none; }
}


/* Constrain Feature Steps to standard page width (front + editor) */
.wp-block-group.tft-feature-steps{
  max-width: var(--wp--style--global--content-size, 1120px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: var(--wp--style--global--padding-left, 24px);
  padding-right: var(--wp--style--global--padding-right, 24px);
  width: 100%;
  box-sizing: border-box;
}


/* ========== TFT Latest News Carousel (Pattern) ========== */
.tft-news-carousel{
  position: relative;
  padding: 32px 0 0;
  overflow: visible;
  /* Deterministic layout to avoid "half-card" issues */
  --tft-news-gap: 22px;
  --tft-news-visible: 3;
}

/* Optional: force 4 cards when explicitly requested */
.tft-news-carousel[data-visible="4"]{ --tft-news-visible: 4; }

@media (max-width: 1024px){
  .tft-news-carousel{ --tft-news-visible: 2; }
}

@media (max-width: 640px){
  .tft-news-carousel{ --tft-news-visible: 1; }
}

/* inner constrained width = same as header/content */
.tft-news-carousel .tft-news-carousel__inner{
  max-width: var(--wp--style--global--content-size, 1120px);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--wp--style--global--content-padding, 24px);
  padding-right: var(--wp--style--global--content-padding, 24px);
}

.tft-news-carousel__head{
  /* More breathing room between the title and the overhanging cards */
  margin: 0 0 86px;
}

.tft-news-carousel__title{
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #0b2233;
  font-size: clamp(1.6rem, 2.3vw, 2.25rem);
}
.tft-news-carousel__title span{ color: #0FA3A0; }

.tft-news-carousel__nav{
  display: inline-flex;
  gap: 10px;
  align-items: center;
}

.tft-news-carousel__btn{
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(15,163,160,.35);
  background: rgba(15,163,160,.10);
  color: #0FA3A0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(11,34,51,.10);
  transition: transform .18s ease, filter .18s ease, background-color .18s ease;
}
.tft-news-carousel__btn:hover{ transform: translateY(-1px); background: rgba(15,163,160,.14); }
.tft-news-carousel__btn:disabled{ opacity: .45; cursor: default; transform: none; }

/* Full width background bar */
.tft-news-carousel__bg{
  position: relative;
  /* push the color band down so cards can sit above it */
  margin-top: 0;
  /* top padding is the visible "gap" between title zone and the color band */
  padding: 140px 0 44px;
  /* IMPORTANT: allow vertical overhang (avoid clipping in some browsers) */
  overflow: visible;
  background: linear-gradient(135deg, #0FA3A0 0%, #0b3342 45%, #0b2233 105%);
}

/* Pull the cards/CTA up so they overhang ABOVE the colored background */
.tft-news-carousel__inner--cards{
  position: relative;
  /* make the cards clearly overhang above the color band */
  /* less lift so the heading stays comfortably above */
  margin-top: -190px !important;
}

/* CTA alignment (pattern uses __ctaWrap / __cta) */
.tft-news-carousel__ctaWrap{
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--tft-news-gap);
  align-items: start;
  margin-top: 22px;
}
.tft-news-carousel__cta{
  grid-column: 3;
  justify-self: stretch;
}
.tft-news-carousel__cta .wp-block-button,
.tft-news-carousel__cta .wp-block-button__link{
  width: 100%;
}

/* subtle texture */
.tft-news-carousel__bg:before{
  content:"";
  position:absolute;
  inset: 0;
  pointer-events:none;
  opacity: .22;
  background:
    radial-gradient(circle at 18% 30%, rgba(255,255,255,.55), rgba(255,255,255,0) 40%),
    radial-gradient(circle at 70% 65%, rgba(255,255,255,.35), rgba(255,255,255,0) 45%),
    radial-gradient(circle at 92% 20%, rgba(255,255,255,.28), rgba(255,255,255,0) 42%);
  mix-blend-mode: overlay;
}

/* stage content above bg texture */
.tft-news-carousel__query,
.tft-news-carousel__footer{ position: relative; z-index: 1; }

/* Stage content above bg texture */
.tft-news-carousel__bg .tft-news-carousel__inner{ position: relative; z-index: 1; }

/* Track: single row, overflow hidden */
.tft-news-carousel__track{
  display: flex !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  gap: var(--tft-news-gap);
  flex-wrap: nowrap !important;
  overflow: visible;
  will-change: transform;
  transition: transform .35s ease;
}
.tft-news-carousel__query{
  /* No overflow clipping here: overhang should be visible in all browsers */
  overflow: visible;
}

/* Card sizing: fit exactly N cards per view based on --tft-news-visible */
.tft-news-card{
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  /* stronger separation from the teal/dark gradient */
  box-shadow: 0 24px 75px rgba(11,34,51,.28);
  flex: 0 0 calc(
    (100% - (var(--tft-news-visible) - 1) * var(--tft-news-gap)) / var(--tft-news-visible)
  );
  /* overhang is handled at the container level to avoid clipping */
  margin-top: 0;
}

.tft-news-card__img{
  height: 160px;
  overflow: hidden;
}

/* Ensure the featured image fills the whole card width (no blank strip) */
.tft-news-card__img figure,
.tft-news-card__img .wp-block-post-featured-image,
.tft-news-card__img a{
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
}

.tft-news-card__img img{
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
  max-width: none !important;
}
.tft-news-card__img,
.tft-news-card__img figure{
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
}

/* Gutenberg's “constrained” layout can add max-width to inner blocks.
   Force children to be allowed to stretch full width inside the card. */
.tft-news-card.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){
  max-width: none !important;
  width: 100% !important;
}

.tft-news-card .wp-block-post-featured-image,
.tft-news-card .wp-block-post-featured-image figure{
  width: 100% !important;
  margin: 0 !important;
}

.tft-news-card__body{
  padding: 16px 16px 18px;
  position: relative;
  /* make room for the "Lire la suite" link pinned at the bottom-right */
  padding-bottom: 52px;
}

.tft-news-card__title{
  margin: 2px 0 10px;
  font-size: 1.05rem;
  line-height: 1.25;
  color: #0b2233;
}
.tft-news-card__title a{ color: inherit; text-decoration: none; }
.tft-news-card__title a:hover{ text-decoration: underline; }

.tft-news-card__excerpt{
  margin: 0;
  color: #475569;
  font-size: .95rem;
  line-height: 1.55;
}

/* Read more (bottom-right) – using core/post-excerpt "more" link */
.tft-news-card__excerpt .wp-block-post-excerpt__more-link{
  position: absolute;
  right: 16px;
  bottom: 16px;
  color: #0FA3A0;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.tft-news-card__excerpt .wp-block-post-excerpt__more-link:hover{ text-decoration: underline; }

/* CTA under the last visible card, same width as a card */
.tft-news-carousel__footer{
  margin-top: 36px;
  display: flex;
  justify-content: flex-end !important;
}
.tft-news-carousel__footer .wp-block-buttons{
  width: calc((100% - (var(--tft-news-gap) * 2)) / 3);
  margin-left: auto;
  justify-content: flex-end;
}
.tft-news-carousel__cta{
  width: calc(
    (100% - (var(--tft-news-visible) - 1) * var(--tft-news-gap)) / var(--tft-news-visible)
  );
}
.tft-news-carousel__cta .wp-block-button__link{
  width: 100%;
  text-align: center;
  background: #ffffff;
  color: #0FA3A0;
  border: 1px solid rgba(255,255,255,.8);
  box-shadow: 0 18px 40px rgba(11,34,51,.22);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform .18s ease, filter .18s ease;
}
.tft-news-carousel__cta .wp-block-button__link:hover{
  transform: translateY(-1px);
  filter: brightness(.98);
}

/* Responsive */
@media (max-width: 980px){
  .tft-news-carousel__bg{ padding: 100px 0 28px; }
  .tft-news-card{ flex: 0 0 calc((100% - 22px) / 2); margin-top: 0; }
  .tft-news-carousel__cta{ width: calc((100% - 22px) / 2); }
}

/* ------------------------------
   Global CTA (before footer)
------------------------------ */
.tft-global-cta{
  width: 100%;
  background: var(--tft-teal, #0f8c8c);
  color: #fff;
  padding: 64px 0;
}
.tft-global-cta__inner{
  width: min(1200px, calc(100% - 64px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  text-align: center;
}
.tft-global-cta__title{
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  line-height: 1.15;
  font-weight: 800;
}
.tft-global-cta__button{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  min-height: 52px;
  border-radius: 14px;
  background: #fff;
  color: var(--tft-teal, #0f8c8c);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 12px 26px rgba(0,0,0,0.18);
}
.tft-global-cta__button:hover{
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(0,0,0,0.22);
}
@media (max-width: 640px){
  .tft-global-cta{ padding: 52px 0; }
  .tft-global-cta__inner{ width: min(1200px, calc(100% - 40px)); }
}

/* ==============================
   Popular Services Cards (TFT)
   ============================== */

.tft-popular-services{
  padding: 72px 0 32px;
}

.tft-popular-services__inner{
  max-width: 1200px;
}

.tft-popular-services__eyebrow{
  margin: 0 0 10px;
  text-align: center;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 12px;
  opacity: .75;
}

.tft-popular-services__title{
  margin: 0 0 28px;
  text-align: center;
}

.tft-popular-services__title .tft-accent{
  color: var(--tft-teal, #0aa6a6);
}

.tft-popular-services__card{
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(0,0,0,.10);
}

.tft-service-card__media{
  position: relative;
  overflow: hidden;
}

.tft-service-card__media img{
  width: 100% !important;
  height: 220px;
  object-fit: cover;
  display: block;
}

.tft-service-card__ribbon{
  position: absolute;
  left: 0;
  bottom: 18px;
  z-index: 2;
  background: var(--tft-teal, #0aa6a6);
  color: #fff;
  /* Tag style (référence) : carré à gauche, arrondi à droite */
  padding: 12px 20px 12px 26px;
  border-radius: 0 18px 18px 0;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.1;
  letter-spacing: .2px;
  max-width: calc(100% - 24px);
  box-shadow: 0 10px 22px rgba(0,0,0,.18);
}

.tft-service-card__ribbon:before{
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 8px;
  background: rgba(8, 42, 56, .85);
  border-radius: 0;
}

.tft-service-card__content{
  padding: 18px 20px 22px;
}

.tft-service-card__link{
  color: var(--tft-teal, #0aa6a6);
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  gap: 8px;
}

.tft-service-card__link:hover{
  text-decoration: underline;
}

@media (max-width: 980px){
  .tft-popular-services{ padding: 52px 0 22px; }
  .tft-service-card__media img{ height: 200px; }
}

@media (max-width: 600px){
  .tft-service-card__media img{ height: 180px; }
  .tft-popular-services__title{ margin-bottom: 18px; }
}

@media (max-width: 640px){
  /* Mobile: 1 card (latest) + centered CTA */
  .tft-news-card{ flex: 0 0 86%; }
  .tft-news-card:nth-child(n+2){ display: none; }
  .tft-news-track{ justify-content: center; }

  .tft-news-carousel__ctaWrap{
    display: flex !important;
    justify-content: center;
    margin-top: 18px;
  }
  .tft-news-carousel__cta{
    grid-column: auto;
    justify-self: auto;
    width: 86%;
    margin-top: 0;
  }
}


/* =============================
   Trust Logos Carousel (TFT)
   ============================= */

.tft-logos { padding: 64px 0; }


.tft-logos__title{
  margin: 0 0 28px;
  font-weight:800;
  letter-spacing:-0.02em;
  line-height:1.05;
  text-align:center;
}

.tft-logos__title .tft-logos__accent{ color: var(--tft-teal, #0b8f8a); }

.tft-logo-carousel{
  /* keep within normal site width (same as header) */
  width:100%;
  background: #fff;

  /* place arrows left/right on the same line as the logos */
  display:grid;
  grid-template-columns: 44px 1fr 44px;
  align-items:center;
  gap:18px;
}

.tft-logo-carousel__viewport{
  overflow:hidden;
  width:100%;
}

/* Let the 2 nav buttons sit in the grid columns (left / right) */
.tft-logo-carousel__navwrap{
  display: contents;
}

.tft-logo-carousel__track{
  display:flex;
  align-items:center;
  gap:22px;
  will-change: transform;
}

.tft-logo-carousel__item{
  /* 3 logos max on desktop to match normal content width */
  flex: 0 0 calc((100% - 22px * 2) / 3);
  background:#fff;
  border:1px solid rgba(12, 30, 45, 0.08);
  border-radius:16px;
  padding:14px 16px;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:84px;
}

.tft-logo-carousel__item img{
  width:100%;
  height:auto;
  max-height:56px;
  object-fit:contain;
  display:block;
  filter: grayscale(1);
  opacity: .92;
  transition: filter .25s ease, opacity .25s ease, transform .25s ease;
}

.tft-logo-carousel__item:hover img{
  filter: grayscale(0);
  opacity: 1;
  transform: translateY(-1px);
}

.tft-logo-carousel__nav{
  appearance:none;
  border:1px solid rgba(11, 143, 138, .35);
  background: rgba(255,255,255,.9);
  color: var(--tft-teal, #0b8f8a);
  width:44px;
  height:44px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  box-shadow: 0 14px 30px rgba(6, 18, 28, .12);
  position:relative;
  z-index: 2;
}

.tft-logo-carousel__nav:hover{
  transform: translateY(-1px);
  background: rgba(11, 143, 138, .08);
}


.tft-logo-carousel__nav:active{ transform: translateY(0); }

/* align them in the grid */
.tft-logo-carousel__nav--prev{ justify-self:start; }
.tft-logo-carousel__nav--next{ justify-self:end; }

.tft-logo-carousel__nav svg{ width:18px; height:18px; display:block; }

@media (max-width: 900px){
  .tft-logos{ padding: 44px 0; }
  .tft-logo-carousel{ grid-template-columns: 40px 1fr 40px; }
  .tft-logo-carousel__item{ flex-basis: calc((100% - 22px) / 2); }
}

@media (max-width: 520px){
  .tft-logo-carousel__nav{ width:40px; height:40px; }
}


/* === Trust Logos Carousel (TFT) overrides === */
.tft-logo-carousel { position: relative; }
.tft-logo-carousel__viewport { overflow: hidden; width: 100%; }
.tft-logo-carousel__track { display: flex; align-items: center; gap: 18px; will-change: transform; }
.tft-logo-carousel__item { display: flex; align-items: center; justify-content: center; }
.tft-logo-carousel__item img { width: 100%; height: 64px; object-fit: contain; display: block; filter: grayscale(100%); opacity: .9; transition: filter .25s ease, opacity .25s ease; }
.tft-logo-carousel__item img:hover { filter: grayscale(0%); opacity: 1; }
.tft-logo-carousel__nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; }
.tft-logo-carousel__nav--prev { left: -18px; }
.tft-logo-carousel__nav--next { right: -18px; }
@media (max-width: 768px) {
  .tft-logo-carousel__nav--prev { left: -12px; }
  .tft-logo-carousel__nav--next { right: -12px; }
  .tft-logo-carousel__item img { height: 54px; }
}

/* =========================================================
   Trust logos carousel (TFT) — block-safe + responsive
   ========================================================= */
.tft-trust-logos{
  background:#fff;
  padding:clamp(48px,6vw,80px) 0;
}

.tft-trust-logos__title{
  text-align:center;
  margin:0 0 26px;
}

.tft-trust-logos .tft-logo-carousel{
  margin:0;
  align-items:center;
  flex-wrap:nowrap;
}

.tft-trust-logos .tft-logo-carousel__nav{
  flex:0 0 64px;
  display:flex;
  justify-content:center;
}

.tft-trust-logos .tft-logo-carousel__btn{
  width:42px;
  height:42px;
  border-radius:999px;
  border:1px solid rgba(0,151,136,.35);
  background:rgba(0,151,136,.08);
  color:var(--tft-teal, #0aa8a1);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:transform .18s ease, background .18s ease, border-color .18s ease;
}
.tft-trust-logos .tft-logo-carousel__btn:hover{
  transform:translateY(-1px);
  background:rgba(0,151,136,.14);
  border-color:rgba(0,151,136,.5);
}

.tft-trust-logos .tft-logo-carousel__viewport{
  overflow:hidden;
  width:100%;
  display:flex;
  gap:18px;
  align-items:center;
  scroll-behavior:smooth;
}

/* WP outputs images as figure.wp-block-image */
.tft-trust-logos .tft-logo-carousel__viewport > .wp-block-image{
  flex:0 0 calc((100% - (18px * 3))/4);
  max-width:calc((100% - (18px * 3))/4);
  background:#fff;
  border:1px solid rgba(7,27,42,.08);
  border-radius:14px;
  padding:14px 18px;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 10px 22px rgba(0,0,0,.06);
}

.tft-trust-logos .tft-logo-carousel__viewport > .wp-block-image img{
  width:100%;
  height:54px;
  object-fit:contain;
}

@media (max-width: 980px){
  .tft-trust-logos .tft-logo-carousel__viewport > .wp-block-image{
    flex-basis:calc((100% - (18px * 2))/3);
    max-width:calc((100% - (18px * 2))/3);
  }
}

@media (max-width: 620px){
  .tft-trust-logos .tft-logo-carousel{
    gap:10px;
  }
  .tft-trust-logos .tft-logo-carousel__nav{
    flex-basis:54px;
  }
  .tft-trust-logos .tft-logo-carousel__viewport{
    gap:12px;
  }
  .tft-trust-logos .tft-logo-carousel__viewport > .wp-block-image{
    flex-basis:calc((100% - 12px)/2);
    max-width:calc((100% - 12px)/2);
  }
  .tft-trust-logos .tft-logo-carousel__viewport > .wp-block-image img{
    height:48px;
  }
}

/* =============================
   Dropdown menu (child pages)
   ============================= */

/* Base */
.tft-menu li{ position: relative; }

/* Subtle caret for items with children */
.tft-menu li.menu-item-has-children > a{
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tft-menu li.menu-item-has-children > a::after{
  content: "";
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid rgba(9, 139, 133, .85); /* teal */
  transform: translateY(1px);
  opacity: .9;
}

/* Desktop dropdown */
.tft-menu .sub-menu{
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 220px;
  padding: 10px;
  margin: 0;
  list-style: none;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(3, 34, 49, .14);
  z-index: 999;

  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

/*
  Hover gap fix
  The dropdown is offset from the parent item for a nicer look.
  Without a small "hover bridge", the submenu can disappear while moving the
  cursor from the parent link to the submenu.
*/
.tft-menu .sub-menu::before{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -14px;
  height: 14px;
  background: transparent;
}

.tft-menu .sub-menu li{ margin: 0; }
.tft-menu .sub-menu a{
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.tft-menu .sub-menu a:hover,
.tft-menu .sub-menu a:focus{
  background: rgba(9, 139, 133, .08);
}

/* Show on hover / focus */
.tft-menu li:hover > .sub-menu,
.tft-menu li:focus-within > .sub-menu{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Nested submenu (if any) */
.tft-menu .sub-menu .sub-menu{
  top: 0;
  left: calc(100% + 10px);
}

/* Mobile: display children as indented list inside the opened drawer */
@media (max-width: 980px){
  #primary-nav.is-open .tft-menu li.menu-item-has-children > a::after{ border-top-color: rgba(255,255,255,.75); }
  #primary-nav.is-open .tft-menu .sub-menu{
    position: static;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 6px 0 0 10px;
    margin: 0;
  }
  #primary-nav.is-open .tft-menu .sub-menu a{
    padding: 10px 10px;
    border-radius: 12px;
    opacity: .95;
  }
}
