/* HERO — overlay più intenso solo qui */
.pg-certificazioni__hero::before{background:rgba(0,0,0,.35)}

/* ====== STATS (texture + sfumatura) ====== */
.stats-section{position:relative;isolation:isolate}
.stats-section::before{
  content:"";position:absolute;top:0;right:0;width:60vw;height:100%;
  /* FIX: aggiunto spazio dopo la parentesi per validare background */
  background:url("/wp-content/themes/themenexus/images/certificazioni/Texture-blu.png") right top/cover no-repeat;
  opacity:.9;pointer-events:none;z-index:-1
}
.stats-section::after{
  content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
  background:linear-gradient(90deg,#f7f8f3 0%,rgba(247,248,243,.95) 35%,rgba(247,248,243,.6) 55%,rgba(247,248,243,0) 100%)
}
.bg-stone{background:#e3e3dd}

/* ======================================================
   Sezione “Le nostre certificazioni”
====================================================== */
.cert-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1.5rem}

/* Card base */
.cert-card{
  position:relative;display:flex;flex-direction:column;justify-content:flex-end;overflow:hidden;
  gap:0;padding:2rem 1.5rem 1.5rem;border-radius:6px;min-height:200px;text-decoration:none;
  transition:transform .2s ease
}

/* Testo */
.cert-card h3{margin:0;font:600 1.125rem/1.2 var(--font-base);color:var(--cl-dark)}
.cert-card p{margin:0;font-size:.95rem;line-height:1.4;max-width:32ch}
.cert-size{color:var(--cl-dark)}

/* Icona download (base) */
.cert-icon{width:28px;height:28px;z-index:2;color:var(--cl-dark)}
.cert-icon svg{width:100%;height:100%;stroke:currentColor;fill:none;stroke-width:2}

/* Ghost layer (document.svg inline) */
.cert-bg{
  position:absolute;inset:0;display:flex;justify-content:flex-end;align-items:flex-end;
  pointer-events:none;z-index:0;mix-blend-mode:luminosity;opacity:.1;transition:transform .3s ease
}
.cert-bg svg{width:40%;height:auto;transform:translate(10%,15%)}

/* Palette card */
.bg-ottanio{background:var(--cl-ottanio)}
.bg-sage{background:var(--cl-sage)}
.bg-stone{background:var(--cl-stone)}
.text-dark,.text-dark h3,.text-dark p,.text-dark .cert-icon{color:var(--cl-dark)}

/* Responsiveness */
@media (max-width:1100px){.cert-grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width:640px){
  .cert-grid{grid-template-columns:1fr;gap:1rem}
  .cert-card{aspect-ratio:16/9;padding:1rem}
  /* .cert-bg svg mantiene width:40% già definito */
}

/* Media hero project highlight (fallback legacy) */
.project-highlight>picture{
  grid-area:1/1;width:100%;height:100%;object-fit:cover;min-height:auto
}

/* CTA su sfondo ivory */
.ivory-cta{color:var(--cl-ivory);transition:color .18s ease}
.ivory-cta:hover,.ivory-cta:focus-visible{
  color:#fff; /* fallback */
  color:color-mix(in oklab,var(--cl-ivory) 80%,#fff 20%);
  outline:none
}
@media (max-width:640px){
  .project-highlight>picture{min-height:clamp(320px,75vw,520px)}
}

/* ——————————————————————————————
   CERTIFICAZIONI — micro-affinamenti
   —————————————————————————————— */

/* 1) Intro texture leggermente meno invadente */
.pg-certificazioni__hero+.stats-section::before{opacity:.6}
.pg-certificazioni__hero+.stats-section::after{
  background:linear-gradient(90deg,
    var(--cl-stone) 0%,
    color-mix(in oklab,var(--cl-stone) 90%,transparent) 40%,
    transparent 78%)
}

/* 2) Griglia: respiro senza cambiare layout */
.certifications-section .cert-grid{gap:clamp(14px,1.6vw,20px)}

/* 3) Card PDF: bordo tenue, radius più alto */
.certifications-section .cert-card{border:1px solid rgba(12,22,24,.08);border-radius:10px}
.certifications-section .cert-card h3{margin:0 0 .25rem}
.certifications-section .cert-card p{line-height:1.5}

/* Ghost document più discreto */
.certifications-section .cert-bg{opacity:.08}

/* 4) Icona download in alto a destra */
.certifications-section .cert-icon{
  position:absolute;right:clamp(12px,1.2vw,16px);top:clamp(12px,1.2vw,16px)
}

/* 5) Micro-hover sobrio (solo device con hover) */
@media (hover:hover){.certifications-section .cert-card:hover{transform:translateY(-1px)}}

/* 6) Mobile: niente aspect-ratio forzato in questa sezione */
@media (max-width:640px){
  .certifications-section .cert-card{aspect-ratio:auto;min-height:180px}
}

/* Reveal tweaks */
.pg-certificazioni .hero .reveal-up{--rev-distance:10px}
.pg-certificazioni .cert-grid .reveal-scale{--rev-distance:12px}
.pg-certificazioni .project-caption .reveal-up{--rev-distance:10px}

/* FIX: cover reale per media nella FAQ */
.cert-faq-section .project-highlight{position:relative;overflow:hidden;min-height:auto}
.cert-faq-section .project-highlight>picture{position:absolute;inset:0;width:100%;height:100%}
.cert-faq-section .project-highlight>picture>img{
  width:100%;height:100%;object-fit:cover;object-position:center;display:block
}
@media (max-width:640px){
  .cert-faq-section .project-highlight{min-height:clamp(280px,70vw,480px)}
}
/* link inline nelle FAQ — semplice */
.cert-faq-section .faq-answer a{
  color: var(--cl-ottanio);
  text-decoration: none;
  font-weight: var(--fw-medium);
  transition: color .15s ease;
  outline-offset: 2px;
}

.cert-faq-section .faq-answer a:hover{
  /* fallback + mix leggero */
  color: #0b3f41;
  color: color-mix(in oklab, var(--cl-ottanio) 80%, black 20%);
}

.cert-faq-section .faq-answer a:focus-visible{
  outline: 2px solid color-mix(in oklab, var(--cl-ottanio) 40%, transparent);
}
