/*
Theme Name: ASACERT The7 FSE
Description: Header e footer del prototipo ASACERT adattati a The7 FSE.
Template: dt-the7
Version: 0.3.0
Text Domain: asacert-the7-fse
*/

:root {
  --asacert-blue: #1b365c;
  --asacert-deep: #102b4d;
  --asacert-gold: #af986f;
  --asacert-frame: 88rem;
}

.asacert-template-header,
.asacert-template-footer {
  font-family: Poppins, Arial, sans-serif;
}
.asacert-template-header *, .asacert-template-footer * { box-sizing: border-box; }
.asacert-template-header a, .asacert-template-footer a { text-decoration: none; }
.asacert-template-header a:hover, .asacert-template-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.asacert-template-header :focus-visible, .asacert-template-footer :focus-visible { outline: 3px solid var(--asacert-gold); outline-offset: 3px; }

/* Copia isolata della barra e della navigazione del prototipo. */
.asacert-template-header { position: relative; z-index: 100; color: var(--asacert-deep); }
.asacert-template-header .asacert-utility { background: var(--asacert-blue); color: #fff; font-size: .75rem; }
.asacert-template-header .asacert-utility__inner { display: flex; min-height: 38px; max-width: var(--asacert-frame); align-items: center; gap: 1.2rem; margin: auto; padding: 0 2rem; }
.asacert-template-header .asacert-utility a { color: #fff; }
.asacert-template-header .asacert-utility .asacert-offices { margin-left: auto; }
.asacert-template-header .asacert-language { font-weight: 600; }
.asacert-template-header .asacert-site-header { position: relative; z-index: 1; isolation: isolate; display: flex; min-height: 90px; max-width: var(--asacert-frame); align-items: center; gap: 2.2rem; margin: auto; padding: 12px 2rem; background: #fff; }
.asacert-template-header .asacert-site-header::before { position: absolute; z-index: -1; inset: 0 calc(50% - 50vw); background: #fff; content: ""; }
.asacert-template-header .asacert-brand { display: block; width: 260px; flex: 0 0 260px; }
.asacert-template-header .asacert-brand img { display: block; width: 100%; height: auto; }
.asacert-template-header .asacert-primary-nav { display: flex; align-self: stretch; align-items: center; gap: 1.7rem; margin-block: -12px; padding-block: 12px; font-size: .99rem; font-weight: 500; }
.asacert-template-header .asacert-nav-item { position: static; display: flex; align-items: center; }
.asacert-template-header .asacert-nav-item > a, .asacert-template-header .asacert-nav-item > button { padding: 0; border: 0; background: none; color: var(--asacert-deep); font: inherit; cursor: pointer; white-space: nowrap; }
.asacert-template-header .asacert-nav-item > button::after { display: inline-block; margin-left: .38rem; color: var(--asacert-gold); content: "+"; font-size: 1.05em; line-height: 1; }
.asacert-template-header .asacert-nav-item.is-mega-open > button::after { content: "−"; }
.asacert-template-header .asacert-nav-item--contact > a { color: var(--asacert-gold); }
.asacert-template-header .asacert-header-service-button { display: inline-flex; min-height: 44px; flex: 0 0 auto; align-items: center; margin-left: auto; padding: .9rem 1.1rem; background: var(--asacert-blue); color: #fff; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.asacert-template-header .asacert-header-service-button:hover { background: var(--asacert-deep); color: #fff; text-decoration: none; }
.asacert-template-header .asacert-menu-toggle, .asacert-template-header .asacert-mobile-finder { display: none; }
.asacert-template-header .asacert-mega-menu { position: absolute; z-index: 20; top: 100%; right: 0; left: 0; display: none; min-width: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; padding: 2rem max(2rem, 8%); border-top: 2px solid var(--asacert-gold); background: #fff; box-shadow: 0 15px 30px rgba(16, 43, 77, .18); }
.asacert-template-header .asacert-nav-item.is-mega-open .asacert-mega-menu { display: grid; }
.asacert-template-header .asacert-mega-menu strong, .asacert-template-header .asacert-mega-menu a { display: block; margin-bottom: .55rem; font-size: .78rem; }
.asacert-template-header .asacert-mega-menu strong { color: var(--asacert-gold); text-transform: uppercase; }
.asacert-template-header .asacert-mega-menu a { color: var(--asacert-deep); }
.asacert-template-header .asacert-mega-menu--services { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.asacert-template-header .asacert-mega-menu--insights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.asacert-template-header .asacert-mega-callout { padding-left: 1.5rem; border-left: 1px solid var(--asacert-gold); }
.asacert-template-header .asacert-mega-callout p { margin: .5rem 0 1rem; color: #536073; font-size: .8rem; }
.asacert-template-header .asacert-mega-callout > a { display: inline-block; padding: .8rem 1rem; background: var(--asacert-blue); color: #fff; font-weight: 600; }

/* Pannello di ricerca laterale del prototipo. */
body.asacert-finder-open { overflow: hidden; }
.asacert-template-header .asacert-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.asacert-template-header .asacert-panel-backdrop:not([hidden]) { position: fixed; z-index: 199; inset: 0; background: transparent; }
.asacert-template-header .asacert-finder-panel { position: fixed; z-index: 200; top: 0; right: 0; width: min(440px, 100%); height: 100vh; height: 100dvh; overflow-y: auto; padding: 2rem; background: #fff; box-shadow: -10px 0 30px rgba(0,0,0,.18); color: var(--asacert-deep); transform: translateX(105%); visibility: hidden; pointer-events: none; transition: transform .3s cubic-bezier(.16,1,.3,1), visibility .3s; }
.asacert-template-header .asacert-finder-panel.is-open { transform: translateX(0); visibility: visible; pointer-events: auto; }
.asacert-template-header .asacert-panel-close { display: block; min-width: 44px; min-height: 44px; margin-left: auto; padding: 0; border: 0; background: none; color: var(--asacert-blue); font: 1.5rem Poppins, Arial, sans-serif; cursor: pointer; }
.asacert-template-header .asacert-finder-panel h2 { margin: 2.5rem 0 .5rem; color: var(--asacert-deep); font-size: 2rem; font-weight: 600; line-height: 1.1; }
.asacert-template-header .asacert-finder-panel p { color: #536073; font-size: .9rem; }
.asacert-template-header .asacert-finder-intro { margin-bottom: 1.2rem; }
.asacert-template-header .asacert-service-search { width: 100%; margin: .75rem 0 1.25rem; padding: .85rem 1rem; border: 1px solid var(--asacert-blue); border-radius: 0; background: #fff; color: var(--asacert-blue); font: .9rem Poppins, Arial, sans-serif; caret-color: var(--asacert-gold); }
.asacert-template-header .asacert-service-search::placeholder { color: #66758a; }
.asacert-template-header .asacert-service-no-results { margin: 0 0 1rem; color: #536073; font-size: .84rem; }
.asacert-template-header .asacert-service-accordions details { border-top: 1px solid rgba(27,54,92,.18); }
.asacert-template-header .asacert-service-accordions details:last-child { border-bottom: 1px solid rgba(27,54,92,.18); }
.asacert-template-header .asacert-service-accordions [hidden] { display: none !important; }
.asacert-template-header .asacert-service-accordions summary { display: flex; min-height: 52px; align-items: center; justify-content: space-between; padding: 1rem 0; color: var(--asacert-blue); font-weight: 600; cursor: pointer; list-style: none; }
.asacert-template-header .asacert-service-accordions summary::-webkit-details-marker { display: none; }
.asacert-template-header .asacert-service-accordions summary span { color: var(--asacert-gold); font-size: 1.25rem; }
.asacert-template-header .asacert-service-accordions details[open] summary span { transform: rotate(45deg); }
.asacert-template-header .asacert-finder-category { padding: .1rem 0 1rem; }
.asacert-template-header .asacert-finder-category h3 { margin: .8rem 0 .3rem; color: var(--asacert-gold); font-size: .69rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.asacert-template-header .asacert-finder-category a { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .55rem 0; color: #405776; font-size: .78rem; }
.asacert-template-header .asacert-finder-category a span { color: var(--asacert-gold); font-size: 1rem; }
.asacert-template-header .asacert-finder-help { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--asacert-gold); }
.asacert-template-header .asacert-finder-help strong { display: block; color: var(--asacert-blue); font-size: .9rem; }
.asacert-template-header .asacert-finder-help p { color: #536073; font-size: .8rem; }
.asacert-template-header .asacert-finder-help a { color: var(--asacert-blue); font-size: .78rem; font-weight: 600; }

/* Griglia e gerarchie del footer del prototipo. */
.asacert-template-footer { background: var(--asacert-deep); color: #fff; }
.asacert-template-footer .asacert-logo-showcase { overflow: hidden; padding: 4.5rem max(2rem, calc((100vw - var(--asacert-frame)) / 2)); background: #fff; color: var(--asacert-deep); }
.asacert-template-footer .asacert-logo-tabs { display: flex; gap: 1.5rem; margin-bottom: 2rem; border-bottom: 1px solid rgba(27,54,92,.18); }
.asacert-template-footer .asacert-logo-tabs button { min-height: 44px; padding: .7rem 0; border: 0; border-bottom: 2px solid transparent; background: none; color: #536073; font: 600 .78rem Poppins, Arial, sans-serif; text-transform: uppercase; cursor: pointer; }
.asacert-template-footer .asacert-logo-tabs button.is-active { border-color: var(--asacert-blue); color: var(--asacert-blue); }
.asacert-template-footer .asacert-logo-tab-panel[hidden] { display: none; }
.asacert-template-footer .asacert-logo-marquee { width: 100%; overflow: hidden; }
.asacert-template-footer .asacert-logo-track { display: flex; width: max-content; align-items: center; gap: 3.5rem; animation: asacert-logo-scroll 36s linear infinite; }
.asacert-template-footer #asacert-logos-partners .asacert-logo-track { animation-direction: reverse; animation-duration: 30s; }
.asacert-template-footer .asacert-logo-track img { width: 150px; height: 70px; flex: 0 0 150px; object-fit: contain; filter: grayscale(1); opacity: .8; }
.asacert-template-footer .asacert-logo-marquee:hover .asacert-logo-track, .asacert-template-footer .asacert-logo-marquee:focus-within .asacert-logo-track { animation-play-state: paused; }
@keyframes asacert-logo-scroll { to { transform: translateX(-50%); } }
.asacert-template-footer .asacert-footer-grid, .asacert-template-footer .asacert-footer-locations { display: grid; max-width: var(--asacert-frame); grid-template-columns: 1.2fr .8fr .8fr; gap: 3rem; margin: auto; padding: 4rem 2rem; }
.asacert-template-footer h2 { margin: 0 0 1rem; color: #fff; font-size: 1.15rem; font-weight: 500; }
.asacert-template-footer p { margin: .35rem 0 1rem; color: #dce5ec; font-size: .82rem; line-height: 1.7; }
.asacert-template-footer a { color: #fff; }
.asacert-template-footer .asacert-footer-grid section > a { display: block; margin: .42rem 0; font-size: .82rem; }
.asacert-template-footer .asacert-rating { display: block; max-width: 130px; height: auto; margin-bottom: 1rem; background: #fff; }
.asacert-template-footer .asacert-footer-locations { padding-top: 2.5rem; border-top: 1px solid rgba(255, 255, 255, .2); font-size: .78rem; }
.asacert-template-footer .asacert-footer-locations strong { display: block; margin-top: .8rem; font-size: .8rem; }
.asacert-template-footer .asacert-footer-news-link { display: inline-block; margin-top: .6rem; padding: .75rem .9rem; border: 1px solid var(--asacert-gold); background: var(--asacert-gold); color: var(--asacert-deep); font-weight: 600; }
.asacert-template-footer .asacert-footer-bottom { padding: 1rem 2rem; background: var(--asacert-gold); color: var(--asacert-deep); font-size: .75rem; text-align: center; }
.asacert-template-footer .asacert-footer-bottom a { color: var(--asacert-deep); }

.asacert-page-main { width: min(100% - 3rem, var(--asacert-frame)); margin-inline: auto; padding-block: clamp(2rem, 4vw, 4rem); }
.asacert-home-main { min-height: 40vh; }

@media (min-width: 1200px) {
  .asacert-template-header .asacert-mega-menu--services { grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(170px, .85fr); }
}
@media (min-width: 801px) and (max-width: 1199px) {
  .asacert-template-header .asacert-site-header { gap: 1rem; }
  .asacert-template-header .asacert-primary-nav { gap: 1rem; font-size: .88rem; }
  .asacert-template-header .asacert-brand { width: 210px; flex-basis: 210px; }
  .asacert-template-header .asacert-mega-menu--services .asacert-mega-callout { display: grid; grid-column: 1 / -1; grid-template-columns: minmax(140px, .8fr) minmax(200px, 1.2fr) auto; align-items: center; gap: 1.5rem; padding: 1.25rem 0 0; border-top: 1px solid var(--asacert-gold); border-left: 0; }
  .asacert-template-header .asacert-mega-callout p { margin: 0; }
}
@media (max-width: 800px) {
  body.asacert-mobile-menu-open { overflow: hidden; }
  .asacert-template-header .asacert-utility__inner { padding: 0 1rem; }
  .asacert-template-header .asacert-utility a:not(.asacert-offices) { display: none; }
  .asacert-template-header .asacert-site-header { min-height: 72px; padding: 10px 1rem; }
  .asacert-template-header .asacert-brand { width: 190px; flex-basis: 190px; }
  .asacert-template-header .asacert-header-service-button { display: none; }
  .asacert-template-header .asacert-menu-toggle { display: grid; gap: 4px; margin-left: auto; padding: 10px; border: 0; background: none; cursor: pointer; }
  .asacert-template-header .asacert-menu-toggle span { width: 24px; height: 2px; background: var(--asacert-blue); }
  .asacert-template-header .asacert-primary-nav { display: none; }
  .asacert-template-header .asacert-site-header.is-open .asacert-primary-nav { position: fixed; z-index: 60; inset: 0; display: flex; overflow-y: auto; flex-direction: column; align-items: stretch; margin: 0; padding: max(6.25rem, calc(env(safe-area-inset-top) + 5rem)) 1.5rem max(2rem, env(safe-area-inset-bottom)); background: var(--asacert-blue); color: #fff; }
  .asacert-template-header .asacert-site-header.is-open .asacert-menu-toggle { position: fixed; z-index: 61; top: max(1rem, env(safe-area-inset-top)); right: 1rem; width: 44px; height: 44px; padding: 0; place-content: center; }
  .asacert-template-header .asacert-site-header.is-open .asacert-menu-toggle span { width: 25px; background: #fff; transition: transform .2s ease, opacity .2s ease; }
  .asacert-template-header .asacert-site-header.is-open .asacert-menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .asacert-template-header .asacert-site-header.is-open .asacert-menu-toggle span:nth-child(2) { opacity: 0; }
  .asacert-template-header .asacert-site-header.is-open .asacert-menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .asacert-template-header .asacert-site-header.is-open .asacert-mobile-finder { display: flex; min-height: 54px; align-items: center; justify-content: space-between; margin-bottom: 1.1rem; padding: .9rem 1rem; background: var(--asacert-gold); color: var(--asacert-deep); font-weight: 700; }
  .asacert-template-header .asacert-site-header.is-open .asacert-nav-item { width: 100%; align-self: stretch; display: block; }
  .asacert-template-header .asacert-site-header.is-open .asacert-nav-item > a, .asacert-template-header .asacert-site-header.is-open .asacert-nav-item > button { display: flex; width: 100%; min-height: 54px; align-items: center; justify-content: space-between; padding: .8rem 0; border-bottom: 1px solid rgba(255,255,255,.24); color: #fff; font-size: 1.12rem; text-align: left; }
  .asacert-template-header .asacert-site-header.is-open .asacert-mega-menu { position: static; display: none; margin: 0; padding: 25px 0 40px .75rem; grid-template-columns: 1fr; border: 0; border-bottom: 1px solid rgba(255,255,255,.24); background: transparent; box-shadow: none; }
  .asacert-template-header .asacert-site-header.is-open .asacert-nav-item.is-mega-open .asacert-mega-menu { display: grid; }
  .asacert-template-header .asacert-site-header.is-open .asacert-mega-menu strong { color: #e7d0a0; }
  .asacert-template-header .asacert-site-header.is-open .asacert-mega-menu a { padding: .65rem 0; color: #fff; font-size: .95rem; }
  .asacert-template-header .asacert-site-header.is-open .asacert-mega-callout { display: none; }
  .asacert-template-footer .asacert-footer-grid, .asacert-template-footer .asacert-footer-locations { grid-template-columns: 1fr; padding: 3rem 1.25rem; }
  .asacert-template-footer .asacert-footer-locations { padding-top: 2.5rem; }
  .asacert-template-footer .asacert-logo-showcase { padding: 3rem 1.25rem; }
  .asacert-template-footer .asacert-logo-track { gap: 2rem; }
  .asacert-template-footer .asacert-logo-track img { width: 120px; flex-basis: 120px; }
}
@media (prefers-reduced-motion: reduce) {
  .asacert-template-header .asacert-menu-toggle span { transition: none; }
  .asacert-template-header .asacert-finder-panel { transition: none; }
  .asacert-template-footer .asacert-logo-track { width: auto; flex-wrap: wrap; animation: none; }
  .asacert-template-footer .asacert-logo-track img[aria-hidden="true"] { display: none; }
}
