/*=========================
      MEGA MENU STYLES  
==========================*/
.eventiMegamenu img {
  aspect-ratio: 1 / 1.1;
  width: 100%;
  object-fit: cover;
}

.eventiMegamenu figcaption {
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.2;
    text-align: center;
    background-color: #000;
    color: #fff;
    padding: 0.375rem 0.1875rem;
    min-height: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
  bottom: .1px;
  left: .1px;
  right: .1px;
}



/* === NAVBAR === */
.navbar-with-mega .navbar-mega {
  /*background-color: #e0e0fa;*/

  /*box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);*/
  position: relative;
  z-index: 1000;
  padding-top: 0;
  padding-bottom: 0;
 /* border-bottom: 1px solid #000;*/
}

body.homepage .navbar-with-mega .navbar-mega {
  
    border-bottom: none;
}

/* Centra le voci di menu */
.navbar-with-mega .navbar-mega .navbar-nav {
  margin: 0 auto;
}

.navbar-with-mega .navbar-nav .nav-link {
  padding: 1rem 1.25rem;
  padding: 0.75rem 1.25rem;
  color: #000;
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 0.375rem;
}

.navbar-with-mega .navbar-nav .nav-link:hover,
.navbar-with-mega .navbar-nav .nav-item.active .nav-link {
  color: #000;
}

/* Chevron verso il basso per voci con mega menu */
.navbar-with-mega .navbar-nav .nav-item[data-mega] .nav-link::after {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23474747'%3e%3cpath d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

/* Ruota il chevron verso l'alto quando il menu è aperto */
.navbar-with-mega .navbar-nav li.active[data-mega] .nav-link::after {
  transform: rotate(-180deg);
}

/* Cambia colore chevron all'hover */
.navbar-with-mega .navbar-nav .nav-item[data-mega] .nav-link:hover::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23474747'%3e%3cpath d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* === MEGA MENU STRUCTURE === */
.navbar-with-mega .mega-menu-wrapper {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;
  
  display: none;
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  /*ombra e bg per effetto tutto schermo*/
  box-shadow: 0 4px 12px -4px rgba(0,0,0,0.18);
  background-color: #e0e0fa;

}

.navbar-with-mega .mega-menu-wrapper.show {
  display: block;
  animation: fadeIn 0.3s ease-in-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Wrapper per contenere navbar e mega menu */
.navbar-with-mega {
  position: relative;
}

.navbar-with-mega .mega-menu-container {
  margin: 0 auto;
  background: #e0e0fa;
  padding: 1rem 0 2.5rem 0;
  position: relative;
  /*max-width: 1140px; /* container-xl width */
  max-width: 992px; /* container-lg width */
  transform: scale(0.95);
  transition: transform 0.3s ease-in-out;

  /*ombra per effetto stretto
  box-shadow: 0 4px 12px -4px rgba(0,0,0,0.18);*/
}

.navbar-with-mega .mega-menu-wrapper.show .mega-menu-container {
  transform: scale(1);
}

/* Rimuovi i breakpoint custom precedenti */

.navbar-with-mega .mega-menu-content {
  padding: 0 2rem;
  
}

/* === CLOSE BUTTON === */
.navbar-with-mega .mega-menu-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  font-size: 1.75rem;
  color: #000;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s ease;
  z-index: 10;
  width: 32px;
  height: 32px;
}

.navbar-with-mega .mega-menu-close:hover {
  color: #000;
}

/* === STILI COMUNI === */
.navbar-with-mega .mega-menu-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #000;
 /* margin-bottom: 1.25rem;
  padding-bottom: 0.625rem;
  border-bottom: 2px solid #474747;*/
  letter-spacing: 0.5px;
}

.navbar-with-mega .mega-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.navbar-with-mega .mega-menu-list li {
  margin-bottom: 0.625rem;
  margin-bottom:0;
}

.navbar-with-mega .mega-menu-list a {
  color: #000;
  text-decoration: none;
  display: block;
  padding: 0.375rem 0 0 0;
  transition: all 0.2s ease;
  font-size: 0.9375rem;
}

.navbar-with-mega .mega-menu-list a:hover {
  color: #000;
  /*padding-left: 0.5rem;*/
  text-decoration: underline;
}

/* === MENU CATALOGO === */
.navbar-with-mega .menu-column.macrosettori {
  border-right: 1px solid #e9ecef;
  padding-right: 2rem;
}

.navbar-with-mega .menu-column.novita,
.navbar-with-mega .menu-column.classifiche {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.navbar-with-mega .promo-banner {
  margin-top: 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 0;
  overflow: hidden;
  position: relative;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.navbar-with-mega .promo-banner:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.navbar-with-mega .promo-banner-content h4 {
  font-size: 1.375rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.navbar-with-mega .promo-banner-content p {
  margin: 0;
  font-size: 0.9375rem;
  opacity: 0.95;
}

/* === MENU SERVIZI === */
.navbar-with-mega .menu-column.clienti,
.navbar-with-mega .menu-column.libreria {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.navbar-with-mega .menu-column.clienti:not(:last-child),
.navbar-with-mega .menu-column.libreria:not(:last-child),
.navbar-with-mega .menu-column.assistenza:not(:last-child),
.navbar-with-mega .menu-column:not(:last-child) {
  border-right: 1px solid #000;
}

/* === MENU EVENTI === */
.navbar-with-mega .eventi-carousel {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid #000;
}

.navbar-with-mega .swiper {
  width: 100%;
  padding: 1rem 0 2.5rem 0;
}

.navbar-with-mega .evento-card {
  background: #fff;
  border: 1px solid #000;
  border-radius: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  height: 100%;
}

.navbar-with-mega .evento-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

.navbar-with-mega .evento-img {
  width: 100%;
  height: 150px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2.5rem;
}

.navbar-with-mega .evento-content {
  padding: 1rem;
}

.navbar-with-mega .evento-title {
  font-size: 1rem;
  font-weight: 600;
  color: #000;
  margin-bottom: 0.5rem;
}

.navbar-with-mega .evento-date {
  font-size: 0.8125rem;
  color: #000;
  margin-bottom: 0.5rem;
}

.navbar-with-mega .evento-desc {
  font-size: 0.875rem;
  color: #000;
  margin: 0;
  line-height: 1.4;
}

.navbar-with-mega .eventi-archivio .mega-menu-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}

.navbar-with-mega .eventi-archivio .mega-menu-list li {
  margin-bottom: 0;
}

/* === MENU CHI SIAMO === */
.navbar-with-mega .chi-siamo-banner {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.navbar-with-mega .chi-siamo-banner::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.navbar-with-mega .chi-siamo-banner::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.navbar-with-mega .chi-siamo-banner-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1rem;
}

.navbar-with-mega .chi-siamo-banner h3 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.navbar-with-mega .chi-siamo-banner p {
  margin: 0;
  font-size: 1.125rem;
  opacity: 0.95;
}

.navbar-with-mega .chi-siamo-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

.navbar-with-mega .chi-siamo-link-card {
  padding: 1.75rem 1.5rem;
  background: #f8f9fa;
  border-radius: 0;
  text-decoration: none;
  color: #000;
  transition: all 0.3s ease;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.navbar-with-mega .chi-siamo-link-card:hover {
  background: #000;
  color: #fff;
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(71, 71, 71, 0.25);
  text-decoration: none;
}

.navbar-with-mega .chi-siamo-link-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.navbar-with-mega .chi-siamo-link-title {
  font-weight: 600;
  font-size: 1rem;
  margin: 0;
}

/* === SWIPER CUSTOMIZATION === */
.navbar-with-mega .swiper-button-next,
.navbar-with-mega .swiper-button-prev {
  color: #007bff;
  width: 40px;
  height: 40px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.navbar-with-mega .swiper-button-next::after,
.navbar-with-mega .swiper-button-prev::after {
  font-size: 1.125rem;
  font-weight: 700;
}

.navbar-with-mega .swiper-pagination-bullet {
  background: #000;
  opacity: 0.5;
}

.navbar-with-mega .swiper-pagination-bullet-active {
  opacity: 1;
}

/* === RESPONSIVE === */
@media (max-width: 991.98px) {
  .navbar-with-mega,
  .navbar-mega {
    display: none !important;
  }
  .navbar-with-mega .mega-menu-wrapper {
    position: static;
    background: transparent;
  }

  .navbar-with-mega .mega-menu-container {
    max-width: 100%;
    box-shadow: none;
    padding: 1rem 0;
  }

  .navbar-with-mega .mega-menu-content {
    padding: 0 1rem;
  }

  .navbar-with-mega .menu-column.macrosettori,
  .navbar-with-mega .menu-column.novita,
  .navbar-with-mega .menu-column.classifiche,
  .navbar-with-mega .menu-column.clienti,
  .navbar-with-mega .menu-column.libreria,
  .navbar-with-mega .menu-column.assistenza,
  .navbar-with-mega .menu-column{
    padding-left: 0;
    padding-right: 0;
    margin-bottom: 2rem;
    border-right: none;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 1.5rem;
  }

  .navbar-with-mega .promo-banner {
    margin-top: 1rem;
    height: 120px;
  }

  .navbar-with-mega .chi-siamo-banner {
    height: 150px;
  }

  .navbar-with-mega .chi-siamo-links {
    grid-template-columns: 1fr;
  }

  .navbar-with-mega .eventi-archivio .mega-menu-list {
    grid-template-columns: 1fr;
  }
}

/*=========================
  NASCONDI MENU SU MOBILE
  (Rimuovi i commenti per attivare)
==========================*/

/* Extra small devices (phones, less than 576px) */
/* @media (max-width: 575.98px) {
  .navbar-with-mega,
  .navbar-mega {
    display: none !important;
  }
} */

/* Small devices (landscape phones, less than 768px) */
/* @media (max-width: 767.98px) {
  .navbar-with-mega,
  .navbar-mega {
    display: none !important;
  }
} */

/* Medium devices (tablets, less than 992px) */
@media (max-width: 991.98px) {
  .navbar-with-mega,
  .navbar-mega {
    display: none !important;
  }
} /**/

/* Large devices (desktops, less than 1200px) */
/* @media (max-width: 1199.98px) {
  .navbar-with-mega,
  .navbar-mega {
    display: none !important;
  }
} */

/* Extra large devices (large desktops, less than 1400px) */
/* @media (max-width: 1399.98px) {
  .navbar-with-mega,
  .navbar-mega {
    display: none !important;
  }
} */
