
/*
Theme Name: Aeffe Consulting Gutenberg
Theme URI: https://aeffe.consulting/
Author: Vibes Web Solutions
Description: Tema Aeffe Consulting con Gutenberg.
Version: 1.8.2
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: aeffe-gutenberg
Tags: full-site-editing, block-patterns, custom-logo, business
*/

/* =========================================
   01. IMPOSTAZIONI GENERALI
========================================= */

:root {
  --navy: #012c6b;
  --coral: #e64b39;
  --pale: #eef5fb;
  --text: #385477;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 105px;
}

body {
  margin: 0;
  background: #fff;
  color: var(--navy);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a,
input,
select,
textarea {
  outline-offset: 5px;
}

button {
  cursor: pointer;
}

p {
  line-height: 1.55;
}

h1 {
  font-size: clamp(38px, 4vw, 58px);
  line-height: 1.06;
  letter-spacing: -2px;
  margin: 0;
  font-weight: 750;
}

h2 {
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: -1px;
  margin: 0 0 15px;
}

h3 {
  font-size: 18px;
  line-height: 1.2;
}

em {
  font-style: normal;
  color: var(--coral);
}

.wp-site-blocks {
  overflow-x: clip;
}

.wp-site-blocks > *,
.aeffe-main > *,
.aeffe-main .wp-block-group > * {
  margin-block-start: 0;
}

.wp-block-post-content {
  margin-block-start: 0 !important;
}

.section,
.wrap {
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
}

.section {
  padding: 45px 0;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 1.8px;
  font-weight: 700;
  margin: 0 0 14px;
}

.coral {
  color: var(--coral);
}

.textlink {
  font-size: 12px;
  font-weight: bold;
  white-space: nowrap;
}

.ae-link {
  margin: 0;
}

.ae-link .button {
  color: #fff;
}

.ae-link .outline {
  color: var(--navy);
}

.button {
  background: var(--coral);
  color: #fff;
  display: inline-flex;
  justify-content: space-between;
  gap: 25px;
  align-items: center;
  padding: 17px 25px;
  border: 1px solid var(--coral);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  transition: background .2s, transform .2s;
}

.button:hover {
  background: #d83d24;
  transform: translateY(-2px);
}

.outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  font-size: 13px;
  border: 1px solid #7896bb;
  border-radius: 3px;
  font-weight: bold;
  background: #fff;
}

/* =========================================
   02. HEADER E NAVIGAZIONE
========================================= */

.ae-header {
  height: 96px;
  padding: 0 max(5%, calc((100vw - 1320px)/2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 300;
  border-bottom: 1px solid #e6edf3;
  gap: 25px;
}

.ae-header .wp-block-site-logo {
  margin: 0;
  flex-shrink: 0;
  line-height: 0;
}

.ae-header .wp-block-site-logo img {
  width: 145px !important;
  height: auto !important;
  object-fit: contain;
  max-height: 70px;
}

.ae-header .wp-block-navigation {
  gap: 26px;
  font-size: 13px;
  font-weight: 600;
  z-index: 4;
}

.ae-header .wp-block-navigation a {
  color: var(--navy);
  text-decoration: none;
}

.ae-header .wp-block-navigation a:hover {
  color: var(--coral);
}

.ae-header .wp-block-button__link,
.aeffe-footer .wp-block-button__link {
  border-radius: 3px;
  background: var(--coral);
  color: #fff;
  padding: 14px 20px;
  font-size: 13px;
  font-weight: bold;
  text-decoration: none;
}

.ae-header
.wp-block-navigation__responsive-container.is-menu-open {
  background: #fff;
  color: var(--navy);
  padding: 30px;
}

.ae-header
.wp-block-navigation__responsive-container.is-menu-open a {
  color: var(--navy);
}

.ae-header
.wp-block-navigation__responsive-container-open {
  color: var(--navy);
}

@media (min-width: 1101px) {
  body .wp-site-blocks .ae-header {
    display: grid !important;
    grid-template-columns:
      minmax(180px, 1fr)
      max-content
      minmax(180px, 1fr) !important;
    align-items: center !important;
    column-gap: clamp(18px, 2vw, 36px) !important;
    width: 100vw !important;
    max-width: none !important;
    margin-inline: calc(50% - 50vw) !important;
    padding-inline: clamp(26px, 5vw, 90px) !important;
  }

  body .ae-header > .wp-block-site-logo {
    justify-self: start;
    min-width: 0;
  }

  body .ae-header > .wp-block-navigation {
    justify-self: center;
    width: max-content;
    max-width: 100%;
    margin: 0 !important;
    gap: clamp(15px, 1.8vw, 28px);
  }

  body .ae-header
  > .wp-block-navigation
  .wp-block-navigation__container {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    column-gap: clamp(15px, 1.8vw, 28px);
  }

  body .ae-header > .wp-block-buttons {
    justify-self: end;
    margin: 0 !important;
    justify-content: flex-end;
  }
}

/* =========================================
   03. HERO GENERALE
========================================= */

.hero {
  position: relative;
  overflow: hidden;
  background: #eef4f9;
}

.hero > .wp-block-video {
  margin: 0;
  line-height: 0;
}

.hero > .wp-block-video video {
  display: block;
  width: 100%;
  height: auto;
}

.hero > .aeffe-hero-video {
  margin: 0;
  line-height: 0;
}

.hero > .aeffe-hero-video video {
  display: block;
  width: 100%;
  height: auto;
}

.hero video {
  pointer-events: none;
}

.hero-content {
  max-width: 1320px;
  margin: 0 auto;
  padding: 36px 0;
}

.hero-content .lead {
  color: var(--text);
  font-size: 17px;
  line-height: 1.6;
  max-width: 550px;
  margin: 13px 0 20px;
}

.hero-bottom {
  display: flex;
  align-items: center;
  gap: 17px;
  font-size: 10px;
  letter-spacing: 1px;
  font-weight: bold;
}

.hero-bottom p {
  font-size: 10px;
  margin: 0;
  font-weight: 700;
}

.hero-bottom button {
  background: none;
  border: 0;
  color: var(--navy);
  font-size: 12px;
  cursor: pointer;
  pointer-events: auto;
}

/* =========================================
   04. HOME 2 - HERO APPROVATA
========================================= */

.home-overlay {
  max-width: none !important;
  width: 100%;
  margin: 0 !important;
}

.home-overlay .hero {
  width: 100%;
  max-width: none;
  aspect-ratio: 16 / 9;
  min-height: 0;
  display: block;
  isolation: isolate;
}

.home-overlay .hero > .aeffe-hero-video,
.home-overlay .hero > .wp-block-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  margin: 0 !important;
}

.home-overlay .hero > .aeffe-hero-video video,
.home-overlay .hero > .wp-block-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #092f68;
}

.home-overlay .heroshade {
  display: none !important;
}

.home-overlay .hero-content {
  position: absolute;
  z-index: 2;
  left: 32px;
  top: 56px;
  bottom: 48px;
  width: min(40vw, 640px);
  max-width: 640px;
  min-width: 0;
  margin: 0;
  padding: 44px 48px;
  background: rgba(255, 255, 255, .70);
  box-shadow: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0;
}

.home-overlay .hero-content .eyebrow {
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 1.6px;
  margin: 0 0 16px;
}

.home-overlay .hero-content h1 {
  font-size: clamp(48px, 4vw, 68px);
  line-height: 1.03;
  letter-spacing: -1.8px;
  margin: 0;
  max-width: 100%;
  overflow-wrap: normal;
}

.home-overlay .hero-content h1 br {
  display: block;
}

.home-overlay .hero-content .lead {
  font-size: clamp(15px, 1.12vw, 18px);
  line-height: 1.55;
  max-width: 92%;
  margin: 22px 0 28px;
  color: var(--text);
}

.home-overlay .hero-content .ae-link {
  margin: 0 !important;
  max-width: 100%;
}

.home-overlay .hero-content .button {
  padding: 15px 22px;
  gap: 16px;
  font-size: 13px;
  max-width: 100%;
}

.home-overlay .hero-bottom {
  position: absolute;
  z-index: 3;
  right: 3%;
  bottom: 16px;
  left: auto;
  margin: 0;
  padding: 9px 13px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .85);
}

@media (min-width: 801px) and (max-width: 1100px) {
  .home-overlay .hero-content {
    left: 24px;
    top: 34px;
    bottom: 34px;
    width: min(44vw, 520px);
    max-width: 520px;
    padding: 30px 28px;
  }

  .home-overlay .hero-content .eyebrow {
    font-size: 10px;
    margin-bottom: 10px;
  }

  .home-overlay .hero-content h1 {
    font-size: clamp(34px, 3.6vw, 50px);
    line-height: 1.05;
    letter-spacing: -1px;
  }

  .home-overlay .hero-content .lead {
    font-size: 13px;
    line-height: 1.45;
    margin: 14px 0 18px;
    max-width: 100%;
  }

  .home-overlay .hero-content .button {
    padding: 13px 16px;
    font-size: 12px;
    gap: 12px;
  }
}

/* =========================================
   05. AREE DI INTERVENTO
========================================= */

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 20px;
}

.section-head p:not(.eyebrow) {
  color: var(--text);
  font-size: 14px;
}

body .aeffe-main .ae-areas-grid,
body .wp-block-post-content .ae-areas-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 20px !important;
  align-items: stretch;
  width: 100%;
  max-width: none;
  padding: 0;
  margin: 0;
}

body .aeffe-main .ae-areas-grid > .ae-card,
body .wp-block-post-content .ae-areas-grid > .ae-card {
  display: grid !important;
  grid-template-columns: minmax(0, 61%) minmax(0, 39%) !important;
  grid-template-rows: minmax(260px, auto);
  column-gap: 0 !important;
  row-gap: 0 !important;
  align-items: stretch;
  margin: 0 !important;
  padding: 0 !important;
  min-width: 0;
  width: 100%;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #eef5fb;
  transition: transform .2s, box-shadow .2s;
}

body .aeffe-main .ae-card:hover,
body .wp-block-post-content .ae-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px #012c6b1a;
}

body .aeffe-main .ae-card > .ae-card__copy,
body .wp-block-post-content .ae-card > .ae-card__copy {
  grid-column: 1;
  grid-row: 1;
  display: flex !important;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0 !important;
  margin: 0 !important;
  padding: 22px 14px 18px 19px;
  min-width: 0;
  min-height: 0;
  background: #eef5fb;
  position: relative;
  z-index: 1;
}

body .aeffe-main .ae-card__copy > *,
body .wp-block-post-content .ae-card__copy > * {
  margin-block: 0 !important;
}

body .aeffe-main .ae-card__icon,
body .wp-block-post-content .ae-card__icon {
  display: block;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  stroke: var(--navy);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  margin: 0 0 9px;
}

body .aeffe-main .ae-card:nth-child(even) .ae-card__icon,
body .wp-block-post-content .ae-card:nth-child(even) .ae-card__icon {
  stroke: var(--coral);
}

body .aeffe-main .ae-card__copy h3,
body .wp-block-post-content .ae-card__copy h3 {
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: -.2px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 12px !important;
}

body .aeffe-main .ae-card__copy h3 a,
body .wp-block-post-content .ae-card__copy h3 a {
  color: inherit;
  text-decoration: none;
}

body .aeffe-main .ae-card__copy h3 a::after,
body .wp-block-post-content .ae-card__copy h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
}

body .aeffe-main .ae-card__copy > p:not(.ae-card__arrow),
body .wp-block-post-content .ae-card__copy > p:not(.ae-card__arrow) {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text);
  margin: 0 0 15px !important;
}

body .aeffe-main .ae-card__copy .ae-card__arrow,
body .wp-block-post-content .ae-card__copy .ae-card__arrow {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  flex-shrink: 0;
  margin-top: auto !important;
  border: 1px solid #90adce;
  border-radius: 50%;
  color: #6080aa;
  line-height: 1;
  font-size: 16px;
}

body .aeffe-main .ae-card > figure.wp-block-image.ae-card__visual,
body .wp-block-post-content .ae-card > figure.wp-block-image.ae-card__visual {
  grid-column: 2;
  grid-row: 1;
  display: block !important;
  position: relative !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0;
  align-self: stretch;
  justify-self: stretch;
  width: 100% !important;
  height: 100% !important;
  min-height: 100%;
  overflow: hidden;
  line-height: 0;
  background: #dae6f1;
}

body .aeffe-main .ae-card__visual img,
body .wp-block-post-content .ae-card__visual img {
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 100%;
  min-height: 100%;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: cover !important;
  object-position: center;
}

/* =========================================
   06. VALORI
========================================= */

.values {
  padding: 40px 0;
  background: linear-gradient(100deg, #eff7fd, #e3edf8);
  position: relative;
  overflow: hidden;
}

.values .wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px 60px;
}

.values .wrap > p {
  border-left: 1px solid #b9cee5;
  padding: 10px 0 10px 35px;
  max-width: 470px;
  font-size: 15px;
  color: var(--text);
}

.value-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 15px;
}

.value-row > div {
  display: flex;
  align-items: center;
  gap: 20px;
  border-right: 1px solid #c1d2e6;
  padding: 5px 25px;
}

.value-row > div:first-child {
  padding-left: 0;
}

.value-row > div:last-child {
  border: 0;
}

.value-row b {
  font-size: 36px;
  font-weight: 400;
  color: #7691b5;
}

/* =========================================
   07. LO STUDIO
========================================= */

.studio {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 65px;
  align-items: center;
}

.studio > .wp-block-group {
  min-width: 0;
}

.studio p:not(.eyebrow) {
  font-size: 15px;
  color: var(--text);
  max-width: 530px;
}

.studio-photo {
  height: 310px;
  overflow: hidden;
  position: relative;
  background: #e7edf3;
}

.studio-photo div {
  width: 100%;
  height: 100%;
  background: url('assets/reference.png') no-repeat;
  background-size: 1706.4px 2986.2px;
  background-position: -790.2px -1776.6px;
}

.studio-actions {
  display: flex !important;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: flex-start;
  gap: 12px !important;
  margin-top: 22px !important;
}

.studio-actions > .ae-link {
  display: flex !important;
  width: auto;
  margin: 0 !important;
  max-width: none !important;
}

.studio-actions > .ae-link a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 52px;
  min-width: 0;
  height: 100%;
  margin: 0 !important;
  padding: 14px 19px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.studio-actions > .ae-link .button {
  gap: 18px;
  justify-content: space-between;
}

/* =========================================
   08. METODO
========================================= */

.method {
  background: linear-gradient(100deg, #f1f7fc, #fff);
  padding: 30px 0;
}

.method-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: 28px;
}

.method h2 {
  font-size: 25px;
}

.method article {
  padding-left: 24px;
  border-left: 1px solid #cbd9e8;
}

.method h3 {
  font-size: 15px;
  margin: 12px 0 8px;
}

.method p {
  font-size: 13px;
  color: var(--text);
  margin: 0;
}

/* =========================================
   09. FOCUS
========================================= */

.focus-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 25px;
  align-items: stretch;
}

.focus-grid > .wp-block-group {
  background: var(--pale);
  border-top: 3px solid #bad0e9;
  padding: 30px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  transition: background .2s, border-color .2s;
}

.focus-grid > .wp-block-group:hover {
  border-color: var(--coral);
  background: #e5eef7;
}

.focus-grid > .wp-block-group > p:first-child {
  font-size: 11px;
  letter-spacing: 2px;
  color: #627fa3;
  text-transform: uppercase;
  margin: 0 0 8px;
}

.focus-grid h3 {
  font-size: 29px;
  line-height: 1.06;
  margin: 18px 0 14px;
}

.focus-grid h3 a {
  display: inline;
  padding: 0;
  background: none;
  border: 0;
  color: inherit;
}

.focus-grid > .wp-block-group > p:not(:first-child) {
  font-size: 14px;
  color: var(--text);
  margin: 0 0 18px;
}

.focus-grid b {
  font-size: 12px;
  margin-top: auto;
  display: inline-block;
}

/* =========================================
   10. CALL TO ACTION
========================================= */

.page-cta {
  padding: 40px 0;
  background: #eaf2fa;
}

.page-cta .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

/* =========================================
   11. PAGINE INTERNE
========================================= */

.page-hero {
  background: linear-gradient(115deg, #eef5fc, #e6eff9 70%, #f7fafc);
  padding: 28px 0 58px;
  border-bottom: 1px solid #dce7f2;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  margin-bottom: 40px;
  color: #597393;
}

.breadcrumbs a {
  text-decoration: underline;
}

.breadcrumbs span {
  margin: 0 12px;
  color: #e75a40;
}

.breadcrumbs > p {
  font-size: 12px;
  margin: 0;
}

.page-hero h1 {
  font-size: clamp(36px, 4vw, 56px);
  max-width: 1050px;
  line-height: 1.12;
}

.page-intro {
  font-size: 19px;
  line-height: 1.6;
  color: var(--text);
  max-width: 790px;
  margin: 23px 0 0;
}

.editorial {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.editorial p:not(.eyebrow) {
  color: var(--text);
  font-size: 17px;
}

.profile {
  border-top: 1px solid #dae5ef;
}

.profile-role {
  font-size: 22px;
  color: #d84a31;
}

.profile > p {
  max-width: 760px;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 30px;
}

.profile-grid article {
  border-top: 3px solid var(--coral);
  padding-top: 14px;
}

.profile-grid p {
  color: var(--text);
  font-size: 15px;
}

.detail-layout,
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 75px;
}

.detail-block {
  padding: 0 0 30px;
  margin-bottom: 28px;
  border-bottom: 1px solid #dce5ef;
}

.detail-block h2 {
  font-size: 26px;
}

.detail-block p {
  font-size: 18px;
  color: var(--text);
  line-height: 1.75;
}

.service-sidebar {
  background: #f0f5fa;
  padding: 26px;
  height: fit-content;
}

.service-sidebar > a:not(.button) {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #d0ddec;
  padding: 14px 0;
  font-size: 14px;
}

.service-sidebar a.selected {
  color: #d6472e;
  font-weight: bold;
}

.service-sidebar .button {
  margin-top: 25px;
}

.service-sidebar p {
  color: var(--text);
  font-size: 14px;
}

/* =========================================
   12. NEWS - GRIGLIA E FILTRI CORRETTI
========================================= */

/* Ricerca a sinistra, categorie allineate a destra */

.news-tools {
  display: grid !important;
  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1fr) !important;
  column-gap: 32px !important;
  row-gap: 18px !important;
  align-items: start;
  width: 100%;
  max-width: none;
  margin-top: 28px !important;
  margin-bottom: 55px !important;
  padding: 0;
}

.news-tools > .aeffe-news-search {
  min-width: 0;
  width: 100%;
  margin: 0 !important;
}

.news-tools > .wp-block-group {
  justify-self: end;
  align-self: start;
  width: min(100%, 350px);
  max-width: 350px;
  min-width: 0;
  margin: 0 !important;
  padding: 0;
}

.news-tools > .wp-block-group > p:first-child {
  margin: 0 0 12px !important;
}

.news-tools .wp-block-categories,
.news-tools .wp-block-categories-dropdown,
.news-tools .wp-block-categories__dropdown,
.news-tools select {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-top: 0;
}

/* Spazio controllato tra filtri e griglia */

.news-tools + .wp-block-query,
.news-tools ~ .wp-block-query {
  margin-top: 0 !important;
  margin-bottom: 45px !important;
}

/* Griglia dinamica del Query Loop */

.wp-block-query ul.wp-block-post-template.news-grid,
.wp-block-query ol.wp-block-post-template.news-grid,
.wp-block-query .news-grid {
  display: grid !important;
  grid-template-columns:
    repeat(2, minmax(0, 1fr)) !important;
  gap: 30px 30px !important;
  align-items: stretch !important;
  align-content: start;
  list-style: none;
  width: 100%;
  max-width: none;
  margin: 0 !important;
  padding: 0 !important;
}

/*
  Correzione importante:
  Gutenberg applica un margine verticale
  agli elementi successivi del Query Loop.
  Lo azzeriamo per allineare tutte le card.
*/

.wp-block-query .news-grid > li,
.wp-block-query .news-grid > li.wp-block-post {
  display: flex !important;
  flex-direction: column;
  align-self: stretch !important;
  height: 100%;
  min-width: 0;
  margin: 0 !important;
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
  padding: 0 !important;
}

/* Card della stessa altezza */

.news-card {
  display: flex !important;
  flex-direction: column;
  flex: 1 1 auto;
  align-items: stretch;
  width: 100%;
  height: 100%;
  min-width: 0;
  margin: 0 !important;
  padding: 36px 40px;
  background: #f0f5fa;
  border-top: 3px solid #bdd0e5;
  transition: border-color .2s, transform .2s;
}

.news-card:hover {
  border-color: var(--coral);
  transform: translateY(-3px);
}

.news-card[hidden] {
  display: none !important;
}

/* Metadata */

.news-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 16px;
  row-gap: 6px;
  font-size: 12px;
  font-weight: bold;
  color: #c8412b;
  margin: 0 0 18px !important;
}

.news-meta > * {
  margin: 0 !important;
}

.news-meta a,
.news-meta time {
  color: #c8412b;
  font-size: 12px;
  font-weight: 700;
}

/* Titoli */

.news-card h2,
.news-card .wp-block-post-title {
  font-size: 25px;
  line-height: 1.25;
  margin: 0 0 16px !important;
  letter-spacing: -.4px;
}

.news-card .wp-block-post-title a {
  color: var(--navy);
  text-decoration: none;
}

.news-card .wp-block-post-title a:hover {
  color: var(--coral);
}

/* Estratto e collegamento sempre ordinati */

.news-card p {
  color: var(--text);
}

.news-card .wp-block-post-excerpt {
  display: flex;
  flex-direction: column;
  flex: 1;
  margin: 0 !important;
}

.news-card .wp-block-post-excerpt__excerpt {
  font-size: 16px;
  line-height: 1.65;
  margin: 0 0 20px !important;
}

.news-card .wp-block-post-excerpt__more-text {
  margin-top: auto !important;
  margin-bottom: 0 !important;
  padding-top: 18px;
}

.news-card .wp-block-post-excerpt__more-link {
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
}

.news-card .wp-block-post-excerpt__more-link:hover {
  color: var(--coral);
}

/* Paginazione */

.wp-block-query-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 42px !important;
  margin-bottom: 28px !important;
}

.wp-block-query-pagination a {
  color: var(--navy);
  text-decoration: none;
}

.wp-block-query-pagination a:hover,
.wp-block-query-pagination .current {
  color: var(--coral);
}

/* Spazio inferiore della sezione News */

section.section:has(.news-tools) {
  padding-bottom: 75px;
}

/* Articoli storici */

.archive-note {
  padding: 15px 20px;
  border-left: 3px solid #e35a40;
  background: #f5f7fa;
  font-size: 14px;
  color: var(--text);
}

.article-body {
  max-width: 850px;
}

.article-body > p:not(.archive-note):not(.article-date):not(.source-note) {
  font-size: 19px;
  line-height: 1.85;
  color: var(--text);
}

.article-date {
  font-size: 13px;
  color: #b8402b;
  margin: 25px 0;
}

.source-note {
  font-size: 13px;
  background: #f2f6fa;
  padding: 20px;
  line-height: 1.7;
}

.source-note a {
  text-decoration: underline;
}

#newsCount {
  font-size: 13px;
  color: var(--text);
}

/* =========================================
   13. CONTATTI
========================================= */

.contact {
  background: #eaf2fa;
  padding: 55px 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 85px;
}

.contact h2 {
  font-size: 39px;
}

.contact p {
  color: var(--text);
}

.contact-mail {
  font-size: 22px;
  font-weight: bold;
  display: block;
  margin: 25px 0;
}

.contact-details {
  font-size: 15px;
}

.contact-details small {
  display: block;
  margin-top: 12px;
}

form {
  background: #fff;
  padding: 30px;
  border-radius: 5px;
}

form h3 {
  margin: 0 0 20px;
  font-size: 23px;
}

label {
  font-size: 12px;
  font-weight: bold;
  display: block;
  margin: 0 0 16px;
}

input,
select,
textarea {
  display: block;
  border: 1px solid #ced9e6;
  background: #fcfdfe;
  padding: 12px;
  width: 100%;
  margin-top: 7px;
  border-radius: 3px;
  color: var(--navy);
  font-size: 14px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.ae-contact-form .ae-form-message {
  margin: 10px 0 15px;
  font-weight: bold;
}

.ae-form-consent {
  font-size: 12px;
  margin-top: 10px;
}

.ae-form-consent input {
  display: inline;
  width: auto;
  vertical-align: middle;
  margin-right: 9px;
}

.ae-form-hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

/* =========================================
   14. FOOTER
========================================= */

.aeffe-footer {
  margin: 0 auto;
  padding: 22px max(5%, calc((100vw - 1320px)/2));
  background: #fff;
}

.aeffe-footer .ae-footer-main {
  display: flex;
  align-items: center;
  gap: 25px;
  justify-content: space-between;
  padding-bottom: 16px;
}

.aeffe-footer .wp-block-site-logo img {
  width: 136px !important;
  height: auto !important;
}

.aeffe-footer .wp-block-navigation {
  display: flex;
  gap: 25px;
  font-size: 12px;
  font-weight: bold;
}

.aeffe-footer .ae-footer-meta {
  border-top: 1px solid #dce5ee;
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  color: var(--text);
}

.aeffe-footer .ae-footer-meta p {
  font-size: 11px;
}

/* =========================================
   15. RESPONSIVE TABLET
========================================= */

@media (max-width: 1450px) {
  .section,
  .wrap {
    margin-left: 5%;
    margin-right: 5%;
  }
}

@media (max-width: 1100px) {
  body .wp-site-blocks .ae-header {
    display: flex !important;
    justify-content: space-between !important;
    width: 100vw !important;
    max-width: none !important;
    margin-inline: calc(50% - 50vw) !important;
    padding-inline: 4vw !important;
  }

  .ae-header .wp-block-navigation {
    gap: 15px;
    margin-left: auto !important;
  }

  .ae-header .wp-block-button {
    display: none;
  }

  body .aeffe-main .ae-areas-grid,
  body .wp-block-post-content .ae-areas-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr)) !important;
  }

  .method-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .method-grid > div:first-child {
    grid-column: 1 / -1;
  }

  .studio {
    gap: 30px;
  }

  .studio-photo {
    height: 270px;
  }

  .contact-grid {
    gap: 35px;
  }
}

@media (max-width: 900px) {
  .detail-layout,
  .article-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .news-grid,
  .wp-block-query ul.wp-block-post-template.news-grid {
    grid-template-columns: 1fr !important;
  }
}

/* News su tablet e mobile */

@media (max-width: 780px) {
  .news-tools {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
    margin-bottom: 36px !important;
  }

  .news-tools > .wp-block-group {
    justify-self: start;
    width: 100%;
    max-width: 100%;
  }

  .news-card {
    padding: 28px 25px;
  }

  section.section:has(.news-tools) {
    padding-bottom: 55px;
  }
}

/* =========================================
   16. MOBILE HERO
========================================= */

@media (max-width: 800px) {
  .home-overlay .hero {
    display: flex;
    flex-direction: column;
    aspect-ratio: auto;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .home-overlay .hero > .aeffe-hero-video,
  .home-overlay .hero > .wp-block-video {
    display: block;
    order: 1;
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    line-height: 0;
  }

  .home-overlay .hero > .aeffe-hero-video video,
  .home-overlay .hero > .wp-block-video video {
    position: relative;
    inset: auto;
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: #092f68;
  }

  .home-overlay .hero-content {
    order: 2;
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;
    right: auto;
    transform: none;
    width: 100%;
    max-width: none;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 26px 5% 20px;
    background: #f3f7fb;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
  }

  .home-overlay .hero-content h1 {
    font-size: clamp(29px, 5.8vw, 41px);
    letter-spacing: -1px;
    line-height: 1.08;
  }

  .home-overlay .hero-content h1 br {
    display: none;
  }

  .home-overlay .hero-content .lead {
    font-size: 15px;
    max-width: 650px;
    margin: 14px 0 20px;
  }

  .home-overlay .hero-content .button {
    padding: 15px 18px;
  }

  .home-overlay .hero-bottom {
    order: 3;
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    align-self: flex-start;
    margin: 0;
    padding: 8px 5% 16px;
    background: #f3f7fb;
    border-radius: 0;
    width: 100%;
  }
}

/* =========================================
   17. MOBILE GENERALE
========================================= */

@media (max-width: 700px) {
  body .wp-site-blocks .ae-header {
    width: 100vw !important;
    max-width: none !important;
    margin-inline: calc(50% - 50vw) !important;
    padding-inline: 5vw !important;
    height: 78px;
  }

  .ae-header .wp-block-site-logo img {
    width: 125px !important;
  }

  .section {
    padding: 35px 0;
  }

  .section-head {
    display: block;
  }

  .section-head p:not(.eyebrow) {
    font-size: 14px;
  }

  h2 {
    font-size: 29px;
  }

  .values .wrap {
    display: block;
  }

  .values .wrap > p {
    border: 0;
    padding: 0;
  }

  .value-row {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
  }

  .value-row > div {
    padding: 0;
    border: 0;
    gap: 12px;
  }

  .value-row b {
    font-size: 29px;
  }

  .studio {
    display: block;
  }

  .studio-photo {
    margin-top: 30px;
    height: 220px;
  }

  .method-grid {
    grid-template-columns: 1fr 1fr;
    gap: 25px;
  }

  .method article {
    padding-left: 13px;
  }

  .focus-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .focus-grid > .wp-block-group {
    padding: 25px;
  }

  .focus-grid h3 {
    font-size: 26px;
  }

  .focus-grid h3 br {
    display: none;
  }

  .contact-grid {
    display: block;
  }

  .contact h2 {
    font-size: 33px;
  }

  form {
    margin-top: 30px;
    padding: 22px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .page-cta .wrap {
    display: block;
  }

  .page-cta .button {
    margin-top: 23px;
  }

  .news-tools {
    grid-template-columns: 1fr !important;
  }

  .aeffe-footer .ae-footer-main,
  .aeffe-footer .ae-footer-meta {
    flex-wrap: wrap;
  }
}

@media (max-width: 620px) {
  body .aeffe-main .ae-areas-grid,
  body .wp-block-post-content .ae-areas-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  body .aeffe-main .ae-areas-grid > .ae-card,
  body .wp-block-post-content .ae-areas-grid > .ae-card {
    grid-template-rows: minmax(205px, auto);
  }

  body .aeffe-main .ae-card > .ae-card__copy,
  body .wp-block-post-content .ae-card > .ae-card__copy {
    padding: 18px;
  }
}

@media (max-width: 460px) {
  .studio-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .studio-actions > .ae-link {
    width: 100%;
    display: block !important;
  }

  .studio-actions > .ae-link a {
    width: 100%;
    justify-content: center;
  }

  .news-card {
    padding: 25px 20px;
  }

  .news-card h2,
  .news-card .wp-block-post-title {
    font-size: 22px;
  }
}

/* =========================================
   18. ACCESSIBILITA'
========================================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
