/* =========================================================
   PI.MEL SRLS — STYLE.CSS UNICO
   Tutte le pagine del sito condividono questo unico foglio.
   ========================================================= */

/* ===== RESET / BASE ===== */

*,
*::before,
*::after {
  box-sizing: border-box;
  /* FIX: senza box-sizing:border-box, elementi con width:100% + padding
     (es. .contatto-card, .catalogo-card su mobile) sforano la larghezza
     del contenitore e causano lo scroll orizzontale visto sul sito. */
}

html {
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  background-color: #f5ebe0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  overflow-x: hidden; /* rete di sicurezza extra contro overflow orizzontali */
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

a:link,
a:visited,
a:hover,
a:active {
  color: #2f2483;
  text-decoration: none;
  border-right: 1px solid #2f2483;
  padding-right: clamp(0.5rem, 2.5vw, 5rem);
  padding-left: clamp(0.5rem, 2.5vw, 5rem);
}

a.logo-link:link,
a.logo-link:visited,
a.logo-link:hover,
a.logo-link:active,
.logo-link {
  border-right: none;
  padding: 0;
}

#no-border {
  border-right: none;
}

/* ===== HEADER / NAV (tutte le pagine) ===== */

header {
  display: flex;
  justify-content: center;
}

.inner-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 80%;
  color: #2f2483;
  padding: 1.5rem 0;
  margin-bottom: 2rem;
}

.inner-header img {
  width: clamp(100px, 12vw, 180px);
  height: auto;
}

.inner-header .logo-link {
  border-right: none;
  padding: 0;
}

.menu {
  display: flex;
  align-items: center;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(0.9rem, 1.3vw, 1.1rem);
}

/* ── DROPDOWN ── */

.dropdown {
  position: relative;
}

.submenu {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #f5ebe0;
  min-width: 160px;
  border: 1px solid #2f2483;
  padding: 0;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.submenu li {
  border-bottom: 1px solid rgba(47, 36, 131, 0.2);
}

.submenu li:last-child {
  border-bottom: none;
}

.submenu li a {
  border-right: none;
  padding: 0.65rem 1.2rem;
  display: block;
  text-align: left;
  font-size: clamp(0.8rem, 1vw, 1rem);
  transition: background-color 0.2s ease, padding-left 0.2s ease;
}

.submenu li a:hover {
  background-color: rgba(47, 36, 131, 0.08);
  padding-left: 1.6rem;
}

.dropdown:hover .submenu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

/* ===== HERO (HOME) ===== */

.hero {
  position: relative;
  overflow: hidden;
}

.hero img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-text {
  position: absolute;
  left: 1%;
  top: 50%;
  transform: translateY(-50%);
  width: 30%;
  text-align: center;
}

.hero-text h2 {
  font-family: "Life Savers", serif;
  font-size: clamp(1.4rem, 2.5vw, 2.2rem);
  text-align: center;
  color: #2f2483;
  margin: 0 0 2rem 0;
  font-weight: 800;
}

.hero-text p {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(0.75rem, 1vw, 0.95rem);
  font-weight: 500;
  color: #2f2483;
  line-height: 1.7;
  margin: 0;
}

/* ===== LOGO IAM4U (HOME) ===== */

.iam4u {
  display: flex;
  justify-content: center;
  padding: 3rem 0 0 0;
}

.iam4u img {
  max-width: 400px;
  height: auto;
  margin-left: 5%;
}

/* ===== ESCLUSIVA (HOME) ===== */

.esclusiva {
  text-align: center;
  padding: 1.5rem 0 0 0;
}

.esclusiva p {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #1a1a1a;
  margin: 0;
}

/* ===== PARTNERS INTRO (PAGINA PARTNERS) ===== */

.partners-intro {
  text-align: center;
  padding: 2.5rem 0 0 0;
}

.partners-intro h1 {
  font-family: "Life Savers", serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  color: #2f2483;
  margin: 0;
}

.partners-page-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-grow: 1;
  min-height: calc(100vh - 200px);
}

/* ===== PARTNERS LOGOS (HOME + PAGINA PARTNERS) ===== */

.partners {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 3rem;
  padding: 0 1rem;
}

.partners img {
  max-width: 200px;
  max-height: 100px;
  object-fit: contain;
  padding: 1.5em;
}

/* ===== FOOTER (tutte le pagine) ===== */

footer {
  background-color: #d5bcaa;
  display: flex;
  justify-content: center;
  margin-top: auto;
}

.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 60%;
  padding: 20px 0;
}

.foot img {
  max-width: 160px;
  height: auto;
}

.foot div {
  display: flex;
  gap: 48px;
  align-items: center;
}

.foot p {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(0.7rem, 1vw, 0.85rem);
  color: #2f2483;
}

/* ===== PAGINA CONTATTI ===== */

.contatti-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 40px 120px;
}

.contatti-title {
  font-family: "Life Savers", serif;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  color: #2f2483;
  margin-bottom: 60px;
  text-align: center;
  letter-spacing: 0.02em;
}

.contatti-wrapper {
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.contatti-sede {
  text-align: center;
}

.contatti-sede h2 {
  font-family: "Life Savers", serif;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: #2f2483;
  margin-bottom: 12px;
}

.contatti-sede p {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  color: #3a3a3a;
  line-height: 1.8;
}

.contatti-persone {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.contatto-card {
  background-color: #2f2483;
  border-radius: 12px;
  padding: 40px 48px;
  text-align: center;
  min-width: 240px;
  flex: 1;
  max-width: 380px;
  transition: background-color 0.25s;
}

.contatto-card:hover {
  background-color: #1e1660;
}

.contatto-card h2 {
  font-family: "Life Savers", serif;
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  color: #d5bcaa;
  margin-bottom: 8px;
}

.contatto-ruolo {
  font-family: "Montserrat", sans-serif;
  font-size: 0.85rem;
  color: #d5bcaa;
  margin-bottom: 20px;
}

.contatto-tel,
.contatto-tel:link,
.contatto-tel:visited,
.contatto-tel:active {
  display: inline-block;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 700;
  color: #d5bcaa;
  text-decoration: none;
  border-right: none;
  padding: 0;
  transition: color 0.2s;
}

.contatto-tel:hover {
  color: #d5bcaa;
}

/* ===== PAGINE BRAND (Togethair / Ceriotti / Sinergy / Bakù) — condivise ===== */

.brand-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 40px 120px;
}

.brand-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
}

.brand-logo {
  max-width: 280px; /* valore di default: Ceriotti, Sinergy, Bakù */
  height: auto;
}

.brand-tagline {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(0.75rem, 1.2vw, 0.95rem);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #7a7a7a;
  margin: 0;
}

.brand-description {
  max-width: 680px;
  margin: 0 auto 72px;
  text-align: center;
}

.brand-description p {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(0.9rem, 1.2vw, 1.05rem);
  color: #3a3a3a;
  line-height: 1.9;
  margin: 0;
}

.cataloghi-title {
  font-family: "Life Savers", serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: #2f2483;
  text-align: center;
  margin-bottom: 48px;
}

.cataloghi-grid {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.catalogo-card {
  background-color: #ffffff;
  border: 1px solid #d5bcaa;
  border-radius: 12px;
  padding: 48px 40px;
  text-align: center;
  max-width: 340px; /* valore di default: Togethair, Ceriotti, Sinergy */
  flex: 1;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  transition: box-shadow 0.25s, transform 0.25s;
}

.catalogo-card:hover {
  box-shadow: 0 8px 32px rgba(47, 36, 131, 0.12);
  transform: translateY(-4px);
}

.catalogo-icon {
  width: 64px;
  height: 64px;
}

.catalogo-icon svg {
  width: 100%;
  height: 100%;
}

.catalogo-card h3 {
  font-family: "Life Savers", serif;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: #2f2483;
  margin: 0;
}

.catalogo-card p {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(0.8rem, 1vw, 0.9rem);
  color: #5a5a5a;
  line-height: 1.7;
  margin: 0;
  flex: 1;
}

.btn-download,
.btn-download:link,
.btn-download:visited,
.btn-download:active {
  display: inline-block;
  margin-top: 8px;
  padding: 12px 32px;
  background-color: #2f2483;
  color: #f5ebe0;
  font-family: "Montserrat", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 6px;
  border-right: none;
  transition: background-color 0.2s, color 0.2s;
}

.btn-download:hover {
  background-color: #1e1660;
  color: #ffffff;
}

/* --- Override specifici per singola pagina brand --- */

body.page-togethair .brand-logo {
  max-width: 320px;
}

body.page-baku .catalogo-card {
  max-width: 380px;
}

/* ===== PAGINA IAM4U — sezioni prodotto ===== */

.prodotti-iam4u {
  width: 80%;
  margin: 0 auto;
  padding: 3rem 0;
  display: flex;
  flex-direction: column;
  gap: 5rem;
}

.prodotto {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(3rem, 8vw, 15rem);
}

.prodotto-invertito {
  flex-direction: row-reverse;
}

.prodotto-img {
  flex: 0 0 440px;
  max-width: 440px;
}

.prodotto-img img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

.prodotto-testo {
  flex: 1;
  max-width: 500px;
}

.prodotto-testo h2 {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  font-weight: 800;
  color: #2f2483;
  margin: 0 0 1.5rem 0;
}

.prodotto-testo h3 {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(0.9rem, 1.2vw, 1.1rem);
  font-weight: 700;
  color: #2f2483;
  margin: 0 0 1rem 0;
}

.titolo-luce {
  color: #c49a8a !important;
}

.prodotto-testo p {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(0.8rem, 1vw, 0.95rem);
  color: #2f2483;
  line-height: 1.7;
  margin: 0 0 1rem 0;
}

.prodotto-nuance {
  font-style: italic;
  font-weight: 400;
  color: #2f2483;
  margin-bottom: 1rem;
}

.prodotto-formato {
  font-size: clamp(0.75rem, 0.9vw, 0.85rem);
  color: #2f2483;
  margin-left: 1rem;
}

.prodotto-testo ul {
  margin: 0 0 1rem 1.2rem;
  padding: 0;
  list-style: disc;
}

.prodotto-testo ul li {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(0.8rem, 1vw, 0.95rem);
  color: #2f2483;
  line-height: 1.7;
}

/* UP — layout speciale a piena larghezza */

.prodotto-up {
  flex-direction: column;
  gap: 2rem;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  /* FIX: era "calc(-10%)", valore sbagliato che non centra un elemento
     100vw quando il genitore è già centrato con margin:auto. La formula
     corretta -50vw + 50% compensa esattamente lo scarto tra viewport e
     contenitore, evitando overflow orizzontale su questa sezione. */
}

.prodotto-img-wide img {
  width: 100%;
  height: auto;
  display: block;
}

.prodotto-testo-up {
  display: flex;
  gap: 4rem;
  padding: 0 5%;
}

.up-col {
  flex: 1;
}

/* =========================================================
   MEDIA QUERIES
   ========================================================= */

@media (max-width: 1024px) {
  .hero-text {
    width: 42%;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  /* --- Header / nav --- */
  .inner-header {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
  }

  .inner-header img {
    width: clamp(80px, 25vw, 140px);
  }

  .menu {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  a:link,
  a:visited,
  a:hover,
  a:active {
    padding-right: clamp(0.3rem, 3vw, 1rem);
    padding-left: clamp(0.3rem, 3vw, 1rem);
    font-size: 0.85rem;
    border-right: none;
  }

  /* --- Hero (home) --- */
  .hero {
    display: flex;
    flex-direction: column;
  }

  .hero-text {
    position: static;
    transform: none;
    width: 90%;
    margin: 2rem auto 0 auto;
    text-align: center;
  }

  .hero-text h2 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
  }

  .hero-text p {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  /* --- Iam4u logo (home) --- */
  .iam4u {
    padding: 2rem 0 0 0;
  }

  .iam4u img {
    max-width: 250px;
    margin-left: 0;
  }

  /* --- Partners logos --- */
  .partners {
    flex-direction: column;
    align-items: center;
  }

  .partners img {
    max-width: 140px;
    max-height: 70px;
  }

  /* --- Footer --- */
  .foot {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 20px;
    width: 90%;
    text-align: center;
  }

  .foot div {
    flex-direction: column;
    gap: 6px;
  }

  /* --- Contatti --- */
  .contatti-main {
    padding: 60px 24px 80px;
  }

  .contatti-persone {
    flex-direction: column;
    align-items: center;
  }

  .contatto-card {
    width: 100%;
    max-width: 100%;
  }

  /* --- Pagine brand --- */
  .brand-main {
    padding: 40px 24px 80px;
  }

  .cataloghi-grid {
    flex-direction: column;
    align-items: center;
  }

  .catalogo-card {
    width: 100%;
    max-width: 100%;
  }

  .brand-logo {
    max-width: 200px; /* default: Ceriotti, Sinergy, Bakù */
  }

  body.page-togethair .brand-logo {
    max-width: 220px;
  }

  /* --- Iam4u prodotti --- */
  .prodotti-iam4u {
    width: 90%;
  }

  .prodotto,
  .prodotto-invertito {
    flex-direction: column;
    gap: 2rem;
  }

  .prodotto-img {
    flex: none;
    width: 100%;
    max-width: 100%;
  }

  .prodotto-up {
    width: 100%;
    margin-left: 0;
  }

  .prodotto-testo-up {
    flex-direction: column;
    gap: 1.5rem;
    padding: 0;
  }
}

@media (max-width: 480px) {
  .hero-text {
    width: 92%;
    margin-top: 1.5rem;
  }

  .hero-text h2 {
    font-size: 1.2rem;
  }

  .hero-text p {
    font-size: 0.85rem;
    line-height: 1.5;
  }

  .iam4u img {
    max-width: 180px;
  }

  .partners img {
    max-width: 110px;
    max-height: 55px;
  }

  .menu {
    font-size: 0.8rem;
  }

  .contatti-main {
    padding: 40px 16px 60px;
  }

  .brand-main {
    padding: 32px 16px 60px;
  }
}

/* ===== ICONA INSTAGRAM (NAV + FOOTER, tutte le pagine) ===== */

.instagram-menu-item {
  display: flex;
  align-items: center;
}

.instagram-link,
.instagram-link:link,
.instagram-link:visited,
.instagram-link:hover,
.instagram-link:active {
  display: inline-flex;
  align-items: center;
  border-right: none;
  padding: 0;
  margin-left: 0.75rem;
  color: #2f2483;
  transition: color 0.2s ease, transform 0.2s ease;
}

.instagram-link:hover {
  color: #d5bcaa;
  transform: scale(1.1);
}

.instagram-link svg {
  width: 20px;
  height: 20px;
  display: block;
}

.footer-instagram {
  margin-left: 0;
}

.footer-instagram svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 768px) {
  .instagram-link {
    margin-left: 0.5rem;
  }
}

/* ===== LINK PRIVACY / COOKIE POLICY (FOOTER, tutte le pagine) ===== */

.iubenda-links {
  margin: 0 !important;
}

.iubenda-links a.iubenda-white {
  border-right: none !important;
  padding: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  color: #2f2483 !important;
  text-decoration: underline !important;
  font-weight: 700 !important;
  font-family: "Montserrat", sans-serif !important;
  font-size: clamp(0.7rem, 1vw, 0.85rem) !important;
}

.iubenda-links a.iubenda-white:hover {
  color: #1e1660 !important;
}
