/* Header Styles */
.site-header {
    position: relative;
    top: 0;
    width: 100%;
    background-color: var(--primary-color); /* per vederlo chiaramente */
    backdrop-filter: blur(1px); /* effetto blur sullo sfondo */
    -webkit-backdrop-filter: blur(1px); /* supporto Safari */
    z-index: 1000;
  }

.logo-img {
  max-height: 2.5rem;
}

/* Layout del navbar con tre sezioni */
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-container {
    flex: 0 1 auto; /* larghezza minima necessaria */
}

.navbar-center {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
}

/* Responsive: su schermi piccoli mantieni il comportamento normale */
@media (max-width: 991.98px) {
    .navbar-content {
        flex-direction: column;
        align-items: stretch;
    }

    .navbar-right {
        width: 100%;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1rem; /* distanza verticale tra elementi */
        margin-top: 1rem;
    }

    .navbar-right .nav-item {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .navbar-right .btn {
        margin-top: 1.5rem;
    }
}

/* Stato attivo inverted-button */
.inverted-button.active {
  border: 2px solid var(--secondary-color);
  background-color: rgba(143, 0, 29, 0.1); /* leggera trasparenza */
  color: var(--bg-color);
  font-weight: 600;
}

/* Hover quando attivo, più soft */
.inverted-button.active:hover {
  background-color: rgba(143, 0, 29, 0.15);
  cursor: default;
}
  
  /* Navbar */
  .navbar {
    padding: 0.5rem 0;
  }
  
  /* Brand Container */
  .brand-container {
    padding: 0.75rem 0;
  }
  
  /* Brand Title */
  .brand-title {
    font-family: "Josefin Sans", sans-serif !important;
    font-weight: 700;
    font-size: 2rem;
    color: white;
    margin: 0;
    line-height: 1.2;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
  }
  
  /* Brand Subtitle */
  .brand-subtitle {
    font-family: "Instrument Sans", sans-serif !important;
    font-size: 0.85rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
  }
  
  /* Navbar Brand Link */
  .navbar-brand {
    padding: 0;
    margin: 0;
    display: block;
    text-decoration: none;
  }
  
  .navbar-brand:hover .brand-title {
    color: #c40d2e;
  }
  
  .navbar-brand:hover .brand-subtitle {
    color: rgba(255, 255, 255, 0.9);
  }
  
  /* Navigation Links */
  .navbar-nav .nav-item {
    position: relative;
    margin: 0 0.25rem;
  }
  
  .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    padding: 1.5rem 1rem;
    transition: all 0.3s ease;
    position: relative;
  }
  
  .navbar-nav .nav-link span {
    position: relative;
    z-index: 1;
  }
  
  .navbar-nav .nav-link:before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #c40d2e;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
  }
  
  .navbar-nav .nav-link:hover {
    color: white;
  }
  
  .navbar-nav .nav-link:hover:before,
  .navbar-nav .nav-link.active:before {
    transform: scaleX(1);
    transform-origin: left;
  }
  
  .navbar-nav .nav-link.active {
    color: white;
    font-weight: 600;
  }
  
  /* Navbar Toggler */
  .navbar-toggler {
    border: none;
    padding: 0.5rem;
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    transition: background-color 0.3s ease;
  }
  
  .navbar-toggler:focus {
    box-shadow: none;
    outline: none;
  }
  
  .navbar-toggler:hover {
    background-color: rgba(255, 255, 255, 0.2);
  }
  
  .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  }
  
  /* Responsive Adjustments */
  @media (max-width: 991.98px) {
    .navbar-collapse {
      background-color: #1a1a1a;
      padding: 1rem;
      border-radius: 0.5rem;
      margin-top: 0.5rem;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
  
    .navbar-nav .nav-link {
      padding: 0.75rem 1rem;
    }
  
    .navbar-nav .nav-link:before {
      display: none;
    }
  
    .navbar-nav .nav-link.active {
      background-color: rgba(143, 0, 29, 0.1);
      border-radius: 4px;
    }
  }
  
  /* Login Partial Styling */
  .navbar-nav .btn {
    margin-left: 0.5rem;
    padding: 0.375rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
  }
  
  .navbar-nav .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.5);
  }
  
  .navbar-nav .btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: white;
  }
  
  .navbar-nav .btn-primary {
    background-color: #c40d2e;
    border-color: #c40d2e;
  }
  
  .navbar-nav .btn-primary:hover {
    background-color: #6b0016;
    border-color: #6b0016;
  }
  