/* ============================================
   OPTIWATT LANDING - Elegant & Innovative Design
   ============================================ */

:root {
  /* Brand Colors - Based on Logo */
  --primary-red: #e31e24;
  --primary-dark: #1a1a1a;
  --primary-light: #ffffff;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-600: #6c757d;
  --gray-800: #343a40;

  /* Gradients */
  --gradient-red: linear-gradient(135deg, #e31e24 0%, #c41e3a 100%);
  --gradient-dark: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  --gradient-overlay: linear-gradient(135deg, rgba(227, 30, 36, 0.95) 0%, rgba(26, 26, 26, 0.95) 100%);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.16);
  --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.20);

  /* Transitions */
  --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ============================================
   GLOBAL RESET & BASE
   ============================================ */

* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: 'Open Sans', -apple-system, system-ui, sans-serif;
  line-height: 1.7;
  color: var(--primary-dark);
  overflow-x: hidden;
  background: #fff;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(2rem, 5vw, 3.5rem); }
h3 { font-size: clamp(1.5rem, 4vw, 2.25rem); }

p {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  margin-bottom: 1.5rem;
  line-height: 1.8;
  color: var(--gray-600);
}

section {
  position: relative;
  overflow: hidden;
}

/* ============================================
   NAVIGATION - Clean & Minimal
   ============================================ */

.navbar-modern {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
  padding: 1rem 0;
  transition: var(--transition-smooth);
}

.navbar-modern.scrolled {
  padding: 0.5rem 0;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.navbar-brand img {
  height: 55px;
  width: auto; /* l'img ha width/height (proporzioni, fase 13 blocco 3): qui comanda l'altezza */
  transition: var(--transition-smooth);
}

.navbar-modern.scrolled .navbar-brand img {
  height: 45px;
}

.nav-link {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary-dark) !important;
  padding: 0.6rem 1rem !important;
  transition: var(--transition-smooth);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-red);
  transition: var(--transition-smooth);
  transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 80%;
}

.language-selector {
  position: relative;
}

.language-selector .dropdown-toggle {
  background: transparent;
  border: 1px solid var(--gray-300);
  color: var(--primary-dark);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.language-selector .dropdown-toggle:hover {
  border-color: var(--primary-red);
  color: var(--primary-red);
}

.language-selector .dropdown-menu {
  border: none;
  box-shadow: var(--shadow-md);
  border-radius: 1rem;
  padding: 0.5rem;
  margin-top: 0.5rem;
}

.language-selector .dropdown-item {
  border-radius: 0.5rem;
  padding: 0.6rem 1rem;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.language-selector .dropdown-item:hover {
  background: var(--gray-100);
  color: var(--primary-red);
}

.btn-cta {
  background: var(--gradient-red);
  color: white !important;
  padding: 0.7rem 1.8rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 16px rgba(227, 30, 36, 0.3);
}

.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(227, 30, 36, 0.4);
}

/* ============================================
   HERO - Asymmetric Split Design
   ============================================ */

.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  padding: 6rem 0;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: var(--primary-red);
  clip-path: polygon(20% 0, 100% 0, 100% 100%, 0% 100%);
  opacity: 0.03;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: white;
}

.hero-badge {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  background: rgba(227, 30, 36, 0.15);
  border: 1px solid rgba(227, 30, 36, 0.3);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--primary-red);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-title {
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 900;
  margin-bottom: 1.5rem;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.hero-title .highlight {
  color: var(--primary-red);
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  font-weight: 400;
  margin-bottom: 3rem;
  opacity: 0.85;
  max-width: 600px;
  color: rgba(255, 255, 255, 0.9);
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-hero-primary {
  padding: 1.2rem 3rem;
  font-size: 1.05rem;
  border-radius: 50px;
  font-weight: 700;
  background: var(--primary-red);
  color: white;
  border: 2px solid var(--primary-red);
  transition: var(--transition-smooth);
  box-shadow: 0 8px 24px rgba(227, 30, 36, 0.4);
  text-decoration: none;
  display: inline-block;
}

.btn-hero-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(227, 30, 36, 0.5);
  color: white;
}

.btn-hero-secondary {
  padding: 1.2rem 3rem;
  font-size: 1.05rem;
  border-radius: 50px;
  font-weight: 700;
  background: transparent;
  color: white;
  border: 2px solid white;
  transition: var(--transition-smooth);
  text-decoration: none;
  display: inline-block;
}

.btn-hero-secondary:hover {
  background: white;
  color: var(--primary-dark);
  transform: translateY(-3px);
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: bounce-scroll 2s infinite;
}

@keyframes bounce-scroll {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

.scroll-indicator i {
  font-size: 2rem;
  color: white;
  opacity: 0.6;
}

/* ============================================
   FEATURES - Diagonal Cards Layout
   ============================================ */

.features-section {
  padding: 8rem 0;
  background: var(--gray-100);
  position: relative;
}

.diagonal-accent {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 200px;
  background: white;
  transform: skewY(-2deg);
  transform-origin: top left;
}

.feature-card {
  background: white;
  border-radius: 1.5rem;
  padding: 3rem 2.5rem;
  transition: var(--transition-smooth);
  border: 1px solid var(--gray-200);
  height: 100%;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background: var(--gradient-red);
  transition: var(--transition-smooth);
}

.feature-card:hover::before {
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.feature-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--primary-red) 0%, #c41e3a 100%);
  border-radius: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: white;
  font-size: 2rem;
  transition: var(--transition-smooth);
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(5deg);
}

.feature-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary-dark);
  font-weight: 700;
}

.feature-description {
  color: var(--gray-600);
  font-size: 1rem;
  line-height: 1.7;
  margin: 0;
}

/* ============================================
   APPLICATIONS - Staggered Grid
   ============================================ */

.applications-section {
  padding: 8rem 0;
  background: white;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

@media (max-width: 991px) {
  .app-grid { grid-template-columns: repeat(2, 1fr); }
}

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

.app-card {
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
  height: 400px;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-md);
}

.app-card:nth-child(even) {
  margin-top: 2rem;
}

@media (max-width: 991px) {
  .app-card:nth-child(even) {
    margin-top: 0;
  }
}

.app-card:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-xl);
  z-index: 10;
}

.app-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.app-card:hover img {
  transform: scale(1.05);
}

.app-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  background: linear-gradient(to top, rgba(26, 26, 26, 0.95) 0%, transparent 100%);
  color: white;
  transition: var(--transition-smooth);
}

.app-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  transition: var(--transition-smooth);
}

.app-card:hover .app-title {
  color: var(--primary-red);
  transform: translateY(-5px);
}

/* ============================================
   TIMELINE - Zigzag Layout
   ============================================ */

.timeline-section {
  padding: 8rem 0;
  background: var(--gray-100);
}

.timeline-item {
  display: grid;
  grid-template-columns: 1fr 80px 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 3rem;
}

/* Forza ogni elemento nella sua colonna */
.timeline-item > *:nth-child(1) { grid-column: 1; }
.timeline-item > *:nth-child(2) { grid-column: 2; }
.timeline-item > *:nth-child(3) { grid-column: 3; }

@media (max-width: 991px) {
  .timeline-item {
    grid-template-columns: 80px 1fr;
    gap: 1.5rem;
  }

  .timeline-content:last-child {
    display: none !important;
  }
}

.timeline-content {
  background: white;
  border-radius: 1.5rem;
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.timeline-content:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(10px);
}

.timeline-item:nth-child(even) .timeline-content:hover {
  transform: translateX(-10px);
}

.timeline-number {
  width: 80px;
  height: 80px;
  background: var(--gradient-red);
  border-radius: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  font-weight: 900;
  box-shadow: 0 8px 24px rgba(227, 30, 36, 0.3);
}

/* ============================================
   REQUIREMENTS - Dark Section with Icons
   ============================================ */

.requirements-section {
  padding: 8rem 0;
  background: var(--primary-dark);
  color: white;
  position: relative;
}

.requirement-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.5rem;
  padding: 2.5rem 2rem;
  text-align: center;
  transition: var(--transition-smooth);
  height: 100%;
}

.requirement-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary-red);
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(227, 30, 36, 0.3);
}

.requirement-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  color: var(--primary-red);
}

.requirement-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: white;
}

.requirement-text {
  opacity: 0.85;
  font-size: 1rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   ADVANTAGES - Clean List
   ============================================ */

.advantages-section {
  padding: 8rem 0;
  background: white;
}

.advantage-item {
  background: var(--gray-100);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: var(--transition-smooth);
  border-left: 3px solid transparent;
}

.advantage-item:hover {
  background: white;
  border-left-color: var(--primary-red);
  transform: translateX(8px);
  box-shadow: var(--shadow-sm);
}

.advantage-check {
  width: 40px;
  height: 40px;
  background: var(--primary-red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.advantage-text {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin: 0;
}

/* ============================================
   GALLERY - Pinterest Masonry
   ============================================ */

.gallery-section {
  padding: 8rem 0;
  background: var(--gray-100);
}

.gallery-grid {
  column-count: 4;
  column-gap: 1.25rem;
}

@media (max-width: 1200px) { .gallery-grid { column-count: 3; } }
@media (max-width: 768px) { .gallery-grid { column-count: 2; } }
@media (max-width: 480px) { .gallery-grid { column-count: 1; } }

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  cursor: pointer;
  margin-bottom: 1.25rem;
  break-inside: avoid;
  display: inline-block;
  width: 100%;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.gallery-item:hover {
  box-shadow: var(--shadow-md);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: var(--transition-smooth);
}

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

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

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

.gallery-overlay i {
  font-size: 2.5rem;
  color: white;
}

/* ============================================
   WHY US - Split Sections
   ============================================ */

.why-us-section {
  padding: 8rem 0;
  background: white;
}

.why-us-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 6rem;
}

.why-us-block:nth-child(even) {
  direction: rtl;
}

.why-us-block:nth-child(even) > * {
  direction: ltr;
}

@media (max-width: 991px) {
  .why-us-block,
  .why-us-block:nth-child(even) {
    grid-template-columns: 1fr;
    direction: ltr;
  }
}

.why-us-image {
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.why-us-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: var(--transition-smooth);
}

.why-us-image:hover img {
  transform: scale(1.05);
}

.why-us-title {
  font-size: 2.25rem;
  margin-bottom: 1.5rem;
  color: var(--primary-dark);
}

.why-us-title .highlight {
  color: var(--primary-red);
}

.why-us-text {
  font-size: 1.125rem;
  color: var(--gray-600);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.pdf-download {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.8rem;
  background: var(--gray-100);
  border-radius: 50px;
  text-decoration: none;
  color: var(--primary-dark);
  font-weight: 600;
  margin-right: 0.75rem;
  margin-top: 0.75rem;
  transition: var(--transition-smooth);
  border: 1px solid var(--gray-200);
}

.pdf-download:hover {
  background: var(--primary-red);
  color: white;
  border-color: var(--primary-red);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.pdf-download i {
  font-size: 1.25rem;
}

/* ============================================
   STATS - Minimal Circles
   ============================================ */

.stats-section {
  padding: 6rem 0;
  background: var(--primary-dark);
  color: white;
}

.stat-item {
  text-align: center;
  padding: 2rem 1rem;
}

.stat-circle {
  width: 160px;
  height: 160px;
  margin: 0 auto 1.5rem;
  border: 4px solid rgba(227, 30, 36, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  position: relative;
}

.stat-number {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1;
  display: block;
  color: var(--primary-red);
}

.stat-label {
  font-size: 1.125rem;
  font-weight: 400;
  opacity: 0.9;
}

/* ============================================
   CONTACT - Clean Form
   ============================================ */

.contact-section {
  padding: 8rem 0;
  background: var(--gray-100);
}

.contact-info {
  background: white;
  border-radius: 1.5rem;
  padding: 3rem;
  box-shadow: var(--shadow-sm);
  height: 100%;
}

.contact-info-item {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: var(--gray-100);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--primary-red);
  flex-shrink: 0;
}

.contact-form {
  background: white;
  border-radius: 1.5rem;
  padding: 3rem;
  box-shadow: var(--shadow-sm);
}

.form-label {
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
}

.form-control {
  border: 2px solid var(--gray-200);
  border-radius: 0.75rem;
  padding: 0.9rem 1.25rem;
  font-size: 1rem;
  transition: var(--transition-smooth);
}

.form-control:focus {
  border-color: var(--primary-red);
  box-shadow: 0 0 0 0.2rem rgba(227, 30, 36, 0.15);
  outline: none;
}

.btn-submit {
  background: var(--gradient-red);
  border: none;
  color: white;
  padding: 1.1rem 2.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 50px;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 16px rgba(227, 30, 36, 0.3);
  width: 100%;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(227, 30, 36, 0.4);
}

/* Modulo contatti (fase 13, blocco 2) */
.btn-submit:disabled { opacity: 0.75; transform: none; }
.contact-form .form-control.is-invalid { border-color: var(--primary-red); }
.contact-form .invalid-feedback { color: var(--primary-red); font-size: 0.85rem; font-weight: 600; }
.contact-form .invalid-feedback:empty { display: none; }
.contact-form .is-invalid ~ .invalid-feedback:not(:empty) { display: block; }
.contact-privacy { font-size: 0.8rem; color: var(--gray-600); margin: 0.25rem 0 1.25rem; line-height: 1.5; }
.contact-privacy a { color: var(--primary-red); font-weight: 600; }

/* ============================================
   FOOTER - Clean & Organized
   ============================================ */

.footer-modern {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 4rem 0 2rem;
}

.footer-logo {
  max-width: 180px;
  margin-bottom: 1.5rem;
}

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

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: var(--transition-smooth);
  font-size: 0.95rem;
}

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

.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  margin-top: 3rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

/* ============================================
   MODAL - Elegant Area Riservata
   ============================================ */

.modal-content {
  border: none;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.modal-header {
  background: var(--gradient-red);
  color: white;
  border: none;
  padding: 2rem;
}

.modal-title {
  font-weight: 700;
  font-size: 1.5rem;
}

.modal-body {
  padding: 2.5rem;
}

.cloud-option {
  display: block;
  padding: 1.5rem;
  background: var(--gray-100);
  border-radius: 1rem;
  text-decoration: none;
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 1.05rem;
  transition: var(--transition-smooth);
  border: 2px solid transparent;
  text-align: center;
  margin-bottom: 1rem;
}

.cloud-option:hover {
  background: white;
  border-color: var(--primary-red);
  color: var(--primary-red);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.cloud-option i {
  margin-right: 0.5rem;
  font-size: 1.25rem;
}

/* ============================================
   UTILITIES
   ============================================ */

.section-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  margin-bottom: 1rem;
  text-align: center;
  letter-spacing: -0.03em;
  color: var(--primary-dark);
}

.section-title .highlight {
  color: var(--primary-red);
}

.section-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--gray-600);
  text-align: center;
  margin-bottom: 4rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
}

.skip-to-content {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--primary-red);
  color: white;
  padding: 1rem 2rem;
  z-index: 9999;
  transition: var(--transition-smooth);
  border-radius: 0 0 1rem 0;
  font-weight: 600;
}

.skip-to-content:focus {
  top: 0;
}

#back-to-top {
  width: 55px;
  height: 55px;
  background: var(--gradient-red);
  border: none;
  box-shadow: 0 4px 16px rgba(227, 30, 36, 0.3);
  transition: var(--transition-smooth);
  border-radius: 50%;
}

#back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(227, 30, 36, 0.4);
}

#back-to-top i {
  font-size: 1.25rem;
}

/* ============================================
   MOBILE RESPONSIVE FIXES
   ============================================ */

@media (max-width: 991px) {
  /* Hero section - reduce padding top */
  .hero-section {
    padding: 4rem 0 3rem;
    min-height: auto;
  }

  /* Hero stats badge - more spacing from navbar */
  .hero-stats-badge {
    margin-top: 2rem;
  }

  /* All sections - reduce top padding */
  .features-section,
  .applications-section,
  .timeline-section,
  .gallery-section,
  .why-us-section {
    padding: 4rem 0;
  }

  /* Feature cards - reduce internal padding */
  .feature-card {
    padding: 2rem 1.5rem;
  }

  /* Timeline - fix mobile layout */
  .timeline-item {
    grid-template-columns: 60px 1fr !important;
    gap: 1rem !important;
  }

  .timeline-item > *:nth-child(1),
  .timeline-item > *:nth-child(3) {
    grid-column: 2 !important;
  }

  .timeline-item > *:nth-child(2) {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  .timeline-content[style*="visibility: hidden"] {
    display: none !important;
  }

  .timeline-number {
    width: 60px !important;
    height: 60px !important;
    font-size: 1.5rem !important;
  }

  .timeline-content {
    padding: 1.5rem !important;
  }
}

@media (max-width: 576px) {
  /* Even more compact on small mobile */
  .hero-section {
    padding: 3rem 0 2rem;
  }

  .features-section,
  .applications-section,
  .timeline-section,
  .gallery-section,
  .why-us-section {
    padding: 3rem 0;
  }

  .feature-card {
    padding: 1.5rem 1rem;
  }

  .timeline-number {
    width: 50px !important;
    height: 50px !important;
    font-size: 1.25rem !important;
  }
}

/* ===== Consenso cookie (fase 13, blocco 1) ===== */
.ow-consent {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 10000;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.ow-consent[hidden] { display: none; }
.ow-consent-box {
  pointer-events: auto;
  position: relative;
  max-width: 640px;
  width: 100%;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-top: 4px solid var(--primary-red);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-lg);
  padding: 1.25rem 1.5rem;
}
.ow-consent-title { font-size: 1.1rem; font-weight: 700; margin: 0 2rem 0.5rem 0; color: var(--primary-dark); }
.ow-consent-text { font-size: 0.9rem; line-height: 1.5; margin-bottom: 1rem; color: var(--gray-800); }
.ow-consent-text a { color: var(--primary-red); font-weight: 600; }
.ow-consent-actions { display: flex; gap: 0.75rem; justify-content: flex-end; }
/* stili propri, il banner non dipende da Bootstrap; le due scelte hanno lo stesso peso visivo */
.ow-consent-btn {
  min-width: 8rem;
  padding: 0.55rem 1.25rem;
  border: 2px solid var(--primary-dark);
  border-radius: 0.5rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.ow-consent-btn-outline { background: var(--primary-light); color: var(--primary-dark); }
.ow-consent-btn-outline:hover { background: var(--gray-200); }
.ow-consent-btn-solid { background: var(--primary-dark); color: var(--primary-light); }
.ow-consent-btn-solid:hover { background: var(--gray-800); border-color: var(--gray-800); }
.ow-consent-btn:focus-visible, .ow-consent-close:focus-visible { outline: 3px solid var(--primary-red); outline-offset: 2px; }
.ow-consent-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border: 0;
  background: none;
  color: var(--gray-600);
  font-size: 1.6rem;
  line-height: 1;
  padding: 0.25rem;
}
.ow-consent-close:hover, .ow-consent-close:focus-visible { color: var(--primary-dark); }
@media (max-width: 575.98px) {
  .ow-consent { left: 0.5rem; right: 0.5rem; bottom: 0.5rem; }
  .ow-consent-box { padding: 1rem; }
  .ow-consent-actions .ow-consent-btn { flex: 1; min-width: 0; }
}
.ow-consent-box:focus { outline: none; }

/* Menu lingue (fase 13, blocco 4): voce attiva col rosso del marchio, non il blu di Bootstrap */
.language-selector .dropdown-item.active,
.language-selector .dropdown-item:active {
  background: var(--primary-red);
  color: var(--primary-light);
}
