/* ==========================================================================
   Enzo Rapisarda Autotrasporti - Main Stylesheet
   Modern, Fast & Standalone PHP Site
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Mulish:wght@300;400;600;700;800;900&display=swap');

:root {
  --primary: #ef0505;
  --primary-hover: #d00404;
  --bg-black: #000000;
  --bg-dark: #0a0a0a;
  --bg-card: #121212;
  --bg-card-hover: #1c1c1c;
  --text-white: #ffffff;
  --text-muted: #b8b8b8;
  --text-dark: #1f2937;
  --border-color: rgba(255, 255, 255, 0.1);
  --border-active: #ef0505;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 30px;
  --transition: all 0.3s ease;
  --container-max: 1200px;
}

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

html {
  scroll-behavior: smooth;
  font-family: 'Mulish', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background-color: var(--bg-black);
  color: var(--text-white);
  line-height: 1.6;
}

body {
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

a {
  color: var(--text-white);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary);
}

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

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* ==========================================================================
   Top Bar
   ========================================================================== */
.top-bar {
  background-color: #050505;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  padding: 8px 0;
  color: var(--text-muted);
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.top-bar-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.top-bar-left a, .top-bar-left span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #cccccc;
}

.top-bar-left a:hover {
  color: var(--primary);
}

.top-bar-left i {
  color: var(--primary);
  font-size: 0.95rem;
}

.top-bar-right {
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: 0.5px;
  font-size: 0.82rem;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.main-header {
  background-color: rgba(0, 0, 0, 0.95);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(8px);
  border-bottom: 2px solid #1a1a1a;
  transition: var(--transition);
}

.main-header.scrolled {
  background-color: #000000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  border-bottom-color: var(--primary);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
}

.logo-wrapper {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 34px;
  max-height: 36px;
  width: auto;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 8px;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-block;
  padding: 10px 16px;
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-lg);
  color: var(--text-white);
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  background-color: var(--primary);
  color: #ffffff;
}

/* Submenu / Dropdown */
.has-dropdown > .nav-link::after {
  content: " \f107";
  font-family: "FontAwesome";
  font-size: 0.8rem;
  margin-left: 4px;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 250px;
  background-color: #111111;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  z-index: 100;
}

.has-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item a {
  display: block;
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #e0e0e0;
  border-left: 3px solid transparent;
}

.dropdown-item a:hover {
  background-color: #1a1a1a;
  color: var(--primary);
  border-left-color: var(--primary);
  padding-left: 24px;
}

/* Mobile Toggle */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-white);
  font-size: 1.6rem;
  cursor: pointer;
  padding: 5px;
}

/* ==========================================================================
   Hero Homepage (Video Background & Red Overlay - Original Design)
   ========================================================================== */
.hero-video-section {
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  padding: 100px 20px 80px 20px;
  background-color: #000000;
}

.hero-video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Sfumatura rossa sul lato sinistro esattamente come nello screenshot originale */
  background: 
    linear-gradient(90deg, rgba(220, 15, 15, 0.82) 0%, rgba(180, 10, 10, 0.70) 35%, rgba(60, 5, 5, 0.45) 65%, rgba(0, 0, 0, 0.65) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.4) 70%, rgba(0,0,0,0.95) 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 950px;
  margin: 0 auto;
}

.hero-title {
  font-size: 3.1rem;
  font-weight: 900;
  line-height: 1.25;
  color: #ffffff;
  margin-bottom: 22px;
  text-shadow: 0 4px 20px rgba(0,0,0,0.85);
  letter-spacing: -0.5px;
}

.hero-subtitle {
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.6;
  max-width: 860px;
  margin: 0 auto 35px auto;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.hero-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 30px;
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition);
  cursor: pointer;
}

.hero-btn-red {
  background-color: var(--primary);
  border: 2px solid var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(239, 5, 5, 0.4);
}

.hero-btn-red:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(239, 5, 5, 0.6);
}

.hero-btn-outline {
  background-color: rgba(0, 0, 0, 0.45);
  border: 2px solid #ffffff;
  color: #ffffff;
  backdrop-filter: blur(4px);
}

.hero-btn-outline:hover {
  background-color: #ffffff;
  color: #000000;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

.hero-arrow-wrapper {
  margin-top: 30px;
  margin-bottom: 5px;
}

.hero-arrow-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: #ffffff;
  color: #111111;
  border-radius: 50%;
  font-size: 1rem;
  transition: var(--transition);
  animation: bounce 2s infinite;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.hero-arrow-btn:hover {
  background-color: var(--primary);
  color: #ffffff;
  transform: translateY(3px) scale(1.08);
}

/* ==========================================================================
   Overlap Section (4 Pallini esattamente al centro tra video sopra e sfondo nero sotto)
   ========================================================================== */
.overlap-section {
  position: relative;
  z-index: 10;
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 55px;
  background-color: #000000;
}

.overlap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
  position: relative;
  top: -44px; /* Sposta il blocco verso l'alto esattamente di metà cerchio (88px / 2): centro esatto sulla linea tra video e nero */
  margin-bottom: -44px;
  z-index: 20;
}

.overlap-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 10px;
}

.overlap-icon-circle {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background-color: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
  margin-bottom: 18px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.overlap-item:hover .overlap-icon-circle {
  transform: scale(1.08);
  box-shadow: 0 8px 25px rgba(239, 5, 5, 0.5);
}

.overlap-item h4 {
  font-size: 1.15rem;
  font-weight: 900;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.overlap-item p {
  font-size: 0.92rem;
  color: #cccccc;
  line-height: 1.4;
}

/* ==========================================================================
   Partners Section (8 Schede Bianche - Screenshot 2)
   ========================================================================== */
.partners-grid-custom {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  max-width: 1100px;
  margin: 35px auto 0 auto;
}

.partner-card-white {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 20px 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 125px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.partner-card-white:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

.partner-card-white img {
  max-height: 65px;
  max-width: 100%;
  object-fit: contain;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-12px); }
  60% { transform: translateY(-6px); }
}

/* ==========================================================================
   Inner Page Banner
   ========================================================================== */
.page-banner {
  background: linear-gradient(135deg, #0d0d0d 0%, #1a0000 100%);
  border-bottom: 3px solid var(--primary);
  padding: 60px 0;
  text-align: center;
  position: relative;
}

.page-banner h1 {
  font-size: 2.4rem;
  font-weight: 900;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.page-banner h1 span {
  color: var(--primary);
}

.page-banner .breadcrumb {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.page-banner .breadcrumb a {
  color: #ffffff;
}

.page-banner .breadcrumb a:hover {
  color: var(--primary);
}

/* ==========================================================================
   Section Components & Cards
   ========================================================================== */
.section-padding {
  padding: 70px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 2.2rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 15px;
}

.section-title p.lead {
  font-size: 1.15rem;
  color: #d1d1d1;
  max-width: 850px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Feature Grid (4-pillar: Tracciabilità, Monitoraggio, etc.) */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}

.feature-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 35px 25px;
  text-align: center;
  transition: var(--transition);
}

.feature-card:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--primary);
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(239, 5, 5, 0.15);
}

.feature-icon-circle {
  width: 72px;
  height: 72px;
  background-color: var(--primary);
  color: #ffffff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 20px;
  box-shadow: 0 6px 15px rgba(239, 5, 5, 0.35);
  transition: var(--transition);
}

.feature-card:hover .feature-icon-circle {
  transform: rotate(10deg) scale(1.05);
}

.feature-card h4, .feature-card h5 {
  font-size: 1.2rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: #ffffff;
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Alternating Row Content */
.content-row {
  display: flex;
  align-items: center;
  gap: 50px;
  margin-bottom: 60px;
}

.content-row.reverse {
  flex-direction: row-reverse;
}

.content-col-text {
  flex: 1;
}

.content-col-text h2 {
  font-size: 2.1rem;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 20px;
  text-transform: uppercase;
}

.content-col-text p {
  font-size: 1.05rem;
  color: #cccccc;
  margin-bottom: 25px;
  line-height: 1.7;
}

.content-col-img {
  flex: 1;
}

.content-col-img img {
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  width: 100%;
}

/* Button style */
.btn-red {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: var(--primary);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 13px 28px;
  border-radius: var(--radius-lg);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.btn-red:hover {
  background-color: var(--primary-hover);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 5, 5, 0.4);
}

.btn-white {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: #ffffff;
  color: #000000;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 13px 28px;
  border-radius: var(--radius-lg);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.btn-white:hover {
  background-color: #f0f0f0;
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

/* Counters Section */
.counters-section {
  background: linear-gradient(180deg, #080808 0%, #000000 100%);
  border-top: 1px solid #1a1a1a;
  border-bottom: 1px solid #1a1a1a;
  padding: 60px 0;
}

.counters-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  text-align: center;
}

.counter-item i {
  font-size: 2.4rem;
  color: var(--primary);
  margin-bottom: 15px;
  display: inline-block;
}

.counter-number {
  font-size: 3rem;
  font-weight: 900;
  color: #ffffff;
  display: block;
  margin-bottom: 8px;
}

.counter-label {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* CTA Banner */
.cta-banner {
  background-color: var(--primary);
  color: #ffffff;
  padding: 50px 0;
  border-radius: var(--radius-md);
  margin: 40px 0;
}

.cta-banner .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.cta-banner h2 {
  font-size: 2rem;
  font-weight: 900;
  text-transform: uppercase;
}

/* Partners Section */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
  align-items: center;
}

.partner-box {
  background-color: #ffffff;
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 110px;
  transition: var(--transition);
}

.partner-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.15);
}

.partner-box img {
  max-height: 60px;
  max-width: 140px;
  object-fit: contain;
}

/* Video Responsive Player */
.video-responsive-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  background: #000;
  margin: 30px auto;
  max-width: 900px;
}

.video-responsive-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(239, 5, 5, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.gallery-overlay i {
  color: #ffffff;
  font-size: 2rem;
  transform: translateY(10px);
  transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-item:hover .gallery-overlay i {
  transform: translateY(0);
}

/* Lightbox Modal */
.lightbox-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
}

.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: none;
  font-size: 1.8rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
  background: var(--primary);
}

.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* Department Contact Cards */
.departments-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-bottom: 50px;
}

@media (min-width: 1025px) {
  .dept-card-wide {
    grid-column: span 2;
  }
}

@media (max-width: 1024px) {
  .departments-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .departments-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .section-title h2 {
    font-size: 1.7rem;
    line-height: 1.25;
  }
}

@media (max-width: 480px) {
  .section-title h2 {
    font-size: 1.4rem;
    line-height: 1.25;
  }
}

.dept-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 30px 20px;
  text-align: center;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  box-sizing: border-box;
}

.dept-card:hover {
  border-color: var(--primary);
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(239, 5, 5, 0.2);
}

.dept-card i.dept-icon {
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 15px;
  display: inline-block;
}

.dept-card h4 {
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: #ffffff;
  letter-spacing: 0.5px;
  overflow-wrap: break-word;
}

.dept-card .dept-email {
  display: inline-block;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  overflow-wrap: anywhere;
  word-break: normal;
  max-width: 100%;
  transition: color 0.2s ease;
}

.dept-card .dept-email:hover {
  color: var(--primary);
}

.dept-card .dept-phones {
  font-size: 0.92rem;
  font-weight: 600;
  color: #e0e0e0;
  margin-bottom: 22px;
  line-height: 1.5;
}

.dept-card .dept-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: auto;
}

.btn-small-red {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-color: var(--primary);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: var(--radius-lg);
  text-transform: uppercase;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-small-red:hover {
  background-color: var(--primary-hover);
  color: #ffffff;
  transform: translateY(-2px);
}

/* Contact Form & Map Section */
.contact-section-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: stretch;
}

.contact-form-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 35px;
}

.contact-form-box h3 {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 25px;
  text-transform: uppercase;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: #d0d0d0;
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  background: #1a1a1a;
  border: 1px solid #333333;
  color: #ffffff;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-family: inherit;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background: #222222;
  box-shadow: 0 0 10px rgba(239, 5, 5, 0.2);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.form-alert {
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.95rem;
  font-weight: 600;
  display: none;
}

.form-alert.success {
  background-color: rgba(34, 197, 94, 0.2);
  border: 1px solid #22c55e;
  color: #4ade80;
  display: block;
}

.form-alert.error {
  background-color: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #f87171;
  display: block;
}

.map-box {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  min-height: 420px;
  height: 100%;
}

.map-box iframe {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.main-footer {
  background-color: #050505;
  border-top: 3px solid var(--primary);
  padding: 60px 0 20px 0;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

.footer-logo {
  max-width: 220px;
  margin-bottom: 18px;
}

.footer-bio {
  font-size: 0.9rem;
  color: #a0a0a0;
  line-height: 1.6;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #cccccc;
  font-size: 0.92rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-links a::before {
  content: "\f105";
  font-family: "FontAwesome";
  color: var(--primary);
}

.footer-links a:hover {
  color: var(--primary);
  padding-left: 5px;
}

.footer-contact-item {
  font-size: 0.9rem;
  color: #cccccc;
  margin-bottom: 12px;
  line-height: 1.5;
}

.footer-contact-item strong {
  color: #ffffff;
}

.footer-contact-item i {
  color: var(--primary);
  margin-right: 8px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 25px;
  text-align: center;
  font-size: 0.85rem;
  color: #777777;
}

.footer-bottom a {
  color: #aaaaaa;
}

.footer-bottom a:hover {
  color: var(--primary);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 992px) {
  .overlap-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }

  .partners-grid-custom {
    grid-template-columns: repeat(2, 1fr);
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .departments-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .content-row, .content-row.reverse {
    flex-direction: column;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .top-bar {
    display: none;
  }

  .logo-img {
    height: 28px;
    max-height: 30px;
  }

  .overlap-section {
    margin-top: 0;
    padding-bottom: 45px;
  }

  .overlap-icon-circle {
    width: 76px;
    height: 76px;
    font-size: 1.7rem;
    margin-bottom: 12px;
  }

  .overlap-grid {
    top: -38px;
    margin-bottom: -38px;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px 15px;
  }

  .partners-grid-custom {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 76px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 76px);
    background-color: #0d0d0d;
    flex-direction: column;
    align-items: stretch;
    padding: 30px 20px;
    gap: 15px;
    overflow-y: auto;
    transition: left 0.3s ease;
  }

  .nav-menu.active {
    left: 0;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background-color: #1a1a1a;
    margin-top: 8px;
    border: none;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.05rem;
  }

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

  .counters-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .partners-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .cta-banner .container {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.6rem;
  }

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

/* ==========================================================================
   Modal Cookie Consenso (GDPR Complianz Style - Screenshot Originale)
   ========================================================================== */
.cookie-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(3px);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cookie-backdrop.show {
  opacity: 1;
}

.cookie-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 92%;
  max-width: 480px;
  max-height: 90vh;
  background: #ffffff;
  color: #222222;
  border-radius: 14px;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.45);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  font-family: inherit;
}

.cookie-modal.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.cookie-header {
  position: relative;
  padding: 18px 24px 10px 24px;
  text-align: center;
}

.cookie-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #222222;
  margin: 0;
}

.cookie-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: #333333;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s ease;
}

.cookie-close:hover {
  color: var(--primary);
}

.cookie-body {
  padding: 10px 24px;
  overflow-y: auto;
  font-size: 0.88rem;
  color: #333333;
  line-height: 1.5;
}

.cookie-intro {
  margin-bottom: 16px;
  color: #333333;
  font-size: 0.86rem;
}

.cookie-accordions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.cookie-acc-item {
  background-color: #f7f7f7;
  border-radius: 6px;
  padding: 12px 14px;
  border: 1px solid #ededed;
}

.cookie-acc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.cookie-cat-name {
  font-weight: 700;
  color: #222222;
  font-size: 0.92rem;
}

.cookie-cat-status {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-always-active {
  color: #2e7d32;
  font-size: 0.84rem;
  font-weight: 600;
}

.acc-icon {
  font-size: 0.85rem;
  color: #333333;
  transition: transform 0.25s ease;
}

.acc-icon.collapsed {
  transform: rotate(180deg);
}

.cookie-acc-content {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e5e5e5;
  font-size: 0.82rem;
  color: #444444;
  line-height: 1.45;
  display: block;
}

.cookie-acc-content.hidden {
  display: none;
}

/* Toggle Switch (Arancione caldo esattamente come nello screenshot) */
.switch-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  margin: 0;
}

.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cccccc;
  transition: .3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.switch-toggle input:checked + .slider {
  background-color: #e65100;
}

.switch-toggle input:checked + .slider:before {
  transform: translateX(20px);
}

.cookie-services-link {
  text-align: center;
  margin: 12px 0 6px 0;
}

.cookie-services-link a {
  color: #990000;
  font-size: 0.84rem;
  text-decoration: underline;
  font-weight: 600;
}

.cookie-footer {
  display: grid;
  grid-template-columns: 1fr 1fr 1.3fr;
  gap: 8px;
  padding: 16px 20px;
  background-color: #ffffff;
  border-top: 1px solid #eeeeee;
}

.cookie-btn {
  padding: 10px 12px;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.2s ease, transform 0.15s ease;
  border: 1px solid transparent;
}

.cookie-btn-accept {
  background-color: var(--primary);
  color: #ffffff;
}

.cookie-btn-accept:hover {
  background-color: var(--primary-hover);
}

.cookie-btn-deny, .cookie-btn-save {
  background-color: #f5f5f5;
  color: #222222;
  border-color: #e0e0e0;
}

.cookie-btn-deny:hover, .cookie-btn-save:hover {
  background-color: #e8e8e8;
}

/* Pulsante Flottante per riaprire il consenso */
.cookie-reopen-btn {
  position: fixed;
  bottom: 15px;
  left: 15px;
  z-index: 999;
  background-color: rgba(20, 20, 20, 0.9);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  transition: all 0.25s ease;
}

.cookie-reopen-btn:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
}
