html {
  font-size: 16px;
}

@media (min-width: 768px) {
  html {
    font-size: 20px;
  }
}

@font-face {
  font-family: 'MyFont';
  src: url('/fonts/CormorantGaramond-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'MyFont';
  src: url('/fonts/CormorantGaramond-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'MyFont';
  src: url('/fonts/CormorantGaramond-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'MyFont';
  src: url('/fonts/CormorantGaramond-BoldItalic.woff2') format('woff2');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

body {
  font-family: 'MyFont', sans-serif !important;
}

h1 {
  font-weight: 700;
  /* Bold */
}

em {
  font-style: italic !important;
  /* Italic */
}

strong {
  font-weight: 700;
  /* Bold */
}

strong em {
  font-weight: 700;
  font-style: italic !important;
  /* Bold Italic */
}





.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #5c534a;
}


html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}


body {
  display: flex;
  flex-direction: column;
  margin: 0;
  color: var(--text-color);
  background-color: var(--bg-muted);

}


main {

  flex: 1;
}

:root {
  --primary-color: #c9a76c;
  --accent-color: #a88c5b;
  --text-color: #000000;
  --bg-light: #ffffff;
  --bg-muted: #faf7f5;
  --hover-bg: #c9a76c;
  --nav-bar-color: #dfbf88;
  --select-btn-light: #dfbf88;
  --select-btn-dark: #a88c5b;
  --select-btn-light-hover: #5B3519;
  --select-btn-dark-hover: #4b2b14;
  --select-btn-success: #68A455;
  --select-btn-success-push: #598a4b;
  --border-color: #b8a898;
  --border-radius: 12px;
  --transition-speed: 0.3s;
}




/* Navbar */
.navbar {
  background-image: url('/images/woodTemplate/wood-pattern.png');
  background-repeat: repeat;
  background-color: var(--nav-bar-color) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid #eee;
}

.navbar-brand {
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--text-color);
}

.nav-link {
  color: var(--text-color) !important;
  transition: background-color var(--transition-speed);
  border-radius: var(--border-radius);
  padding: 0.5rem 0.75rem;
}

.nav-link:hover {
  background-color: var(--hover-bg);
}



.navbar.fixed-top .navbar-nav .nav-link {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  font-size: 0.9rem;
  /* font un po' più piccolo */
}

.navbar-toggler {
  padding: 0.25rem 0.5rem;
  /* bottone hamburger più piccolo */
  font-size: 1.1rem;
}


.dropdown-menu {
  border-radius: var(--border-radius);
  border: 1px solid #eee;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  background-image: url('https://www.transparenttextures.com/patterns/wood-pattern.png');
  background-repeat: repeat;
  background-color: var(--nav-bar-color) !important;
}

.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus {
  background-color: var(--hover-bg) !important;
  color: var(--text-color) !important;
}

/* Icon buttons */
.btn-link {
  color: var(--text-color);
  font-size: 1.2rem;
  transition: color var(--transition-speed);
}

.btn-link:hover {
  color: var(--accent-color);
}


/* Stile generale offcanvas mobile */
.offcanvas {
  background-color: var(--nav-bar-color) !important;
  background-image: url('https://www.transparenttextures.com/patterns/wood-pattern.png') !important;
  background-repeat: repeat !important;
  color: var(--text-color);
}

/* Header offcanvas */
.offcanvas-header {
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.offcanvas-title {
  font-weight: 600;
  color: var(--text-color);
}

/* Corpo offcanvas */
.offcanvas-body {
  padding: 1rem;
}

/* Accordion items / nav links */
.offcanvas-body .accordion-button,
.offcanvas-body .nav-link {
  background-color: transparent;
  color: var(--text-color);
  font-weight: 500;
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius);
  transition: background-color var(--transition-speed);
}

.offcanvas-body .accordion-button:hover,
.offcanvas-body .nav-link:hover {
  background-color: var(--hover-bg);
  color: var(--text-color);
}

/* Icone caret / indicatore dropdown */
.offcanvas-body .accordion-button::after {
  filter: invert(0.3); /* se vuoi adattare il colore dell’icona */
}

/* Rimuove il bordo predefinito bootstrap su accordion */
.offcanvas-body .accordion-button:not(.collapsed) {
  background-color: var(--hover-bg);
  color: var(--text-color);
}

/* Mantiene l’accordion compatto e coerente con il tema */
.offcanvas-body .accordion-item {
  background-color: transparent;
  border: none;
}

/* Padding dei link interni */
.offcanvas-body .accordion-body a {
  display: block;
  padding: 0.5rem 1.25rem;
  color: var(--text-color);
  text-decoration: none;
  transition: color var(--transition-speed), background-color var(--transition-speed);
}

.offcanvas-body .accordion-body a:hover {
  color: var(--text-color);
  background-color: var(--hover-bg);
  border-radius: var(--border-radius);
}


/* Footer */
footer {
  position: relative;
  background-image: url('https://www.transparenttextures.com/patterns/wood-pattern.png');
  background-repeat: repeat;
  background-color: var(--nav-bar-color) !important;
  color: var(--text-color);
}

footer a.icon-spacing {
  text-decoration: none;
}

/* Utilities */
.rounded-soft {
  border-radius: var(--border-radius);
}

.shadow-soft {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.transition {
  transition: all var(--transition-speed) ease-in-out;
}

/*Label*/
label {
  color: #000 !important;
}

.btn-link {
  color: var(--text-color) !important;
  /* nero o grigio scuro */
}

.btn-link .navbar-icon {
  color: #000 !important;
}

.btn.btn-success {
  background-color: var(--select-btn-success) !important;
  color: var(--bg-light) !important;
  border-color: var(--select-btn-success-push) !important;
  border-width: 1px;
  border-style: solid;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}


.btn.btn-confirm {
  background-color: var(--select-btn-light) !important;
  color: #3e3e3e !important;
  border-color: var(--select-btn-dark) !important;
  border-width: 1px;
  border-style: solid;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.btn.btn-confirm:hover {
  background-color: #806d53 !important;
  color: #faf7f5 !important;
}

.btn.btn-return {
  background-color: #8f8a85 !important;
  color: #faf7f5 !important;
  border-color: #75726e !important;
  border-width: 1px;
  border-style: solid;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.btn.btn-return:hover {
  background-color: #3e3e3e !important;
  color: #faf7f5 !important;
}

/* Cambia colore di bordo e focus dei campi input/select */
input.form-control:focus,
select.form-select:focus,
input[type="text"]:focus,
input[type="number"]:focus {
  border-color: var(--border-color);
  /* colore legno/marrone */
  box-shadow: 0 0 0 0.25rem rgba(166, 140, 109, 0.25);
  /* effetto leggero */
}

/* Colore standard dei bordi */
input.form-control,
select.form-select {
  border-color: var(--border-color);
}

input[type="checkbox"] {
  accent-color: #a68c6d !important;
  border: 1px solid var(--border-color);
  width: 1.1rem;
  height: 1.1rem;
}


input[type="radio"].form-check-input {
  border: 2px solid var(--border-color) !important;
  background-clip: padding-box;
}

/* Quando selezionato */
input[type="radio"].form-check-input:checked {
  background-color: #a68c6d !important;
  border-color: var(--border-color) !important;
}


/*Checkbox marroni custom*/
/* Nasconde il checkbox originale */
input[type="checkbox"].custom-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  background-color: white;
  cursor: pointer;
  position: relative;
  transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

/* Stato selezionato */
input[type="checkbox"].custom-checkbox:checked {
  background-color: #a68c6d;
  /* colore marroncino personalizzato */
  border-color: var(--border-color);
}

/* Aggiungi una "spunta" visiva */
input[type="checkbox"].custom-checkbox:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -50%) rotate(45deg);

}

/* centro il logo */
@media (max-width: 991px) {
  nav.navbar.fixed-top .navbar-brand {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }
}

.navbar-icon {
  color: #000 !important;
  font-size: 1.3rem;
  transition: transform 0.2s ease;
}

.navbar-icon:active {
  transform: scale(0.85);
}

.navbar-icon:hover {
  transform: scale(1.1);
}


/*Ordinamento e filtraggio su Ricorrenze e Categorie*/
/* Input di ricerca */
.custom-search-input {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 0.5rem 1rem;
  font-family: 'MyFont', sans-serif !important;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background-color: var(--bg-light);
  color: var(--text-color);
}

.custom-search-input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 0.25rem rgba(166, 140, 109, 0.3);
  outline: none;
}

/* Select ordinamento (già suggerito in precedenza) */
.custom-select {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 0.5rem 1rem;
  background-color: var(--bg-light);
  color: var(--text-color);
  font-size: 0.95rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.custom-select:hover,
.custom-select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 0.25rem rgba(166, 140, 109, 0.3);
  outline: none;
}