/* ===========================
   RESET & BASE
=========================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #111827;
  line-height: 1.6;
  background: #ffffff;
}

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

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

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ===========================
   HEADER & NAVBAR
=========================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffffee;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e5e7eb;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo a {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* NAVIGATION DESKTOP */
.main-nav {
  position: relative;
}

.main-nav ul {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
}

.main-nav a {
  position: relative;
  padding: 4px 0;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: #0369a1;
  transition: width 0.18s ease;
}

.main-nav a:hover::after {
  width: 100%;
}

.has-submenu {
  position: relative;
}

/* SUBMENU – regole base: nascosto */
.submenu {
  position: absolute;
  top: 120%;
  left: 0;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  min-width: 220px;
  list-style: none;
  padding: 8px 0;
  margin: 0;
  display: none !important;   /* nascosto SEMPRE fino a hover */
  z-index: 999;
}

.has-submenu:hover .submenu {
  display: block !important;  /* appare solo quando passi col mouse */
}

.submenu li a {
  display: block;
  padding: 8px 16px;
  font-size: 13px;
}

.submenu li a:hover {
  background: #f3f4f6;
}

/* TOGGLE MOBILE */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
}

/* ===========================
   HERO
=========================== */
.hero {
  position: relative;
  min-height: 70vh;
  background: url("../img/hero.jpg") center center / cover no-repeat;
  color: #ffffff;
  display: flex;
  align-items: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  /* leggera sfumatura per leggere bene il testo */
  background: linear-gradient(
    120deg,
    rgba(0, 0, 0, 0.55),
    rgba(0, 0, 0, 0.15)
  );
}

.hero-content {
  position: relative;
  padding: 80px 16px;
  max-width: 720px;
}

.hero h1 {
  font-size: 36px;
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero p {
  font-size: 18px;
  max-width: 560px;
  margin-bottom: 24px;
}

/* ===========================
   BUTTONS
=========================== */
.btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.btn-primary {
  background: #0ea5e9;
  color: #0b1120;
}

.btn-primary:hover {
  background: #0284c7;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: #e5e7eb;
  border-color: #e5e7ebaa;
  margin-left: 8px;
}

.btn-outline:hover {
  background: #e5e7eb;
  color: #0b1120;
}

.btn-secondary {
  background: #0f172a;
  color: #f9fafb;
}

/* STATS GRID (Copper Beech Urban at a glance) */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
}

.stat-card {
  background: #0b172a;
  color: #e5e7eb;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.25);
}

.stat-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.8;
  margin-bottom: 4px;
}

.stat-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.stat-number {
  font-size: 26px;
  font-weight: 700;
  color: #38bdf8;
}

.stat-unit {
  font-size: 13px;
  opacity: 0.9;
}

/* Su schermi piccoli le stats vanno a una colonna sola */
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ===========================
   SECTIONS
=========================== */
.section {
  padding: 64px 0;
}

.section-light {
  background: #f9fafb;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 32px;
}

.section-header h2 {
  font-size: 28px;
  margin-bottom: 8px;
}

/* ===========================
   GRID & CARDS
=========================== */
.cards-grid {
  display: grid;
  /* 5 cards in the same line on desktop */
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
  max-width: 1200px;   /* a bit wider to give each card some space */
  margin: 0 auto;
}

/* optional: responsive behaviour so it doesn't get too tight on small screens */
@media (max-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

@media (max-width: 480px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }
}

/* you can keep this for other sections that use 3-column layout */
.cards-grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: #ffffff;
  border-radius: 14px;
  padding: 20px 20px 24px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 18px;
}

.card p {
  font-size: 14px;
  margin-bottom: 12px;
}

.card-link {
  font-size: 14px;
  font-weight: 600;
  color: #0369a1;
}

/* Immagini nelle card */
.card-img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 12px;
  height: 180px;
  object-fit: fill;
  object-position: 70%;
}
/* NEWS CARDS */
.card-news .card-tag {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  margin-bottom: 8px;
}

/* ===========================
   SPLIT LAYOUT (ABOUT)
=========================== */
.split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: flex-start;
}

.bullets {
  list-style: none;
  padding-left: 0;
  margin: 0;
  font-size: 14px;
}

.bullets li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
}

.bullets li::before {
  content: "▸";
  position: absolute;
  left: 0;
  top: 0;
  color: #0369a1;
}

/* ========= PROJECT PAGE ========= */

.project-hero {
  position: relative;
  background: url("../img/hero.jpg") center/cover no-repeat; /* <-- QUI ora usa hero.jpg */
  color: #fff;
}

.project-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(15,23,42,0.9), rgba(15,23,42,0.4));
}

.project-hero-inner {
  position: relative;
  padding: 72px 16px 56px;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: flex-end;
}

.breadcrumb {
  font-size: 12px;
  opacity: 0.9;
  margin-bottom: 8px;
}

.breadcrumb a {
  color: #e5e7eb;
}

.project-hero h1 {
  margin: 0 0 8px;
  font-size: 32px;
}

.project-subtitle {
  margin: 0 0 12px;
  max-width: 520px;
  font-size: 25px;
  opacity: 0.95;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.tag {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.7);
  background: rgba(15,23,42,0.6);
}

.tag-green {
  border-color: #4ade80;
  color: #bbf7d0;
}

/* KPIs in hero */
.project-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 260px;
}

.kpi-box {
  background: rgba(15,23,42,0.85);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 12px 30px rgba(15,23,42,0.5);
}

.kpi-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.8;
}

.kpi-value {
  font-size: 20px;
  font-weight: 700;
}

.kpi-value span {
  font-size: 12px;
  font-weight: 500;
  margin-left: 4px;
  opacity: 0.8;
}

/* Layout sezione progetto */
.project-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.1fr);
  gap: 32px;
}

.project-main h2 {
  margin-top: 0;
}

.project-main h3 {
  margin-top: 24px;
}

.project-list {
  padding-left: 18px;
}

.project-list li {
  margin-bottom: 6px;
}

.project-list.small li {
  margin-bottom: 4px;
}

/* Aside cards */
.project-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.aside-card {
  background: #0f172a;
  color: #e5e7eb;
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 14px;
  box-shadow: 0 10px 25px rgba(15,23,42,0.35);
}

.aside-card h3 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 16px;
}

.aside-card.highlight {
  border: 1px solid #22c55e;
}

/* Responsive */
@media (max-width: 900px) {
  .project-hero-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .project-kpis {
    width: 100%;
  }

  .project-layout {
    grid-template-columns: 1fr;
  }
}
/* NEWS SCROLLER */
.news-scroller {
  display: flex;
  overflow-x: auto;
  gap: 20px;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
}

.news-scroller::-webkit-scrollbar {
  height: 8px;
}

.news-scroller::-webkit-scrollbar-thumb {
  background: #0ea5e9;
  border-radius: 4px;
}

.news-card {
  flex: 0 0 300px; /* larghezza card */
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15,23,42,0.12);
  padding: 16px;
  scroll-snap-align: start;
}

.news-card img {
  width: 100%;
  height: 160px;
  border-radius: 12px;
  object-fit: cover;
  margin-bottom: 12px;
}

.news-card h4 {
  margin: 0;
  font-size: 17px;
}

.news-card p {
  font-size: 14px;
  margin: 8px 0 12px;
}

.news-date {
  font-size: 11px;
  opacity: 0.65;
  margin-bottom: 8px;
}

.news-arrow {
  cursor: pointer;
  font-size: 22px;
  padding: 8px;
  user-select: none;
}
/* ===========================
   FOOTER
=========================== */
.site-footer {
  background: #020617;
  color: #e5e7eb;
  padding-top: 32px;
  font-size: 13px;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  padding: 0 16px 24px;
}

.site-footer a {
  color: #e5e7eb;
}

.footer-bottom {
  border-top: 1px solid #111827;
  padding: 12px 16px;
  text-align: center;
  font-size: 12px;
  color: #9ca3af;
}

/* ====== LEADERSHIP PAGE ====== */

.leader-hero {
  position: relative;
  background: url("../img/hero.jpg") center/cover no-repeat;
  color: #fff;
}

.leader-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(15,23,42,0.95), rgba(15,23,42,0.5));
}

.leader-hero-inner {
  position: relative;
  padding: 72px 16px 56px;
}

.leader-subtitle {
  max-width: 620px;
  font-size: 15px;
  margin-top: 8px;
  opacity: 0.95;
}

.leader-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.1fr);
  gap: 32px;
}

.leader-main h2 {
  margin-top: 0;
}

.leader-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (max-width: 900px) {
  .leader-layout {
    grid-template-columns: 1fr;
  }
}

.leader-photo {
  width: 160px;
  height: 160px;
  margin: 0 auto 12px auto; /* center horizontally */
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
}

.leader-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%; /* sposta leggermente verso il basso per non tagliare la testa */
}

.leader-main p {
  text-align: justify;
}

/* ABOUT HERO */
.about-hero {
  position: relative;
  background: url("../img/hero.jpg") center/cover no-repeat;
  color: #fff;
}

.about-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(15,23,42,0.95), rgba(15,23,42,0.5));
}

.about-hero-inner {
  position: relative;
  padding: 72px 16px 56px;
}

.about-subtitle {
  max-width: 720px;
  font-size: 15px;
  margin-top: 8px;
  opacity: 0.96;
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 900px) {
  /* NAV MOBILE */
  .main-nav {
    display: none; /* nascosto finché non clicchi il bottone (JS) */
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
  }

  .main-nav ul {
    flex-direction: column;
    padding: 12px 16px 16px;
  }

  .nav-toggle {
    display: block;
  }

  /* submenu: lasciamo le regole base (display:none + hover),
     non aggiungiamo display:block qui */
  .submenu {
    position: static;
    box-shadow: none;
    border-radius: 0;
    border: none;
    padding-left: 8px;
  }

  .hero {
    min-height: 70vh;
  }

  .hero h1 {
    font-size: 28px;
  }

  .hero p {
    font-size: 16px;
  }

  .btn-outline {
    margin-top: 8px;
    margin-left: 0;
  }

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