/* =====================================================
   STYLE.CSS — Sito Elettricisti
   Tema: Slate Freddo / Grigio Professionale
   ===================================================== */

/* --- AJAX PAGE TRANSITIONS --- */
#page-content {
  min-height: 60vh;
}
#page-content.page-exit {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
#page-content.page-enter {
  animation: pageEnter 0.3s ease forwards;
}
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- PROGRESS BAR --- */
#progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--accent);
  z-index: 9999;
  transition: width 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  border-radius: 0 2px 2px 0;
}
#progress-bar.loading {
  opacity: 1;
  transition: width 0.5s ease;
}

/* --- VARIABILI E RESET --- */
:root {
  --primary:       black;
  --secondary:     blue;
  --accent:        #e8c14a;
  --white:         #ffffff;
  --light:         #eef0f3;
  --dark:          #1c2433;
  --text:          #2d2d2d;
  --text-light:    #666;
  --shadow:        0 4px 24px rgba(0,0,0,0.10);
  --shadow-hover:  0 8px 32px rgba(0,0,0,0.18);
  --radius:        10px;
  --transition:    0.3s ease;
  --max-width:     1200px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}

img   { max-width: 100%; height: auto; display: block; }
a     { text-decoration: none; color: inherit; }
ul    { list-style: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 80px 0; }

/* --- TIPOGRAFIA --- */
h1 { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.2; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.3; }
h3 { font-size: 1.3rem; }
p  { color: var(--text-light); line-height: 1.8; }

.section-title    { text-align: center; color: var(--primary); margin-bottom: 12px; }
.section-subtitle { text-align: center; max-width: 600px; margin: 0 auto 56px; }

/* --- BOTTONI --- */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-align: center;
}
.btn-primary { background: var(--accent); color: var(--primary); }
.btn-primary:hover { background: #e0951a; transform: translateY(-2px); box-shadow: var(--shadow-hover); }

.btn-outline { background: transparent; color: var(--white); border: 2px solid var(--white); }
.btn-outline:hover { background: var(--white); color: var(--primary); }

.btn-secondary { background: var(--secondary); color: var(--white); }
.btn-secondary:hover { background: var(--primary); transform: translateY(-2px); }

/* =====================================================
   NAVBAR
   ===================================================== */
.navbar {
  position: sticky;
  top: 0;
  background: var(--primary);
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-weight: 700;
  font-size: 1.3rem;
}
.nav-logo .logo-img {
  height: 100px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
  border-radius: 0;
}

.nav-links {
  display: flex;
  gap: 32px;
}
.nav-links a {
  color: rgba(255,255,255,0.85);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
  padding-bottom: 4px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: var(--transition);
}
.nav-links a:hover,
.nav-links a.active { color: var(--white); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-cta {
  background: var(--accent) !important;
  color: var(--primary) !important;
  padding: 8px 22px;
  border-radius: 50px;
  font-weight: 700 !important;
}
.nav-cta:hover { background: #e0951a !important; }
.nav-cta::after { display: none !important; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.hamburger span {
  width: 26px; height: 3px;
  background: var(--white);
  border-radius: 3px;
  transition: var(--transition);
  display: block;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* =====================================================
   FOOTER
   ===================================================== */
footer {
  background: var(--dark);
  color: rgba(255,255,255,0.75);
  padding: 56px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 24px;
}
.footer-brand .logo-text {
  color: var(--white);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-brand .logo-img-footer {
  height: 85px;
  width: auto;
  filter: brightness(0) invert(1);
}
.footer-brand p { font-size: 0.9rem; }
.footer-col h4 { color: var(--white); margin-bottom: 16px; font-size: 1rem; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: rgba(255,255,255,0.7); transition: var(--transition); font-size: 0.9rem; }
.footer-col ul li a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}
.footer-bottom a { color: var(--accent); }

/* =====================================================
   HERO — HOME
   ===================================================== */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 60%, #374a60 100%);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero-bg-image {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.10), transparent 45%),
    radial-gradient(circle at 80% 75%, rgba(232,193,74,0.18), transparent 50%);
  opacity: 0.12;
}
.hero-shapes { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-shapes span { position: absolute; border-radius: 50%; background: rgba(255,255,255,0.04); }
.hero-shapes span:nth-child(1) { width: 500px; height: 500px; right: -120px; top: -120px; }
.hero-shapes span:nth-child(2) { width: 300px; height: 300px; right: 220px; bottom: 40px; }
.hero-shapes span:nth-child(3) { width: 180px; height: 180px; right: 120px; top: 40%; }

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 740px;
  color: var(--white);
  padding: 60px 0;
}
.hero-logo-top {
  display: flex;
  justify-content: center;
  margin-bottom: 22px;
}
.hero-logo-top img {
  width: 400px;
  max-width: 55vw;
  height: auto;
  filter: brightness(0) invert(1) drop-shadow(0 8px 20px rgba(0,0,0,0.3));
}
.hero-badge {
  display: inline-block;
  background: var(--accent);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 6px 18px;
  border-radius: 50px;
  margin-bottom: 20px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.hero-content h1 { margin-bottom: 20px; }
.hero-content h1 span { color: var(--accent); }
.hero-content > p {
  color: rgba(255,255,255,0.85);
  font-size: 1.rem;
  margin-bottom: 36px;
  max-width: 540px;
}
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  gap: 48px;
  margin-top: 64px;
  flex-wrap: wrap;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.stat { display: flex; flex-direction: column; }
.stat-number { font-size: 2.2rem; font-weight: 700; color: var(--accent); line-height: 1; }
.stat-label { font-size: 0.82rem; color: rgba(255,255,255,0.65); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }

/* =====================================================
   SEZIONE SERVIZI
   ===================================================== */
.services { background: var(--light); }
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 28px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: var(--transition);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.card:hover::before { transform: scaleY(1); }
.card-icon { font-size: 2.8rem; margin-bottom: 16px; display: block; }
.card h3 { color: var(--primary); margin-bottom: 10px; }

/* =====================================================
   TEASER PROGETTI (homepage)
   ===================================================== */
.projects-teaser .teaser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}
.project-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  background: var(--white);
}
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.project-card-img {
  height: 220px;
  position: relative;
  overflow: hidden;
}
.project-card-img .img-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem;
  color: rgba(255,255,255,0.5);
}
.project-card-img img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.project-card:hover .project-card-img img { transform: scale(1.05); }
.project-card-img .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(47,59,82,0.65), transparent);
}
.project-card-body { padding: 24px; }
.project-card-body h3 { color: var(--primary); margin-bottom: 8px; }
.project-card-body p { font-size: 0.9rem; margin-bottom: 16px; }
.project-tag {
  display: inline-block;
  background: var(--light);
  color: var(--secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 50px;
  margin-bottom: 12px;
}

/* =====================================================
   PERCHÉ SCEGLIERCI
   ===================================================== */
.why-us { background: var(--primary); }
.why-us .section-title   { color: var(--white); }
.why-us .section-subtitle { color: rgba(255,255,255,0.75); }
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.why-item {
  text-align: center;
  padding: 36px 20px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  transition: var(--transition);
}
.why-item:hover { background: rgba(255,255,255,0.13); transform: translateY(-4px); }
.why-icon { font-size: 2.6rem; margin-bottom: 14px; }
.why-item h3 { color: var(--accent); margin-bottom: 10px; }
.why-item p { color: rgba(255,255,255,0.7); font-size: 0.9rem; }

/* =====================================================
   CTA CHIAMACI (fondo home)
   ===================================================== */
.cta-call { background: var(--accent); padding: 72px 0; text-align: center; }
.cta-call h2 { color: var(--primary); margin-bottom: 10px; }
.cta-call p { color: var(--primary); opacity: 0.8; margin-bottom: 32px; font-size: 1.05rem; }
.btn-call {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--primary);
  color: var(--white);
  padding: 20px 48px;
  border-radius: 50px;
  font-size: 1.3rem;
  font-weight: 700;
  transition: var(--transition);
  box-shadow: 0 6px 24px rgba(47,59,82,0.35);
}
.btn-call:hover {
  background: var(--dark);
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(47,59,82,0.45);
}
.btn-call .phone-icon { font-size: 1.5rem; animation: ring 1.8s infinite; }
@keyframes ring {
  0%,100% { transform: rotate(0); }
  10%      { transform: rotate(-15deg); }
  20%      { transform: rotate(15deg); }
  30%      { transform: rotate(-10deg); }
  40%      { transform: rotate(10deg); }
  50%      { transform: rotate(0); }
}

/* =====================================================
   PAGE HERO (pagine interne)
   ===================================================== */
.page-hero {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 30px 0 30px;
  text-align: center;
  color: var(--white);
}
.page-hero h1 { color: var(--white); margin-bottom: 14px; }
.page-hero p { color: rgba(255,255,255,0.8); max-width: 600px; margin: 0 auto; }
.breadcrumb {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
}
.breadcrumb a { color: var(--accent); }
.breadcrumb span::before { content: '/'; margin-right: 6px; }

/* =====================================================
   CHI SIAMO — STORIA
   ===================================================== */
.storia-section { padding: 80px 0; }
.storia-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.storia-text h2 { color: var(--primary); margin-bottom: 20px; }
.storia-text p { margin-bottom: 16px; }
.storia-text .btn { margin-top: 12px; }
.storia-img {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-hover);
  height: 420px;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem;
  color: rgba(255,255,255,0.3);
  position: relative;
}
.storia-img img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

.values-section { background: var(--light); }
.value-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.value-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 28px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.value-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.value-card .icon { font-size: 3rem; margin-bottom: 16px; }
.value-card h3 { color: var(--primary); margin-bottom: 10px; }

/* =====================================================
   CONTATTI
   ===================================================== */
.contatti-section { padding: 80px 0; }
.contatti-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: start;
}
.contact-form-wrapper h2 { color: var(--primary); margin-bottom: 8px; }
.contact-form-wrapper > p { margin-bottom: 32px; }
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 6px;
  font-size: 0.9rem;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid #d5d9de;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  transition: var(--transition);
  background: var(--white);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(80,96,112,0.12);
}
.form-group textarea { resize: vertical; min-height: 130px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-submit { margin-top: 8px; width: 100%; padding: 15px; font-size: 1rem; }
.form-success {
  display: none;
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-top: 16px;
  font-weight: 600;
}

.contact-info h3 { color: var(--primary); margin-bottom: 24px; font-size: 1.4rem; }
.info-item { display: flex; gap: 16px; margin-bottom: 24px; align-items: flex-start; }
.info-icon {
  width: 50px; height: 50px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.info-text strong { display: block; color: var(--primary); margin-bottom: 4px; font-size: 0.95rem; }
.info-text span { font-size: 0.9rem; }
.map-placeholder {
  margin-top: 32px;
  height: 220px;
  background: var(--light);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-light);
  font-size: 0.9rem;
  border: 2px dashed #c2c8cf;
  overflow: hidden;
  flex-direction: column;
  gap: 8px;
}
.map-placeholder iframe,
.map-placeholder img { width: 100%; height: 100%; border: none; object-fit: cover; }

/* =====================================================
   LISTA PROGETTI
   ===================================================== */
.projects-list { padding: 80px 0; }
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 32px;
}
.project-item {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  background: var(--white);
}
.project-item:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.project-item-img {
  height: 240px;
  position: relative;
  overflow: hidden;
}
.project-item-img .img-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem;
  color: rgba(255,255,255,0.45);
}
.project-item-img img,
.project-item-img video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.project-item:hover .project-item-img img,
.project-item:hover .project-item-img video { transform: scale(1.07); }
.project-item-body { padding: 28px; }
.project-item-body h3 { color: var(--primary); margin-bottom: 8px; }
.project-item-body p { font-size: 0.9rem; margin-bottom: 20px; }
.project-meta { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.meta-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 50px;
  background: var(--light);
  color: var(--secondary);
}

/* =====================================================
   PAGINA SINGOLO PROGETTO
   ===================================================== */
.project-detail { padding: 72px 0; }
.project-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--secondary);
  font-weight: 600;
  transition: var(--transition);
  margin-bottom: 36px;
  font-size: 0.95rem;
}
.project-back:hover { color: var(--primary); gap: 14px; }
.project-detail h2 { color: var(--primary); margin-bottom: 16px; }
.project-detail .lead { margin-bottom: 16px; font-size: 1.05rem; max-width: 800px; }
.project-detail .description { margin-bottom: 48px; max-width: 800px; }
.project-info-bar {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  padding: 20px 28px;
  background: var(--light);
  border-radius: var(--radius);
  margin-bottom: 48px;
}
.project-info-item strong { display: block; color: var(--primary); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.project-info-item span { font-size: 0.95rem; }

.gallery-section { margin-bottom: 56px; }
.gallery-section h3 { color: var(--primary); margin-bottom: 24px; font-size: 1.5rem; }
.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.project-carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}
.project-gallery.carousel-track {
  display: flex;
  grid-template-columns: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  gap: 16px;
  padding: 4px 2px 10px;
  flex: 1;
}
.project-gallery.carousel-track::-webkit-scrollbar {
  height: 8px;
}
.project-gallery.carousel-track::-webkit-scrollbar-thumb {
  background: rgba(28,36,51,0.25);
  border-radius: 999px;
}
.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
  position: relative;
}
.project-gallery.carousel-track .gallery-item {
  flex: 0 0 min(88vw, 560px);
  scroll-snap-align: start;
}
.gallery-item .img-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.8rem;
  color: rgba(255,255,255,0.45);
}
.gallery-item img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-overlay {
  position: absolute; inset: 0;
  background: rgba(47,59,82,0.5);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: var(--transition);
  color: white;
  font-size: 2rem;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.carousel-btn {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: rgba(28,36,51,0.9);
  color: var(--white);
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: var(--transition);
  flex: 0 0 auto;
}
.carousel-btn:hover {
  transform: translateY(-1px);
  background: var(--secondary);
}
.carousel-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.video-section { margin-bottom: 56px; }
.video-section h3 { color: var(--primary); margin-bottom: 20px; font-size: 1.5rem; }
.video-wrapper {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 16/9;
  background: var(--dark);
  position: relative;
  display: flex; align-items: center; justify-content: center;
  max-width: 860px;
}
.video-wrapper iframe,
.video-wrapper video { width: 100%; height: 100%; border: none; }
.video-fallback-link {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  text-align: center;
  font-size: 1rem;
  line-height: 1.45;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  text-decoration: none;
  z-index: 2;
}
.video-fallback-link:hover {
  background: rgba(0, 0, 0, 0.82);
}
.video-direct-link {
  display: inline-block;
  margin-top: -6px;
  margin-bottom: 8px;
  font-size: 0.92rem;
  color: var(--secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.video-direct-link:hover {
  color: var(--primary);
}
.video-placeholder { text-align: center; color: rgba(255,255,255,0.35); }
.video-placeholder .play-icon { font-size: 4rem; margin-bottom: 14px; }
.video-placeholder p { font-size: 0.9rem; }

@media (max-width: 900px) {
  .project-carousel {
    gap: 8px;
  }
  .carousel-btn {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }
  .project-gallery.carousel-track .gallery-item {
    flex-basis: min(84vw, 420px);
  }
}

/* =====================================================
   LIGHTBOX
   ===================================================== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.93);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.lightbox.active { display: flex; }
.lightbox-img { max-width: 90vw; max-height: 85vh; border-radius: 8px; object-fit: contain; }
.lightbox-close {
  position: absolute;
  top: 20px; right: 28px;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
  background: none;
  border: none;
}
.lightbox-close:hover { color: var(--accent); transform: rotate(90deg); }

/* =====================================================
   ANIMAZIONI
   ===================================================== */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.10s; }
.delay-2 { transition-delay: 0.20s; }
.delay-3 { transition-delay: 0.30s; }
.delay-4 { transition-delay: 0.40s; }
.delay-5 { transition-delay: 0.50s; }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 960px) {
  .storia-grid  { grid-template-columns: 1fr; }
  .contatti-grid { grid-template-columns: 1fr; }
  .footer-grid  { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 68px; left: 0;
    width: 100%;
    flex-direction: column;
    background: var(--primary);
    padding: 24px;
    gap: 20px;
    transform: translateX(-100%);
    transition: var(--transition);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  }
  .nav-links.open { transform: translateX(0); }
  .hamburger { display: flex; }
  section { padding: 56px 0; }
  .hero-logo-top img { width: 200px; }
  .hero-stats { gap: 24px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .project-info-bar { gap: 20px; }
}

@media (max-width: 480px) {
  .hero-buttons { flex-direction: column; }
  .btn { width: 100%; text-align: center; }
  .projects-grid,
  .teaser-grid { grid-template-columns: 1fr; }
  .btn-call { font-size: 1.1rem; padding: 16px 32px; }
}
