/* Custom styles per sovrascrivere i colori di Bootstrap */
/* Colori personalizzati del progetto */

/* CSS Custom Properties per i colori */
:root {
  --primary: #2D95A3;
  --secondary: #333333;
  --btn-primary: #ec8d00;
  --btn-primary-text: #212529;
}

/* Sovrascrittura colori primari */
.bg-primary {
  background-color: var(--primary) !important;
}

a.bg-primary:hover, a.bg-primary:focus,
button.bg-primary:hover, button.bg-primary:focus {
  background-color: #247A85 !important;
}

.text-primary {
  color: var(--primary) !important;
}

a.text-primary:hover, a.text-primary:focus {
  color: #1E6B75 !important;
}

.btn-primary {
  background-color: var(--btn-primary) !important;
  border-color: var(--btn-primary) !important;
  color: var(--btn-primary-text) !important;
}

.btn-primary:hover, .btn-primary:focus {
  background-color: #d27f00 !important;
  border-color: #c57100 !important;
  color: var(--btn-primary-text) !important;
}

.btn-primary:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled).active {
  background-color: #b87000 !important;
  border-color: #a96200 !important;
  color: var(--btn-primary-text) !important;
}

/* Sovrascrittura colori secondari */
.bg-secondary {
  background-color: var(--secondary) !important;
}

a.bg-secondary:hover, a.bg-secondary:focus,
button.bg-secondary:hover, button.bg-secondary:focus {
  background-color: #262626 !important;
}

.text-secondary {
  color: var(--secondary) !important;
}

a.text-secondary:hover, a.text-secondary:focus {
  color: #1a1a1a !important;
}

.btn-secondary {
  background-color: var(--secondary) !important;
  border-color: var(--secondary) !important;
}

.btn-secondary:hover, .btn-secondary:focus {
  background-color: #262626 !important;
  border-color: #1a1a1a !important;
}

.btn-secondary:not(:disabled):not(.disabled):active,
.btn-secondary:not(:disabled):not(.disabled).active {
  background-color: #1a1a1a !important;
  border-color: #0d0d0d !important;
}

/* Link primari */
a {
  color: var(--primary);
}

a:hover {
  color: #1E6B75;
}

/* Border primari */
.border-primary {
  border-color: var(--primary) !important;
}

/* Alert primari */
.alert-primary {
  color: #1E6B75;
  background-color: #E6F4F6;
  border-color: #B8DEE3;
}

.alert-primary hr {
  border-top-color: #247A85;
}

/* Badge primari */
.badge-primary {
  background-color: var(--primary) !important;
}

.badge-secondary {
  background-color: var(--secondary) !important;
}

/* List group items */
.list-group-item-primary {
  color: #1E6B75;
  background-color: #E6F4F6;
}

.list-group-item-secondary {
  color: #1a1a1a;
  background-color: #E6E6E6;
}

/* Table variants */
.table-primary,
.table-primary > th,
.table-primary > td {
  background-color: #E6F4F6;
}

.table-primary th,
.table-primary td,
.table-primary thead th,
.table-primary tbody + tbody {
  border-color: #B8DEE3;
}

.table-secondary,
.table-secondary > th,
.table-secondary > td {
  background-color: #E6E6E6;
}

.table-secondary th,
.table-secondary td,
.table-secondary thead th,
.table-secondary tbody + tbody {
  border-color: #B3B3B3;
}

/* Navbar personalizzata */
.navbar.bg-primary {
  background-color: var(--primary) !important;
  border-bottom: 2px solid #247A85;
}

.navbar.bg-secondary {
  background-color: var(--secondary) !important;
  border-bottom: 2px solid #262626;
}

.navbar-brand {
  font-size: 1.5rem;
  transition: opacity 0.2s ease;
}

.navbar-brand:hover {
  opacity: 0.8;
}

.navbar-nav .nav-link {
  transition: color 0.2s ease, background-color 0.2s ease;
  border-radius: 0.25rem;
  margin: 0 0.25rem;
  padding: 0.5rem 0.75rem !important;
}

.navbar-nav .nav-link:hover {
  color: rgba(255, 255, 255, 0.9) !important;
  background-color: rgba(255, 255, 255, 0.1);
}

.navbar-nav .nav-link.active {
  background-color: rgba(255, 255, 255, 0.15);
  font-weight: 500;
}

.navbar-nav .btn {
  transition: all 0.2s ease;
  font-weight: 500;
}

.navbar-nav .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Footer personalizzato */
footer.bg-secondary {
  background-color: var(--secondary) !important;
}

footer a {
  transition: color 0.2s ease, opacity 0.2s ease;
}

footer a:hover {
  color: rgba(255, 255, 255, 0.9) !important;
  opacity: 0.9;
}

footer h5 {
  color: #fff;
  margin-bottom: 1rem;
}

footer hr {
  opacity: 0.25;
}

/* Dropdown menu nella navbar */
.navbar .dropdown-menu {
  border: none;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  margin-top: 0.5rem;
}

.navbar .dropdown-item {
  transition: background-color 0.2s ease, color 0.2s ease;
}

.navbar .dropdown-item:hover {
  background-color: var(--primary);
  color: #fff;
}

.navbar .dropdown-item i {
  margin-right: 0.5rem;
  width: 1.2em;
}

/* Responsive improvements */
@media (max-width: 991.98px) {
  .navbar-nav .btn {
    margin-top: 0.5rem;
    width: 100%;
    text-align: center;
  }
}

