*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --main-color: #7d6136;
  --main-light: #a88a5e;
  --main-dark: #5a4426;
  --accent: #d4a574;
  --bg-light: #faf7f2;
  --text-light: #6b6b6b;
  --title-color: hsl(0, 0%, 15%);
  --slider-text-color: hsl(0, 0%, 35%);
  --slide-container-color: hsl(0, 0, 100%);
  --book-body-color: #494949;
  --dark-text: #3e3e3e;
  --btn-hover-color: #362c2c;
  --transition: all 0.3s ease;
  --full-white: #ffffff;
}

body {
  /*background-color: var(--bg-light);*/
  font-family: "Poppins", sans-serif;
  color: var(--dark-text);
  margin: 0;
  padding: 20px;
}

footer {
  background-color: var(--main-dark);
  color: #fff;
  font-family: "Poppins", sans-serif;
}

.custom-container {
  font-family: "Poppins", sans-serif;
  background-color: var(--bg-light);
  max-width: 800px;
  margin: auto;
  padding: 20px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.underline-red {
  text-decoration: underline solid red 20%;
}

h1 {
  font-family: "Poppins", sans-serif;
  color: var(--main-dark);
  margin: auto;
  padding: 5px;
  font-weight: 600;
  margin-bottom: 10px;
}

.h1-white {
  font-family: "Poppins", sans-serif;
  color: #fff !important;
  margin: auto;
  padding: 5px;
  font-weight: 600;
  margin-bottom: 10px;
}

.custom-btn-link {
  /* Reset stili di default del button */
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font-family: inherit;
  cursor: pointer;

  /* Stile da anchor tag */
  color: var(--main-color);
  text-decoration: underline;
  font-size: inherit;
  line-height: inherit;

  /* Transizione smooth */
  transition: all 0.3s ease;
}

.custom-btn-link:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.custom-btn-link:active {
  color: var(--main-dark);
  text-decoration-color: var(--main-dark);
}

.custom-btn-link:focus {
  outline: 2px solid var(--main-light);
  outline-offset: 2px;
}

/* Opzionale: versione senza underline */
.custom-btn-link-no-underline {
  color:  var(--main-dark);
  text-decoration: none;
  border-bottom: 1px solid var(--main-color);
  padding-bottom: 2px;
}

.custom-btn-link-no-underline:hover {
  border-bottom-color: var(--accent);
  color: var(--accent);
}



.bg-imieilibri {
    --bs-bg-opacity: 1;
    background-color: rgba(var(--main-light), var(--bs-bg-opacity)) !important;
}





.fs-unset {
  font-size: unset;
}

.p-form {
  border: none;
  border-bottom: 1px solid hsl(210, 17%, 44%);
}

.p-no-modify {
  border: none;
  font-family: "Poppins", sans-serif;
  font-size: var(--bs-body-font-size);
  color: var(--accent);
}

.menu-link-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 colonne */
  gap: 15px; /* Spazio tra gli elementi */
}

.menu-link-list li {
  display: flex;
}


.menu-link-list a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.menu-description {
  margin-top: 10px;
  color: var(--main-color);
  font-family: inherit;
  font-size: inherit;
}

/* Layout per schermi grandi (>= 900px) */
.header-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.header-item {
  display: flex;
  align-items: center;
}

.logo-item {
  flex: 0 0 auto;
  order: 1;
}

.search-item {
  flex: 1 1 auto;
  order: 2;
}

.login-item {
  flex: 0 0 auto;
  order: 3;
}

/* Layout per schermi piccoli (< 900px) */
@media (max-width: 900px) {
  .header-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }

  .logo-item {
    grid-column: 1;
    grid-row: 1;
    justify-content: flex-start;
  }

  .login-item {
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-end;
  }

  .search-item {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
  }
}


.bg-card-color-primary{
  background-color: var(--main-color) !important;
}



.book-card {
  position: relative;
  overflow: hidden;
  width: 400px !important;
}

.book-card-align {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.center-text {
  left: 50%;
  transform: translate(-50%) !important;
}

.book-card-img {
  max-width: 100%;
  height: auto;
  border-radius: 1.5rem;
}

.logo-img {
  max-width: 100%;
  height: auto;
  border-radius: 1.5rem;
}

.last-books-title {
  color: var(--main-color);
  text-align: center;
}

.anchor-tag {
  color: var(--main-color);
  text-decoration: underline;
}

.book-card-info {
  width: 280px;
  background-color: #fff;
  padding: 1.5rem 2rem;
  box-shadow: 0 8px 24px hsla(0, 0%, 0%, 0.15);
  border-radius: 1rem;
  position: absolute;
  bottom: -10rem;
  left: 0;
  right: 0;
  margin-inline: auto;
  opacity: 0;
  transition: opacity 1s 1s;
}

.book-card-author {
  display: block;
  margin: auto;
  color: var(--dark-text);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.25rem;
}

.title-color {
  color: var(--book-body-color);
}

.no-border {
  border: none !important;
}

.some-topic-books {
  width: 100%;
  overflow-x: auto;
  margin: 3rem auto;
  display: flex;
  gap: 1rem;
}

.single-some-topic-book {
  flex: 0 0 2rem;
  height: 1.2rem;
  background-color: #5a4424;
  padding: 1rem;
  text-align: center;
  align-content: center;
}

.display-price {
  display: block;
  font-size: medium;
  font-weight: 500;
  color: #666;
}

.book-card-title {
  font-weight: 500;
  color: var(--title-color);
  margin-bottom: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.book-card-text {
  font-family: inherit;
  font-size: 1.5rem;
  line-height: 1.5rem;
  color: hsl(0, 0%, 10%);
  margin-bottom: 3px;
}

.book-card-link {
  text-decoration: none;
  font-weight: 500;
  color: var(--main-color);
}

.book-card-link:hover {
  text-decoration: underline;
  color: hsl(36, 43%, 23%);
}

.book-card:hover .book-card-info {
  animation: show-book-info 1s forwards;
  opacity: 1;
  transition: opacity 0.3s;
}

.book-card-link:hover {
  animation: remove-overflow 2s forwards;
}

.book-card-link:not(:hover) {
  animation: show-overflow 2s forwards;
}

.book-card-link:not(:hover) .book-card-info {
  animation: remove-info 1s forwards;
}

@keyframes show-book-info {
  50% {
    transform: translateY(-15rem);
  }
  100% {
    transform: translateY(-10rem);
  }
}

@keyframes remove-overflow {
  to {
    overflow: initial;
  }
}

@keyframes remove-info {
  0% {
    transform: translateY(-5rem);
  }
  50% {
    transform: translateY(-9rem);
  }
  100% {
    transform: translateY(0.5rem);
  }
}

@keyframes show-hoverflow {
  0% {
    overflow: initial;
    pointer-events: none;
  }
  50% {
    overflow: hidden;
    pointer-events: none;
  }
}

.books-container {
  font-size: 1.7rem;
  background-color: #2c3e50;
  color: #ececec;
  padding: 4rem;
}

.book-title,
.book-price {
  color: #2c3e50;
}

.suggest-price {
  color: #ff9900;
  font-size: 1.5rem;
}

span.strike {
  text-decoration: line-through;
}

.discount-value {
  background-color: #ff9900;
  color: #ffffff;
  padding: 5px;
  margin-right: 2px;
}

.book {
  overflow: hidden;
  background-color: #ffffff;
  color: var(--dark-text);
  text-align: center;
  width: 240px;
  /* height: 600px;*/
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 2rem;
}

.book:hover {
  box-shadow: 5px 15px 25px #eeeeee;
}

.book img {
  width: 200px;
  margin: 1rem;
  transition: all 0.3s ease;
}

.book:hover img {
  scale: 1.1;
}

.book a:link,
.book a:visited {
  color: var(--main-color);
  display: inline-block;
  text-decoration: none;

  padding: 1.2rem 3rem;
  border-radius: 1rem;
  margin-top: 1rem;
  transition: all 0.2s;
}

.book a:hover {
  transform: scale (1.1);
}

/* Animazione sulla freccia SVG */
.book-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: all 0.3s ease;
}

.book-link:hover {
  transform: scale(1.1);
}

.book-link svg {
  animation: slideArrow 2s ease-in-out infinite;
}

@keyframes slideArrow {
  0% {
    transform: translateX(-5px);
    opacity: 0.5;
  }
  50% {
    transform: translateX(8px);
    opacity: 1;
  }
  100% {
    transform: translateX(-5px);
    opacity: 0.5;
  }
}

/* Effetto al passaggio del mouse */
.book-link:hover svg {
  animation: moveRightArrow 1s ease-in-out infinite;
  filter: brightness(1.2);
}


/* HIGHLIGHTS */


/* ENFASI SULLA SECTION*/
.books-section--highlighted {
  background-color: rgba(212, 165, 116, 0.05);
  padding: 40px 0;
  border-radius: 12px;
  margin: 20px 0;
}

.book-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), var(--main-light));
  color: var(--full-white);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}



/* Versione enfatizzata della card */
.book--highlighted {
  background: linear-gradient(135deg, var(--full-white) 0%, #fdfaf7 100%);
  border: 1px solid var(--accent);
  box-shadow: 0 8px 24px rgba(212, 165, 116, 0.15);
  transform: translateY(-4px);
  position: relative;
}

.book--highlighted::before {
  content: '★';
  position: absolute;
  top: -12px;
  right: 20px;
  font-size: 24px;
  color: var(--accent);
  animation: starPulse 2s ease-in-out infinite;
}

.book--highlighted:hover {
  box-shadow: 0 12px 32px rgba(212, 165, 116, 0.25);
  transform: translateY(-8px);
}

@keyframes starPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}





section {
  border-top: #7d6136;
}

.pagination-row {
  width: 100%;
  background-color: #f9f9f5;
}

.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
}

.pagination-container a {
  text-decoration: none;
  color: var(--main-color);
  margin: 0 5px;
  padding: 5px 10px;
  border: 1px solid var(--main-color);
  border-radius: 5px;
  transition:
    background-color 0.3s,
    color 0.3s;
}

.pagination-container a:hover {
  background-color: var(--main-color);
  color: #fff;
}

.pagination-container .active {
  background-color: var(--main-color);
  color: #fff;
  border: 1px solid var(--main-color);
  padding: 5px 10px;
}

.arrow {
  font-weight: bold;
}

.items-container {
  border-bottom: 1px solid var(--dark-text);
}

.filter-list {
  display: flex;
}

.filter-title {
  color: var(--main-color);
  font-size: larger;
  font-weight: bold;
  text-align: left;
  margin-top: 6px;
  margin-bottom: 4px;
}

.filter-item {
  color: var(--dark-text) !important;
  text-align: left !important;
  margin-top: 1px;
  margin-bottom: 2px;
  margin-left: 5px;
  font-size: 1rem;
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-bottom: 3px;
}

.filter-item:hover {
  color: var(--dark-text);
  text-decoration: underline;
  font-size: 1rem;
  background: none;
}

.active-filters {
  background-color: #f9f9f5;
  flex-wrap: nowrap !important;
}

.filter-selected-container {
  height: 30px;
  width: 100px;
  line-height: 30px;
  font-size: 1rem;
  background-color: transparent;
}

.hide-filters {
  display: none !important;
}

.filter-selected-title {
  width: 150px;
  line-height: 30px;
  color: var(--main-color);
  font-size: 1rem;
  font-weight: 700;
}

.filter-selected {
  height: 30px;
  width: 150px;
  line-height: 30px;
  color: var(--dark-text);
  text-decoration: none;
  font-size: 1rem;
  margin-left: 5px;
  /*border: 1px solid var(--dark-text);*/
  background-color: #d3c41e;
  border-radius: 8px;
  padding-left: 5px;
}

.delete-filter {
  color: #292929;
  line-height: 30px;
  float: right;
  font-size: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/**
Scroll style
*/

.many-items {
  width: 100%;
  height: 200px;
  overflow-y: scroll;
}

.many-items::-webkit-scrollbar-track {
  border: 1px solid var(--dark-text);
  padding: 2px 0;
  background-color: #d3c41e;
}

.many-items::-webkit-scrollbar {
  width: 20px;
}

.many-items::-webkit-scrollbar-thumb {
  border: 1px solid var(--dark-text);
  padding: 2px 0;
  background-color: var(--main-color);
}

.styled-scrollbar {
  scrollbar-width: auto;
  scrollbar-color: var(--main-color) #d3c41e;
}

.button {
  padding: 12px 30px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.custom-button {
  background: linear-gradient(
    135deg,
    var(--main-color) 0%,
    var(--main-dark) 100%
  );
  color: white;
}

.custom-button:hover {
  color: white !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(125, 97, 54, 0.4);
}

.disabled {
  opacity: 0.8;
}

.counter-span {
  line-height: 42px;
  font-size: 16px;
  font-weight: 600;
  padding: 12px 30px;
  color: var(--main-color);
  background: #fff;
  border: 1px solid var(--main-color);
  padding: 3px;
  border-radius: 8px;
}

.secondary-button {
  background: white;
  color: var(--main-color);
  border: 2px solid var(--main-color);
}

.secondary-button:hover {
  background: var(--main-color);
  color: white;
}

.search-button {
  background-color: var(--main-color);
  color: rgb(255, 255, 255);
  padding: 12px 24px;
  font-size: 1rem;
  white-space: initial;
  border: none;
  text-decoration: none;
}

.search-button:hover {
  background-color: #d4a574;
  color: rgb(255, 255, 255);
  padding: 12px 24px;
  font-size: 1rem;
  white-space: initial;
  text-decoration: none;
  box-shadow: 0 10px 20px rgba(125, 97, 54, 0.4);
}

.search-button svg {
  fill: #fff;
}

.button-outline-dark {
  padding: 12px 30px;
  color: #302a05;
  border: 1px solid #302a05;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.button-outline-dark:hover {
  box-shadow: inset 0 0 0 2px hsl(0, 0%, 39.6%);
  background-color: #302a05;
  border: none;
  color: #fff;
}

.button-outline-alert {
  padding: 12px 30px;
  color: #880f02;
  border: 1px solid #880f02;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.button-outline-alert:hover {
  box-shadow: inset 0 0 0 2px hsl(0, 90%, 77%);
  background-color: #880f02;
  border: none;
  color: #fff;
}

.contact-input {
  white-space: pre-wrap; /* Preserva gli spazi */
  word-wrap: break-word; /* Vai a capo se necessario */
  padding: 10px; /* Aggiungi padding interno */
}

/* INIT SUGGESTION INPUT TOPIC */
/* Contenitore wrapper con posizionamento */
.list-tag {
  position: relative; /* FONDAMENTALE per i suggerimenti */
}

.tag-input-wrapper {
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: 8px;
  background: white;
  transition: border-color 0.15s ease-in-out;
  position: relative;
}

.tag-input-wrapper:focus-within {
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Placeholder visuale quando vuoto */
.tag-input-wrapper.empty {
  color: #6c757d;
}

.tag-input-wrapper.empty::after {
  content: attr(aria-placeholder);
  position: absolute;
  top: 8px;
  left: 8px;
  font-style: italic;
  pointer-events: none;
  color: #6c757d;
}

/* Singolo tag */
.tag-item {
  background: var(--main-color);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 14px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tag-label {
  font-weight: 500;
}

.tag-remove {
  cursor: pointer;
  font-weight: bold;
  opacity: 0.8;
  transition: opacity 0.2s;
  border: none;
  background: transparent;
  color: white;
  padding: 0;
  margin: 0;
  font-size: 16px;
  line-height: 1;
}

.tag-remove:hover {
  opacity: 1;
}

/* Campo di input editabile */
.tag-text {
  min-width: 120px;
  outline: none;
  flex: 1;
  padding: 2px 0;
}

/* Suggerimenti dropdown */
.topic-suggest-wrapper {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  z-index: 1050;
  margin-top: -1px;
  max-width: 100%;
}

.suggestion {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 250px;
  overflow-y: auto;
}

.suggest-item {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
  transition: background 0.15s;
}

.suggest-item:last-child {
  border-bottom: none;
}

.suggest-item:hover {
  background: #f8f9fa;
  color: var(--main-color);
}

.suggest-item:active {
  background: var(--main-dark);
  color: white;
}

/* Input disabilitato */
#book_category.disabled {
  background-color: #f5f5f5;
  color: #999;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Container topics disabilitato */
#topics_container.disabled {
  background-color: #f5f5f5;
  opacity: 0.6;
  cursor: not-allowed;
}

#topics_container.disabled .tag-text {
  color: #999;
  cursor: not-allowed;
}

/* CROPPER */
/* Stili per il modale del cropper */
#crop-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
}
#crop-modal.active {
  display: flex;
}

.crop-container {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh; /* Altezza massima viewport */
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.crop-container h5 {
  margin-bottom: 15px;
  flex-shrink: 0; /* Non si riduce */
}

.crop-image-wrapper {
  width: 100%;
  flex: 1; /* Occupa lo spazio disponibile */
  overflow: hidden;
  margin-bottom: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#crop-image {
  max-width: 100%;
  max-height: calc(90vh - 150px); /* Sottrae spazio per titolo e bottoni */
  display: block;
  object-fit: contain;
}

.crop-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0; /* Non si riduce */
  width: 100%;
  justify-content: center;
  margin-top: auto; /* Spinge in basso */
}

#preview-cropped {
  margin-top: 15px;
  max-width: 200px;
  border: 2px solid #28a745;
  border-radius: 4px;
  display: none;
}

/* Responsive per schermi piccoli */
@media (max-width: 768px) {
  #crop-image {
    max-height: calc(85vh - 140px);
  }
  .crop-container {
    padding: 15px;
    max-height: 95vh;
  }
}

/* END SUGGESTION INPUT TOPIC */

.password-wrapper {
  position: relative;
}

.toggle-button {
  display: inline-flex;
  position: absolute;
  background-color: transparent;
  top: 55%;
  border: none;
  transform: translateY(-50%);
  left: unset;
  right: 12px;
  cursor: pointer;
}

.eye-icon {
  width: 20px;
  height: 20px;
}

#image_error_messages {
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  padding: 0.25rem 0;
}

#image_error_messages div {
  margin: 0.25rem 0;
}

.brown-bg {
  background-color: #b2ad7f;
}
img {
  max-width: 100%;
}
img {
  vertical-align: middle;
  border-style: none;
}
/* About Me 
---------------------*/
.about-text h3 {
  font-size: 45px;
  font-weight: 700;
  margin: 0 0 6px;
}
@media (max-width: 767px) {
  .about-text h3 {
    font-size: 35px;
  }
}
.about-text h6 {
  font-weight: 600;
  margin-bottom: 15px;
}
@media (max-width: 767px) {
  .about-text h6 {
    font-size: 18px;
  }
}
.about-text p {
  font-size: 18px;
  max-width: 450px;
}
.about-text p mark {
  font-weight: 600;
  color: #20247b;
}

.about-list {
  padding-top: 10px;
}
.about-list .media {
  padding: 5px 0;
}

.about-list p {
  margin: 0;
  font-size: 15px;
}

@media (max-width: 991px) {
  .about-avatar {
    margin-top: 30px;
  }
}

.about-section {
  background: linear-gradient(
    135deg,
    var(--main-color) 0%,
    var(--main-light) 100%
  );
  color: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.about-section .counter {
  padding: 22px 20px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 0 30px rgba(31, 45, 61, 0.125);
}
.about-section .counter .count-data {
  margin-top: 10px;
  margin-bottom: 10px;
}
.about-section .counter .count {
  font-weight: 700;
  color: #20247b;
  margin: 0 0 5px;
}
.about-section .counter p {
  font-weight: 600;
  margin: 0;
}
.counter {
  border-bottom: 2px solid #5a4426;
}
mark {
  background-image: linear-gradient(
    rgba(252, 83, 86, 0.6),
    rgba(252, 83, 86, 0.6)
  );
  background-size: 100% 3px;
  background-repeat: no-repeat;
  background-position: 0 bottom;
  background-color: transparent;
  padding: 0;
  color: currentColor;
}

.container-contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  padding: 15px;
  background: rgba(255, 255, 255, 0.8);
}

.wrap-contact {
  background: #b2ad7f;
  background: linear-gradient(45deg, #b2ad7f, #a8e063);
  border-radius: 10px;
  overflow: hidden;
  padding: 72px 55px 65px 55px;
}

.contact-form {
  width: 100%;
}

form .contact-form {
  width: 100%;
}

.contact-form-title {
  display: block;
  font-size: 39px;
  color: #fff;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
  padding-bottom: 70px;
}

.form-title-link {
  display: block;
  font-size: 39px;
  color: #fff;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
  padding-bottom: 70px;
}

.form-title-link:hover {
  color: var(--main-dark);
}

.contact-form-btn {
  font-size: 16px;
  color: #555555;
  line-height: 1.2;
  text-transform: uppercase;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 15px;
  min-width: 120px;
  height: 50px;
  border-radius: 2px;
  position: relative;
  z-index: 1;
  background: #80c64a;
  background: linear-gradient(-135deg, #56ab2f, #a8e063);
  transition: all 0.4s;
}

.contact-label {
  display: block;
  width: 100%;
  font-size: 15px;
  color: var(--dark-text);
  line-height: 1.2;
  padding: 0 5px;
}

.contact-input {
  display: block;
  width: 100%;
  background: #fff;
  font-size: 15px;
  color: var(--dark-text);
  line-height: 1.2;
  padding: 0 5px;
}

.focus-input {
  position: absolute;
  display: block;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
}
textarea.contact-input {
  min-height: 120px;
  padding-top: 13px;
  padding-bottom: 13px;
}

.wrap-input {
  width: 100%;
  position: relative;
  border-bottom: 2px solid rgba(255, 255, 255, 0.24);
  margin-bottom: 27px;
}

.validate-input {
  position: relative;
}

.gallery-img {
  display: block;
  max-width: 100%;
}

.all-categories {
  column-count: 1;
  text-align: justify;
  background-color: #f9f9f5;
}

.all-categories a {
  text-decoration: none;
  padding: 5px;
  color: var(--dark-text);
}

.all-categories a:hover {
  text-decoration: underline;
  padding: 5px;
  color: var(--dark-text);
}

.category-list-title {
  column-span: all;
  color: var(--main-color);
}

.topnavcontainer {
  /*background-color: #b02b2c;*/
  width: 100%;
  /*
  padding-right: calc(var(--bs-gutter-x)*.5);
  padding-left: calc(var(--bs-gutter-x)*.5); 
  */
  margin: auto;
  height: 33px;
  top: 0px;
  position: fixed;
  z-index: 3;
}

#subtopnav {
  position: fixed;
  background-color: var(--main-color);
  color: #f1f1f1;
  padding-right: calc(var(--bs-gutter-x) * 0.5);
  padding-left: calc(var(--bs-gutter-x) * 0.5);
  letter-spacing: 1px;
  font-family: "Source Sans Pro Topnav", sans-serif;
  font-size: 0;
  top: 0px;
  z-index: 2;
  width: 100%;
  white-space: nowrap;
  overflow: auto;
  scrollbar-width: none;
  max-width: 1750px;
  margin: auto;
  text-align: end;
}

#menubtn_container {
  position: fixed;
  left: 0;
  top: 0px;
  border-right: 10px solid rgba(40, 42, 53, 0.5);
  height: 33px;
  color: white;
  font-size: 15px;
}

#subtopnav a {
  display: inline-block;
  width: auto;
  margin: 0 !important;
  padding: 5px 15px 5px 15px !important;
  font-size: 15px !important;
  text-decoration: none;
  background-color: transparent;
  color: inherit;
  line-height: 1.5;
}

.mar-top-33 {
  margin-top: 33px;
}

.mar-top-100 {
  margin-top: 100px;
}

.limit-select {
  max-height: 150px;
  overflow-y: auto;
}

.search-container {
  position: relative;
}

.search-input {
  height: 50px;
  border-radius: 30px;
  padding-left: 35px;
  border: none;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 15px;
  transform: translateY(-50%);
  color: #888;
}

.explained-menu {
  color: var(--main-color);
  font-size: 1.5rem;
  display: none;
}

.pdf-list {
  width: 80%;
}
.card {
  width: 18rem;
}
.category .list-group {
  width: 200px;
}
.nd {
  text-decoration: none;
}

@media (max-width: 370px) and (min-width: 992px) {
  .explained-menu {
    display: none;
  }
}
.headerNotificationCarousel .text-center {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0 10px;
}
.message p {
  text-decoration: none;
}
@media only screen and (min-width: 768px) {
  .onlymobile {
    display: none;
  }
}
.headerNotificationCarousel .text-center p {
  font-size: 16px;
}

@media only screen and (min-width: 992px) {
  /* .onlydesktop {
   display: inline !important; 
}
*/

  .onlymobile {
    display: none !important;
  }
}
@media only screen and (max-width: 700px) {
  .onlydesktop {
    display: none;
  }
  .onlymobile {
    display: inline !important;
  }
}

.topbar-search-form {
  margin: 12px -8px 0 -8px;
  padding: 12px;
  flex: 1 0 100%;
  position: relative;
}

.topbar-search-form .form-control {
  padding: 12px 12px 12px 12px;
  box-sizing: border-box;
  color: #292929;
  background-color: #f9f9f5;
  border: 1px solid #d6d6d6;
  border-radius: 0;
  margin: 0 !important;
  font-size: 14px;
}

.topbar-search-form .btn {
  border-radius: 0;
  padding: 12px 24px;
  border: 0;
}

.topbar-search-form .btn-primary:hover {
  background-color: #5a4424;
  color: #fff;
  border-color: #5a4424;
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.5625rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.25rem;
  color: #292929;
  background-color: #f9f9f5;
  background-clip: padding-box;
  border: 1px solid #959595;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border-radius: 0;
  transition:
    border-color 0.15s ease-in-out,
    outline 0.15s ease-in-out,
    box-shadow 0.15s ease-in-out,
    background-color 0.15s ease-in-out;
}

.form-check.is-invalid {
  border-left: 3px solid #dc3545;
  padding-left: 10px;
  margin-left: -10px;
}

.form-check.is-invalid .form-check-input {
  border-color: #dc3545;
}

.form-check.is-invalid .form-check-label {
  color: #dc3545;
}

/* ===== SOCIAL ICON CONTAINER ===== */
.social-icon-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg-light) 0%, #f0ebe5 100%);
  color: var(--main-color);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(93, 65, 38, 0.12);
  border: 2px solid transparent;
}

.social-icon-container:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(93, 65, 38, 0.2);
  background: linear-gradient(
    135deg,
    var(--main-color) 0%,
    var(--main-light) 100%
  );
  color: var(--bg-light);
  border-color: var(--accent);
}

.social-icon-container:active {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(93, 65, 38, 0.15);
}

/* Icona SVG dentro il container */
.social-icon-container span {
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-icon-container .icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
  transition: transform 0.3s ease;
}

.social-icon-container:hover .icon {
  transform: scale(1.15) rotate(5deg);
}

/* Focus per accessibilità */
.social-icon-container:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Focus visible per tastiera */
.social-icon-container:focus-visible {
  outline: 2px dashed var(--main-color);
  outline-offset: 3px;
}

/* Versione alternativa su sfondo scuro */
.social-icon-container.on-dark {
  background: linear-gradient(
    135deg,
    var(--main-color) 0%,
    var(--main-light) 100%
  );
  color: var(--bg-light);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.social-icon-container.on-dark:hover {
  background: linear-gradient(
    135deg,
    var(--main-dark) 0%,
    var(--main-color) 100%
  );
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* ===== HEADER VENDITORE ===== */
.seller-header {
  background: linear-gradient(
    135deg,
    var(--main-color) 0%,
    var(--main-light) 100%
  );
  color: white;
  padding: 60px 0;
  margin-bottom: 50px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.seller-profile {
  display: flex;
  align-items: center;
  gap: 40px;
}

.seller-avatar {
  flex-shrink: 0;
}

.seller-avatar img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 5px solid var(--accent);
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.seller-info h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.seller-info p {
  font-size: 1.1rem;
  margin-bottom: 15px;
  opacity: 0.95;
  line-height: 1.6;
}

.seller-stats {
  display: flex;
  gap: 30px;
  margin-top: 20px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* ===== SEZIONE LIBRI ===== */
.books-section {
  margin-top: 20px;
  padding: 10px 40px;
}

.section-title {
  font-size: 2rem;
  color: var(--title-color);
  font-weight: 700;
  margin-bottom: 40px;
  text-align: center;
  position: relative;
  padding-bottom: 15px;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

/* ===== LOAD MORE BUTTON ===== */
.load-more-container {
  display: flex;
  justify-content: center;
  margin-top: 50px;
}

.btn-load-more {
  background-color: var(--main-color);
  color: white;
  border: none;
  padding: 14px 40px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(125, 97, 54, 0.3);
}

.btn-load-more:hover {
  background-color: var(--btn-hover-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(125, 97, 54, 0.4);
}

.btn-load-more:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.loading-spinner {
  display: none;
  text-align: center;
  padding: 30px 0;
}

.loading-spinner.active {
  display: block;
}

.spinner-border {
  color: var(--main-color);
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}

.empty-state svg {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.5rem;
  color: var(--title-color);
  margin-bottom: 10px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .seller-header {
    padding: 40px 0;
    margin-bottom: 30px;
  }

  .seller-profile {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .seller-avatar img {
    width: 120px;
    height: 120px;
  }

  .seller-info h1 {
    font-size: 1.8rem;
  }

  .seller-stats {
    justify-content: center;
  }

  .books-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
  }

  .section-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .books-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .book-title {
    font-size: 0.95rem;
  }

  .seller-info h1 {
    font-size: 1.5rem;
  }
}

/* Carousel Swiper */

.swiper {
  z-index: 0 !important;
}

.books-swiper {
  padding: 20px 0 60px 0;
}

.swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Frecce di navigazione */
.swiper-button-prev,
.swiper-button-next {
  color: var(--main-color) !important;
  background-color: transparent;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
}

.swiper-button-prev:after,
.swiper-button-next:after {
  font-size: 18px;
  font-weight: bold;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
  background-color: transparent;
  color: white;
}

/* Paginazione */
.swiper-pagination-bullet {
  background-color: var(--main-color) !important;
  opacity: 0.5;
}

.swiper-pagination-bullet-active {
  background-color: var(--main-color) !important;
  opacity: 1;
}

/* Responsive breakpoints */
@media (max-width: 1400px) {
  .swiper-slide {
    width: 100%;
  }
}
.swiper-horizontal > .swiper-pagination-bullets,
.swiper-pagination-bullets.swiper-pagination-horizontal,
.swiper-pagination-custom,
.swiper-pagination-fraction {
  bottom: var(--swiper-pagination-bottom, -16px) !important;
}

.select2-container--bootstrap-5 .select2-selection--single {
  height: 38px;
  border: 1px solid #dee2e6;
}

.select2-container--bootstrap-5 .select2-selection--multiple {
  min-height: 38px;
  border: 1px solid #dee2e6;
}

.select2-container--bootstrap-5.select2-container--disabled .select2-selection {
  background-color: #e9ecef;
  cursor: not-allowed;
}

.select2-container--bootstrap-5
  .select2-selection--multiple
  .select2-selection__choice {
  background-color: var(--main-color);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
}

.select2-container--bootstrap-5
  .select2-selection--multiple
  .select2-selection__choice__remove {
  color: white;
  margin-right: 4px;
}

.form-card {
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.05);
  padding: 2rem;
  border: 1px solid #eee;
}
.form-label {
  color: var(--main-dark);
  font-weight: 500;
}
.form-control:focus {
  border-color: var(--main-light);
  box-shadow: 0 0 0 0.25rem rgba(125, 97, 54, 0.15);
}
.btn-submit {
  background-color: var(--main-color);
  border: none;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  transition: all 0.2s;
}
.btn-submit:hover {
  background-color: var(--btn-hover-color);
  color: #fff;
  transform: translateY(-1px);
}
.required::after {
  content: " *";
  color: #dc3545;
}
.error-list {
  background: #fdf2f2;
  border-left: 4px solid #dc3545;
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
}
.error-list li {
  color: #b91c1c;
  margin-bottom: 0.25rem;
}
.success-alert {
  background: #f0fdf4;
  border-left: 4px solid #16a34a;
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
}
.success-alert p {
  color: #15803d;
  margin: 0;
}
/* Honepot hidden */
.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
}

/* =========================================
           STILI AGGIUNTIVI (GRID & CARDS)
           ========================================= */
.author_data h2 {
  font-weight: 700;
  letter-spacing: -0.02em;
}
.author_data .bio-text {
  line-height: 1.7;
  color: var(--text-light);
}

/* Grid responsive Mobile-First */
.works-section {
  padding: 2rem 0;
}
.works-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr); /* Mobile: 1 colonna */
  gap: 1.5rem;
}
@media (min-width: 576px) {
  .works-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 768px) {
  .works-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 992px) {
  .works-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 1200px) {
  .works-grid {
    grid-template-columns: repeat(4, 1fr);
  }
} /* XL: 4 colonne */

/* Card Styling */
.work-card {
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
  background: #fff;
}
.work-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0.75rem 1.5rem rgba(125, 97, 54, 0.15) !important;
}
.work-card img.cover-img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  background-color: var(--bg-light);
}
.card-title {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Prezzi & Sconti */
.price-block {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #eee;
}
.price-original {
  text-decoration: line-through;
  color: var(--text-light);
  font-size: 0.85rem;
  margin-right: 0.5rem;
}
.price-current {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--main-dark);
}
.discount-badge {
  background-color: var(--accent);
  color: var(--main-dark);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.2em 0.6em;
  border-radius: 0.35rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
/* =========================================
           IMMAGINE AUTORE (Responsive & Mobile First)
           ========================================= */
.author-portrait {
  width: 100%;
  max-width: 180px;
  aspect-ratio: 1/1;
  object-fit: cover;
  border: 3px solid var(--accent);
  background-color: var(--bg-light);
  transition: transform 0.3s ease;
}
.author-portrait:hover {
  transform: scale(1.03);
}
.author-portrait-placeholder {
  width: 150px;
  height: 150px;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .author-portrait {
    max-width: 200px;
  }
  .author-portrait-placeholder {
    width: 170px;
    height: 170px;
  }
}

.header-custom {
  background: transparent;
  color: #fff;
  padding: 2rem 1rem;
  border-radius: 0.75rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 12px rgba(125, 97, 54, 0.25);
}

.header-custom-authors {
background-image: url("../img/wallface.webp?v=1");
  background-size: cover;
  background-position: center;
}

.header-custom-books {
  background-image: url("../img/disk_books.webp?v=1");
  background-size: cover;
  background-position: center;
}

.header-custom-inserimento-autore {
  background-image: url("../img/paper_pen_inkwell.jpg?v=1");
  background-size: cover;
  background-position: center;
}

.header-custom-modifica-autore {
  background-image: url("../img/paper_writed_pen_inkwell.jpg");
  background-size: cover;
  background-position: center;
}

.search-card {
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.04);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid #eee;
}

.table-container {
  background: var(--slide-container-color);
  border-radius: 0.75rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.table-custom thead {
  background-color: var(--main-light);
  color: #fff;
}

.table-custom th {
  font-weight: 500;
  white-space: nowrap;
  font-size: 0.9rem;
  padding: 1rem 0.75rem;
  border-bottom: 2px solid var(--main-dark);
}

.table-custom td {
  vertical-align: middle;
  padding: 0.85rem 0.75rem;
  font-size: 0.95rem;
  color: var(--book-body-color);
  border-bottom: 1px solid #eee;
}

.text-muted-custom {
  color: var(--text-light);
}
.empty-val {
  color: var(--text-light);
  font-style: italic;
  font-size: 0.85rem;
}

.link-custom {
  color: var(--main-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.link-custom:hover {
  color: var(--main-dark);
  text-decoration: underline;
}

.badge-solo {
  background-color: var(--accent);
  color: #fff;
}
.badge-collab {
  background-color: var(--main-color);
  color: #fff;
}

.author-name {
  font-weight: 600;
  color: var(--title-color);
}
.bio-truncate {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
  line-height: 1.4;
}

.btn-view {
  background-color: var(--main-color);
  border: none;
  color: #fff;
  padding: 0.35rem 0.7rem;
  border-radius: 0.3rem;
  font-size: 0.85rem;
  transition:
    background 0.2s,
    transform 0.1s;
}
.btn-view:hover {
  background-color: var(--btn-hover-color);
  color: #fff;
  transform: translateY(-1px);
}

/* Modal styling */
.modal-header-custom {
  background: linear-gradient(135deg, var(--main-color), var(--main-dark));
  color: #fff;
}
.section-title {
  color: var(--main-color);
  font-weight: 600;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 0.25rem;
  margin-bottom: 0.75rem;
}

.breadcrumb {
  background-color: var(--bg-light);
  padding: 10px;
  border-radius: 5px;
  list-style: none;
}

.breadcrumb-item {
  display: inline;
  margin-right: 5px;
}

.breadcrumb-item a {
  color: var(--main-color);
  text-decoration: none;
}

.breadcrumb-item a:hover {
  color: var(--main-dark);
}

.breadcrumb-item::after {
  content: ">";
  margin-left: 5px;
}

.breadcrumb-item:last-child::after {
  content: "";
}
/* =========== Personal Nav Container =========== */

.personal-nav-container {
  background-color: var(--bg-light);
  padding: 0 2rem;
  border-bottom: 3px solid var(--main-color);
  box-shadow: 0 4px 12px rgba(125, 97, 54, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.personal-nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 64px;
}

/* =========== Personal Toggle Button =========== */

.personal-nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  background: none;
  border: 2px solid var(--main-color);
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 8px;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--full-white);
  transition: var(--transition);
  text-transform: capitalize;
}



.personal-nav-toggle i {
  font-size: 1.3rem;
  color: var(--main-dark);
  transition: transform 0.3s ease;
}

.personal-nav-toggle:hover {
  background-color: var(--main-color);
  color: var(--main-dark);
}

.personal-nav-toggle:hover i {
  color: var(--full-white);
}



.personal-nav-toggle.active {
  background-color: var(--main-dark);
  color: var(--full-white) !important;
}

.personal-nav-toggle.active i {
  color: var(--full-white) !important;
  transform: rotate(180deg);
}

.personal-nav-toggle span {
  color: var(--main-dark);
}


/* =========== Personal Nav Links =========== */


.personal-nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.personal-nav-links li {
  position: relative;
}


.personal-nav-links li a {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--main-dark) !important;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
  text-transform: capitalize;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: inline-block;
  text-decoration: none;
}


.personal-nav-links li a::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 2px;
  background-color: var(--main-color);
  transition: transform 0.3s ease;
  border-radius: 1px;
}

.personal-nav-links li a:hover {
  background-color: var(--main-color);
  color: var(--full-white) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(90, 68, 38, 0.25);
}

.personal-nav-links li a:hover::after {
  transform: translateX(-50%) scaleX(1);
  background-color: var(--white);
}



.personal-nav-links li a:active {
  background-color: var(--main-dark);
  transform: translateY(0);
}

/* =========== Active Link =========== */

.personal-nav-links li.active a {
  background-color: var(--accent);
  color: var(--title-color) !important;
  font-weight: 700;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.personal-nav-links li.active a::after {
  display: none;
}
/* =========== Submenu Styles =========== */

.personal-nav-item-with-submenu {
  position: relative;
}

.personal-nav-item-toggle {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--main-dark) !important;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
  text-transform: capitalize;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  text-decoration: none;
}

.personal-nav-item-toggle i {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.personal-nav-item-toggle:hover {
  background-color: var(--main-color);
  color: var(--full-white) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(90, 68, 38, 0.25);
}

.personal-nav-item-toggle[aria-expanded="true"] i {
  transform: rotate(180deg);
}

.personal-nav-submenu {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--bg-light);
  border: 2px solid var(--main-color);
  border-radius: 6px;
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 20px rgba(125, 97, 54, 0.15);
  margin-top: 0.5rem;
  z-index: 1001;
}

.personal-nav-submenu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.personal-nav-submenu li {
  position: relative;
}

.personal-nav-submenu li a {
  display: block;
  padding: 0.8rem 1.2rem;
  color: var(--main-dark) !important;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 0;
  transition: all 0.3s ease;
}

.personal-nav-submenu li:first-child a {
  border-radius: 4px 4px 0 0;
}

.personal-nav-submenu li:last-child a {
  border-radius: 0 0 4px 4px;
}

.personal-nav-submenu li a:hover {
  background-color: var(--main-color);
  color: var(--full-white) !important;
  padding-left: 1.5rem;
  box-shadow: none;
  transform: none;
}

.personal-nav-submenu li a::after {
  display: none;
}


/* =========== Responsive Mobile =========== */



/* margin top per le voci del footer*/

@media (max-width: 568px) {
 .mg-tp{
  margin-top: 5px;
 }
}



@media (max-width: 1050px) {
  .personal-nav-toggle {
    display: flex;
  }

  .personal-nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    background-color: var(--bg-light);
    border-bottom: 3px solid var(--main-color);
    box-shadow: 0 8px 24px rgba(125, 97, 54, 0.12);
    padding: 0.5rem 0;
    gap: 0;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition:
      opacity 0.3s ease,
      transform 0.3s ease;
  }

  .personal-nav-links.open {
    display: flex;
    opacity: 1;
    transform: translateY(0);
    animation: personalSlideDown 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }

  .personal-nav-links li {
    width: 100%;
    opacity: 0;
    transform: translateX(-15px);
  }

  .personal-nav-links.open li {
    animation: personalFadeInItem 0.3s ease forwards;
  }

  .personal-nav-links.open li:nth-child(1) {
    animation-delay: 0.05s;
  }
  .personal-nav-links.open li:nth-child(2) {
    animation-delay: 0.1s;
  }
  .personal-nav-links.open li:nth-child(3) {
    animation-delay: 0.15s;
  }
  .personal-nav-links.open li:nth-child(4) {
    animation-delay: 0.2s;
  }
  .personal-nav-links.open li:nth-child(5) {
    animation-delay: 0.25s;
  }
  .personal-nav-links.open li:nth-child(6) {
    animation-delay: 0.3s;
  }

  .personal-nav-links li a {
    display: block;
    padding: 15px 20px;
    border-radius: 0;
    font-size: 1rem;
    width: 100%;
    text-align: left;
  }

  .personal-nav-links li a:hover {
    transform: none;
    padding-left: 28px;
  }

  .personal-nav-links li a:active {
    transform: none;
  }

  .personal-nav-links li a::after {
    display: none;
  }

  .personal-nav-links li.active a {
    border-left: 4px solid var(--main-color);
    padding-left: 16px;
  }
}

@media (max-width: 768px) {
  .personal-nav-toggle {
    display: flex;
  }

  .personal-nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-light);
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
    border-bottom: 3px solid var(--main-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 0;
    overflow: hidden;
  }

  .personal-nav-links.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    max-height: 500px;
  }

  .personal-nav-links li {
    width: 100%;
  }

  .personal-nav-links li a,
  .personal-nav-item-toggle {
    width: 100%;
    border-radius: 0;
    padding: 0.8rem 2rem;
    text-align: left;
    justify-content: flex-start;
  }

  .personal-nav-links li a:hover,
  .personal-nav-item-toggle:hover {
    background-color: var(--main-color);
    transform: none;
  }

  .personal-nav-submenu {
    position: static;
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 0;
    margin: 0;
    box-shadow: none;
    transform: none;
    transition: all 0.3s ease;
  }

  .personal-nav-submenu.active {
    opacity: 1;
    visibility: visible;
    max-height: 300px;
  }

  .personal-nav-submenu li a {
    padding-left: 3rem;
    font-size: 0.85rem;
  }

  .personal-nav-submenu li a:hover {
    padding-left: 3.5rem;
  }
}

/* =========== Animations =========== */

@keyframes personalSlideDown {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes personalFadeInItem {
  0% {
    opacity: 0;
    transform: translateX(-15px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* CUSTOM MODAL */

/* Modal custom */
.custom-modal {
  background: #fff;
  border: 1px solid var(--main-light);
  color: var(--dark-text);
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial;
}

/* Header */
.custom-modal .modal-header {
  background: linear-gradient(90deg, var(--main-light), var(--main-color));
  color: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.custom-modal .modal-title {
  color: #fff;
  font-weight: 600;
}

/* Body list */
.summary-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}
.summary-list li {
  background: #fff;
  border-left: 4px solid var(--main-color);
  padding: 0.85rem 1rem;
  border-radius: 6px;
  color: var(--book-body-color);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  line-height: 1.35;
  font-size: 0.98rem;
}
.summary-list li strong {
  color: var(--title-color);
}

/* Special items */
.summary-list li.warning {
  border-left-color: var(--accent);
  background: linear-gradient(180deg, #fff, #fffaf2);
}
.summary-list li.enforcement {
  border-left-color: var(--main-dark);
  background: linear-gradient(180deg, #fff, #fff5f0);
  color: var(--dark-text);
}

/* Footer buttons */
.custom-modal .modal-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: transparent;
}
.custom-modal .btn-primary {
  background-color: var(--main-color);
  border-color: var(--main-color);
}
.custom-modal .btn-primary:hover,
.custom-modal .btn-primary:focus {
  background-color: var(--btn-hover-color);
  border-color: var(--btn-hover-color);
  box-shadow: none;
}
.custom-modal .btn-outline-secondary {
  color: var(--dark-text);
  border-color: rgba(0, 0, 0, 0.06);
}

/* Responsive tweaks */
@media (max-width: 576px) {
  .modal-dialog {
    margin: 1rem;
  }
  .summary-list li {
    font-size: 0.95rem;
    padding: 0.7rem;
  }
}

.page-container {
  max-width: 920px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--main-light);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}
.page-header {
  padding: 1.25rem 1.5rem;
  background: linear-gradient(90deg, var(--main-light), var(--main-color));
  color: #fff;
}
.page-body {
  padding: 1.25rem 1.5rem;
}

.lead {
  color: #fff;
  opacity: 0.95;
  font-size: 0.95rem;
}

.section h3 {
  color: var(--title-color);
  margin-bottom: 0.5rem;
}

.text-white {
  font-size: large;
  font-family: "Poppins", sans-serif;
  color: #fff !important;
}

.custom-card {
  border: 1px solid #f0ece6;
  border-left: 4px solid var(--main-color);
  padding: 0.9rem;
  border-radius: 6px;
  background: #fff;
  color: var(--book-body-color);
}
.custom-card.warn {
  border-left-color: var(--accent);
  background: linear-gradient(180deg, #fff, #fffaf2);
}
.custom-card.illegal {
  border-left-color: var(--main-dark);
  background: linear-gradient(180deg, #fff, #fff5f0);
}
ul.bullets {
  padding-left: 1.1rem;
  margin: 0;
}
ul.bullets li {
  margin-bottom: 0.6rem;
  line-height: 1.35;
}
.cta {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}
.btn-primary {
  background-color: var(--main-color);
  border-color: var(--main-color);
  color: #fff;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
}
.btn-outline-secondary {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: var(--dark-text);
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
}
.btn-primary:hover {
  background-color: var(--btn-hover-color);
  border-color: var(--btn-hover-color);
}

/* Banner */
#cookie-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  /* Sfondo pieno e non trasparente per miglior contrasto */
  background: var(--bg-light, #fff);
  color: var(--dark-text);
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  z-index: 9999;
  font-family: system-ui, Arial;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18); /* più evidente */
  border-left: 6px solid var(--main-color);
  /* rimuovo eventuale trasparenza */
  opacity: 1;
}
#cookie-banner p {
  margin: 0;
  font-size: 14px;
  flex: 1;
  color: var(--dark-text);
}
#cookie-banner a {
  color: var(--main-color);
  text-decoration: underline;
}
#cookie-banner button {
  background: var(--main-color);
  color: #fff;
  border: 0;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
}
#cookie-banner button.secondary {
  background: transparent;
  color: var(--dark-text);
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-weight: 600;
}
@media (max-width: 600px) {
  #cookie-banner {
    flex-direction: column;
    align-items: stretch;
    left: 8px;
    right: 8px;
    bottom: 8px;
    padding: 12px;
  }
  #cookie-actions {
    justify-content: flex-end;
  }
}

/* ========= SPINNER =========== */

#loadingSpinner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(90, 68, 38, 0.7); /* --main-dark con trasparenza */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(2px);
}

.spinner {
  border: 5px solid rgba(212, 165, 116, 0.3); /* --accent con trasparenza */
  border-top: 5px solid var(--accent); /* --accent */
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

#loadingSpinner p {
  color: var(--accent);
  margin-top: 20px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.5px;
}


@media (max-width: 567px) {
  #foooter_col_1 {
    order: 1;
  }
  #foooter_col_2 {
    order: 3;
  }
  #foooter_col_3 {
    order: 2;
  }
}



/* ==================== CARD DI SELEZIONE DEL TIPO DI INSERZIONE =================== */

  .media-card {
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid #e8dfd5;
    text-decoration: none;
    color: inherit;
    display: block;
    padding: 2rem;
    border-radius: 8px;
    height: 100%;
    background-color: var(--bg-light);
}

.media-card:hover {
    border-color: var(--main-color);
    box-shadow: 0 4px 12px rgba(125, 97, 54, 0.15);
    transform: translateY(-4px);
    background-color: var(--full-white);
}

.media-card i {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.media-card h3 {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--title-color);
}

.media-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
}


/* ====================  FINE CARD DI SELEZIONE DEL TIPO DI INSERZIONE =================== */

