/* ===============================
   RESET / BASE
================================ */

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

:root {
  --bg-main: #f7f3ed;
  --bg-soft: #f4efe8;
  --bg-section: #faf7f2;
  --surface: #ffffff;
  --surface-soft: #fcfaf7;

  --text-main: #223127;
  --text-soft: #667168;
  --text-white: #ffffff;

  --green: #2f8f46;
  --green-dark: #216a33;
  --green-soft: #e8f6eb;

  --orange: #ef8b1e;
  --orange-dark: #d97706;
  --orange-soft: #fff3e4;

  --blue: #1f8acb;
  --blue-soft: #eaf6fd;

  --teal: #00a7b5;
  --teal-soft: #e7f9fb;

  --purple: #9656a1;
  --purple-soft: #f6ecf8;

  --border: rgba(34, 49, 39, 0.08);
  --border-strong: rgba(34, 49, 39, 0.14);

  --shadow-xs: 0 4px 10px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 10px 24px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 16px 36px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.16);

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;

  --container: 1180px;
  --header-height: 96px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-main);
  background: linear-gradient(180deg, #faf7f2 0%, #f4efe8 100%);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--green-dark);
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--orange-dark);
  text-decoration: none;
}

p {
  margin: 0 0 1em;
}

ul,
ol {
  margin: 0 0 1em;
  padding-left: 1.2em;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.site-main {
  min-height: 60vh;
  position: relative;
  z-index: 1;
}

.home-page {
  overflow-x: clip;
}

.text-center {
  text-align: center;
}

.mb-0 {
  margin-bottom: 0;
}

/* ===============================
   TYPOGRAPHY
================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 0.5em;
  line-height: 1.18;
  color: var(--text-main);
}

h1 {
  font-size: clamp(2.4rem, 4.2vw, 4.3rem);
}

h2 {
  font-size: clamp(2rem, 3vw, 3rem);
}

h3 {
  font-size: clamp(1.2rem, 1.7vw, 1.5rem);
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: var(--orange-soft);
  color: var(--orange-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.section-intro {
  max-width: 760px;
  margin: 0 auto 34px;
  text-align: center;
  color: var(--text-soft);
  font-size: 1.05rem;
}

/* ===============================
   TOP BAR
================================ */

.top-bar {
  background: #111111;
  color: #ffffff;
  font-size: 12px;
  position: relative;
  z-index: 1001;
}

.top-bar-inner {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* SINISTRA - CONTATTI */
.top-bar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.top-bar-link {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  font-size: 12px;
  line-height: 1;
}

.top-bar-link:hover {
  color: #ffffff;
}

/* separatore tra telefono e email */
.top-bar-left .top-bar-link + .top-bar-link {
  position: relative;
  padding-left: 16px;
}

.top-bar-left .top-bar-link + .top-bar-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-50%);
}

/* DESTRA - SOCIAL */
.top-bar-right {
  display: flex;
  align-items: center;
}

.top-bar-icon {
  width: 34px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  background: transparent;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  transition: background 0.2s ease;
}

.top-bar-icon:last-child {
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.top-bar-icon:hover {
  background: #19b8b3;
  color: #ffffff;
}

/* MOBILE */
@media (max-width: 640px) {
  .top-bar-left {
    display: none;
  }

  .top-bar-inner {
    justify-content: flex-end;
  }
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
  border-bottom: 1px solid rgba(34, 49, 39, 0.06);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
}

.home .site-header {
  position: sticky;
  top: 0;
  background: #ffffff;
  border-bottom: 1px solid rgba(34, 49, 39, 0.06);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
  backdrop-filter: none;
}

body.admin-bar .site-header {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

.header-inner {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 20px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  color: var(--text-main);
}

.site-logo img,
.custom-logo,
.site-logo .custom-logo-link img {
  max-height: 74px;
  width: auto;
}

.logo-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: #fff;
  font-size: 18px;
  box-shadow: 0 10px 24px rgba(47, 143, 70, 0.22);
}

.logo-text {
  line-height: 1.15;
}

.logo-text strong {
  display: block;
  font-size: 1rem;
  font-weight: 800;
}

.logo-text span {
  display: block;
  font-size: 0.85rem;
  color: var(--text-soft);
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  color: var(--text-main);
  font-size: 20px;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
}

.nav-toggle:hover {
  background: #faf8f4;
}

.btn-dona-header {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--orange), #f59e0b);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.01em;
  box-shadow: 0 12px 24px rgba(239, 139, 30, 0.24);
  white-space: nowrap;
}

.btn-dona-header:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--orange-dark), #ea8a10);
  transform: translateY(-1px);
}

/* ===============================
   MENU
================================ */

.main-nav {
  display: flex;
  align-items: center;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav > ul {
  display: flex;
  align-items: center;
  gap: 6px;
}

.main-nav li {
  position: relative;
}

.main-nav a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--text-main);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.main-nav a:hover {
  color: var(--orange-dark);
  background: rgba(239, 139, 30, 0.10);
}

.main-nav .current-menu-item > a,
.main-nav .current_page_item > a,
.main-nav .current-menu-ancestor > a,
.main-nav .current-page-ancestor > a {
  color: var(--orange-dark);
  background: rgba(239, 139, 30, 0.12);
}

.main-nav .sub-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 250px;
  padding: 10px 0;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(34, 49, 39, 0.08);
  border-radius: 16px;
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.22s ease;
  z-index: 100;
}

.main-nav .sub-menu li a {
  padding: 11px 16px;
  border-radius: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.main-nav .sub-menu li a:hover {
  background: #f7f3ee;
}

@media (min-width: 900px) {
  .main-nav .menu-item-has-children > a::after {
    content: "▾";
    display: inline-block;
    margin-left: 7px;
    font-size: 0.7rem;
    opacity: 0.7;
    vertical-align: middle;
  }

  .main-nav li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .main-nav .sub-menu li > .sub-menu {
    top: -10px;
    left: calc(100% + 10px);
  }
}

/* ===============================
   BUTTONS
================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--orange), #f59e0b);
  color: #fff;
  box-shadow: 0 12px 28px rgba(239, 139, 30, 0.22);
}

.btn-primary:hover {
  color: #fff;
}

.btn-secondary {
  background: linear-gradient(135deg, var(--green), #3aa65a);
  color: #fff;
  box-shadow: 0 12px 28px rgba(47, 143, 70, 0.22);
}

.btn-secondary:hover {
  color: #fff;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.90);
  border: 1px solid rgba(255, 255, 255, 0.36);
  color: var(--text-main);
}

.btn-outline:hover {
  background: #ffffff;
  color: var(--text-main);
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding: 110px 0 90px;
  min-height: 560px;
  display: flex;
  align-items: center;
  background-image: url('/wp-content/uploads/hero-famiglia.png');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  color: #fff;
  margin-top: 0;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(23, 32, 26, 0.72) 0%,
    rgba(23, 32, 26, 0.52) 42%,
    rgba(23, 32, 26, 0.20) 100%
  );
  z-index: 0;
}

.hero::after {
  display: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr);
  gap: 40px;
  align-items: center;
}

.hero-content {
  max-width: 720px;
}

.hero h1 {
  margin: 0 0 18px;
  color: #fff;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero-subtitle {
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1.08rem, 1.5vw, 1.35rem);
  font-weight: 500;
}

.hero-text {
  max-width: 660px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.90);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
  margin-bottom: 0;
}

.hero-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 600;
}

.hero-list li::before {
  content: "✔";
  margin-right: 8px;
  color: #9ae6b4;
}

.hero-side-box {
  display: none;
}

/* ===============================
   HOME SECTIONS
================================ */

.home-section {
  position: relative;
  padding: 76px 0;
  z-index: 1;
}

.home-section:nth-child(even) {
  background: rgba(255, 255, 255, 0.34);
}

.home-section h2 {
  margin: 0 0 12px;
  text-align: center;
  letter-spacing: -0.02em;
}

.section-actions {
  margin-top: 28px;
  text-align: center;
}

/* ===============================
   GRIDS
================================ */

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.cards.cards-progetti {
  align-items: stretch;
  margin-top: 30px;
}

.cards-news {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.aree-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}

/* ===============================
   CARD PROGETTO
================================ */

.card-progetto {
  position: relative;
  overflow: hidden;
  min-height: 100%;
  height: 100%;
  background: #fff;
  border: 1px solid rgba(34, 49, 39, 0.06);
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.card-progetto:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(34, 49, 39, 0.12);
}

.card-progetto .card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
}

.card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 11;
  background: #e9e4dd;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card-progetto:hover .card-image img {
  transform: scale(1.04);
}

.card-badge {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 14px;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
}

.badge-infanzia {
  background: #4caf50;
}

.badge-accoglienza {
  background: #ef8b1e;
}

.badge-supporto-sociale {
  background: #1f8acb;
}

.badge-salute {
  background: #00a7b5;
}

.badge-solidarieta {
  background: #9656a1;
}

.card-content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 220px;
  padding: 22px 20px 20px;
}

.card-title {
  margin: 0 0 10px;
  font-size: 1.55rem;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.card-excerpt {
  margin-bottom: 18px;
  color: var(--text-soft);
  font-size: 0.96rem;
  line-height: 1.58;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-button {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  color: var(--green);
}

.card-button:hover {
  color: var(--orange-dark);
}

/* ===============================
   HOME PROGETTI
================================ */

.home-progetti .cards-progetti {
  margin-top: 20px;
}

.home-progetti .section-actions {
  margin-top: 34px;
}

/* ===============================
   ARCHIVIO / CATEGORIE
================================ */

.titolo-categoria-home,
.categoria-title {
  margin: 0 0 20px;
  font-size: clamp(1.5rem, 2vw, 2rem);
  line-height: 1.15;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.progetti-categoria {
  margin-bottom: 54px;
}

.progetti-categoria + .progetti-categoria {
  padding-top: 38px;
  border-top: 1px solid rgba(34, 49, 39, 0.06);
}

.categoria-description {
  margin: 0 0 18px;
  color: var(--text-soft);
  font-size: 0.98rem;
}

/* ===============================
   AREE DI INTERVENTO
================================ */

.area-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(34, 49, 39, 0.06);
  border-radius: 22px;
  padding: 28px 20px;
  min-height: 220px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.area-card .area-icon {
  width: 82px;
  height: 82px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 34px;
  font-weight: 800;
}

.area-card h3 {
  margin-bottom: 10px;
}

.area-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.area-card.infanzia .area-icon {
  background: var(--green-soft);
  color: var(--green);
}

.area-card.accoglienza .area-icon {
  background: var(--orange-soft);
  color: var(--orange-dark);
}

.area-card.supporto-sociale .area-icon {
  background: var(--blue-soft);
  color: var(--blue);
}

.area-card.salute .area-icon {
  background: var(--teal-soft);
  color: var(--teal);
}

.area-card.solidarieta .area-icon {
  background: var(--purple-soft);
  color: var(--purple);
}

/* ===============================
   IMPATTO
================================ */

.home-impatto .impatto-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 28px;
  align-items: stretch;
}

.impatto-left {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.impatto-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.impatto-card {
  min-height: 220px;
  padding: 24px 20px;
  border-radius: 22px;
  color: #fff;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}

.impatto-card h3 {
  margin: 0 0 8px;
  color: #fff;
}

.impatto-card p {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
}

.impatto-card .btn {
  min-height: 42px;
  padding: 10px 18px;
  margin-top: auto;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.impatto-card .btn:hover {
  background: rgba(255, 255, 255, 0.24);
}

.impatto-card.dona {
  background: linear-gradient(135deg, #7bbf3c, #4f9e23);
}

.impatto-card.volontario {
  background: linear-gradient(135deg, #f3a224, #e28115);
}

.impatto-card.beni {
  background: linear-gradient(135deg, #b47ad4, #8d56aa);
}

.impatto-media {
  position: relative;
  overflow: hidden;
  min-height: 100%;
  border-radius: 26px;
  box-shadow: var(--shadow-lg);
  background: #ddd;
}

.impatto-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.impatto-media-overlay {
  position: absolute;
  inset: auto 18px 18px 18px;
  display: flex;
  justify-content: flex-end;
}

.impatto-media-overlay .btn {
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-main);
}

/* ===============================
   TESTIMONIANZE
================================ */

.impatto-quotes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 28px;
}

.quote-card {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(34, 49, 39, 0.06);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.quote-card blockquote {
  margin: 0 0 14px;
  color: #415047;
  font-size: 0.98rem;
}

.quote-card cite {
  display: block;
  color: var(--green-dark);
  font-style: normal;
  font-weight: 800;
  font-size: 0.92rem;
}

/* ===============================
   NEWS
================================ */

.card-news {
  background: #fff;
  border: 1px solid rgba(34, 49, 39, 0.06);
  border-radius: 22px;
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.card-news:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-news-image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e9e4dd;
}

.card-news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-news-body {
  padding: 22px;
}

.card-date {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--text-soft);
  font-size: 0.86rem;
  font-weight: 700;
}

.card-news h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  line-height: 1.3;
}

.card-news p {
  color: var(--text-soft);
  font-size: 0.95rem;
}

/* ===============================
   PAGE / SINGLE / ARCHIVE
================================ */

.page-wrapper,
.single-wrapper,
.single-progetto-wrapper,
.archive-wrapper,
.archive-progetti {
  padding: 52px 16px;
}

body:not(.home) .page-wrapper,
body:not(.home) .single-wrapper,
body:not(.home) .archive-wrapper,
body:not(.home) .archive-progetti {
  padding-top: 38px;
}

body:not(.home) .single-progetto-wrapper {
  padding-top: 44px;
}

.page-title,
.single-title {
  margin: 0 0 18px;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.page-body,
.single-body,
.single-progetto-body {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(34, 49, 39, 0.06);
  border-radius: 24px;
  padding: 30px;
  box-shadow: var(--shadow-sm);
}

.page-thumb {
  width: 100%;
  height: 460px;
  margin: 26px 0 34px;
  overflow: hidden;
  border-radius: 22px;
  box-shadow: var(--shadow-md);
}

.page-thumb img {
  width: 100%;
  height: 100%;
  max-width: none;
  display: block;
  object-fit: cover;
}

/* ===============================
   SINGLE PROGETTO
================================ */

.single-progetto-header {
  margin-bottom: 24px;
}

.single-progetto-header h1 {
  margin-bottom: 8px;
}

.single-progetto-subtitle {
  margin-bottom: 14px;
  color: var(--text-soft);
  font-size: 1.02rem;
}

.single-progetto-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 0.92rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 800;
  background: #edf5ee;
  color: var(--green-dark);
}

.badge-categoria {
  background: var(--green);
  color: #fff;
}

.single-progetto-thumb {
  width: 100%;
  height: 460px;
  margin: 26px 0;
  overflow: hidden;
  border-radius: 22px;
  box-shadow: var(--shadow-md);
}

.single-progetto-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.single-progetto-box {
  margin: 30px 0;
  padding: 26px;
  border-radius: 22px;
  background: linear-gradient(180deg, #f8fbf8 0%, #f1f7f1 100%);
  border-left: 5px solid var(--green);
}

.single-progetto-box h2 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.single-progetto-box p {
  margin: 0;
  color: #49564d;
}

/* ===============================
   FOOTER
================================ */

.site-footer {
  margin-top: 60px;
  color: #f5fff6;
  position: relative;
  z-index: 1;
}

.footer-top {
  background: linear-gradient(135deg, #2d7b3d, #1f5f2b);
  padding: 42px 0;
}

.footer-top-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
}

.footer-brand {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.footer-title {
  font-size: 1.05rem;
  font-weight: 800;
}

.footer-text {
  margin: 6px 0 0;
  font-size: 0.95rem;
  opacity: 0.96;
}

.footer-links .footer-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links .footer-menu li + li {
  margin-top: 8px;
}

.footer-links .footer-menu a {
  color: #f5fff6;
  opacity: 0.95;
  font-weight: 600;
}

.footer-links .footer-menu a:hover {
  opacity: 1;
  color: #fff;
}

.footer-bottom {
  background: #194d22;
  padding: 14px 0;
  font-size: 0.84rem;
}

.footer-bottom-inner {
  text-align: center;
}

/* ===============================
   SAFETY FIXES
================================ */

.mobile-bottom-nav,
.bottom-nav,
.sticky-bottom-bar,
.floating-menu,
.fixed-bottom-menu {
  z-index: 10;
}

.home .site-main,
.home .hero,
.home-section,
.site-footer {
  position: relative;
  z-index: 1;
}

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

@media (max-width: 1100px) {
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .aree-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-impatto .impatto-grid {
    grid-template-columns: 1fr;
  }

  .impatto-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .impatto-quotes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 899px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .header-inner {
    flex-wrap: wrap;
    gap: 12px;
    min-height: auto;
  }

  .site-logo img,
  .custom-logo,
  .site-logo .custom-logo-link img {
    max-height: 64px;
  }

  .main-nav {
    display: none;
    width: 100%;
    margin-top: 6px;
    padding-bottom: 4px;
  }

  body.nav-open .main-nav {
    display: block;
  }

  .main-nav > ul {
    display: block;
    padding-top: 10px;
    border-top: 1px solid rgba(34, 49, 39, 0.08);
  }

  .main-nav a {
    padding: 12px 10px;
    font-size: 15px;
  }

  .main-nav .sub-menu {
    position: static;
    min-width: 0;
    padding: 2px 0 2px 14px;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
  }

  .main-nav li.open > .sub-menu {
    display: block;
  }

  .main-nav .sub-menu li a {
    padding: 9px 10px;
    font-size: 14px;
  }

  .btn-dona-header {
    margin-left: auto;
  }

  .hero {
    padding: 84px 0 86px;
    min-height: 460px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cards-news {
    grid-template-columns: 1fr;
  }

  .aree-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .impatto-cards {
    grid-template-columns: 1fr;
  }

  .impatto-quotes {
    grid-template-columns: 1fr;
  }

  .footer-top-inner {
    flex-direction: column;
  }
	
  .single-progetto-thumb {
    height: 360px;
  }
  .page-thumb {
    height: 360px;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  .hero {
    padding: 68px 0 72px;
    min-height: 400px;
    background-position: center center;
  }

  .hero h1 {
    line-height: 1.08;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .home-section {
    padding: 58px 0;
  }

  .cards,
  .aree-grid {
    grid-template-columns: 1fr;
  }

  .card-content {
    padding: 20px 18px 18px;
  }

  .card-title {
    font-size: 1.35rem;
  }

  .page-body,
  .single-body,
  .single-progetto-body {
    padding: 22px;
    border-radius: 18px;
  }

  .page-wrapper,
  .single-wrapper,
  .single-progetto-wrapper,
  .archive-wrapper,
  .archive-progetti {
    padding: 34px 12px;
  }
	
  .single-progetto-thumb {
    height: 260px;
    border-radius: 18px;
  }
  .page-thumb {
    height: 260px;
    border-radius: 18px;
  }
}

@media (max-width: 420px) {
  .header-inner {
    padding-left: 14px;
    padding-right: 14px;
  }

  .site-logo img,
  .custom-logo,
  .site-logo .custom-logo-link img {
    max-height: 58px;
  }

  .btn,
  .btn-dona-header {
    min-height: 46px;
    padding: 11px 18px;
    font-size: 14px;
  }

  .card-badge {
    left: 12px;
    bottom: 12px;
    font-size: 12px;
  }
}