:root {
  --pf-primary: #ffbe00;
  --pf-primary-hover: #e5a800;
  --pf-primary-accent: #f59e0b;
  --pf-primary-dark: #b45309;
  --pf-primary-darker: #78350f;
  --pf-primary-light: #fffbeb;
  --pf-primary-soft: #fef3c7;

  --pf-secondary: #166534;
  --pf-secondary-hover: #14532d;
  --pf-secondary-dark: #0b291b;
  --pf-secondary-light: #f0fdf4;

  --pf-accent: #0284c7;
  --pf-bg-cream: #f8f9fa;
  --pf-dark: #1e293b;
  --pf-muted: #64748b;
  --pf-card-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  --pf-card-hover-shadow: 0 16px 32px rgba(255, 190, 0, 0.2);
  --pf-radius-lg: 16px;
  --pf-radius-md: 10px;
  --pf-radius-sm: 6px;
  --pf-transition: color 0.25s ease-in-out, background-color 0.25s ease-in-out, border-color 0.25s ease-in-out,
    box-shadow 0.25s ease-in-out, transform 0.25s ease-in-out, opacity 0.25s ease-in-out, visibility 0.25s ease-in-out;
}

body {
  font-family: var(--bs-body-font-family, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif);
  color: var(--pf-dark);
  background-color: #ffffff;
  overflow-x: hidden;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6, .font-serif {
  font-family: inherit;
  font-weight: 700;
  color: var(--pf-dark);
  letter-spacing: -0.01em;
}

footer h5,
footer .font-serif {
  color: #ffffff !important;
}

.btn-transparency {
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 50px !important;
  padding: 0.35rem 1rem !important;
  line-height: 1.5;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: var(--pf-transition);
}
.btn-transparency:hover {
  background-color: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.5);
  color: #ffffff !important;
  transform: translateY(-2px);
}

.btn-giallo.btn-sm,
.btn-terracotta.btn-sm {
  padding: 0.35rem 1rem !important;
  font-size: 0.875rem;
  border-radius: 50px !important;
  line-height: 1.5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.bg-cypress {
  background-color: var(--pf-secondary);
  color: #ffffff;
}

.text-terracotta {
  color: var(--pf-primary-dark) !important;
}
.text-cypress {
  color: var(--pf-secondary) !important;
}

.navbar-custom {
  background-color: #ffffff;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
  padding: 0.85rem 0;
  border-bottom: 5px solid var(--pf-primary);
  transition: var(--pf-transition), padding 0.25s ease-in-out;
}
.navbar-custom.scrolled {
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.09);
  padding: 0.5rem 0;
}
.navbar-brand-logo {
  height: 52px;
  width: auto;
  transition: var(--pf-transition);
}
.navbar-brand-title {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--pf-dark);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.navbar-brand-sub {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--pf-secondary);
  text-transform: uppercase;
}

.nav-link {
  font-family: inherit;
  font-weight: 500;
  font-size: 0.94rem;
  color: #334155 !important;
  padding: 0.55rem 0.85rem !important;
  background-color: transparent !important;
  border: none !important;
  transition: color 0.2s ease;
}
.nav-link:hover {
  color: var(--pf-primary-dark) !important;
  background-color: transparent !important;
}
.nav-link.active {
  color: var(--pf-primary-dark) !important;
  font-weight: 600;
  background-color: transparent !important;
  box-shadow: none;
}

.navbar-custom .dropdown-menu {
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
  padding: 0.5rem;
  min-width: 230px;
}
.navbar-custom .dropdown-item {
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.55rem 0.9rem;
  border-radius: 6px;
  color: #334155;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.navbar-custom .dropdown-item:hover,
.navbar-custom .dropdown-item:focus {
  background-color: var(--pf-bg-cream);
  color: var(--pf-primary-dark);
}
.navbar-custom .dropdown-item.active,
.navbar-custom .dropdown-item:active {
  background-color: var(--pf-primary);
  color: #111827;
  font-weight: 600;
}
.navbar-custom .dropdown-item.active i {
  color: #111827 !important;
}

@media (min-width: 992px) {
  .navbar-custom .nav-item.dropdown {
    position: relative;
  }
  .navbar-custom .nav-item.dropdown:hover > .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }
  .navbar-custom .dropdown-menu {
    display: block;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    margin-top: 0;
    pointer-events: none;
  }
  .navbar-custom .nav-item.dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 12px;
  }
}

.btn-giallo,
.btn-terracotta {
  background-color: var(--pf-primary);
  color: #111827 !important;
  border: 1px solid var(--pf-primary-hover);
  font-weight: 600;
  padding: 0.6rem 1.5rem;
  border-radius: 50px;
  transition: var(--pf-transition);
  box-shadow: none;
}
.btn-giallo:hover, .btn-giallo:focus,
.btn-terracotta:hover, .btn-terracotta:focus {
  background-color: var(--pf-primary-hover);
  border-color: #cca000;
  color: #000000 !important;
  transform: translateY(-2px);
  box-shadow: none;
}

.btn-outline-terracotta {
  background-color: transparent;
  color: var(--pf-primary-dark);
  border: 2px solid var(--pf-primary);
  font-weight: 700;
  padding: 0.6rem 1.5rem;
  border-radius: 50px;
  transition: var(--pf-transition);
}
.btn-outline-terracotta:hover {
  background-color: var(--pf-primary);
  color: #111827;
  border-color: var(--pf-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(255, 190, 0, 0.3);
}

.btn-cypress {
  background-color: var(--pf-secondary);
  color: #ffffff;
  border: 1px solid var(--pf-secondary);
  font-weight: 600;
  padding: 0.6rem 1.5rem;
  border-radius: 50px;
  transition: var(--pf-transition);
  box-shadow: 0 4px 12px rgba(22, 101, 52, 0.25);
}
.btn-cypress:hover {
  background-color: var(--pf-secondary-hover);
  border-color: var(--pf-secondary-hover);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(22, 101, 52, 0.35);
}

.slider-btn-prev:hover,
.slider-btn-next:hover {
  background: var(--pf-primary);
  border-color: var(--pf-primary);
  color: #111827;
  transform: translateY(-50%) scale(1.08);
}

.section-title {
  display: block;
  font-size: 1.85rem;
  margin-bottom: 1.4rem;
  font-weight: 700;
  line-height: 1.2;
}
.section-title-underline {
  position: relative;
  padding-bottom: 10px;
}
.section-title-underline::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 55px;
  height: 4px;
  background: var(--pf-primary);
  border-radius: 2px;
}
.text-center .section-title-underline::after,
.section-title-underline.text-center::after {
  left: 50%;
  transform: translateX(-50%);
}

.page-header-template h1 {
  font-size: 2.4rem;
}
.section-block .card h2.display-6,
.section-block .card h3.display-6 {
  font-size: 1.85rem;
}
.section-block .lead {
  font-size: 1.1rem;
}

.section-block {
  background-color: #ffffff;
}
.section-block:nth-child(even of .section-block) {
  background-color: var(--bs-light, #f8f9fa);
}
.section-block:nth-child(odd of .section-block) {
  background-color: #ffffff;
}
.section-block + .section-block {
  border-top: 1px solid var(--bs-border-color, #dee2e6);
}

@media (max-width: 991px) {
  .section-title {
    font-size: 1.6rem;
  }
  .navbar-nav {
    padding-top: 1rem;
  }
}

.page-header-template {
  background: linear-gradient(135deg, var(--pf-secondary-dark) 0%, #144631 100%);
  color: #ffffff;
  padding: 3.5rem 0 3rem;
  border-bottom: 4px solid var(--pf-primary);
  position: relative;
}

.page-header-template[style*="background-image"] {
  --hdr-overlay: 11, 41, 27;
  display: flex;
  align-items: flex-end;
  min-height: 380px;
  padding: 3rem 0 2.25rem;
  background-color: var(--pf-secondary-dark);
  background-position: center 40%;
  background-size: cover;
  background-repeat: no-repeat;
  isolation: isolate;
  overflow: hidden;
}

.page-header-template[style*="background-image"] > .container {
  position: relative;
  width: 100%;
}

.page-header-template[style*="background-image"] > .container::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -5rem;
  bottom: -2.25rem;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, rgba(var(--hdr-overlay), 0) 0, rgba(var(--hdr-overlay), 0.85) 5rem, rgba(var(--hdr-overlay), 0.94) 100%);
}

@media (min-width: 768px) {
  .page-header-template[style*="background-image"] {
    min-height: 400px;
  }
}

.page-header-style-overlay[style*="background-image"] {
  display: block;
  min-height: 0;
  padding: 3.5rem 0 3rem;
  background-position: center center;
}

.page-header-style-overlay[style*="background-image"] > .container {
  position: static;
}

.page-header-style-overlay[style*="background-image"] > .container::before {
  content: none;
}

.page-header-style-overlay[style*="background-image"]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(11, 41, 27, 0.95) 0%, rgba(11, 41, 27, 0.55) 50%, rgba(0, 0, 0, 0.35) 100%);
}

.page-header-style-split[style*="background-image"] {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 0;
  padding: 0;
  background-size: 0 0;
}

.page-header-style-split[style*="background-image"] > .container {
  position: static;
  padding-top: 2.5rem;
  padding-bottom: 2.25rem;
}

.page-header-style-split[style*="background-image"] > .container::before {
  content: none;
}

.page-header-style-split[style*="background-image"]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg, var(--pf-secondary-dark) 0%, #144631 100%);
}

.page-header-style-split[style*="background-image"]::after {
  content: "";
  order: -1;
  height: clamp(140px, 30vw, 220px);
  background-image: inherit;
  background-size: cover;
  background-position: 60% 40%;
  background-repeat: no-repeat;
}

@media (min-width: 992px) {
  .page-header-style-split[style*="background-image"] {
    --hdr-container: 960px;
    container-type: inline-size;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    min-height: 300px;
  }
  .page-header-style-split[style*="background-image"] > .container {
    align-self: center;
    max-width: none;
    margin: 0;
    padding-left: max(0.75rem, calc((100cqw - var(--hdr-container)) / 2 + 0.75rem));
    padding-right: 2.5rem;
  }
  .page-header-style-split[style*="background-image"] .row > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .page-header-style-split[style*="background-image"]::after {
    order: 0;
    height: auto;
  }
}
@media (min-width: 1200px) {
  .page-header-style-split[style*="background-image"] {
    --hdr-container: 1140px;
  }
}
@media (min-width: 1400px) {
  .page-header-style-split[style*="background-image"] {
    --hdr-container: 1320px;
  }
}

.breadcrumb-item a {
  color: var(--pf-primary) !important;
  text-decoration: none;
}
.breadcrumb-item.active {
  color: rgba(255, 255, 255, 0.75) !important;
}
.breadcrumb-item + .breadcrumb-item::before {
  color: #ffffff !important;
}

.page-header-template.page-header-auth-only {
  background-color: #3b070c;
  background-image: linear-gradient(135deg, #3b070c 0%, #651319 50%, #881324 100%);
}

.page-header-template.page-header-auth-only[style*="background-image"] {
  --hdr-overlay: 59, 7, 12;
}

.page-header-style-overlay.page-header-auth-only[style*="background-image"]::before {
  background: linear-gradient(to top, rgba(59, 7, 12, 0.95) 0%, rgba(101, 19, 25, 0.6) 50%, rgba(0, 0, 0, 0.35) 100%);
}

.page-header-style-split.page-header-auth-only[style*="background-image"]::before {
  background: linear-gradient(135deg, #3b070c 0%, #651319 50%, #881324 100%);
}

.page-header-template.page-header-auth-only .breadcrumb-item a {
  color: #fecaca !important;
}

.page-header-template.page-header-auth-only .breadcrumb-item a:hover {
  color: #ffffff !important;
  text-decoration: underline;
}

.page-header-template.page-header-auth-only .breadcrumb-item.active {
  color: rgba(255, 255, 255, 0.8) !important;
}

.page-header-template.page-header-auth-only .breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255, 255, 255, 0.6) !important;
}

footer {
  background-color: var(--pf-secondary-dark);
  color: #ffffff;
  font-size: 0.92rem;
  border-top: 5px solid var(--pf-primary);
}
footer h5 {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
}
footer p,
footer li {
  color: rgba(255, 255, 255, 0.9);
}
footer strong {
  color: #ffffff;
}
footer a {
  color: #ffffff;
  text-decoration: none;
  transition: var(--pf-transition);
}
footer a:hover {
  color: var(--pf-primary);
}
footer .text-secondary {
  color: rgba(255, 255, 255, 0.85) !important;
}
footer .text-muted {
  color: rgba(255, 255, 255, 0.75) !important;
}
footer .text-terracotta {
  color: var(--pf-primary) !important;
}
footer .btn-outline-secondary {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.45);
  transition: var(--pf-transition);
}
footer .btn-outline-secondary:hover {
  background-color: var(--pf-primary);
  border-color: var(--pf-primary);
  color: #111827;
}
footer .bg-dark {
  background-color: rgba(0, 0, 0, 0.32) !important;
}
footer .border-secondary {
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background-color: rgba(0, 0, 0, 0.2);
  padding: 1.5rem 0;
  font-size: 0.85rem;
}
.footer-bottom .text-secondary {
  color: rgba(255, 255, 255, 0.75) !important;
}

#backToTop {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 44px;
  height: 44px;
  background-color: var(--pf-primary);
  color: #111827;
  border: 1px solid var(--pf-primary-hover);
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(255, 190, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: var(--pf-transition);
  font-weight: bold;
}
#backToTop.show {
  opacity: 1;
  visibility: visible;
}
#backToTop:hover {
  background-color: var(--pf-primary-hover);
  color: #000000;
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(255, 190, 0, 0.5);
}

@media print {
  .page-header-template {
    background: #ffffff !important;
    color: #000000 !important;
    border-bottom: 2px solid #000000 !important;
    padding: 1.5rem 0 !important;
  }

  .page-header-template::before,
  .page-header-template::after,
  .page-header-template > .container::before {
    display: none !important;
  }

  .page-header-template h1,
  .page-header-template p,
  .page-header-template .lead {
    color: #000000 !important;
  }
}
