/* Stili aggiuntivi per migliorare la responsività */
@media (max-width: 768px) {
  .hamburger {
    display: block;
    cursor: pointer;
  }
  
  .hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-color);
    transition: all 0.3s ease;
  }
  
  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  
  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: white;
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    padding: 20px 0;
    z-index: 999;
  }

  .language-picker {
    margin-left: auto;
    margin-right: 12px;
  }

  .language-select {
    max-width: 116px;
    font-size: 0.72rem;
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .nav-item {
    margin: 15px 0;
  }
  
  .hero-content {
    text-align: center;
    margin: 0 auto;
  }
  
  .about-content, 
  .contact-container {
    flex-direction: column;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  
  .feature-card {
    margin-bottom: 20px;
  }
}

/* Miglioramenti per accessibilità */
:focus {
  outline: 3px solid var(--primary-color);
  outline-offset: 3px;
}

.btn:focus {
  box-shadow: 0 0 0 3px rgba(255, 127, 39, 0.5);
}

/* Animazioni più fluide */
.animate {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Miglioramenti per la stampa */
@media print {
  header, footer, .cta, .btn {
    display: none;
  }
  
  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }
  
  a {
    text-decoration: none;
    color: #000;
  }
  
  .container {
    width: 100%;
    max-width: none;
    padding: 0;
    margin: 0;
  }
}

/* Header mobile compatto e menu laterale accessibile */
.nav-close-item {
  display: none;
}

@media (max-width: 768px) {
  header {
    position: sticky;
    top: 0;
    z-index: 1100;
  }

  .navbar {
    min-height: 64px;
    padding: 9px 0;
    gap: 7px;
  }

  .logo {
    max-width: 175px;
    font-size: clamp(0.98rem, 4.1vw, 1.22rem);
    line-height: 1.05;
    white-space: normal;
    flex: 1 1 auto;
  }

  .language-picker {
    order: 2;
    display: flex;
    align-items: center;
    gap: 3px;
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .language-flag {
    width: 1.05rem;
    font-size: 1rem;
  }

  .language-select {
    width: 92px;
    max-width: 92px;
    padding: 6px 17px 6px 6px;
    font-size: 0.68rem;
  }

  .hamburger {
    order: 3;
    display: inline-flex;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    margin-left: 0;
    padding: 0;
    border: 1px solid rgba(44, 140, 153, 0.35);
    border-radius: 10px;
    background: #fff;
    color: var(--text-color);
    z-index: 1104;
  }

  .hamburger .bar {
    width: 22px;
    height: 2px;
    margin: 0;
    background-color: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .hamburger.active .bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .nav-menu {
    position: fixed;
    inset: 0 0 0 auto;
    left: auto;
    right: -100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: min(88vw, 360px);
    height: 100dvh;
    margin: 0;
    padding: 78px 20px 28px;
    overflow-y: auto;
    text-align: left;
    background: #fff;
    box-shadow: -12px 0 32px rgba(31, 63, 70, 0.18);
    visibility: hidden;
    transition: right 0.25s ease, visibility 0.25s ease;
    z-index: 1102;
  }

  .nav-menu.active {
    left: auto;
    right: 0;
    visibility: visible;
  }

  .nav-close-item {
    display: flex;
    justify-content: flex-end;
    position: absolute;
    top: 14px;
    right: 18px;
    margin: 0;
  }

  .nav-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(44, 140, 153, 0.35);
    border-radius: 10px;
    background: #fff;
    color: var(--text-color);
    font-size: 1.65rem;
    line-height: 1;
    cursor: pointer;
  }

  .nav-item {
    width: 100%;
    margin: 0;
    border-bottom: 1px solid rgba(44, 140, 153, 0.12);
  }

  .nav-link {
    display: block;
    min-height: 52px;
    padding: 14px 10px;
    font-size: 1rem;
  }

  .nav-link::after {
    display: none;
  }

  .nav-menu .language-picker {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(44, 140, 153, 0.18);
  }

  .nav-menu .language-select {
    width: 100%;
    max-width: none;
    min-height: 44px;
    font-size: 0.85rem;
  }

  body.menu-open {
    overflow: hidden;
  }
}
