/* ============================================================
   ROOT & RESET
   ============================================================ */
:root {
  --yellow:        #F5C518;
  --yellow-hover:  #D4AA10;
  --yellow-light:  rgba(245, 197, 24, 0.12);
  --yellow-bg:     #FFFBEA;
  --black:         #111111;
  --dark:          #1C1C1C;
  --gray-dark:     #333333;
  --gray:          #666666;
  --gray-mid:      #999999;
  --gray-light:    #F5F5F5;
  --white:         #FFFFFF;
  --shadow-sm:     0 2px 8px rgba(0,0,0,0.08);
  --shadow-md:     0 6px 24px rgba(0,0,0,0.12);
  --shadow-lg:     0 16px 48px rgba(0,0,0,0.16);
  --radius-sm:     6px;
  --radius-md:     12px;
  --radius-lg:     20px;
  --transition:    all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--white);
  color: var(--gray-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5 { font-weight: 700; line-height: 1.2; color: var(--dark); }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.1rem; }
p  { color: var(--gray); line-height: 1.75; }

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--yellow-hover);
  margin-bottom: 0.75rem;
}
.section-title {
  margin-bottom: 1rem;
}
.section-title span { color: var(--yellow-hover); }

.title-line {
  width: 56px;
  height: 4px;
  background: var(--yellow);
  border-radius: 2px;
  margin-bottom: 1.5rem;
}
.title-line.center { margin-left: auto; margin-right: auto; }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section { padding: 6rem 0; }
.section-alt { background: var(--gray-light); }
.text-center { text-align: center; }
.flex { display: flex; }
.grid { display: grid; }
.gap-1 { gap: 1rem; }
.gap-2 { gap: 2rem; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
  letter-spacing: 0.01em;
}
.btn-yellow {
  background: var(--yellow);
  color: var(--dark);
  box-shadow: 0 4px 14px rgba(245,197,24,0.35);
}
.btn-yellow:hover {
  background: var(--yellow-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245,197,24,0.45);
}
.btn-outline {
  border: 2px solid var(--yellow);
  color: var(--yellow);
  background: transparent;
}
.btn-outline:hover {
  background: var(--yellow);
  color: var(--dark);
}
.btn-white {
  background: var(--white);
  color: var(--dark);
  box-shadow: var(--shadow-sm);
}
.btn-white:hover {
  background: var(--yellow);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: var(--transition);
}
.header.scrolled {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}
.header.transparent { background: transparent; }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  padding: 0 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.logo-mark {
  width: 44px; height: 44px;
  background: var(--yellow);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
}
.logo-mark svg { width: 26px; height: 26px; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-name {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.02em;
}
.logo-name.white { color: var(--white); }
.logo-sub {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray-mid);
}
.logo-sub.white { color: rgba(255,255,255,0.7); }
.nav-logo-img { height: 52px; width: auto; display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-links a {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-dark);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%; right: 50%;
  height: 2px;
  background: var(--yellow);
  transition: var(--transition);
  border-radius: 1px;
}
.nav-links a:hover::after { left: 1rem; right: 1rem; }
.nav-links a:hover { color: var(--dark); }
.nav-links.white a { color: rgba(255,255,255,0.85); }
.nav-links.white a:hover { color: var(--white); }

.nav-cta { margin-left: 1.5rem; }

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}
.nav-burger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--dark);
  border-radius: 1px;
  transition: var(--transition);
}
.nav-burger.white span { background: var(--white); }

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 600;
  transition: var(--transition);
}
.mobile-menu a:hover { color: var(--yellow); }
.mobile-close {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  color: var(--white);
  font-size: 2rem;
  cursor: pointer;
  transition: var(--transition);
}
.mobile-close:hover { color: var(--yellow); transform: rotate(90deg); }

/* ============================================================
   HERO SLIDER
   ============================================================ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
}

.slider-track {
  display: flex;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.76, 0, 0.24, 1);
}

.slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Slide backgrounds */
.slide-1 { background: url(../img/opere_marittime.JPG) center/cover no-repeat, linear-gradient(135deg, #1b2631, #2e4057); }
.slide-2 { background: url(../img/Edilizia_stradale.JPG) center/cover no-repeat, linear-gradient(135deg, #1b2631, #2e4057); }
.slide-3 { background: url(../img/consolidamenti.jpg) center/cover no-repeat, linear-gradient(135deg, #1b2631, #2e4057); }
.slide-4 { background: url(../img/lavori\ idrici\ fluviali.JPG) center/cover no-repeat, linear-gradient(135deg, #1b2631, #2e4057); }
.slide-5 { background: url(../img/Urbanizazioni.jpg) center/cover no-repeat, linear-gradient(135deg, #1b2631, #2e4057); }
.slide-6 { background: url(../img/condotte-idriche-fognarie.jpg) center/cover no-repeat, linear-gradient(135deg, #1b2631, #2e4057); }

.slide-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}

/* Geometric background pattern */
.slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(245,197,24,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245,197,24,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* Bottom accent bar */
.slide::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 5px;
  background: var(--yellow);
}

.slide-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 2rem;
  max-width: 900px;
  animation: slideIn 0.8s ease forwards;
}

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

.slide-icon {
  width: 96px; height: 96px;
  background: var(--yellow);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 2rem;
  box-shadow: 0 0 0 16px rgba(245,197,24,0.15);
}
.slide-icon svg { width: 48px; height: 48px; }

.slide-num {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 1rem;
}
.slide-title {
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}
.slide-desc {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255,255,255,0.8);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

/* Slider controls */
.slider-prev,
.slider-next {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  z-index: 10;
  width: 52px; height: 52px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  transition: var(--transition);
}
.slider-prev { left: 2rem; }
.slider-next { right: 2rem; }
.slider-prev:hover,
.slider-next:hover {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--dark);
  transform: translateY(-50%) scale(1.1);
}
.slider-prev svg,
.slider-next svg { width: 20px; height: 20px; }

.slider-dots {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 0.6rem;
  z-index: 10;
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  border: none;
  transition: var(--transition);
  cursor: pointer;
}
.dot.active {
  background: var(--yellow);
  transform: scale(1.4);
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.5);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 10;
  writing-mode: vertical-rl;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, var(--yellow));
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ============================================================
   STATS BAR
   ============================================================ */
.stats-bar {
  background: var(--dark);
  padding: 2.5rem 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.stat-item {
  text-align: center;
  padding: 1.5rem;
  position: relative;
}
.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0; top: 20%; bottom: 20%;
  width: 1px;
  background: rgba(255,255,255,0.1);
}
.stat-number {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--yellow);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.stat-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ============================================================
   SERVICES SECTION
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.service-card {
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.service-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--yellow);
  transform: scaleX(0);
  transition: var(--transition);
  transform-origin: left;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.service-card:hover::before { transform: scaleX(1); }

.service-icon-wrap {
  width: 64px; height: 64px;
  background: var(--yellow-light);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}
.service-card:hover .service-icon-wrap {
  background: var(--yellow);
}
.service-icon-wrap svg { width: 32px; height: 32px; color: var(--yellow-hover); }
.service-card:hover .service-icon-wrap svg { color: var(--dark); }

.service-card h3 { margin-bottom: 0.75rem; font-size: 1.15rem; }
.service-card p { font-size: 0.9rem; margin-bottom: 1.5rem; }
.service-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--yellow-hover);
  transition: var(--transition);
}
.service-link svg { width: 16px; height: 16px; transition: var(--transition); }
.service-link:hover svg { transform: translateX(4px); }

/* ============================================================
   ABOUT SECTION
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.about-visual {
  position: relative;
}
.about-image {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, #1c2b4a 0%, #2e4a7a 100%);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.about-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.about-badge {
  position: absolute;
  bottom: -1.5rem; right: -1.5rem;
  background: var(--yellow);
  padding: 1.5rem 2rem;
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-md);
}
.about-badge-num {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--dark);
  line-height: 1;
}
.about-badge-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--dark);
  margin-top: 0.25rem;
}
.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2rem 0;
}
.about-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.feature-dot {
  width: 8px; height: 8px;
  background: var(--yellow);
  border-radius: 50%;
  margin-top: 0.5rem;
  flex-shrink: 0;
}
.about-feature p { font-size: 0.9rem; margin: 0; color: var(--gray); }

/* ============================================================
   TEAM SECTION
   ============================================================ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}
.team-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  text-align: center;
}
.team-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.team-avatar {
  height: 220px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--dark);
  position: relative;
  overflow: hidden;
}
.team-avatar span {
  position: relative;
  z-index: 1;
}
.team-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  z-index: 2;
}
.team-avatar::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: var(--yellow);
  z-index: 3;
}
.team-av1 { background: linear-gradient(135deg, #f5e642, #f5c518); }
.team-av2 { background: linear-gradient(135deg, #dda520, #c8860a); }
.team-av3 { background: linear-gradient(135deg, #e8c040, #d4a910); }
.team-av4 { background: linear-gradient(135deg, #f0d050, #e0b820); }

.team-info { padding: 1.5rem; }
.team-info h4 { margin-bottom: 0.25rem; }
.team-role {
  font-size: 0.82rem;
  color: var(--yellow-hover);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}
.team-info p { font-size: 0.85rem; }

/* ============================================================
   GALLERY SECTION
   ============================================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 220px;
  gap: 1rem;
  margin-top: 3rem;
}
.gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
}
.gallery-item.tall { grid-row: span 2; }
.gallery-item.wide { grid-column: span 2; }

.gallery-item:hover { transform: scale(1.02); }
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-item:hover .gallery-zoom { transform: scale(1); opacity: 1; }

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.5s ease;
}
.gallery-item:hover img {
  transform: scale(1.06);
}
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(245,197,24,0.85);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: var(--transition);
}
.gallery-zoom {
  width: 50px; height: 50px;
  background: var(--dark);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transform: scale(0.5);
  opacity: 0;
  transition: var(--transition);
}
.gallery-zoom svg { width: 22px; height: 22px; color: var(--white); }
.gallery-label {
  position: absolute;
  bottom: 1rem; left: 1rem;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  letter-spacing: 0.05em;
}

/* Gallery Modal */
.gallery-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.97);
  z-index: 2000;
  display: none;
  flex-direction: column;
}
.gallery-modal.open { display: flex; }

.gm-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.5rem;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.gm-title {
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gm-counter {
  color: rgba(255,255,255,0.4);
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
}
.gm-close {
  color: var(--white);
  font-size: 1.1rem;
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}
.gm-close:hover { background: var(--yellow); color: var(--dark); }

.gm-stage {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gm-prev, .gm-next {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  z-index: 10;
  width: 50px; height: 50px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  transition: var(--transition);
}
.gm-prev { left: 1.25rem; }
.gm-next { right: 1.25rem; }
.gm-prev:hover, .gm-next:hover {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--dark);
  transform: translateY(-50%) scale(1.06);
}
.gm-prev svg, .gm-next svg { width: 20px; height: 20px; }
.gm-nav-hidden { opacity: 0 !important; pointer-events: none !important; }

.gm-media {
  max-width: calc(100% - 130px);
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 0;
}
.gm-media img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius-sm);
  display: block;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  transition: opacity 0.3s ease;
}
.gm-media video {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius-sm);
  background: #000;
  display: block;
}
.gm-media iframe {
  width: min(900px, 100%);
  aspect-ratio: 16/9;
  border: none;
  border-radius: var(--radius-sm);
  display: block;
}

.gm-caption {
  text-align: center;
  padding: 0.5rem 3rem;
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  flex-shrink: 0;
  min-height: 2.2rem;
  line-height: 2.2rem;
}

.gm-thumbs {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  overflow-x: auto;
  justify-content: center;
  flex-shrink: 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  scrollbar-width: thin;
  scrollbar-color: var(--yellow) rgba(255,255,255,0.05);
}
.gm-thumbs::-webkit-scrollbar { height: 4px; }
.gm-thumbs::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); }
.gm-thumbs::-webkit-scrollbar-thumb { background: var(--yellow); border-radius: 2px; }
.gm-thumbs.gm-thumbs-hidden { display: none; }

.gm-thumb {
  width: 80px; height: 56px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  border: 2px solid transparent;
  transition: var(--transition);
  opacity: 0.45;
  background: rgba(255,255,255,0.05);
}
.gm-thumb:hover { opacity: 0.8; }
.gm-thumb.active { border-color: var(--yellow); opacity: 1; }
.gm-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gm-thumb-play {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.45);
}
.gm-thumb-play svg { width: 18px; height: 18px; }

/* ============================================================
   CONTACT SECTION
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}
.contact-info h3 { margin-bottom: 1.5rem; }
.contact-items { margin-top: 2.5rem; }
.contact-item {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}
.contact-icon {
  width: 48px; height: 48px;
  background: var(--yellow-light);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-icon svg { width: 22px; height: 22px; color: var(--yellow-hover); }
.contact-detail h5 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gray-mid); margin-bottom: 0.25rem; }
.contact-detail p { color: var(--dark); font-size: 0.95rem; margin: 0; }

/* Contact form */
.contact-form {
  background: var(--gray-light);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}
.form-group { margin-bottom: 1.5rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-dark);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1.1rem;
  border: 1.5px solid rgba(0,0,0,0.1);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--white);
  color: var(--dark);
  transition: var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 4px rgba(245,197,24,0.12);
}
.form-group textarea { height: 130px; resize: vertical; }
.form-submit { width: 100%; justify-content: center; padding: 1rem 2rem; font-size: 1rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,0.7);
  padding: 4rem 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
}
.footer-brand p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.55);
  margin-top: 1.25rem;
  line-height: 1.7;
}
.footer-col h5 {
  color: var(--white);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1.25rem;
}
.footer-col ul li { margin-bottom: 0.6rem; }
.footer-col ul li a {
  color: rgba(255,255,255,0.55);
  font-size: 0.9rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.footer-col ul li a::before {
  content: '';
  width: 4px; height: 4px;
  background: var(--yellow);
  border-radius: 50%;
  opacity: 0;
  transition: var(--transition);
}
.footer-col ul li a:hover { color: var(--white); }
.footer-col ul li a:hover::before { opacity: 1; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.35);
}
.footer-bottom a { color: var(--yellow); }

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-top {
  position: fixed;
  bottom: 2rem; right: 2rem;
  width: 46px; height: 46px;
  background: var(--yellow);
  color: var(--dark);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 500;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
  pointer-events: none;
}
.back-top.visible { opacity: 1; transform: translateY(0); pointer-events: all; }
.back-top:hover { background: var(--yellow-hover); transform: translateY(-3px); }
.back-top svg { width: 18px; height: 18px; }

/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ============================================================
   SERVICE DETAIL PAGES
   ============================================================ */
.page-hero {
  padding: 10rem 0 6rem;
  position: relative;
  overflow: hidden;
  min-height: 420px;
  display: flex; align-items: flex-end;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
/* Gradiente di fallback (visibile se non viene impostata una foto) */
.page-hero-1 { background-color: #1a1a1a; }
.page-hero-2 { background-color: #2c1810; }
.page-hero-3 { background-color: #0d3b6e; }
.page-hero-4 { background-color: #0a2342; }
.page-hero-5 { background-color: #1b2631; }
.page-hero-6 { background-color: #1a2f4e; }

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  /* Scurisce la foto per rendere il testo leggibile.
     Aumenta il valore (es. 0.6) se la foto è molto chiara. */
  background: rgba(0,0,0,0.5);
}
.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 5px;
  background: var(--yellow);
}
.page-hero-content {
  position: relative; z-index: 1;
}
.page-hero-content .breadcrumb {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 1rem;
  display: flex; gap: 0.5rem; align-items: center;
}
.page-hero-content .breadcrumb a { color: var(--yellow); }
.page-hero-content .breadcrumb span { color: rgba(255,255,255,0.4); }
.page-hero-content h1 { color: var(--white); margin-bottom: 1rem; }
.page-hero-content p { color: rgba(255,255,255,0.75); max-width: 600px; font-size: 1.1rem; }

.page-icon-hero {
  position: absolute;
  right: 10%;
  top: 50%;
  transform: translateY(-50%);
  width: 180px; height: 180px;
  background: rgba(245,197,24,0.1);
  border: 2px solid rgba(245,197,24,0.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.page-icon-hero svg { width: 80px; height: 80px; color: rgba(245,197,24,0.5); }

.page-content { padding: 5rem 0; }
.page-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 4rem;
  align-items: start;
}
.page-body h2 { margin-bottom: 1.5rem; font-size: 1.9rem; }
.page-body h3 { margin: 2.5rem 0 1rem; font-size: 1.3rem; color: var(--dark); }
.page-body p { margin-bottom: 1.2rem; line-height: 1.8; }
.page-body ul {
  margin: 1rem 0 1.5rem;
  padding-left: 0;
}
.page-body ul li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: var(--gray);
  line-height: 1.6;
}
.page-body ul li::before {
  content: '';
  display: block;
  width: 8px; height: 8px;
  background: var(--yellow);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.45rem;
}
.page-sidebar { position: sticky; top: 6rem; }
.sidebar-card {
  background: var(--gray-light);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin-bottom: 1.5rem;
}
.sidebar-card h4 { margin-bottom: 1.25rem; font-size: 1rem; }
.sidebar-services li {
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.sidebar-services li:last-child { border: none; }
.sidebar-services li a {
  font-size: 0.9rem;
  color: var(--gray);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
}
.sidebar-services li a:hover { color: var(--yellow-hover); }
.sidebar-services li a.active { color: var(--yellow-hover); font-weight: 600; }
.sidebar-services li a svg { width: 14px; height: 14px; }

.cta-card {
  background: var(--dark);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
}
.cta-card h4 { color: var(--white); margin-bottom: 0.75rem; }
.cta-card p { font-size: 0.88rem; color: rgba(255,255,255,0.6); margin-bottom: 1.5rem; }
.cta-card .btn { width: 100%; justify-content: center; }

.highlight-box {
  background: var(--yellow-light);
  border-left: 4px solid var(--yellow);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}
.highlight-box p { color: var(--gray-dark); margin: 0; font-style: italic; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { gap: 3rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .section { padding: 4rem 0; }
  .services-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-badge { right: 0; bottom: -1rem; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-item.wide { grid-column: span 1; }
  .gm-media { max-width: calc(100% - 90px); }
  .gm-prev { left: 0.4rem; }
  .gm-next { right: 0.4rem; }
  .gm-prev, .gm-next { width: 40px; height: 40px; }
  .gm-thumbs { justify-content: flex-start; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
  .page-grid { grid-template-columns: 1fr; }
  .page-sidebar { position: static; }
  .form-row { grid-template-columns: 1fr; }
  .page-icon-hero { display: none; }
  .slider-prev { left: 0.75rem; }
  .slider-next { right: 0.75rem; }
  .scroll-indicator { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2)::after { display: none; }
}

@media (max-width: 480px) {
  .team-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item.tall { grid-row: span 1; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-item::after { display: none; }
}
