/* =======================================================================
   RESET LEGGERO
======================================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.5;
  color: #222;
  background: #fdfcf7; /* caldo, soft */
}

/* =======================================================================
   VARIABILI BRAND
======================================================================= */

:root {
  --logo-purple: #5913a8;
  --logo-green: #1eb000;
}

/* =======================================================================
   LAYOUT BASE
======================================================================= */

.page-container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 3rem 1.25rem 3rem; /* prima era 2.5rem... */
}

/* =======================================================================
   HEADER
======================================================================= */

.site-header {
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06); /* stacco più deciso */
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* Nome associazione */

.site-title a {
  font-weight: 700;
  font-size: 1.08rem;
  text-decoration: none;
  color: var(--logo-purple);
}

/* Menu principale */

.site-nav a {
  font-size: 1rem;
  margin-left: 0.9rem;
  text-decoration: none;
  color: var(--logo-green);
  padding-bottom: 0.15rem;
  border-bottom: 2px solid transparent;
  font-weight: 500;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease;
}

.site-nav a:hover {
  color: #087900;
  transform: translateY(-1px);
}

.site-nav a.is-active {
  color: var(--logo-purple);
  border-color: var(--logo-purple);
  font-weight: 600;
}

/* =======================================================================
   HERO HOME
======================================================================= */

.hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

.hero-logo {
  max-width: 220px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 1.5rem auto;
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #222;
}

.hero-text {
  max-width: 760px;
  margin: 0.35rem auto;
  font-size: 1rem;
  color: #444;
}

/* Bottoni generici */

.btn {
  display: inline-block;
  margin-top: 1.75rem;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: #4caf50;
  color: #fff;
  box-shadow: 0 8px 18px rgba(76, 175, 80, 0.25);
  transition:
    background 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.btn-primary:hover {
  background: #3d9640;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(76, 175, 80, 0.28);
}

/* =======================================================================
   HOME – HIGHLIGHT CARDS
======================================================================= */

.home-highlights h2 {
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
  text-align: left;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

/* Card con foto background */

.home-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  color: #fff;
  min-height: 180px;
  padding: 1.4rem 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  isolation: isolate;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Sfondo immagine + overlay */

.home-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.8);
  z-index: -2;
  transition: filter 0.3s ease;
}

.home-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.55),
    rgba(0, 0, 0, 0.1)
  );
  z-index: -1;
  transition: background 0.3s ease;
}

/* Hover effetto WOW */

.home-card:hover::before {
  filter: brightness(1.05);
}

.home-card:hover::after {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.4),
    rgba(0, 0, 0, 0.05)
  );
}

.home-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}

/* Immagini di sfondo per card */

.home-card--health::before {
  background-image: url("/images/home/health.jpg");
}

.home-card--food::before {
  background-image: url("/images/home/food.jpg");
}

.home-card--pride::before {
  background-image: url("/images/home/pride.jpg");
}

.home-card--projects::before {
  background-image: url("/images/home/projects.jpg");
}

.home-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.home-card p {
  font-size: 0.9rem;
  margin: 0;
}

.card-link {
  margin-top: 0.7rem;
  font-size: 0.88rem;
  color: #ffeb3b;
  text-decoration: none;
  font-weight: 600;
}

.card-link:hover {
  text-decoration: underline;
}

/* =======================================================================
   GENERIC PAGE BODY & CONTACT
======================================================================= */

/* ==== PAGE BODY / TESTO PAGINE ======================================= */

/* paragrafi */
.page-body {
  font-size: 0.98rem;
  color: #444;
  max-width: 760px;     /* Larghezza colonna */
  margin: 0;       /* centrato dentro page-container */
}

.page-body p {
  margin-bottom: 0.9rem;
}

/* liste puntate un filo più ariose */
.page-body ul {
  padding-left: 1.2rem;
  margin: 0.4rem 0 1rem;
}

.page-body li {
  margin-bottom: 0.3rem;
}

.contact-page {
  font-size: 1rem;
}

.contact-page h3 {
  margin-top: 1.2rem;
  font-size: 1.1rem;
}

.contact-page a {
  color: #1565c0;
}

.contact-page a:hover {
  text-decoration: underline;
}

/* =======================================================================
   PAGE HERO (logo sopra ai titoli delle pagine interne)
======================================================================= */

.page-hero {
  text-align: center;
  margin: 2.5rem 0 1.5rem;
}

.page-hero img {
  max-width: 220px;
  width: auto;
  height: auto;
  opacity: 0.95;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.12));
}

/* =======================================================================
   PROJECTS – YEAR PAGES
======================================================================= */

.projects-year-page {
  padding-top: 2rem;
}

.projects-year-header h1 {
  font-size: 1.8rem;
  margin-bottom: 0.4rem;
}

.projects-year-intro {
  max-width: 720px;
  font-size: 0.98rem;
  color: #555;
}

/* Slider evidenza */

.projects-slider-section {
  margin-top: 1.8rem;
  margin-bottom: 2.5rem;
}

.projects-swiper {
  max-width: 960px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.18);
}

.projects-swiper .swiper-slide img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
}

/* Gallery grid */

.projects-gallery-section {
  margin-top: 1rem;
}

.projects-gallery-title {
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.projects-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.projects-gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.15);
}

.projects-gallery-item img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.projects-gallery-item:hover img {
  transform: scale(1.03);
  filter: brightness(1.08);
}

/* Immagini dettaglio progetto */

.project-detail img {
  max-width: 900px;
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
  margin: 0 auto 1.5rem;
}

/* =======================================================================
   PROJECTS – ROOT /projects/
======================================================================= */

.projects-index-header h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.projects-index-intro {
  max-width: 720px;
  font-size: 0.98rem;
  color: #444;
}

.projects-year-section {
  margin-top: 2.5rem;
}

.projects-year-heading {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.projects-year-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.projects-year-list a {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #e1e1e1;
  text-decoration: none;
  font-size: 0.9rem;
  color: #333;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
  transition:
    background 0.15s ease,
    transform 0.1s ease,
    box-shadow 0.15s ease,
    color 0.15s ease;
}

.projects-year-list a:hover {
  background: #29d65a;
  color: #fff;
  box-shadow: 0 6px 14px rgba(41, 214, 90, 0.35);
  transform: translateY(-1px);
}

/* =======================================================================
   PRESS & MEDIA
======================================================================= */

.press-page .press-header h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.press-intro {
  max-width: 720px;
  margin: 0.25rem 0 1.75rem;
  font-size: 0.98rem;
  color: #444;
}

/* Griglia articoli */

.press-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.press-card {
  background: #fff;
  border-radius: 14px;
  padding: 0.75rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
}

.press-card img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.press-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);
}

.press-caption {
  margin-top: 0.7rem;
  font-size: 0.9rem;
  color: #444;
  font-weight: 500;
}

/* =======================================================================
   FOOTER — VERSIONE POMPATA
======================================================================= */

.site-footer {
  background: #f1f1f1;
  padding: 2rem 1rem;
  font-size: 0.95rem;              /* un filo più grande */
  color: #555;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  line-height: 1.7;
}

.site-footer a {
  color: #5b1abf;                  /* viola logo */
  font-weight: 600;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* =======================================================================
   RESPONSIVE
======================================================================= */

@media (max-width: 600px) {
  .page-container {
    padding: 1.75rem 1rem 2.5rem;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .hero-text {
    font-size: 0.95rem;
  }

  .site-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav a {
    margin-left: 0;
    margin-right: 0.6rem;
  }
}

@media (max-width: 700px) {
  .projects-swiper .swiper-slide img {
    height: 260px;
  }

  .projects-gallery-item img {
    height: 180px;
  }

  .press-card img {
    height: 260px;
  }
}

/* =======================================================================
   HEADER NUOVO — TITOLO DUE RIGHE + MENU 2 FILE
======================================================================= */

.site-header {
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem 0.9rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 2rem;
  row-gap: 0.25rem;
  align-items: center;
}

/* ==== TITOLO HEADER SU DUE RIGHE ====================== */

.site-title a {
  display: inline-block;
  text-decoration: none;
  color: var(--logo-purple);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  line-height: 1.2;
  font-size: 1.2rem;        /* prima riga */
}

.site-title-sub {
  display: inline-block;    /* sta sulla sua riga dopo il <br> */
  font-weight: 600;
  font-size: 0.86rem;       /* più piccola, effetto “fondazione” */
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.9;
}

@media (max-width: 900px) {
  .site-title a {
    font-size: 1.05rem;
  }
  .site-title-sub {
    font-size: 0.8rem;
  }
}

@media (max-width: 650px) {
  .site-title a {
    font-size: 0.98rem;
  }
}

/* ==== MENU PRINCIPALE — DUE RIGHE =================================== */

.site-nav {
  grid-column: 2 / 3;
  grid-row: 1 / 3;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.2rem;
  justify-content: center;     /* <--- PRIMA era flex-start */
  max-width: 620px;            /* opzionale, per far respirare le due righe */
  margin: 0 auto;              /* aiuta a centrare il blocco nella cella */
}

.site-nav a {
  font-size: 0.98rem;
  text-decoration: none;
  color: var(--logo-green);
  padding-bottom: 0.18rem;
  border-bottom: 2px solid transparent;
  font-weight: 500;
  transition:
    color 0.18s ease,
    border-color 0.18s ease,
    transform 0.12s ease;
}

.site-nav a:hover {
  color: #0b7300;
  transform: translateY(-1px);
  border-color: rgba(0, 0, 0, 0.08);
}

.site-nav a.is-active {
  color: var(--logo-purple);
  border-color: var(--logo-purple);
  font-weight: 600;
}

/* ==== BANDIERE ======================================================= */

.lang-switcher {
  grid-column: 3 / 4;
  grid-row: 1 / 2;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.lang-switcher img {
  width: 26px;
  height: 26px;
  border-radius: 3px;
  display: block;
  cursor: pointer;
  opacity: 0.85;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    opacity 0.15s ease;
}

.lang-switcher img:hover {
  transform: scale(1.12);
  box-shadow: 0 0 6px rgba(0,0,0,0.25);
  opacity: 1;
}

.lang-switcher img.is-active {
  box-shadow: 0 0 0 2px var(--logo-purple);
  opacity: 1;
}

/* ==== MOBILE ========================================================= */

@media (max-width: 700px) {
  .site-header-inner {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    row-gap: 0.35rem;
  }

  .site-title {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
  }

  .site-nav {
    grid-column: 1 / 3;
    grid-row: 2 / 3;
    max-width: 100%;
  }

  .lang-switcher {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    justify-content: flex-end;
  }
}

/* Titolo header su due righe */
.site-title a {
  text-decoration: none;
  color: var(--logo-purple);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.2;
}

.site-title-line1 {
  font-weight: 700;
  font-size: 1.2rem;
}

.site-title-line2 {
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.9;
}

/* Piccolo aggiustamento su schermi più stretti */
@media (max-width: 900px) {
  .site-title-line1 { font-size: 1.1rem; }
  .site-title-line2 { font-size: 0.8rem; }
}

/* === FORZIAMO IL TITOLO SU DUE RIGHE — DEFINITIVO === */
.site-title a {
  white-space: normal !important;
  display: inline-block !important;
}

.site-title span {
  display: block !important;
}
