:root {
  --green-dark: #0c5b3a;
  --green: #117947;
  --green-light: #55ab72;
  --green-soft: #e9f4ee;
  --text: #183126;
  --muted: #53695e;
  --panel: rgba(255, 255, 255, 0.8);
  --panel-strong: rgba(255, 255, 255, 0.92);
  --border: rgba(17, 121, 71, 0.16);
  --shadow: 0 24px 70px rgba(9, 34, 22, 0.15);
  --radius: 28px;
  --maxw: 1400px;
  --header-h: 88px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(245, 249, 247, 0.95) 0%, rgba(245, 249, 247, 0.82) 35%, rgba(245, 249, 247, 0.35) 65%, rgba(245, 249, 247, 0.05) 100%),
    linear-gradient(180deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.28) 100%),
    url('../img/sfondo.jpg') center center / cover no-repeat fixed;
}

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

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

.page {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.page::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 8% 15%, rgba(85, 171, 114, 0.12), transparent 24%),
    radial-gradient(circle at 18% 80%, rgba(17, 121, 71, 0.1), transparent 28%);
  pointer-events: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(255,255,255,0.7);
  border-bottom: 1px solid rgba(17, 121, 71, 0.1);
}

.header-inner {
  width: min(100%, var(--maxw));
  min-height: var(--header-h);
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.header-brand img {
  width: 56px;
  filter: drop-shadow(0 8px 18px rgba(17, 121, 71, 0.12));
  flex: 0 0 auto;
}

.header-brand-text {
  min-width: 0;
}

.header-brand-text strong {
  display: block;
  font-size: 1.02rem;
  color: var(--green-dark);
  letter-spacing: -0.02em;
}

.header-brand-text span {
  display: block;
  margin-top: 2px;
  font-size: 0.86rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 42vw;
}

.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.nav a {
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.93rem;
  font-weight: 600;
  color: #294236;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav a:hover {
  background: rgba(17, 121, 71, 0.08);
  color: var(--green-dark);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(17, 121, 71, 0.14);
  border-radius: 14px;
  background: rgba(255,255,255,0.72);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--green-dark);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.layout {
  position: relative;
  z-index: 1;
  width: min(100%, var(--maxw));
  margin: 0 auto;
  padding: 28px;
}


.hero-panel {
  background: linear-gradient(180deg, var(--panel-strong), var(--panel));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: 34px 36px 30px;
  animation: fadeUp 900ms ease both;
}

.hero {
  min-height: calc(100vh - var(--header-h) - 56px);
  display: block;
}

.hero-main {
  display: grid;
  grid-template-columns: minmax(420px, 720px) 1fr;
  gap: 26px;
  align-items: stretch;
}

.hero-news {
  position: relative;
  min-height: 0;
  border-radius: calc(var(--radius) + 20px);
  overflow: hidden;
}

.news-card {
  position: absolute;
  right: 22px;
  bottom: 0;
  max-width: 600px;
  max-height: 100%;
  overflow-y: auto;
  padding: 24px 26px;
  border-radius: 24px;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 20px 50px rgba(10, 28, 21, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fadeIn 1.2s ease 0.25s both;
  -webkit-overflow-scrolling: touch;
 }

.news-kicker {
  margin-bottom: 12px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
}

.news-card h3 {
  margin: 0 0 14px;
  font-size: clamp(1.7rem, 2vw, 2.4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--green-dark);
}

.news-card p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #234234;
}

.news-actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.news-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: #fff;
  font-weight: 700;
  font-size: 0.94rem;
  box-shadow: 0 12px 28px rgba(17, 121, 71, 0.18);
}

.news-link-secondary {
  background: rgba(255,255,255,0.72);
  color: var(--green-dark);
  border: 1px solid rgba(17,121,71,0.16);
  box-shadow: none;
}

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

.mission-wide {
  margin-top: 26px;
  padding: 28px 32px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-strong), var(--panel));
  border: 1px solid var(--border);
  box-shadow: 0 18px 46px rgba(9, 34, 22, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.mission-wide h3 {
  margin: 0 0 10px;
  color: var(--green-dark);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.mission-wide p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #234234;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
}

.eyebrow::before {
  content: "";
  width: 30px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--green-dark), var(--green-light));
}

h1 {
  margin: 0;
  font-size: clamp(2.9rem, 4vw, 5rem);
  line-height: 0.94;
  letter-spacing: -0.05em;
  color: var(--green-dark);
  max-width: 12ch;
}

.hero-subtitle {
  margin: 18px 0 0;
  font-size: 1.18rem;
  line-height: 1.75;
  color: #294136;
  max-width: 60ch;
}

.stats {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.stat {
  min-width: 132px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.58);
  border: 1px solid rgba(17,121,71,0.1);
}

.stat strong {
  display: block;
  font-size: 1.35rem;
  color: var(--green-dark);
  letter-spacing: -0.03em;
}

.stat span {
  display: block;
  margin-top: 4px;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.4;
}

.cta-row {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: #fff;
  box-shadow: 0 12px 28px rgba(17, 121, 71, 0.22);
}

.btn-secondary {
  background: rgba(255,255,255,0.66);
  color: var(--green-dark);
  border: 1px solid rgba(17,121,71,0.14);
}

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

.hero-visual {
  position: relative;
  min-height: 620px;
  border-radius: calc(var(--radius) + 10px);
  overflow: hidden;
}

.hero-card {
  position: absolute;
  right: 22px;
  bottom: 72px;
  max-width: 500px;
  padding: 24px 26px;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 20px 50px rgba(10, 28, 21, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 24px;
  animation: fadeIn 1.2s ease 0.25s both;
}

.hero-card p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #234234;
}

.hero-card h3 {
  margin: 0 0 8px;
  color: var(--green-dark);
}

.section {
  margin-top: 34px;
  padding: 32px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.78));
  border: 1px solid rgba(17, 121, 71, 0.12);
  box-shadow: 0 18px 46px rgba(9, 34, 22, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.section-heading {
  display: block;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 0 0 14px;
  font-size: clamp(1.8rem, 2vw, 2.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--green-dark);
}

.section-intro {
  max-width: 1100px;
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.8;
  color: var(--muted);
}

.section p,
.section li {
  font-size: 1rem;
  line-height: 1.85;
  color: #31473d;
}

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

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

.mini-card,
.research-card,
.formation-card,
.center-card {
  border-radius: 22px;
  padding: 22px;
  background: rgba(233, 244, 238, 0.82);
  border: 1px solid rgba(17, 121, 71, 0.12);
}

.mini-card h3,
.research-card h3,
.formation-card h3 {
  margin: 0 0 10px;
  font-size: 1.08rem;
  line-height: 1.35;
  color: var(--green-dark);
  letter-spacing: -0.02em;
}

.mini-card p,
.research-card p,
.formation-card p,
.center-card p {
  margin: 0;
  color: #3b5448;
  line-height: 1.75;
  font-size: 0.96rem;
}

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

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

.research-card {
  min-height: 170px;
}

.unit-box {
  padding: 26px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(12,91,58,0.96), rgba(17,121,71,0.9));
  color: #fff;
  box-shadow: 0 16px 34px rgba(12,91,58,0.18);
}

.unit-box h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.unit-box p {
  margin: 0;
  line-height: 1.8;
  color: rgba(255,255,255,0.92);
}

.footer {
  margin-top: 34px;
  padding: 22px 28px;
  border-top: 1px solid rgba(17,121,71,0.1);
  background: rgba(255,255,255,0.58);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.footer-inner {
  width: min(100%, var(--maxw));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-left {
  justify-self: start;
  font-size: 0.9rem;
}

.footer-center {
  justify-self: center;
  text-align: center;
  font-size: 0.9rem;
}

.footer-center a:hover {
  color: var(--green-dark);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 1180px) {
  body {
    background-attachment: scroll;
  }

  .hero {
    min-height: auto;
  }

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

  .hero-news {
    min-height: 520px;
  }

  .news-card {
    max-height: 520px;
    overflow-y: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  .hero-visual {
    min-height: 260px;
  }

  .research-grid,
  .card-list,
  .columns-2,
  .center-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .header-inner,
  .layout {
    padding-left: 18px;
    padding-right: 18px;
  }

  .header-inner {
    min-height: 76px;
    padding-top: 14px;
    padding-bottom: 14px;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
  }

  .header-brand {
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(100% - 60px);
  }

  .header-brand-text span {
    max-width: none;
    white-space: normal;
  }

  .nav-toggle {
    display: inline-flex;
    flex: 0 0 auto;
  }

  .nav {
    display: none;
    width: 100%;
    margin-top: 14px;
    padding: 10px;
    border-radius: 20px;
    background: rgba(255,255,255,0.82);
    border: 1px solid rgba(17, 121, 71, 0.1);
    box-shadow: 0 12px 30px rgba(9, 34, 22, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 0.95rem;
  }

  .hero-panel,
  .section {
    padding: 24px 22px;
  }

  .footer-inner {
    grid-template-columns: 1fr !important;
    text-align: left;
  }

  .footer-left,
  .footer-center,
  .footer-logo {
    justify-self: start;
    text-align: left;
  }

  .footer-logo {
    justify-content: flex-start;
  }

  .hero-news {
    min-height: 500px;
  }

  .news-card {
    max-height: 500px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

}

@media (max-width: 680px) {
  .research-grid,
  .card-list,
  .columns-2,
  .center-grid {
    grid-template-columns: 1fr;
  }

  .header-brand img {
    width: 48px;
  }

  .header-brand-text strong {
    font-size: 0.96rem;
  }

  .header-brand-text span {
    font-size: 0.8rem;
    line-height: 1.35;
  }

  .hero-card {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }

  .hero-news {
    min-height: 480px;
  }

  .news-card {
    max-height: 480px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.heading-note {
  font-size: 0.58em;
  font-weight: 500;
  color: var(--muted);
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.footer-logo img {
  width: 46px;
}

.nav a.lang-switch {
  border: 1px solid rgba(17, 121, 71, 0.18);
  background: rgba(255, 255, 255, 0.68);
  color: var(--green-dark);
  font-weight: 800;
  min-width: 58px;
  text-align: center;
}

.nav a.lang-switch:hover {
  background: var(--green-dark);
  color: #fff;
}