/* ============================================
   Porto Davide — Sito Professionale v2
   ============================================ */

@font-face {
  font-family: 'Roboto';
  font-weight: 300;
  font-style: normal;
  src: url('../fonts/roboto/KFOlCnqEu92Fr1MmSU5fABc-AMP6lbBP.woff') format('woff');
}
@font-face {
  font-family: 'Roboto';
  font-weight: 400;
  font-style: normal;
  src: url('../fonts/roboto/KFOlCnqEu92Fr1MmSU5fBBc-AMP6lQ.woff') format('woff');
}
@font-face {
  font-family: 'Roboto';
  font-weight: 700;
  font-style: normal;
  src: url('../fonts/roboto/KFOlCnqEu92Fr1MmWUlfBBc-AMP6lQ.woff') format('woff');
}
@font-face {
  font-family: 'Roboto';
  font-weight: 900;
  font-style: normal;
  src: url('../fonts/roboto/KFOlCnqEu92Fr1MmWUlfCBc-AMP6lbBP.woff') format('woff');
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Roboto', Arial, sans-serif;
  color: #2a2a2a;
  line-height: 1.75;
  background: #fff;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
.container { max-width: 1220px; margin: 0 auto; padding: 0 24px; }

/* --- Variabili --- */
:root {
  --blue:        #003f7f;
  --blue-dark:   #001f45;
  --blue-mid:    #004d99;
  --blue-light:  #1a6fc4;
  --yellow:      #ffd500;
  --yellow-dark: #e6bf00;
  --yellow-glow: rgba(255,213,0,.35);
  --white:       #ffffff;
  --off-white:   #f8f9fb;
  --gray-light:  #eef1f6;
  --gray:        #8a93a6;
  --text:        #2a2a2a;
  --text-soft:   #5a6377;
  --border:      rgba(0,63,127,.1);
  --shadow-sm:   0 2px 12px rgba(0,30,80,.07);
  --shadow-md:   0 6px 28px rgba(0,30,80,.12);
  --shadow-lg:   0 16px 50px rgba(0,30,80,.18);
  --radius:      10px;
  --transition:  .35s cubic-bezier(.4,0,.2,1);
}

/* ============================================
   TOP BAR
   ============================================ */
.top-bar {
  background: var(--blue-dark);
  color: rgba(255,255,255,.75);
  font-size: 0.82rem;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.top-bar a { color: rgba(255,255,255,.65); transition: color var(--transition); }
.top-bar a:hover { color: var(--yellow); }
.top-bar-info { display: flex; gap: 22px; flex-wrap: wrap; }
.top-bar-info span { display: flex; align-items: center; gap: 7px; }
.top-bar-icon {
  width: 16px; height: 16px;
  fill: var(--yellow);
  flex-shrink: 0;
  opacity: .85;
}

/* ============================================
   HEADER / NAV
   ============================================ */
.site-header {
  background: rgba(255,255,255,.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 0 var(--border), var(--shadow-sm);
  transition: box-shadow var(--transition), background var(--transition);
}
.site-header.scrolled {
  background: rgba(255,255,255,1);
  box-shadow: 0 1px 0 var(--border), var(--shadow-md);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  min-height: 72px;
}
.logo img { height: 58px; width: auto; transition: opacity var(--transition); }
.logo:hover img { opacity: .85; }

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 9px 10px;
  transition: border-color var(--transition);
}
.nav-toggle:hover { border-color: var(--blue-light); }
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--blue);
  border-radius: 2px;
  transition: transform .4s cubic-bezier(.4,0,.2,1), opacity .3s, width .3s;
}
/* Hamburger → X */
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; width: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.main-nav ul { display: flex; gap: 2px; }
.main-nav a {
  display: block;
  padding: 10px 18px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 1.2px;
  color: var(--blue);
  position: relative;
  transition: color var(--transition);
  border-radius: 6px;
}
.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 18px;
  right: 18px;
  height: 2px;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  border-radius: 2px;
}
.main-nav a:hover { color: var(--blue-light); background: rgba(0,63,127,.04); }
.main-nav a.active { color: var(--blue-light); }
.main-nav a:hover::after,
.main-nav a.active::after { transform: scaleX(1); }
.nav-close { display: none; }

/* Pulsante CTA in nav */
.main-nav .nav-cta a {
  background: var(--yellow);
  color: var(--blue-dark) !important;
  border-radius: 6px;
  padding: 10px 22px;
}
.main-nav .nav-cta a::after { display: none; }
.main-nav .nav-cta a:hover {
  background: var(--yellow-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--yellow-glow);
}

.main-nav .nav-lang {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
}
.main-nav .nav-lang .flag-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 20px;
  line-height: 1;
  border-radius: 3px;
  border: 1px solid transparent;
  padding: 0;
  overflow: hidden;
}
.main-nav .nav-lang .flag-link:hover {
  background: rgba(0,63,127,.05);
  border-color: var(--border);
}
.main-nav .nav-lang .flag-link.active {
  box-shadow: inset 0 0 0 1px var(--blue);
}
.main-nav .nav-lang .flag-icon {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.08) inset;
}
.main-nav .nav-lang .flag-it {
  background: linear-gradient(to right, #009246 0 33.33%, #ffffff 33.33% 66.66%, #ce2b37 66.66% 100%);
}
.main-nav .nav-lang .flag-en {
  background-color: #012169;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30'%3E%3CclipPath id='a'%3E%3Cpath d='M0 0v30h60V0z'/%3E%3C/clipPath%3E%3Cg clip-path='url(%23a)'%3E%3Cpath d='M0 0v30h60V0z' fill='%23012169'/%3E%3Cpath d='M0 0l60 30M60 0L0 30' stroke='%23fff' stroke-width='6'/%3E%3Cpath d='M0 0l60 30M60 0L0 30' stroke='%23C8102E' stroke-width='4'/%3E%3Cpath d='M30 0v30M0 15h60' stroke='%23fff' stroke-width='10'/%3E%3Cpath d='M30 0v30M0 15h60' stroke='%23C8102E' stroke-width='6'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================
   HERO SLIDER
   ============================================ */
.hero {
  position: relative;
  height: 92vh;
  min-height: 580px;
  overflow: hidden;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.4s ease;
  z-index: 1;
}
.hero-slide.active { opacity: 1; z-index: 2; }
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 8s ease;
}
.hero-slide.active img { transform: scale(1); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(0,20,55,.72) 0%,
    rgba(0,30,80,.45) 50%,
    rgba(0,20,55,.25) 100%
  );
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: #fff;
  z-index: 3;
  padding-left: 7%;
}
.hero-content { max-width: 680px; }
.hero-tag {
  display: inline-block;
  background: var(--yellow);
  color: var(--blue-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}
.hero-content h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 900;
  margin-bottom: 18px;
  text-shadow: 0 3px 16px rgba(0,0,0,.35);
  line-height: 1.15;
  letter-spacing: -.5px;
}
.hero-content p {
  font-size: 1.15rem;
  margin-bottom: 36px;
  opacity: .9;
  font-weight: 300;
  max-width: 500px;
  line-height: 1.7;
}
.hero-btn-group { display: flex; gap: 14px; flex-wrap: wrap; }

/* Frecce navigazione slider */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1.3rem;
  transition: background var(--transition), transform var(--transition);
}
.hero-arrow:hover { background: var(--yellow); color: var(--blue-dark); transform: translateY(-50%) scale(1.1); }
.hero-arrow-prev { left: 28px; }
.hero-arrow-next { right: 28px; }

/* Indicatore progresso slide */
.hero-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,.15);
  z-index: 10;
}
.hero-progress-bar {
  height: 100%;
  background: var(--yellow);
  width: 0%;
  transition: width linear;
}

.hero-dots {
  position: absolute;
  bottom: 34px;
  left: 7%;
  display: flex;
  gap: 10px;
  z-index: 10;
}
.hero-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  cursor: pointer;
  transition: all .35s;
  border: none;
}
.hero-dot.active {
  background: var(--yellow);
  width: 28px;
  border-radius: 4px;
}

/* ============================================
   SCROLL INDICATOR
   ============================================ */
.scroll-indicator {
  position: absolute;
  bottom: 28px;
  right: 7%;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.6);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.scroll-indicator-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,.6));
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: .4; transform: scaleY(.8); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ============================================
   BOTTONI
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 34px;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  border-radius: var(--radius);
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--yellow);
  color: var(--blue-dark);
  border-color: var(--yellow);
}
.btn-primary:hover {
  background: var(--yellow-dark);
  border-color: var(--yellow-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px var(--yellow-glow);
}
.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.65);
}
.btn-outline:hover {
  background: rgba(255,255,255,.12);
  border-color: #fff;
}
.btn-blue {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.btn-blue:hover {
  background: var(--blue-light);
  border-color: var(--blue-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-sm { padding: 10px 22px; font-size: 0.78rem; }
.btn svg { width: 16px; height: 16px; }

/* ============================================
   WAVE DIVIDER
   ============================================ */
.wave-divider {
  text-align: center;
  padding: 10px 0 30px;
}
.wave-divider img { display: inline-block; max-width: 120px; opacity: .45; }

/* ============================================
   SEZIONI
   ============================================ */
.section { padding: 96px 0; }
.section-sm { padding: 60px 0; }
.section-gray { background: var(--off-white); }
.section-dark { background: var(--blue-dark); color: #fff; }
.section-parallax {
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  position: relative;
}
.section-parallax::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,20,55,.72) 0%, rgba(0,40,90,.55) 100%);
}
.section-parallax .container { position: relative; z-index: 2; color: #fff; }

.section-title { text-align: center; margin-bottom: 58px; }
.section-title .eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--blue-light);
  margin-bottom: 12px;
}
.section-parallax .section-title .eyebrow { color: var(--yellow); }
.section-title h2 {
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  font-weight: 900;
  color: var(--blue-dark);
  margin-bottom: 16px;
  line-height: 1.2;
  letter-spacing: -.3px;
}
.section-parallax .section-title h2,
.section-dark .section-title h2 { color: #fff; }
.section-title h2 .accent { color: var(--blue-light); }
.section-parallax .section-title h2 .accent { color: var(--yellow); }
.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--yellow);
  margin: 18px auto 0;
  border-radius: 2px;
}
.section-title p {
  color: var(--text-soft);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 20px auto 0;
  line-height: 1.8;
}
.section-parallax .section-title p,
.section-dark .section-title p { color: rgba(255,255,255,.72); }

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
}
.about-text .eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--blue-light);
  margin-bottom: 14px;
}
.about-text h3 {
  font-size: clamp(1.6rem,2.5vw,2.2rem);
  font-weight: 900;
  color: var(--blue-dark);
  margin-bottom: 22px;
  line-height: 1.25;
  letter-spacing: -.3px;
}
.about-text p { margin-bottom: 18px; color: var(--text-soft); font-size: 1.02rem; }
.about-text .stat-row {
  display: flex;
  gap: 36px;
  margin: 30px 0 34px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.about-stat h4 {
  font-size: 2rem;
  font-weight: 900;
  color: var(--blue);
  line-height: 1;
}
.about-stat h4 span { color: var(--yellow-dark); }
.about-stat p { font-size: 0.82rem; color: var(--gray); text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }

.about-img-wrap { position: relative; }
.about-img {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.about-img img { width: 100%; height: 460px; object-fit: cover; }
.about-badge {
  position: absolute;
  bottom: -22px;
  left: -22px;
  background: var(--yellow);
  color: var(--blue-dark);
  border-radius: 14px;
  padding: 20px 28px;
  box-shadow: var(--shadow-md);
  text-align: center;
}
.about-badge strong { display: block; font-size: 2.2rem; font-weight: 900; line-height: 1; }
.about-badge span { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }

/* ============================================
   FEATURES / STATS
   ============================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.feature-card {
  padding: 44px 24px 36px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 16px;
  backdrop-filter: blur(8px);
  transition: transform var(--transition), background var(--transition);
}
.feature-card:hover {
  transform: translateY(-6px);
  background: rgba(255,255,255,.16);
}
.feature-card .icon {
  width: 60px; height: 60px;
  background: rgba(255,213,0,.15);
  border: 1px solid rgba(255,213,0,.25);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.7rem;
}
.feature-card h3 {
  font-size: 2.6rem;
  font-weight: 900;
  margin-bottom: 8px;
  color: var(--yellow);
  line-height: 1;
}
.feature-card p { font-size: 0.9rem; opacity: .82; line-height: 1.6; }

/* ============================================
   SERVICES GRID
   ============================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.service-card {
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid var(--border);
}
.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}
.service-card-thumb { overflow: hidden; }
.service-card img { width: 100%; height: 220px; object-fit: cover; transition: transform .6s ease; }
.service-card:hover img { transform: scale(1.06); }
.service-card-body { padding: 24px; }
.service-card-icon {
  width: 42px; height: 42px;
  background: var(--off-white);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  font-size: 1.3rem;
}
.service-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 8px;
}
.service-card p { font-size: 0.88rem; color: var(--text-soft); line-height: 1.65; }

/* ============================================
   GALLERY
   ============================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.gallery-item {
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  aspect-ratio: 4/3;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.gallery-item:hover img { transform: scale(1.1); }
.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,20,55,.65) 0%, transparent 55%);
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 16px;
}
.gallery-item:hover .gallery-item-overlay { opacity: 1; }
.gallery-item-overlay span {
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.gallery-item-zoom {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(.7);
  width: 46px; height: 46px;
  background: rgba(255,255,255,.9);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity var(--transition), transform var(--transition);
  color: var(--blue);
  font-size: 1.3rem;
  z-index: 2;
}
.gallery-item:hover .gallery-item-zoom {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Gallery variate dimensioni */
.gallery-grid-masonry {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 12px;
}
.gallery-grid-masonry .gi-tall { grid-row: span 2; }
.gallery-grid-masonry .gi-wide { grid-column: span 2; }
.gallery-grid-masonry .gallery-item { aspect-ratio: unset; height: 100%; border-radius: 12px; }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.94);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lightbox.active { display: flex; }
.lightbox img { max-width: 90%; max-height: 88vh; border-radius: 8px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.lightbox-close:hover { background: var(--yellow); color: var(--blue-dark); }

/* ============================================
   CTA BOXES
   ============================================ */
.cta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.cta-box {
  position: relative;
  height: 380px;
  border-radius: 16px;
  overflow: hidden;
  display: block;
}
.cta-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s ease;
}
.cta-box:hover img { transform: scale(1.07); }
.cta-box-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,20,55,.82) 0%, rgba(0,20,55,.2) 55%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
  color: #fff;
  transition: background var(--transition);
}
.cta-box:hover .cta-box-overlay {
  background: linear-gradient(to top, rgba(0,20,55,.92) 0%, rgba(0,20,55,.35) 60%, transparent 100%);
}
.cta-box-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 8px;
}
.cta-box h3 { font-size: 1.45rem; font-weight: 900; margin-bottom: 10px; line-height: 1.2; }
.cta-box p { font-size: 0.88rem; opacity: .82; margin-bottom: 18px; line-height: 1.6; }
.cta-box .btn { align-self: flex-start; }

/* ============================================
   POST / NEWS CARDS
   ============================================ */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 34px;
}
.post-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.post-card-thumb { overflow: hidden; }
.post-card img { width: 100%; height: 230px; object-fit: cover; transition: transform .6s ease; }
.post-card:hover img { transform: scale(1.05); }
.post-card-body { padding: 28px; flex: 1; display: flex; flex-direction: column; }
.post-card-meta {
  font-size: 0.75rem;
  color: var(--gray);
  margin-bottom: 12px;
  display: flex;
  gap: 16px;
  text-transform: uppercase;
  letter-spacing: .8px;
}
.post-card-meta .cat {
  color: var(--blue-light);
  font-weight: 700;
}
.post-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 12px;
  line-height: 1.4;
}
.post-card p { font-size: 0.88rem; color: var(--text-soft); margin-bottom: 20px; line-height: 1.7; flex: 1; }
.post-card .read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue-light);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: .8px;
  transition: gap var(--transition), color var(--transition);
}
.post-card:hover .read-more { gap: 10px; color: var(--blue); }

/* ============================================
   PAGE HERO
   ============================================ */
.page-hero {
  height: 50vh;
  min-height: 320px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: #fff;
  overflow: hidden;
}
.page-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  transform: scale(1.05);
  transition: transform 6s ease;
}
.page-hero.loaded img { transform: scale(1); }
.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,20,55,.72) 0%, rgba(0,40,90,.45) 100%);
  z-index: 2;
}
.page-hero-content {
  position: relative;
  z-index: 3;
  padding-left: 7%;
}
.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900;
  text-shadow: 0 3px 16px rgba(0,0,0,.35);
  margin-bottom: 10px;
  line-height: 1.15;
  letter-spacing: -.3px;
}
.page-hero p { font-size: 1.1rem; opacity: .85; font-weight: 300; }
.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 0.82rem;
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(6px);
  padding: 7px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.2);
}
.breadcrumb a { color: var(--yellow); transition: opacity var(--transition); }
.breadcrumb a:hover { opacity: .8; }
.breadcrumb .sep { opacity: .5; }

/* ============================================
   CONTATTI
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 70px;
  align-items: start;
}
.contact-info-block {
  background: var(--off-white);
  border-radius: 20px;
  padding: 40px 36px;
  border: 1px solid var(--border);
}
.contact-info-block h3 {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--blue-dark);
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--yellow);
}
.contact-info-item {
  display: flex;
  gap: 18px;
  margin-bottom: 26px;
  align-items: flex-start;
}
.contact-info-item .ci-icon {
  width: 48px;
  height: 48px;
  background: var(--blue);
  color: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0,63,127,.25);
}
.contact-info-item h4 {
  color: var(--blue-dark);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
}
.contact-info-item p { color: var(--text-soft); font-size: 0.95rem; line-height: 1.65; }
.contact-info-item a { color: var(--blue-light); transition: color var(--transition); }
.contact-info-item a:hover { color: var(--blue); }

.contact-form-wrap h3 {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--blue-dark);
  margin-bottom: 28px;
}
.contact-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { margin-bottom: 20px; }
.contact-form label {
  display: block;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--blue-dark);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .8px;
}
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--gray-light);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: none;
  border-color: var(--blue-light);
  box-shadow: 0 0 0 4px rgba(26,111,196,.12);
}
.contact-form textarea { min-height: 140px; resize: vertical; }
.map-wrap {
  margin-top: 60px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}
.map-wrap iframe { width: 100%; height: 420px; border: 0; display: block; }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--blue-dark);
  color: rgba(255,255,255,.72);
  padding: 72px 0 0;
  position: relative;
  overflow: hidden;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,213,0,.06) 0%, transparent 70%);
  pointer-events: none;
}
.footer-logo { margin-bottom: 20px; }
.footer-logo img { height: 52px; opacity: .9; }
.footer-about { font-size: 0.9rem; line-height: 1.75; margin-bottom: 20px; max-width: 280px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 38px; height: 38px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.7);
  font-size: 1rem;
  transition: all var(--transition);
}
.footer-social a:hover { background: var(--yellow); color: var(--blue-dark); border-color: var(--yellow); }

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 50px;
  padding-bottom: 50px;
}
.footer-col h4 {
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-col a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  color: rgba(255,255,255,.6);
  transition: color var(--transition), gap var(--transition);
  font-size: 0.9rem;
}
.footer-col a::before { content: '›'; color: var(--yellow); font-size: 1.1rem; }
.footer-col a:hover { color: var(--yellow); gap: 12px; }
.footer-col p { margin-bottom: 8px; font-size: 0.9rem; line-height: 1.7; }
.footer-col strong { color: rgba(255,255,255,.85); }
.footer-col .footer-phone {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--yellow);
  margin: 10px 0 4px;
}

.footer-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 6px;
}
.footer-gallery a { padding: 0; }
.footer-gallery a::before { display: none; }
.footer-gallery img {
  width: 100%;
  height: 76px;
  object-fit: cover;
  border-radius: 8px;
  opacity: .65;
  transition: opacity var(--transition);
}
.footer-gallery img:hover { opacity: 1; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 22px 0;
}
.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-bottom p { font-size: 0.82rem; color: rgba(255,255,255,.4); }
.footer-bottom a { color: rgba(255,255,255,.55); transition: color var(--transition); }
.footer-bottom a:hover { color: var(--yellow); }

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 50px;
  height: 50px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: 999;
  box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--yellow); color: var(--blue-dark); transform: translateY(-3px); }

/* ============================================
   ANIMAZIONI
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.4,0,.2,1), transform .8s cubic-bezier(.4,0,.2,1);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }
.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity .8s cubic-bezier(.4,0,.2,1), transform .8s cubic-bezier(.4,0,.2,1);
}
.fade-in-left.visible { opacity: 1; transform: translateX(0); }
.fade-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity .8s cubic-bezier(.4,0,.2,1), transform .8s cubic-bezier(.4,0,.2,1);
}
.fade-in-right.visible { opacity: 1; transform: translateX(0); }
/* delay stagger */
.fade-in[data-delay="1"] { transition-delay: .1s; }
.fade-in[data-delay="2"] { transition-delay: .2s; }
.fade-in[data-delay="3"] { transition-delay: .3s; }
.fade-in[data-delay="4"] { transition-delay: .4s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .about-grid { gap: 40px; }
  .about-badge { bottom: -18px; left: -16px; }
}

@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-grid-masonry { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 768px) {
  .top-bar .container { justify-content: center; }
  .top-bar-info:last-child { display: none; }

  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--white);
    box-shadow: -8px 0 40px rgba(0,0,0,.15);
    transition: right .4s cubic-bezier(.4,0,.2,1);
    z-index: 2000;
    padding: 80px 24px 40px;
    overflow-y: auto;
  }
  .main-nav.open { right: 0; }
  .main-nav ul { flex-direction: column; gap: 4px; }
  .main-nav a {
    padding: 14px 16px;
    font-size: 0.9rem;
    border-radius: 10px;
    border-bottom: 1px solid var(--gray-light);
  }
  .main-nav a:last-child { border-bottom: none; }
  .main-nav a::after { display: none; }
  .main-nav .nav-cta { margin-top: 16px; }
  .main-nav .nav-cta a { display: block; text-align: center; }
  .main-nav .nav-lang {
    margin-top: 10px;
    justify-content: flex-start;
  }
  .main-nav .nav-lang .flag-link {
    width: 34px;
    height: 22px;
    border-color: var(--gray-light);
  }
  .main-nav .nav-lang .flag-icon {
    width: 100%;
    height: 100%;
  }
  .nav-close {
    display: flex;
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--off-white);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--blue);
    width: 42px; height: 42px;
    align-items: center; justify-content: center;
  }
  .mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 1999;
    backdrop-filter: blur(2px);
  }
  .mobile-overlay.active { display: block; }

  .hero { height: 70vh; min-height: 450px; }
  .hero-overlay { padding-left: 24px; padding-right: 24px; justify-content: center; text-align: center; }
  .hero-content { max-width: 100%; }
  .hero-content p { max-width: 100%; }
  .hero-btn-group { justify-content: center; }
  .hero-arrow { display: none; }
  .scroll-indicator { display: none; }
  .hero-dots { left: 50%; transform: translateX(-50%); }

  .about-grid { grid-template-columns: 1fr; gap: 30px; }
  .about-img { order: -1; }
  .about-badge { bottom: 20px; right: 20px; left: auto; }
  .about-img img { height: 300px; }
  .about-text .stat-row { gap: 24px; }

  .features-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .services-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid-masonry { grid-template-columns: repeat(2, 1fr); }
  .cta-grid { grid-template-columns: 1fr; }
  .posts-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .contact-form .form-row { grid-template-columns: 1fr; gap: 0; }

  .section { padding: 60px 0; }
  .page-hero { height: 38vh; padding-left: 0; }
  .page-hero-content { padding-left: 24px; }
}

@media (max-width: 480px) {
  .features-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-grid-masonry { grid-template-columns: 1fr; }
  .hero { height: 85vh; }
  .hero-content h1 { font-size: 2rem; }
  .btn { padding: 12px 24px; font-size: 0.8rem; }
}
