:root {
  --primary-color: #2a5298;
  --secondary-color: #4facfe;
  --accent-color: #ff6b6b;
  --ios-safe-top: env(safe-area-inset-top, 0px);
  --ios-safe-bottom: env(safe-area-inset-bottom, 0px);
  --ios-safe-left: env(safe-area-inset-left, 0px);
  --ios-safe-right: env(safe-area-inset-right, 0px);
  --vh: 1vh;
  --animation-speed: 0.3s;
  --swipe-progress: 0;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  font-family: 'Roboto', Arial, sans-serif;
  background-color: #f4f4f4;
  line-height: 1.6;
  color: #333;
  scroll-behavior: smooth;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

@keyframes slideUp {
  from { transform: translateX(-50%) translateY(20px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes fluidMotion {
  0% { transform: scale(0.5) rotate(-15deg); opacity: 0; }
  30% { transform: scale(1.2) rotate(5deg); opacity: 0.9; }
  60% { transform: scale(0.95) rotate(-2deg); opacity: 1; }
  80% { transform: scale(1.05) rotate(1deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

@keyframes phoneRing {
  0%, 100% { transform: rotate(0) scale(1); }
  10%, 30% { transform: rotate(-15deg) scale(1.1); }
  20%, 40% { transform: rotate(15deg) scale(1.1); }
  50% { transform: rotate(0) scale(1); }
}

@keyframes searchPulse {
  0%, 100% { transform: scale(1) translateY(0); }
  25% { transform: scale(1.1) translateY(-2px); }
  50% { transform: scale(1.05) translateY(0); }
  75% { transform: scale(1.15) translateY(-1px); }
}

@keyframes rotateCube {
  0% { transform: rotateX(0) rotateY(0) rotateZ(0); }
  25% { transform: rotateX(90deg) rotateY(45deg) rotateZ(45deg); }
  50% { transform: rotateX(180deg) rotateY(90deg) rotateZ(90deg); }
  75% { transform: rotateX(270deg) rotateY(135deg) rotateZ(135deg); }
  100% { transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg); }
}

@keyframes swipeIndicatorPulse {
  0%, 100% { opacity: 0.7; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.05); }
}

@keyframes ripple {
  0% { transform: scale(0, 0); opacity: 0.5; }
  100% { transform: scale(20, 20); opacity: 0; }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 8px 25px rgba(42, 82, 152, 0.35), 0 0 20px rgba(79, 172, 254, 0.4); }
  50% { box-shadow: 0 8px 25px rgba(42, 82, 152, 0.35), 0 0 30px rgba(79, 172, 254, 0.6); }
}

@keyframes borderGlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

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

@keyframes iconPopIn {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.8s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.splash-logo {
  width: 80%;
  max-width: 400px;
  height: auto;
  animation: fluidMotion 1.8s ease-in-out forwards;
  filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.8));
  transform-origin: center;
  opacity: 0;
  will-change: transform, opacity;
}

.debug-panel {
  position: fixed;
  bottom: 10px;
  left: 10px;
  background: rgba(0,0,0,0.8);
  color: white;
  padding: 10px;
  border-radius: 8px;
  z-index: 9999;
  font-family: monospace;
  font-size: 11px;
  max-width: 300px;
  max-height: 200px;
  overflow: auto;
  display: none;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px 20px;
  width: 100%;
  flex: 1 0 auto;
}

.header {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  text-align: center;
  padding: 20px 0;
  border-radius: 0 0 15px 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  margin-top: 0;
}

.logo-container {
  background: white;
  padding: 15px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: transform 0.3s;
}

.logo-container:hover {
  transform: scale(1.05);
}

.logo {
  max-width: 180px;
  height: auto;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.logo-home-link {
  display: inline-block;
  text-decoration: none;
  transition: transform 0.3s;
}

.logo-home-link:hover {
  transform: scale(1.05);
}

.navbar {
  background: linear-gradient(to right, #333, #444);
  padding: 0;
  margin-bottom: 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  border-radius: 10px;
  margin-top: 0;
}

.nav-menu {
  display: flex;
  justify-content: flex-start;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  margin: 0;
  position: relative;
}

.nav-link {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 18px 12px;
  display: block;
  transition: all 0.3s;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.nav-link:hover {
  background-color: rgba(255,255,255,0.1);
  transform: translateY(-2px);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: #4facfe;
  transition: width 0.3s;
}

.nav-link:hover::after {
  width: 70%;
}

.nav-icon {
  margin-right: 5px;
}

.navbar .nav-menu .lock-item.lock-right {
  position: relative;
  margin-left: auto;
}

.navbar .lock-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.navbar .lock-icon {
  display: inline-block;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.navbar .lock-item.active .lock-icon {
  transform: rotate(90deg);
}

.navbar .lock-btn:hover {
  background-color: rgba(255,255,255,0.15);
}

.navbar .lock-item.active .lock-btn {
  background-color: rgba(255,255,255,0.2);
}

.navbar .submenu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background-color: #333;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  width: 190px;
  z-index: 1001;
  overflow: hidden;
  animation: fadeIn 0.3s ease-out;
}

.navbar .submenu li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.navbar .submenu-link {
  color: white;
  text-decoration: none;
  padding: 12px 18px;
  display: block;
  transition: all 0.3s;
  font-size: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
}

.navbar .submenu-link:hover {
  background-color: rgba(255,255,255,0.1);
  padding-left: 22px;
}

.navbar .lock-item.active .submenu {
  display: block;
}

.navbar .lab-link-desktop {
  display: none;
}

@media (min-width: 901px) {
  .navbar .lab-link-desktop {
    display: block;
  }
}

@media (min-width: 769px) {
  .nav-menu {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 0 15px;
    position: relative;
  }

  .navbar .nav-menu .lock-item.lock-right {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 0;
    order: initial;
    margin-right: 0;
  }

  .nav-item {
    margin: 0 2px;
  }

  .nav-link {
    padding: 18px 15px;
    font-size: 14px;
    white-space: nowrap;
  }

  .nav-menu > .nav-item:first-child .nav-link {
    padding-left: 0;
  }
}

.hamburger {
  display: none;
  background: white;
  border: none;
  cursor: pointer;
  padding: 12px 10px;
  position: fixed;
  top: 20px;
  right: 15px;
  z-index: 1001;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  width: 44px;
  height: 44px;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.hamburger-line {
  width: 24px;
  height: 3px;
  background-color: #ff0000;
  border-radius: 2px;
  transition: all 0.3s ease;
  display: block;
}

.hamburger.active .line-1 {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active .line-2 {
  opacity: 0;
}

.hamburger.active .line-3 {
  transform: rotate(-45deg) translate(6px, -6px);
}

.hamburger:hover .hamburger-line {
  background-color: #cc0000;
}

.hamburger.active:hover .hamburger-line {
  background-color: #ff0000;
}

.main-content {
  margin-top: 0;
  background: white;
  padding: 50px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  min-height: 500px;
  margin-bottom: 40px;
  border: 1px solid rgba(0,0,0,0.05);
}

.page-content {
  display: none;
  animation: fadeIn 0.6s ease-out forwards;
}

.page-content.active {
  display: block;
}

.page-content h1, .page-content h2 {
  color: #2a5298;
  margin-bottom: 20px;
  position: relative;
}

.page-content h1::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(to right, #4facfe, #00f2fe);
  margin: 15px 0 25px;
  border-radius: 2px;
}

.page-content h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(to right, #4facfe, #00f2fe);
  margin: 10px 0 20px;
  border-radius: 2px;
}

.page-content p {
  margin-bottom: 18px;
  line-height: 1.8;
  color: #555;
}

.page-content ul {
  margin-bottom: 20px;
  padding-left: 20px;
}

.page-content li {
  margin-bottom: 10px;
  position: relative;
  padding-left: 25px;
  color: #555;
}

.page-content li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: #4facfe;
  font-weight: bold;
}

.hero-section {
  position: relative;
  text-align: center;
  padding: 100px 20px;
  margin: -40px -40px 40px -40px;
  color: white;
  border-radius: 8px;
  overflow: hidden;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(30, 60, 114, 0.5), rgba(42, 82, 152, 0.5));
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  background: rgba(0, 0, 0, 0.25);
  padding: 40px;
  border-radius: 15px;
  backdrop-filter: blur(3px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-section h1 {
  font-size: 48px;
  margin-bottom: 15px;
  color: white;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.hero-section h1::after {
  background: #00f2fe;
  margin: 15px auto 25px;
  width: 80px;
}

.hero-section .hero-subtitle {
  font-size: 24px;
  margin-bottom: 30px;
  color: white;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  font-weight: 500;
  line-height: 1.4;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.hero-btn {
  padding: 15px 35px;
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 500;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  font-size: 18px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  will-change: transform, box-shadow, background;
}

.hero-section .hero-btn.primary {
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  border: 2px solid #ff6b6b;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
  font-weight: 600;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

.hero-section .hero-btn.primary:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(255, 107, 107, 0.6);
  background: linear-gradient(135deg, #ff8e8e, #ff7f50);
  border-color: #ff8e8e;
}

.hero-section .hero-btn.secondary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border: 2px solid #667eea;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  font-weight: 600;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

.hero-section .hero-btn.secondary:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
  background: linear-gradient(135deg, #7c8fee, #8a65b2);
  border-color: #7c8fee;
}

.hero-btn.primary::after {
  content: '📞';
  margin-left: 10px;
  font-size: 18px;
  display: inline-block;
  animation: phoneRing 2s ease-in-out infinite;
}

.hero-btn.secondary::after {
  content: '🔍';
  margin-left: 10px;
  font-size: 18px;
  display: inline-block;
  animation: searchPulse 2s ease-in-out infinite;
}

.hero-btn.primary:hover::after {
  animation: phoneRing 0.5s ease-in-out infinite;
}

.hero-btn.secondary:hover::after {
  animation: searchPulse 0.6s ease-in-out infinite;
}

.visualizzatore-3d-btn {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: 2px solid #5a6fd8;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  position: relative;
  overflow: visible;
  transition: all 0.4s ease;
  padding: 16px 40px 16px 50px;
  border-radius: 50px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.visualizzatore-3d-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.6);
  background: linear-gradient(135deg, #5a6fd8, #6a4b9c);
}

.cube-container {
  position: relative;
  width: 24px;
  height: 24px;
  perspective: 1000px;
}

.cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  animation: rotateCube 3s linear infinite;
  will-change: transform;
}

.cube-face {
  position: absolute;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #ffffff, #f0f0f0);
  border: 1px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}

.cube-face::before {
  content: '';
  width: 8px;
  height: 8px;
  background: rgba(102, 126, 234, 0.6);
  border-radius: 1px;
}

.cube-face-front {
  transform: translateZ(12px);
}

.cube-face-back {
  transform: translateZ(-12px) rotateY(180deg);
}

.cube-face-right {
  transform: rotateY(90deg) translateZ(12px);
}

.cube-face-left {
  transform: rotateY(-90deg) translateZ(12px);
}

.cube-face-top {
  transform: rotateX(90deg) translateZ(12px);
}

.cube-face-bottom {
  transform: rotateX(-90deg) translateZ(12px);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.feature-card {
  background: white;
  padding: 35px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  transition: all 0.3s;
  text-align: center;
  border-top: 4px solid #4facfe;
  will-change: transform, box-shadow;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.feature-icon {
  font-size: 50px;
  margin-bottom: 20px;
}

.feature-card h3 {
  color: #2a5298;
  margin-bottom: 15px;
}

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 30px 0 35px;
  padding: 0 15px;
}

.gallery-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  background: white;
  border: 2px solid #e0e6ed;
  border-radius: 50px;
  font-weight: 600;
  font-size: 15px;
  color: #2a5298;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  min-width: 130px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  -webkit-tap-highlight-color: transparent;
  z-index: 1;
  animation: filterFadeIn 0.4s ease-out forwards;
  will-change: transform, background-color, border-color, box-shadow;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.gallery-filter:hover {
  transform: translateY(-2px);
  border-color: #2a5298;
  box-shadow: 0 6px 16px rgba(42, 82, 152, 0.15);
}

.gallery-filter.active {
  background: linear-gradient(135deg, #2a5298, #1e3c72);
  color: white;
  border-color: #2a5298;
  box-shadow: 0 6px 20px rgba(42, 82, 152, 0.3);
  transform: translateY(-2px);
  position: relative;
  z-index: 2;
  font-weight: 600;
  color: white !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.gallery-filter.active::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, #2a5298, #4facfe, #2a5298);
  border-radius: 52px;
  z-index: -1;
  opacity: 0.8;
  animation: borderGlow 2s linear infinite;
  background-size: 200% 200%;
}

.gallery-filter.active * {
  color: white !important;
  fill: white !important;
  stroke: white !important;
}

.filter-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
  fill: currentColor;
  stroke: currentColor;
}

.gallery-filter:hover .filter-icon {
  transform: scale(1.1);
}

.gallery-filter.active .filter-icon {
  transform: scale(1.15);
  fill: white;
  stroke: white;
}

.gallery-filter[data-category="all"] .filter-icon {
  stroke-width: 2;
  fill: none;
}

.gallery-filter.active[data-category="all"] .filter-icon {
  stroke: white;
}

.gallery-filter[data-category="inox"] {
  color: #7f8c8d;
  border-color: #bdc3c7;
}
.gallery-filter[data-category="inox"]:hover {
  border-color: #7f8c8d;
}
.gallery-filter[data-category="inox"].active {
  background: linear-gradient(135deg, #95a5a6, #7f8c8d);
  border-color: #7f8c8d;
}
.gallery-filter[data-category="inox"].active::before {
  background: linear-gradient(135deg, #95a5a6, #7f8c8d, #95a5a6);
}

.gallery-filter[data-category="ferro"] {
  color: #2c3e50;
  border-color: #34495e;
}
.gallery-filter[data-category="ferro"]:hover {
  border-color: #2c3e50;
}
.gallery-filter[data-category="ferro"].active {
  background: linear-gradient(135deg, #34495e, #2c3e50);
  border-color: #2c3e50;
}
.gallery-filter[data-category="ferro"].active::before {
  background: linear-gradient(135deg, #34495e, #2c3e50, #34495e);
}

.gallery-filter[data-category="vetro"] {
  color: #3498db;
  border-color: #5dade2;
}
.gallery-filter[data-category="vetro"]:hover {
  border-color: #3498db;
}
.gallery-filter[data-category="vetro"].active {
  background: linear-gradient(135deg, #5dade2, #3498db);
  border-color: #3498db;
}
.gallery-filter[data-category="vetro"].active::before {
  background: linear-gradient(135deg, #5dade2, #3498db, #5dade2);
}

.gallery-filter[data-category="arte"] {
  color: #9b59b6;
  border-color: #bb8fce;
}
.gallery-filter[data-category="arte"]:hover {
  border-color: #9b59b6;
}
.gallery-filter[data-category="arte"].active {
  background: linear-gradient(135deg, #bb8fce, #9b59b6);
  border-color: #9b59b6;
}
.gallery-filter[data-category="arte"].active::before {
  background: linear-gradient(135deg, #bb8fce, #9b59b6, #bb8fce);
}

.gallery-filter:nth-child(1) { animation-delay: 0.1s; }
.gallery-filter:nth-child(2) { animation-delay: 0.2s; }
.gallery-filter:nth-child(3) { animation-delay: 0.3s; }
.gallery-filter:nth-child(4) { animation-delay: 0.4s; }
.gallery-filter:nth-child(5) { animation-delay: 0.5s; }

.gallery-filter::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(42, 82, 152, 0.2);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%, -50%);
  transform-origin: 50% 50%;
  pointer-events: none;
}

.gallery-filter:active::after {
  animation: ripple 0.4s ease-out;
}

.gallery-info {
  text-align: center;
  margin: 25px auto 35px;
  font-size: 16px;
  color: #666;
  padding: 12px 25px;
  border-radius: 25px;
  background: #f8f9fa;
  display: block;
  width: fit-content;
  border: 1px solid #e0e6ed;
}

.gallery-category-label {
  font-weight: 700;
  color: #2a5298;
  margin-right: 8px;
}

.gallery-count {
  color: #6c757d;
  font-weight: 500;
}

.gallery-container {
  max-width: 100%;
  margin: 0 auto;
}

.main-slide {
  position: relative;
  margin-bottom: 30px;
  height: 700px;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
}

.main-slide:hover {
  box-shadow: 0 12px 25px rgba(0,0,0,0.2);
}

.main-slide img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: none;
  transition: opacity 0.5s ease;
  cursor: pointer;
  margin: 0 auto;
  opacity: 0;
  will-change: opacity, transform;
}

.main-slide img.loaded {
  opacity: 1;
}

.main-slide img.active {
  display: block;
  opacity: 1;
}

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0,0,0,0.6);
  color: white;
  border: none;
  padding: 15px;
  cursor: pointer;
  font-size: 28px;
  z-index: 10;
  border-radius: 50%;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  opacity: 0.8;
}

.nav-btn:hover {
  background-color: rgba(0,0,0,0.9);
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
}

.prev {
  left: 25px;
}

.next {
  right: 25px;
}

.main-slide .slide-info {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  background-color: rgba(0,0,0,0.85);
  padding: 10px 25px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.3s;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.15);
  white-space: nowrap;
  text-align: center;
  z-index: 100;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  min-width: 75px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.5px;
}

.main-slide .slide-info:hover {
  background-color: rgba(0,0,0,0.95);
  transform: translateX(-50%) scale(1.08);
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.fullscreen-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.98);
  z-index: 9999;
  overflow: hidden;
}

.fullscreen-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.98);
  overflow: hidden;
}

.fullscreen-img {
  width: auto;
  height: auto;
  max-width: 100vw;
  max-height: 100vh;
  object-fit: contain;
  transition: opacity 0.3s ease;
  margin: 0 auto;
  display: block;
  background: #000;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.fullscreen-img[src]:not([src=""]) {
  opacity: 1;
}

.fullscreen-img:not(.loaded) {
  opacity: 0;
}

.fullscreen-img.loaded {
  opacity: 1;
}

.close-btn, .fs-nav-btn {
  position: absolute;
  color: white;
  font-size: 35px;
  cursor: pointer;
  z-index: 101;
  transition: all 0.3s ease;
}

.close-btn {
  top: 20px;
  right: 30px;
  color: #ff0000;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
  z-index: 10002;
  pointer-events: auto;
  touch-action: manipulation;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.fs-nav-btn {
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255,255,255,0.2);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(10px);
}

.fs-nav-btn:hover {
  background-color: rgba(255,255,255,0.4);
  transform: translateY(-50%) scale(1.1);
}

.fs-prev {
  left: 30px;
}

.fs-next {
  right: 30px;
}

.fullscreen-modal .fullscreen-bottom-container {
  position: fixed;
  bottom: 2px;
  left: 0;
  right: 0;
  width: 100%;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  justify-content: center;
  z-index: 101;
  pointer-events: none;
  padding: 0 20px;
  box-sizing: border-box;
  gap: 10px;
}

.fullscreen-modal .fullscreen-bottom-container > * {
  pointer-events: auto;
}

.fullscreen-modal .fullscreen-alt-text {
  color: white;
  background-color: rgba(0, 0, 0, 0.85);
  padding: 8px 20px 10px;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  max-width: 80%;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  word-wrap: break-word;
  line-height: 1.3;
  white-space: normal;
  order: 2;
  margin-top: 0;
  margin-bottom: 15px;
}

.fullscreen-modal .fullscreen-bottom-container .slide-info {
  color: white;
  background-color: rgba(0,0,0,0.85);
  padding: 8px 22px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.3s;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.1);
  white-space: nowrap;
  text-align: center;
  min-width: 75px;
  order: 1;
  margin-bottom: 15px;
  position: relative;
  left: 0;
  transform: none;
}

.fullscreen-modal .fullscreen-bottom-container .slide-info:hover {
  background-color: rgba(0,0,0,0.95);
  transform: scale(1.05);
}

.preview-modal {
  touch-action: pan-y pinch-zoom;
}

.preview-modal .fullscreen-content {
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: 120px;
}

.preview-modal .fullscreen-alt-text {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  background-color: rgba(0, 0, 0, 0.85);
  padding: 10px 15px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  max-width: 90%;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  white-space: normal;
  word-wrap: break-word;
  z-index: 90;
  opacity: 1;
  visibility: visible;
  margin: 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.preview-slide-info-static {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  background-color: rgba(0,0,0,0.85);
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 500;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.1);
  white-space: nowrap;
  text-align: center;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  min-width: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

.swiping-active {
  cursor: grabbing;
}

.main-slide.swiping-active img {
  transition: transform 0.1s ease-out;
}

.jump-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.7);
  z-index: 10000;
  animation: fadeIn 0.3s ease-out;
}

.jump-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 25px 20px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  text-align: center;
  min-width: 300px;
  max-width: 90%;
}

.jump-modal-content h3 {
  color: #2a5298;
  margin-bottom: 15px;
  font-size: 24px;
  text-align: center;
}

.jump-modal-content p {
  margin-bottom: 20px;
  color: #666;
  text-align: center;
}

.jump-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  color: #ff0000;
  cursor: pointer;
  transition: color 0.3s;
  line-height: 1;
  height: 30px;
  width: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.jump-close:hover {
  color: #cc0000;
}

#jump-input {
  width: 150px;
  padding: 12px 15px;
  border: 2px solid #2a5298;
  border-radius: 8px;
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  margin: 15px auto;
  display: block;
  transition: all 0.3s;
  background: #f8f9fa;
  color: #2a5298;
}

#jump-input:focus {
  outline: none;
  border-color: #4facfe;
  box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.3);
  background: white;
}

#jump-input:invalid {
  border-color: #ff6b6b;
  background: #fff5f5;
}

#jump-go {
  background: linear-gradient(135deg, #2a5298, #1e3c72);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: block;
  margin: 0 auto;
}

#jump-go:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(42, 82, 152, 0.4);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(79, 172, 254, 0.1);
}

.contact-item:last-child {
  border-bottom: none;
}

.contact-item strong {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 140px;
  color: #333;
  font-weight: 600;
}

.contact-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.contact-item span,
.contact-item a {
  flex: 1;
  color: #555;
  text-decoration: none;
}

.contact-item a:hover {
  color: #ff6b6b;
  text-decoration: underline;
}

.info, address.info {
  background: #f9f9f9;
  padding: 25px;
  border-radius: 8px;
  margin-bottom: 30px;
  border-left: 4px solid #4facfe;
  font-style: normal;
  line-height: 1.8;
  color: #555;
}

.info p, address.info p {
  margin: 10px 0;
  font-size: 16px;
  color: #555;
  display: flex;
  align-items: center;
}

.info p strong, address.info p strong {
  min-width: 100px;
  color: #333;
  margin-right: 15px;
  font-weight: 600;
}

.info a, address.info a {
  color: var(--primary-color, #2a5298);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.info a:hover, address.info a:hover {
  color: var(--accent-color, #ff6b6b);
  text-decoration: underline;
}

.contact-map {
  width: 100%;
  height: 450px;
  border: none;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  margin: 30px 0;
  transition: all 0.3s;
  display: block;
}

.contact-map:hover {
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.footer {
  text-align: center;
  padding: 30px 20px;
  margin-top: 50px;
  background: linear-gradient(135deg, #1e3c72, #2a5298);
  color: white;
  border-radius: 10px 10px 0 0;
}

.footer p {
  margin: 0;
  font-size: 16px;
  color: rgba(255,255,255,0.9);
}

.formazione-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 25px;
  text-align: left;
}

.formazione-logo {
  width: 250px;
  height: auto;
  margin-bottom: 10px;
}

#formazione h1, #formazione h2 {
  margin-top: 0;
  margin-bottom: 5px;
  font-size: 24px;
}

.model-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.model-thumbnail {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: all 0.3s;
  cursor: pointer;
  position: relative;
  height: 250px;
  display: flex;
  flex-direction: column;
  will-change: transform, box-shadow;
}

.model-thumbnail:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.model-thumbnail img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  flex-shrink: 0;
  transition: opacity 0.3s;
}

.model-thumbnail .model-title {
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 8px;
  text-align: center;
  font-size: 14px;
  flex-shrink: 0;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.news-item {
  background: #f9f9f9;
  padding: 25px;
  border-radius: 8px;
  border-left: 4px solid #4facfe;
  transition: all 0.3s;
  will-change: transform, box-shadow;
}

.news-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.news-item h3 {
  color: #2a5298;
  margin-bottom: 10px;
  font-size: 20px;
}

.news-date {
  color: #666;
  font-size: 14px;
  margin-bottom: 15px;
  font-style: italic;
}

.news-item p {
  color: #555;
  line-height: 1.6;
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin: 40px 0;
}

.partner-card {
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  transition: all 0.3s;
  text-align: center;
  border: 1px solid #f0f0f0;
  will-change: transform, box-shadow;
}

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

.partner-logo {
  max-width: 180px;
  max-height: 100px;
  height: auto;
  margin-bottom: 20px;
  transition: transform 0.3s;
  filter: grayscale(0.3);
}

.partner-card:hover .partner-logo {
  transform: scale(1.05);
  filter: grayscale(0);
}

.partner-card h3 {
  color: #2a5298;
  margin-bottom: 10px;
  font-size: 18px;
}

.partner-card p {
  color: #666;
  font-size: 14px;
  line-height: 1.5;
}

.partner-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.loading-partners .loader-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(42, 82, 152, 0.3);
  border-radius: 50%;
  border-top-color: #2a5298;
  animation: spin 1s linear infinite;
}

.gallery-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.7);
  padding: 20px;
  border-radius: 10px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: none;
}

.loader-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s linear infinite;
  margin: 0 auto 10px;
}

.lazy-load {
  opacity: 0;
  transition: opacity 0.3s ease-in;
}

.lazy-load.loaded {
  opacity: 1;
}

#cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #1e3c72, #2a5298);
  color: white;
  padding: 20px;
  z-index: 10000;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
  animation: slideUp 0.5s ease-out;
}

.cookie-consent-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
}

.cookie-text {
  flex: 1;
}

.cookie-text h3 {
  margin-bottom: 10px;
  color: white;
}

.cookie-text p {
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.5;
}

.cookie-text a {
  color: #4facfe;
  text-decoration: underline;
}

.cookie-buttons {
  display: flex;
  gap: 15px;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 2px solid transparent;
}

.cookie-btn.primary {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: white;
  border-color: #2ecc71;
}

.cookie-btn.primary:hover {
  background: linear-gradient(135deg, #27ae60, #219653);
  border-color: #27ae60;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(39, 174, 96, 0.3);
}

.cookie-btn.reject {
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  color: white;
  border-color: #ff6b6b;
}

.cookie-btn.reject:hover {
  background: linear-gradient(135deg, #ff5252, #e74c3c);
  border-color: #ff5252;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(255, 107, 107, 0.3);
}

.cookie-btn.secondary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-color: #667eea;
}

.cookie-btn.secondary:hover {
  background: linear-gradient(135deg, #5a6fd8, #6a4b9c);
  border-color: #5a6fd8;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(102, 126, 234, 0.3);
}

.cookie-btn:not(.primary):not(.reject):not(.secondary) {
  background: linear-gradient(135deg, #34495e, #2c3e50);
  color: white;
  border-color: #34495e;
}

.cookie-btn:not(.primary):not(.reject):not(.secondary):hover {
  background: linear-gradient(135deg, #2c3e50, #243342);
  border-color: #2c3e50;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(52, 73, 94, 0.3);
}

.cookie-btn.primary::before {
  content: '✅ ';
  margin-right: 8px;
  font-size: 16px;
}

.cookie-btn.reject::before {
  content: '❌ ';
  margin-right: 8px;
  font-size: 16px;
}

.cookie-btn.secondary::before {
  content: '⚙️ ';
  margin-right: 8px;
  font-size: 16px;
}

.cookie-management {
  background: linear-gradient(135deg, rgba(30, 60, 114, 0.05), rgba(42, 82, 152, 0.05));
  padding: 30px;
  border-radius: 12px;
  margin: 35px 0;
  border-left: 5px solid #4facfe;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.cookie-management h3 {
  color: #2a5298;
  margin-bottom: 20px;
  font-size: 22px;
}

.cookie-management .cookie-buttons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.cookie-management .cookie-btn {
  margin: 5px;
  min-width: 200px;
  text-align: center;
  justify-content: center;
  display: inline-flex;
  align-items: center;
}

#cookie-policy-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-out;
}

.cookie-policy-content {
  background: linear-gradient(135deg, #ffffff, #f8f9fa);
  padding: 40px;
  border-radius: 15px;
  max-width: 700px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  margin: 20px;
  border: 1px solid rgba(79, 172, 254, 0.2);
  box-shadow: 0 15px 35px rgba(30, 60, 114, 0.2);
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 30px;
  cursor: pointer;
  color: #ff0000;
  font-weight: bold;
  transition: color 0.3s;
}

.close-modal:hover {
  color: #cc0000;
}

.policy-content h2 {
  color: #2a5298;
  background: linear-gradient(135deg, #1e3c72, #2a5298);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 30px;
  text-align: center;
}

.policy-content h3 {
  color: #2a5298;
  margin: 25px 0 15px;
  border-bottom: 2px solid #4facfe;
  padding-bottom: 8px;
}

.policy-content ul {
  margin-bottom: 20px;
  padding-left: 20px;
}

.policy-content li {
  margin-bottom: 8px;
  color: #555;
  line-height: 1.5;
}

.policy-buttons {
  display: flex;
  gap: 15px;
  margin-top: 30px;
  flex-wrap: wrap;
  justify-content: center;
}

@media (max-width: 768px) {
  .gallery-filters {
    gap: 10px;
    padding: 0 15px;
    margin: 25px 0 30px;
  }

  .gallery-filter {
    flex: 1 1 calc(50% - 10px);
    max-width: calc(50% - 10px);
    padding: 12px 16px;
    font-size: 14px;
    min-width: 0;
    min-height: 55px;
    gap: 8px;
  }

  .filter-icon {
    width: 18px;
    height: 18px;
  }

  .gallery-filter.active {
    transform: translateY(-1px);
  }

  .gallery-info {
    font-size: 14px;
    padding: 10px 20px;
    margin: 20px auto 25px;
  }

  #contatti .info, #contatti address.info {
    padding: 20px 15px;
    margin: 0 0 20px 0;
    border-left-width: 3px;
  }

  #contatti .info p, #contatti address.info p {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 15px;
    font-size: 15px;
    line-height: 1.6;
  }

  #contatti .info p strong, #contatti address.info p strong {
    min-width: auto;
    margin-right: 0;
    margin-bottom: 5px;
    display: block;
    width: 100%;
    font-size: 16px;
  }

  #contatti .info p img, #contatti address.info p img {
    margin-right: 10px;
    margin-bottom: 5px;
    vertical-align: middle;
  }

  #contatti h1 {
    font-size: 28px;
    text-align: center;
  }

  #contatti h2 {
    font-size: 22px;
    text-align: center;
    margin-top: 25px;
  }

  .contact-map {
    height: 300px;
    margin: 20px 0;
    border-radius: 6px;
  }

  #contatti .info a, #contatti address.info a {
    display: inline-block;
    word-break: break-word;
    padding: 2px 0;
  }

  .contact-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding: 10px 0;
  }

  .contact-item strong {
    min-width: auto;
    width: 100%;
  }

  .contact-item span,
  .contact-item a {
    width: 100%;
    padding-left: 28px;
  }
}

@media (max-width: 480px) {
  .gallery-filters {
    gap: 8px;
    padding: 0 10px;
  }

  .gallery-filter {
    flex: 1 1 calc(50% - 8px);
    max-width: calc(50% - 8px);
    padding: 10px 12px;
    font-size: 13px;
    min-height: 50px;
  }

  .filter-icon {
    width: 16px;
    height: 16px;
  }

  .gallery-info {
    font-size: 13px;
    padding: 8px 16px;
  }

  #contatti .info, #contatti address.info {
    padding: 18px 12px;
  }

  #contatti .info p, #contatti address.info p {
    font-size: 14px;
  }

  #contatti .info p strong, #contatti address.info p strong {
    font-size: 15px;
  }

  .contact-map {
    height: 250px;
  }

  #contatti .info p img, #contatti address.info p img {
    width: 18px;
    height: 18px;
    margin-right: 8px;
  }

  .nav-menu.active {
    max-height: 100vh;
    overflow-y: auto;
    padding: 70px 0 25px;
  }

  .nav-item {
    min-height: 48px;
    width: 95%;
  }

  .nav-link {
    padding: 14px 15px;
    font-size: 15px;
    min-height: 48px;
  }

  .hamburger {
    top: 15px;
    right: 10px;
    padding: 10px 8px;
  }

  .navbar .nav-menu .lock-item {
    width: 95%;
  }

  .navbar .nav-menu .lock-btn {
    padding: 14px 15px;
    min-height: 48px;
  }

  .jump-modal-content {
    padding: 20px 15px;
    min-width: 260px;
    width: 90%;
    max-width: 280px;
  }

  .jump-modal-content h3 {
    font-size: 18px;
    margin-top: 5px;
  }

  .jump-modal-content p {
    font-size: 13px;
    margin-bottom: 10px;
  }

  #jump-input {
    width: 100px;
    padding: 8px 10px;
    font-size: 16px;
    margin: 5px auto 10px;
  }

  #jump-go {
    padding: 8px 20px;
    font-size: 13px;
    margin-top: 10px;
    min-width: 80px;
  }

  .jump-close {
    top: 8px;
    right: 12px;
    font-size: 22px;
    height: 25px;
    width: 25px;
  }

  .hero-section {
    padding: 50px 10px;
    margin: -5px -5px 15px -5px;
    min-height: 70vh;
  }

  .hero-background {
    object-position: center 20%;
  }

  .hero-content {
    padding: 25px 15px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(1px);
  }

  .hero-section h1 {
    font-size: 24px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.9);
  }

  .hero-section .hero-subtitle {
    font-size: 16px;
    margin-bottom: 20px;
  }

  .hero-section .hero-btn {
    padding: 12px 25px;
    font-size: 14px;
    width: 200px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  }

  .main-slide {
    height: 300px;
  }

  .model-preview {
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 20px 5px 0 5px;
  }

  .model-thumbnail {
    height: 240px;
  }

  .model-thumbnail img {
    height: 210px;
  }

  .model-thumbnail .model-title {
    height: 30px;
    font-size: 12px;
  }

  .fullscreen-modal .fullscreen-alt-text {
    font-size: 13px;
    padding: 8px 14px;
    max-width: 92%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .gallery-info {
    font-size: 14px;
    margin: 20px auto 25px;
  }

  .preview-modal .fullscreen-alt-text {
    bottom: 25px;
    font-size: 12px;
    padding: 6px 10px;
  }

  .preview-modal .preview-slide-info-static {
    bottom: 70px;
    font-size: 11px;
    padding: 5px 10px;
    min-width: 50px;
  }
}

@media (max-width: 768px) and (orientation: landscape) {
  .nav-menu {
    padding: 70px 0 20px;
    max-height: 100vh;
    overflow-y: scroll;
  }

  .nav-item {
    min-height: 44px;
  }

  .nav-link {
    min-height: 44px;
    padding: 12px 20px;
  }

  .preview-modal .fullscreen-alt-text {
    bottom: 20px;
    font-size: 11px;
    padding: 5px 8px;
    max-width: 80%;
  }

  .preview-modal .preview-slide-info-static {
    bottom: 60px;
    font-size: 10px;
    padding: 4px 8px;
  }

  #contatti .info, #contatti address.info {
    padding: 15px;
  }

  .contact-map {
    height: 200px;
  }
}

@media (max-width: 768px) and (min-height: 800px) {
  .gallery-filter {
    padding: 20px 25px;
    height: auto;
    min-height: 80px;
  }

  .gallery-filter.active {
    transform: translateY(-1px);
  }
}

@media (max-width: 900px) {
  .container {
    padding: 0 15px 15px;
  }

  .main-content {
    padding: 30px;
  }

  .hero-section {
    padding: 70px 20px;
  }

  .model-preview {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
  }

  .model-thumbnail {
    height: 240px;
  }

  .model-thumbnail img {
    height: 210px;
  }

  .model-thumbnail .model-title {
    height: 30px;
    font-size: 13px;
    padding: 6px;
  }

  #contatti .info p, #contatti address.info p {
    flex-wrap: wrap;
  }

  #contatti .info p strong, #contatti address.info p strong {
    min-width: 90px;
  }
}

@media (max-width: 768px) {
  .main-slide .nav-btn,
  .fullscreen-modal .fs-nav-btn,
  .preview-modal .fs-nav-btn {
    display: none;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
  }

  .preview-modal .fullscreen-content {
    padding-bottom: 120px;
  }

  .preview-modal .preview-slide-info-static {
    bottom: 80px;
    margin-bottom: 10px;
  }

  .preview-modal .fullscreen-alt-text {
    bottom: 30px;
    margin-bottom: 15px;
  }

  body.menu-open {
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    position: fixed;
  }

  .container {
    padding: 0 10px 10px;
  }

  .navbar {
    position: relative;
    padding: 0;
    margin-bottom: 10px;
    background: transparent;
    box-shadow: none;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100vw;
    left: 0;
    right: 0;
    position: fixed;
    top: 0;
    background: linear-gradient(135deg,
      rgba(30, 60, 114, 0.98),
      rgba(42, 82, 152, 0.98));
    padding: 80px 0 30px;
    z-index: 10000;
    height: 100vh;
    height: -webkit-fill-available;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: none;
    border-radius: 0;
    justify-content: flex-start;
    align-items: center;
  }

  .nav-menu.active {
    display: flex;
    animation: fadeIn 0.4s ease-out forwards;
  }

  .nav-item {
    margin: 0;
    text-align: center;
    width: 100%;
    max-width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    display: block;
    visibility: visible;
    opacity: 1;
    height: auto;
    min-height: 50px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
  }

  .nav-link {
    padding: 16px 20px;
    font-size: 16px;
    width: 100%;
    max-width: 100%;
    text-align: center;
    display: block;
    color: white;
    text-decoration: none;
    white-space: normal;
    line-height: 1.3;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 6px;
    margin: 2px 0;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    box-sizing: border-box;
  }

  .hamburger {
    display: flex;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    z-index: 10001;
  }

  .main-content {
    padding: 15px 10px;
    margin-top: 0;
    margin-bottom: 20px;
    min-height: auto;
  }

  .page-content h1 {
    font-size: 32px;
    text-align: center;
  }

  .page-content h2 {
    font-size: 24px;
    text-align: center;
  }

  .hero-section {
    padding: 60px 15px;
    margin: -10px -10px 20px -10px;
    text-align: center;
    min-height: 60vh;
    position: relative;
  }

  .hero-background {
    object-position: center 30%;
  }

  .hero-content {
    padding: 30px 20px;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(2px);
    border-radius: 10px;
    margin: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
  }

  .hero-section h1 {
    font-size: 28px;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.9);
  }

  .hero-section .hero-subtitle {
    font-size: 18px;
    margin-bottom: 25px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .hero-section .hero-btn {
    padding: 14px 30px;
    font-size: 16px;
    width: 220px;
    max-width: 100%;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 30px;
  }

  .feature-card {
    padding: 25px 15px;
    margin: 0 5px;
  }

  .feature-icon {
    font-size: 40px;
    margin-bottom: 15px;
  }

  .main-slide {
    height: 400px;
    margin: 0 5px 20px 5px;
  }

  .main-slide .slide-info {
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0,0,0,0.85);
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 13px;
    color: white;
    z-index: 10;
  }

  .jump-modal-content {
    padding: 25px 20px;
    min-width: 280px;
    max-width: 320px;
    width: 90%;
  }

  .jump-modal-content h3 {
    font-size: 20px;
    margin-top: 10px;
    margin-bottom: 10px;
  }

  .jump-modal-content p {
    font-size: 14px;
    margin-bottom: 15px;
  }

  #jump-input {
    width: 120px;
    padding: 10px 12px;
    font-size: 16px;
    margin: 10px auto;
  }

  #jump-go {
    padding: 10px 25px;
    font-size: 14px;
    margin: 15px auto 0;
    min-width: 100px;
  }

  .jump-close {
    top: 10px;
    right: 15px;
    font-size: 24px;
    height: 30px;
    width: 30px;
  }

  .footer {
    padding: 20px 10px;
    margin-top: 30px;
  }

  .footer p {
    font-size: 14px;
  }

  .info, address.info {
    padding: 15px;
    margin: 0 5px 20px 5px;
  }

  .contact-map {
    height: 250px;
    margin: 15px 0;
  }

  .formazione-header {
    margin-bottom: 15px;
    align-items: center;
    text-align: center;
  }

  .formazione-logo {
    width: 180px;
    margin: 0 auto 10px;
  }

  .model-preview {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 5px 0 5px;
  }

  .model-thumbnail {
    height: 240px;
    margin: 0;
  }

  .model-thumbnail img {
    height: 210px;
  }

  .model-thumbnail .model-title {
    height: 30px;
    font-size: 12px;
    padding: 6px;
  }

  .news-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 25px;
  }

  .news-item {
    padding: 20px 15px;
    margin: 0 5px;
  }

  .partners-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    margin: 25px 5px;
  }

  .partner-card {
    padding: 20px 15px;
    margin: 0 5px;
  }

  .partner-logo {
    max-width: 120px;
    max-height: 60px;
  }

  .navbar .nav-menu .lock-item {
    margin-left: 0;
    order: 8;
    margin-top: 5px;
    border-top: 2px solid rgba(255,255,255,0.2);
    padding-top: 5px;
    width: 100%;
    max-width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
    text-align: center;
    display: block;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    position: relative;
  }

  .navbar .nav-menu .submenu {
    position: static;
    width: 100%;
    max-width: 100%;
    border-radius: 0 0 8px 8px;
    margin-top: 0;
    display: none;
    background-color: rgba(0, 0, 0, 0.3);
    box-shadow: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    border-top: 1px solid rgba(255,255,255,0.1);
    animation: none;
    box-sizing: border-box;
  }

  .navbar .nav-menu .lock-item.active .submenu {
    display: block;
    max-height: 350px;
  }

  .navbar .nav-menu .submenu-link {
    text-align: center;
    padding: 16px 20px;
    font-size: 17px;
    font-weight: 500;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: block;
    visibility: visible;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.2);
    letter-spacing: 0.3px;
    white-space: normal;
    word-break: break-word;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .cube-container {
    width: 20px;
    height: 20px;
  }

  .cube-face {
    width: 20px;
    height: 20px;
  }

  .cube-face-front {
    transform: translateZ(10px);
  }

  .cube-face-back {
    transform: translateZ(-10px) rotateY(180deg);
  }

  .cube-face-right {
    transform: rotateY(90deg) translateZ(10px);
  }

  .cube-face-left {
    transform: rotateY(-90deg) translateZ(10px);
  }

  .cube-face-top {
    transform: rotateX(90deg) translateZ(10px);
  }

  .cube-face-bottom {
    transform: rotateX(-90deg) translateZ(10px);
  }

  .cube {
    animation-duration: 4s;
  }

  .hero-btn.primary::after,
  .hero-btn.secondary::after {
    animation-duration: 3s;
  }

  .visualizzatore-3d-btn {
    font-size: 13px;
    padding: 10px 18px;
    min-width: 180px;
    max-width: 100%;
  }

  .hero-section .hero-btn.primary,
  .hero-section .hero-btn.secondary {
    padding: 12px 25px;
    font-size: 14px;
    width: 200px;
  }

  .hero-btn.primary::after,
  .hero-btn.secondary::after {
    font-size: 12px;
    margin-left: 4px;
  }
}

@media (min-width: 1200px) {
  .gallery-filters {
    gap: 15px;
  }

  .gallery-filter {
    padding: 14px 28px;
    font-size: 16px;
    min-width: 150px;
    gap: 12px;
  }

  .filter-icon {
    width: 22px;
    height: 22px;
  }
}

@media (min-width: 1400px) {
  .container {
    max-width: 95%;
    padding: 0 30px 30px;
  }

  .main-content {
    padding: 60px;
  }

  .hero-section {
    padding: 120px 40px;
    min-height: 80vh;
  }

  .hero-content {
    padding: 50px;
  }

  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
  }

  .gallery-container {
    max-width: 90%;
  }
}

@media (min-width: 1920px) {
  body {
    font-size: 18px;
  }

  .container {
    max-width: 1800px;
  }

  .nav-link {
    padding: 18px 15px;
    font-size: 14px;
  }

  .hero-section h1 {
    font-size: 56px;
  }

  .hero-section .hero-subtitle {
    font-size: 28px;
    margin-bottom: 30px;
  }

  .hero-btn {
    padding: 18px 45px;
    font-size: 22px;
  }

  .feature-card {
    padding: 45px;
  }

  .feature-icon {
    font-size: 60px;
  }

  .main-slide {
    height: 800px;
  }
}

@media (min-width: 1024px) and (max-width: 1400px) {
  .nav-menu {
    flex-wrap: nowrap;
    justify-content: flex-start;
  }

  .nav-link {
    padding: 14px 10px;
    font-size: 14px;
  }

  .navbar .nav-menu .lock-item.lock-right {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 0;
    margin-right: 0;
  }
}

@media (max-width: 1024px) and (min-width: 769px) {
  .hero-section {
    padding: 80px 20px;
    min-height: 60vh;
  }

  .hero-content {
    padding: 30px;
  }

  .hero-section h1 {
    font-size: 36px;
  }

  .hero-section .hero-subtitle {
    font-size: 20px;
    margin-bottom: 25px;
  }
}

@media (min-width: 769px) {
  .main-slide .nav-btn,
  .gallery-modal .fs-nav-btn,
  .preview-modal .fs-nav-btn {
    display: flex;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }

  .slide-info,
  .fullscreen-slide-info,
  .preview-slide-info-static {
    cursor: pointer;
  }

  .nav-btn {
    background-color: rgba(0,0,0,0.7);
    width: 60px;
    height: 60px;
    font-size: 24px;
  }

  .nav-btn:hover {
    background-color: rgba(0,0,0,0.9);
    transform: translateY(-50%) scale(1.1);
  }

  .nav-menu {
    justify-content: flex-start;
    position: relative;
  }

  .navbar .nav-menu .lock-item.lock-right {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 0;
    margin-right: 0;
  }
}

.performance-mode .cube,
.performance-mode .hero-btn.primary::after,
.performance-mode .hero-btn.secondary::after {
  animation: none;
}

.performance-mode .feature-card:hover,
.performance-mode .partner-card:hover,
.performance-mode .news-item:hover {
  transform: none;
}

.performance-mode img[loading="lazy"] {
  opacity: 0.5;
  transition: opacity 0.1s;
}

.performance-mode img[loading="lazy"].loaded {
  opacity: 1;
}

.save-data img:not(.critical-image) {
  filter: blur(1px);
  transition: filter 0.3s;
}

.save-data img.loaded {
  filter: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .cube {
    animation: none;
  }

  .hero-btn.primary::after,
  .hero-btn.secondary::after {
    animation: none;
  }

  .gallery-filter,
  .gallery-filter:hover,
  .gallery-filter.active {
    transition: none;
    animation: none;
  }

  .gallery-filter.active::before {
    animation: none;
    background: #2a5298;
  }

  .gallery-filter[data-category="inox"].active::before {
    background: #7f8c8d;
  }

  .gallery-filter[data-category="ferro"].active::before {
    background: #2c3e50;
  }

  .gallery-filter[data-category="vetro"].active::before {
    background: #3498db;
  }

  .gallery-filter[data-category="arte"].active::before {
    background: #9b59b6;
  }
}

@media (prefers-contrast: high) {
  .hero-section {
    background: linear-gradient(135deg, #1a3260, #23447c);
  }

  .nav-link {
    border: 1px solid white;
  }

  .feature-card {
    border: 2px solid #2a5298;
  }

  .gallery-filter {
    border: 3px solid #000;
    color: #000;
  }

  .gallery-filter.active {
    border: 3px solid #000;
    background: #000;
    color: #fff;
  }

  .gallery-filter.active::before {
    display: none;
  }
}

@media print {
  .splash-screen,
  .navbar,
  .hamburger,
  .footer,
  .hero-buttons,
  .nav-btn,
  .fs-nav-btn,
  #cookie-consent-banner {
    display: none;
  }

  body {
    background: white;
    color: black;
    font-size: 12pt;
  }

  .container {
    max-width: 100%;
    padding: 0;
    margin: 0;
  }

  .main-content {
    box-shadow: none;
    padding: 20px;
    margin: 0;
  }

  .hero-section {
    color: black;
    min-height: auto;
    padding: 20px;
    margin: 0;
  }

  .hero-section::before {
    display: none;
  }

  .hero-content {
    background: white;
    color: black;
  }

  .hero-section h1,
  .hero-section .hero-subtitle {
    color: black;
    text-shadow: none;
  }

  a {
    color: black;
    text-decoration: underline;
  }

  .page-content h1,
  .page-content h2 {
    color: black;
  }

  .page-content h1::after,
  .page-content h2::after {
    background: black;
  }

  .gallery-filters {
    display: none;
  }
}

@supports (-webkit-touch-callout: none) {
  .nav-menu {
    height: -webkit-fill-available;
    max-height: 100vh;
  }

  body.menu-open {
    position: fixed;
    overflow: hidden;
    height: 100%;
    width: 100%;
  }

  .nav-link {
    min-height: 44px;
    padding: 12px 20px;
  }

  .hamburger {
    min-height: 44px;
    min-width: 44px;
  }

  .hero-section {
    height: -webkit-fill-available;
    min-height: -webkit-fill-available;
  }

  .main-slide {
    -webkit-overflow-scrolling: touch;
  }
}

.ios-device .fullscreen-modal {
  -webkit-overflow-scrolling: touch;
}

.ios-device .fullscreen-content {
  height: -webkit-fill-available;
}

.apple-device .splash-screen {
  background: linear-gradient(135deg, #1e3c72, #2a5298);
}

@media all and (display-mode: standalone) {
  body {
    padding-top: var(--ios-safe-top);
    padding-bottom: var(--ios-safe-bottom);
  }

  .header {
    padding-top: calc(20px + var(--ios-safe-top));
  }

  .hamburger {
    top: calc(20px + var(--ios-safe-top));
  }
}

@supports (padding: max(0px)) {
  .header {
    padding-top: max(20px, var(--ios-safe-top));
  }

  body {
    padding-left: var(--ios-safe-left);
    padding-right: var(--ios-safe-right);
  }

  .footer {
    padding-bottom: max(30px, var(--ios-safe-bottom));
  }
}

@supports not (backdrop-filter: blur(10px)) {
  .nav-menu {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
  }

  .fullscreen-modal .fullscreen-bottom-container .slide-info,
  .fullscreen-modal .fullscreen-alt-text {
    background-color: rgba(0, 0, 0, 0.9);
  }

  .gallery-filters {
    background: #f8f9fa;
  }
}

.gallery-filter:focus-visible {
  outline: 2px solid #4facfe;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.3);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid #4facfe;
  outline-offset: 2px;
}
