/*
 * Pagine con hero a tutto schermo, dalle tavole Figma:
 * "Pagina a sezioni" (CEAS) e Contatti.
 */

/* ---------- Hero ---------- */

.ap-hero-page {
  font-family: var(--ap-font);
}

.ap-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.ap-hero--plain {
  background: #e4e4e4;
  color: var(--ap-green);
}

.ap-hero--waves {
  background: var(--ap-green);
  color: var(--ap-white);
}

.ap-hero__inner {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem, 3.2vw, 2.75rem);
  padding: 7rem var(--ap-gutter);
  text-align: center;
  pointer-events: none;
}

.ap-hero__text {
  max-width: 34rem;
  margin: 0;
  font-size: clamp(1rem, 1.55vw, 1.4rem);
  font-weight: 400;
  line-height: 1.3;
}

.ap-hero__title {
  margin: 0;
  font-size: clamp(3.4rem, 8vw, 7.5rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.01em;
}

.ap-hero--plain .ap-hero__title { color: var(--ap-lime-dark); }
.ap-hero--waves .ap-hero__title { color: var(--ap-white); }

.ap-hero-page__body {
  position: relative;
  background: var(--ap-white);
}

/* ---------- Sezioni numerate (CEAS) ---------- */

.ap-sec {
  --sec-bg: var(--ap-white);
  --sec-eyebrow: var(--ap-lime-dark);
  --sec-title: var(--ap-green);
  --sec-num: var(--ap-lime-dark);
  --sec-text: var(--ap-green);

  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
  column-gap: clamp(1.5rem, 5vw, 5rem);
  align-items: start;
  padding: clamp(4rem, 8.5vw, 8rem) clamp(1.25rem, 4.3vw, 4rem) clamp(4.5rem, 11vw, 10.5rem);
  background: var(--sec-bg);
  color: var(--sec-text);
}

.ap-sec--grey { --sec-bg: #e4e4e4; }

.ap-sec--lime {
  --sec-bg: var(--ap-lime-dark);
  --sec-eyebrow: var(--ap-white);
  --sec-num: var(--ap-white);
}

.ap-sec--green {
  --sec-bg: var(--ap-green);
  --sec-eyebrow: var(--ap-white);
  --sec-title: var(--ap-lime-dark);
  --sec-num: var(--ap-white);
  --sec-text: var(--ap-white);
}

.ap-sec__eyebrow {
  margin: 0;
  font-size: clamp(1.1rem, 2vw, 1.9rem);
  font-weight: 400;
  line-height: 1;
  color: var(--sec-eyebrow);
}

.ap-sec__title {
  margin: clamp(2.5rem, 9vw, 8.5rem) 0 0;
  font-size: clamp(2rem, 3.7vw, 3.6rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--sec-title);
  hyphens: manual;
}

.ap-sec__media {
  margin: 0;
}

.ap-sec__media img {
  display: block;
  width: 100%;
  aspect-ratio: 0.53;
  object-fit: cover;
}

.ap-sec__body {
  display: flex;
  flex-direction: column;
}

.ap-sec--no-image .ap-sec__body {
  grid-column: 2 / span 2;
}

.ap-sec__num {
  align-self: flex-end;
  margin: 0;
  font-size: clamp(2rem, 4.6vw, 4.4rem);
  font-weight: 400;
  line-height: 1;
  color: var(--sec-num);
}

.ap-sec__text {
  max-width: 26rem;
  margin-top: clamp(2rem, 6vw, 5.5rem);
  font-size: clamp(0.88rem, 1.05vw, 1rem);
  font-weight: 400;
  line-height: 1.45;
}

.ap-sec--no-image .ap-sec__text { max-width: 44rem; }

.ap-sec__text > * { margin: 0 0 0.9em; }
.ap-sec__text > *:last-child { margin-bottom: 0; }
.ap-sec__text strong,
.ap-sec__text b { font-weight: 700; }
.ap-sec__text a { color: inherit; text-decoration: underline; text-underline-offset: 0.2em; }
.ap-sec__text a:hover { text-decoration-thickness: 2px; }
.ap-sec__text ul,
.ap-sec__text ol { padding-left: 1.1em; list-style: disc; }
.ap-sec__text ol { list-style: decimal; }
.ap-sec__text li { margin-bottom: 0.35em; }
.ap-sec__text h3,
.ap-sec__text h4 { margin-top: 1.6em; font-size: 1.1em; font-weight: 700; }
.ap-sec__text img { max-width: 100%; height: auto; }
.ap-sec__text figure { margin-inline: 0; }

.ap-sec--intro { display: block; }
.ap-sec__intro { max-width: var(--ap-measure); margin-inline: auto; }

@media (max-width: 900px) {
  .ap-sec {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 2.25rem;
  }

  .ap-sec__title { margin-top: 1.25rem; }

  .ap-sec__media img {
    aspect-ratio: 4 / 5;
    max-height: 75vh;
  }

  .ap-sec--no-image .ap-sec__body { grid-column: auto; }

  .ap-sec__num {
    position: absolute;
    top: clamp(4rem, 8.5vw, 8rem);
    right: clamp(1.25rem, 4.3vw, 4rem);
    font-size: 2.2rem;
  }

  .ap-sec__text { max-width: none; margin-top: 0; font-size: 0.95rem; }
}

/* ---------- Contatti ---------- */

.ap-ct-wrap {
  width: min(100%, 96rem);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4.5vw, 4.5rem);
}

.ap-ct-info {
  padding-block: clamp(3rem, 7vw, 6rem) clamp(4rem, 9vw, 8rem);
  background: var(--ap-white);
  color: var(--ap-green);
}

/* Riga: titolo a sinistra, contenuto a destra (come le sezioni CEAS) */
.ap-ct-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 2.5rem clamp(2rem, 6vw, 6rem);
  align-items: start;
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.ap-ct-block + .ap-ct-block { border-top: 1px solid var(--ap-line); }

.ap-ct-block__eyebrow {
  margin: 0;
  font-size: clamp(0.95rem, 1.3vw, 1.2rem);
  font-weight: 400;
  color: var(--ap-lime-dark);
}

.ap-ct-block__title {
  max-width: 12ch;
  margin: 1rem 0 0;
  font-size: clamp(1.9rem, 3.2vw, 3rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--ap-green);
}

/* Contatti 2x2 */
.ap-ct-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(1.5rem, 4vw, 4rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.ap-ct-card {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  column-gap: 1.1rem;
  align-content: start;
  padding: 1.75rem 0;
  border-top: 1px solid var(--ap-line);
}

.ap-ct-card > :not(.ap-ct-card__icon) { grid-column: 2; }

.ap-ct-card__icon {
  grid-row: 1 / span 3;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  background: var(--ap-lime-dark);
  color: var(--ap-white);
}

.ap-ct-card__icon .ap-icon { width: 1.15rem; height: 1.15rem; }

.ap-ct-card__label {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ap-muted);
}

.ap-ct-card__value {
  display: flex;
  flex-direction: column;
  margin: 0;
  font-size: clamp(1rem, 1.4vw, 1.3rem);
  font-weight: 400;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.ap-ct-card__value a,
.ap-ct-card__link,
.ap-ct-social a,
.ap-ct-person__links a {
  color: inherit;
  text-decoration: none;
}

.ap-ct-card__value a:hover,
.ap-ct-card__value a:focus-visible { text-decoration: underline; text-underline-offset: 0.2em; }

.ap-ct-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  justify-self: start;
  margin-top: 0.7rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ap-green-700);
}

.ap-ct-card__link .ap-icon { width: 0.9rem; height: 0.9rem; }
.ap-ct-card__link:hover { text-decoration: underline; text-underline-offset: 0.2em; }

.ap-ct-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  margin: 0.15rem 0 0;
  padding: 0;
  list-style: none;
}

.ap-ct-social a {
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: underline;
  text-underline-offset: 0.25em;
  text-decoration-thickness: 1px;
}

.ap-ct-social a:hover,
.ap-ct-social a:focus-visible { color: var(--ap-lime-dark); }

/* Referenti */
.ap-ct-people {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem clamp(1.5rem, 4vw, 4rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.ap-ct-person {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  padding-top: 1.75rem;
  border-top: 1px solid var(--ap-line);
}

.ap-ct-person__photo {
  width: 5.5rem;
  height: 5.5rem;
  flex-shrink: 0;
  border-radius: 999px;
  object-fit: cover;
  background: var(--ap-lime-50);
}

.ap-ct-person__name {
  margin: 0;
  font-size: clamp(1.05rem, 1.4vw, 1.3rem);
  font-weight: 500;
  line-height: 1.2;
}

.ap-ct-person__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.7rem 0 0;
  padding: 0;
  list-style: none;
}

.ap-ct-person__links a {
  display: inline-flex;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--ap-line-strong);
  border-radius: 999px;
  font-size: 0.75rem;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.ap-ct-person__links a:hover,
.ap-ct-person__links a:focus-visible {
  border-color: var(--ap-green);
  background: var(--ap-green);
  color: var(--ap-white);
}

@media (max-width: 900px) {
  .ap-ct-block { grid-template-columns: minmax(0, 1fr); }
  .ap-ct-block__title { max-width: none; }
}

@media (max-width: 600px) {
  .ap-ct-cards,
  .ap-ct-people { grid-template-columns: minmax(0, 1fr); }
}

/* Form */

.ap-ct-form-section {
  padding-block: clamp(4rem, 9vw, 8.5rem);
  background: var(--ap-green);
  color: var(--ap-white);
  scroll-margin-top: 4rem;
}

.ap-ct-title {
  margin: 0;
  font-size: clamp(2.4rem, 4.4vw, 4rem);
  font-weight: 500;
  line-height: 1;
}

.ap-ct-subtitle {
  max-width: 28rem;
  margin: 1rem 0 0;
  font-size: clamp(0.95rem, 1.2vw, 1.15rem);
  font-weight: 400;
  line-height: 1.4;
  color: rgb(255 255 255 / 0.9);
}

.ap-ct-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 2rem;
  margin-top: clamp(2rem, 4vw, 3rem);
}

.ap-ct-field { display: flex; flex-direction: column; gap: 0.55rem; }
.ap-ct-field--full { grid-column: 1 / -1; }

.ap-ct-field label {
  font-size: 0.85rem;
  font-weight: 500;
}

.ap-ct-field input,
.ap-ct-field textarea {
  width: 100%;
  min-height: 3.4rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgb(200 242 90 / 0.45);
  border-radius: 2px;
  background: transparent;
  color: var(--ap-white);
  font-family: var(--ap-font);
  font-size: 0.9rem;
  font-weight: 400;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.ap-ct-field textarea { min-height: 7.5rem; resize: vertical; line-height: 1.5; }

.ap-ct-field input::placeholder,
.ap-ct-field textarea::placeholder { color: rgb(255 255 255 / 0.5); }

.ap-ct-field input:focus,
.ap-ct-field textarea:focus {
  outline: none;
  border-color: var(--ap-lime);
  background: rgb(0 0 0 / 0.08);
}

.ap-ct-form__footer {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.ap-ct-check {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  font-size: 0.85rem;
  line-height: 1.45;
}

.ap-ct-check input {
  width: 1rem;
  height: 1rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: var(--ap-lime);
}

.ap-ct-check a { color: inherit; }

.ap-ct-submit {
  align-self: flex-end;
  padding: 0.7rem 1.3rem;
  border: 1px solid var(--ap-white);
  border-radius: 2px;
  background: transparent;
  color: var(--ap-white);
  font-family: var(--ap-font);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.ap-ct-submit:hover,
.ap-ct-submit:focus-visible { background: var(--ap-white); color: var(--ap-green); }

/* Newsletter */

.ap-ct-newsletter {
  padding-block: clamp(5rem, 13vw, 12rem);
  background: var(--ap-lime-dark);
  color: var(--ap-green-900);
  text-align: center;
  scroll-margin-top: 4rem;
}

.ap-ct-newsletter__title {
  margin: 0;
  font-size: clamp(1.8rem, 3.2vw, 2.9rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--ap-white);
}

.ap-ct-newsletter__text {
  max-width: 42rem;
  margin: 1rem auto 0;
  font-size: clamp(0.85rem, 1vw, 0.95rem);
  font-weight: 400;
  line-height: 1.5;
}

.ap-ct-newsletter__form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  margin-top: 2rem;
}

.ap-ct-newsletter__row {
  display: flex;
  gap: 0.6rem;
  width: min(100%, 38rem);
}

.ap-ct-newsletter__input {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
}

.ap-ct-newsletter__input .ap-icon {
  position: absolute;
  left: 0.9rem;
  width: 1rem;
  height: 1rem;
  color: var(--ap-green-900);
  pointer-events: none;
}

.ap-ct-newsletter__input input {
  width: 100%;
  min-height: 3.4rem;
  padding: 0.8rem 1rem 0.8rem 2.5rem;
  border: 1px solid rgb(6 78 59 / 0.55);
  border-radius: 2px;
  background: rgb(255 255 255 / 0.08);
  color: var(--ap-green-900);
  font-family: var(--ap-font);
  font-size: 0.85rem;
  font-weight: 400;
}

.ap-ct-newsletter__input input::placeholder { color: rgb(6 78 59 / 0.75); }
.ap-ct-newsletter__input input:focus { outline: 2px solid var(--ap-white); outline-offset: 1px; }

.ap-ct-newsletter__submit {
  padding: 0 1.5rem;
  border: 0;
  border-radius: 2px;
  background: var(--ap-white);
  color: var(--ap-green-900);
  font-family: var(--ap-font);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.ap-ct-newsletter__submit:hover,
.ap-ct-newsletter__submit:focus-visible { background: var(--ap-green-900); color: var(--ap-white); }

.ap-ct-check--small {
  width: min(100%, 38rem);
  font-size: 0.72rem;
  text-align: left;
}

.ap-ct-notice {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  max-width: 38rem;
  margin: 1.5rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: 2px;
  font-size: 0.85rem;
  line-height: 1.45;
  text-align: left;
}

.ap-ct-newsletter .ap-ct-notice { margin-inline: auto; }
.ap-ct-notice--ok { background: var(--ap-lime); color: var(--ap-green-900); }
.ap-ct-notice--error { background: #fde8e4; color: #7a1d0c; }

.ap-form__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 760px) {
  .ap-ct-form { grid-template-columns: minmax(0, 1fr); }
  .ap-ct-submit { align-self: stretch; }
  .ap-ct-newsletter__row { flex-direction: column; }
  .ap-ct-newsletter__submit { min-height: 3.2rem; }
}

/* ---------- Pagina editoriale (Chi siamo) ---------- */

.ap-ed {
  --ed-bg: var(--ap-white);

  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr);
  gap: 2.5rem clamp(2rem, 6vw, 6rem);
  align-items: start;
  padding: clamp(4rem, 8vw, 7.5rem) clamp(1.25rem, 4.3vw, 4rem);
  background: var(--ed-bg);
  color: var(--ap-green);
  scroll-margin-top: 2rem;
}

.ap-ed--grey { --ed-bg: #ececec; }

.ap-ed__head {
  position: sticky;
  top: 7rem;
}

.ap-ed__eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  align-items: baseline;
  margin: 0;
  font-size: clamp(0.95rem, 1.3vw, 1.2rem);
  font-weight: 400;
  color: var(--ap-lime-dark);
}

.ap-ed__num {
  font-variant-numeric: tabular-nums;
}

.ap-ed__title {
  max-width: 14ch;
  margin: 1rem 0 0;
  font-size: clamp(1.9rem, 3.4vw, 3.2rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--ap-green);
}

.ap-ed__body {
  max-width: var(--ap-measure);
  color: var(--ap-ink-soft);
}

.ap-ed__body h3 {
  margin-top: 2.4em;
  padding-top: 1.4em;
  border-top: 1px solid var(--ap-line);
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  color: var(--ap-green);
}

.ap-ed__body > h3:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

/* Pulsanti e indice */
.ap-ed-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.75rem;
}

.ap-prose .ap-ed-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1.2rem;
  border: 1px solid var(--ap-green);
  border-radius: 999px;
  color: var(--ap-green);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  text-transform: none;
  transition: background-color 160ms ease, color 160ms ease;
}

.ap-prose .ap-ed-btn::first-letter { text-transform: uppercase; }

.ap-prose .ap-ed-btn:hover,
.ap-prose .ap-ed-btn:focus-visible {
  background: var(--ap-green);
  color: var(--ap-white);
}

.ap-ed--index { align-items: center; }
.ap-ed--index .ap-ed__head { position: static; }
.ap-ed--index .ap-ed-buttons { margin-top: 0; }

.ap-ed--index .ap-ed-btn {
  padding: 0.9rem 1.5rem;
  border-color: var(--ap-lime-dark);
  background: var(--ap-lime-dark);
  color: var(--ap-white);
  font-size: 0.9rem;
}

.ap-ed--index .ap-ed-btn:hover,
.ap-ed--index .ap-ed-btn:focus-visible { border-color: var(--ap-green); }

/* Gallery */
.ap-ed-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin-block: 1.75rem;
}

.ap-ed-gallery__item {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--ap-lime-50);
}

.ap-prose .ap-ed-gallery__item img {
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: cover;
  transition: transform 520ms var(--ap-ease);
}

.ap-ed-gallery__item:hover img { transform: scale(1.06); }

@media (max-width: 900px) {
  .ap-ed { grid-template-columns: minmax(0, 1fr); }
  .ap-ed__head { position: static; }
  .ap-ed__title { max-width: none; }
  .ap-ed-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .ap-ed-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Foto delle sezioni e gallery: cliccabili per l'ingrandimento. */
.ap-sec__media a {
  display: block;
  overflow: hidden;
  cursor: zoom-in;
}

.ap-sec__media img {
  transition: transform 600ms var(--ap-ease);
}

.ap-sec__media a:hover img,
.ap-sec__media a:focus-visible img {
  transform: scale(1.03);
}

.ap-ed-gallery__item { cursor: zoom-in; }
