/* home-testata.css: la testata del sito (home.css) per observations.html, #1878 3.6.
   GENERATO da home.css con ~/projects/bin/testata_observations/componi_testata.py: NON modificare a mano.
   Contiene la sezione «A) HEADER NAV EXTENSION» di home.css e le poche altre regole che toccano la pagina
   (elenco in ~/projects/bin/testata_observations/testata_selezione.json, misurato nella pagina vera).
   Va tenuto ALLINEATO a home.css: chi cambia la testata in home.css rifà questo file
   (~/projects/bin/testata_observations/testata_rifai.sh); l'hook pre-commit del docroot lo controlla. */
.home-header {
  position: sticky;
  top: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0 var(--spacing-md);

  background-color: #0b57d0;
  color: white;
  box-shadow: var(--shadow-md);
}
.home-header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--font-size-lg);
  font-weight: 500;
  text-decoration: none;
  color: white;
  flex-shrink: 0;
}
.home-header__brand-logo {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
}
.home-header__nav {
  display: none;
  list-style: none;
  gap: var(--spacing-xs);
  margin: 0 var(--spacing-lg);
}
.home-header__nav a {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  color: rgba(255, 255, 255, 0.85); 
  text-decoration: none;
  font-size: var(--font-size-sm);
  border-radius: var(--radius-md);

  white-space: nowrap;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.home-header__nav a:hover,
.home-header__nav a:focus-visible {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}
.home-header__nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-weight: 600;
}
.home-header__altro {
  position: relative;
  display: flex;
  align-items: center;
}
.home-header__altro summary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--font-size-sm);
  border-radius: var(--radius-md);
  white-space: nowrap;
  cursor: pointer;
  list-style: none; 
  transition: background var(--transition-fast), color var(--transition-fast);
}
.home-header__altro summary::-webkit-details-marker {
  display: none; 
}
.home-header__altro summary::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform var(--transition-fast);
}
.home-header__altro summary:hover,
.home-header__altro summary:focus-visible,
.home-header__altro details[open] summary {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}
.home-header__altro details[open] summary::after {
  transform: rotate(180deg);
}
.home-header__altro--corrente summary {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-weight: 600;
}
.home-header__altro ul {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 1200; 
  min-width: 240px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
}
.home-header__altro ul a {
  display: block;
  padding: 8px 12px;
  color: var(--text-primary);
  border-radius: 6px;
}
.home-header__altro ul a:hover,
.home-header__altro ul a:focus-visible {
  background: var(--bg-secondary, rgba(127, 127, 127, 0.12));
  color: var(--text-primary);
}
.home-header__altro ul a[aria-current="page"] {
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  color: var(--primary);
  font-weight: 600;
}
.home-header__actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  flex-shrink: 0;
}
.home-header .auth-login-btn {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}
.home-header .auth-login-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-color: #fff;
}
.home-header__hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  border-radius: var(--radius-full);
  transition: background var(--transition-fast);
}
.home-header__hamburger:hover {
  background: rgba(255, 255, 255, 0.15);
}
.home-header__theme {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  border-radius: var(--radius-full);
  transition: background var(--transition-fast);
  flex-shrink: 0;
}
.home-header__theme:hover {
  background: rgba(255, 255, 255, 0.15);
}
.home-header__theme svg {
  width: 22px;
  height: 22px;
}
.home-header__mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  z-index: 1099;
  background: var(--bg-primary);
  box-shadow: var(--shadow-lg);
  padding: var(--spacing-sm) 0;
  list-style: none;

  max-height: calc(100vh - var(--header-height));
  max-height: calc(100dvh - var(--header-height));
  overflow-y: auto;

  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.home-header__mobile-nav.open {
  display: block;
}
.home-header__mobile-nav a {
  display: block;
  padding: 12px var(--spacing-lg);
  color: var(--text-primary);
  text-decoration: none;
  font-size: var(--font-size-md);
  transition: background var(--transition-fast);
}
.home-header__mobile-nav a:hover {
  background: var(--bg-secondary);
}
.home-header__mobile-auth {
  border-top: 1px solid var(--border, rgba(127, 127, 127, .25));
  margin-top: var(--spacing-sm);
  padding-top: var(--spacing-sm);
}
.home-header__mobile-auth-name {
  display: block;
  padding: 4px var(--spacing-lg) 0;
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
}
.home-header__mobile-auth-btn {
  display: block;
  width: 100%;
  padding: 12px var(--spacing-lg);
  background: none;
  border: 0;
  color: var(--text-primary);
  font: inherit;
  font-size: var(--font-size-md);
  text-align: left;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.home-header__mobile-auth-btn:hover {
  background: var(--bg-secondary);
}
.home-header #home-search,
.home-header .auth-header-container {
  display: none;
}
@media (min-width: 768px) {
  .home-header #home-search,
    .home-header .auth-header-container {
      display: block;
    }
}
@media (min-width: 1260px) {
  .home-header__nav {
      display: flex;
    }
  .home-header__hamburger {
      display: none;
    }
}
.skeleton {
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}
@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.home-header a:focus-visible,
.home-header button:focus-visible,
.home-map-card:focus-visible,
.home-hour-card:focus-visible {
  outline: 2px solid white;
  outline-offset: 2px;
}
.home-header__tagline {
  display: none;
  font-size: 10px;
  opacity: 0.8; 
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1;
  margin-top: 1px;
}
@media (min-width: 768px) {
  .home-header__tagline { display: block; }
  .home-header__brand-text { display: flex; flex-direction: column; }
}
