/* Reset + base */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; scroll-behavior: smooth; }
body {
  background: #111;
  color: #f0f0f0;
  font-family: "Josefin Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.6;
  transition: background 0.4s, color 0.4s;
}
a { color: inherit; text-decoration: none; }
a:focus { outline: 2px dashed rgba(255,255,255,0.35); outline-offset: 2px; }

/* NAVBAR */
nav {
  position: fixed;
  width: 95%;
  max-width: 1200px;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.9);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1.5rem;
  border-radius: 12px;
  z-index: 1000;
  transition: all 0.4s ease;
}
nav.scrolled {
  background: rgba(0,0,0,0.95);
  padding: 0.5rem 1.2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
nav .logo { display: flex; align-items: center; padding-top: 5px; gap: 8px; font-weight: 600; }
#nav-logo { width: 20px; height: auto; margin-top: 2px; transition: transform 0.3s; }
#nav-logo:hover { transform: scale(1.05); }
nav ul { list-style: none; display: flex; gap: 1.6rem; }
nav ul li a { font-weight: 700; opacity: 0.95; transition: opacity 0.25s, color 0.25s; }
nav ul li a:hover { opacity: 1; color: #cfcfcf; }

/* Hamburger (mobile) */
.menu-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.menu-toggle div { width: 25px; height: 3px; background: #f0f0f0; border-radius: 2px; transition: all 0.3s; }
#menu { display: flex; flex-direction: row; }

/* HEADER SERVIZIO */
.service-header {
  background: linear-gradient(to bottom, #222, #111);
  padding-top: 7.5rem;
  padding-bottom: 3rem;
  text-align: center;
}
.service-header-inner { max-width: 1000px; margin: 0 auto; padding: 0 1.5rem; }
.service-header h1 {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: clamp(1.9rem, 3vw, 2.6rem); margin-bottom: 0.8rem; font-weight: 600;
}
.h-icon { width: 28px; height: 28px; filter: brightness(0) invert(1); }
.service-header p { max-width: 760px; margin: 0 auto; color: #d9d9d9; font-size: clamp(1rem, 1.4vw, 1.15rem); }

/* CONTENUTO */
.service-content { background: linear-gradient(to bottom, #111, #1a1a1a); padding: 2.2rem 1.5rem 3rem; }
.service-content > * { max-width: 1000px; margin: 0 auto 1.6rem; }

/* Card */
.service-block {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.8rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.service-block:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.12); transform: translateY(-2px); }
.service-block h2 {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.5rem; margin-bottom: 1rem; font-weight: 600;
}
.b-icon { width: 24px; height: 24px; filter: brightness(0) invert(1); }

.service-list { list-style: none; padding: 0; margin: 0; }
.service-list li { display: flex; align-items: center; gap: 10px; padding: 0.45rem 0; font-size: 1.05rem; }
.service-list li img { width: 20px; height: 20px; filter: brightness(0) invert(1); }
.note-wp { margin-top: 0.6rem; color: #d9d9d9; font-size: 0.95rem; }

/* Servizi offerti (più compatta e centrata) */
.services-offerti .services-inner { max-width: 820px; margin: 0.25rem auto 0; }
.services-offerti .services-cols {
  display: grid; grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 0 2rem; justify-content: center; align-items: start;
}

/* TECNOLOGIE (rotatore) */
.tech-rotator { position: relative; height: 190px; overflow: hidden; display: grid; place-items: center; }
.tech-item {
  position: absolute; inset: 0; opacity: 0; transform: translateY(8px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  display: grid; place-items: center; text-align: center; padding: 0 1rem;
}
.tech-item.active { opacity: 1; transform: translateY(0); }
.tech-item img.affinity { width: 64px; height: auto; display: block; background: transparent !important; }
.tech-item h3 { font-size: 1.12rem; margin-bottom: 0.15rem; font-weight: 600; }
.tech-item p { color: #d9d9d9; font-size: 0.98rem; }
.tech-dots { display: flex; justify-content: center; gap: 8px; margin-top: 0.6rem; }
.tech-dots button {
  width: 10px; height: 10px; border: none; border-radius: 50%;
  background: rgba(255,255,255,0.35); cursor: pointer; transition: transform 0.2s, background 0.2s;
}
.tech-dots button.active { background: #fff; transform: scale(1.1); }

/* BIGLIETTI: slider */
.bc-slider { position: relative; }
.bc-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.6); color: #fff; border: none;
  font-size: 1.8rem; line-height: 1;
  padding: 0.5rem 0.9rem; border-radius: 50%;
  cursor: pointer; z-index: 5; transition: background 0.3s, transform 0.3s;
}
.bc-arrow:hover { background: rgba(255,255,255,0.2); transform: translateY(-50%) scale(1.12); }
.bc-prev { left: -52px; }
.bc-next { right: -52px; }

/* 🔧 Fix frecce in responsive */
@media (max-width: 768px) {
  .bc-prev { left: 8px; }
  .bc-next { right: 8px; }
  .bc-arrow { font-size: 1.5rem; padding: 0.4rem 0.7rem; }
}

/* Mobile: frecce centrate lateralmente alla card */
@media (max-width: 520px) {
  .bc-arrow {
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.6);
    font-size: 1.4rem;
    padding: 0.35rem 0.6rem;
  }

  .bc-prev { left: 4px; }   /* più vicine al bordo interno */
  .bc-next { right: 4px; }
}

/* Ancora più stretto (telefono piccolo) */
@media (max-width: 360px) {
  .bc-prev { left: 2px; }
  .bc-next { right: 2px; }
}




.bc-stage { position: relative; width: 100%; min-height: clamp(260px, 34vw, 420px); }
.bc-card {
  position: absolute; inset: 0; width: 100%; opacity: 0;
  transform: translateY(28px) scale(0.985);
  transition: opacity 0.8s ease, transform 0.8s ease;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px; padding: 1.2rem 1.2rem 1.3rem;
  text-align: center; box-shadow: 0 6px 24px rgba(0,0,0,0.4); backdrop-filter: blur(6px);
  display: grid; place-items: center;
}
.bc-card.active { opacity: 1; transform: translateY(0) scale(1); z-index: 2; }

.bc-figure { width: 100%; max-width: 980px; margin: 0 auto; position: relative; display: grid; place-items: center; }

/* ==== biglietto: adattamento preciso 1000x600 (≈ 5:3) all'interno della card ==== */
.bc-figure .thumb-wrap {
  --card-aspect: 5/3;                   /* rapporto 1000x600 */
  width: clamp(320px, 65%, 880px);      /* <- stretto leggermente per stare più dentro */
  aspect-ratio: var(--card-aspect);
  border-radius: 12px;
  overflow: hidden;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.02);
  box-shadow: 0 8px 28px rgba(0,0,0,0.45) inset, 0 8px 28px rgba(0,0,0,0.35);
}
.bc-figure .thumb {
  width: 100%; height: 100%;
  object-fit: contain;                  /* no crop, proporzioni integre */
  display: block;
  border-radius: 10px;
}
.bc-figure figcaption { color: #d9d9d9; font-size: 0.95rem; margin-top: 0.55rem; }

/* Overlay “mouse che clicca” */
.click-overlay {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  opacity: 0; transition: opacity 0.25s ease; pointer-events: none;
}
.bc-card:hover .click-overlay, .bc-card:focus .click-overlay { opacity: 1; }
.click-overlay::before {
  content: ""; width: 56px; height: 56px; border-radius: 50%;
  background: rgba(0,0,0,0.55); box-shadow: 0 6px 18px rgba(0,0,0,0.45);
  display: block; position: relative;
}
.click-overlay::after {
  content: "";
  position: absolute; width: 22px; height: 22px;
  background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'>\
<path d='M9 2h3a4 4 0 0 1 4 4v5h-7V6a4 4 0 0 1 0-4z' opacity='.9'/>\
<path d='M9 12h7v4a4 4 0 0 1-4 4h-3v-8z' opacity='.9'/>\
<path d='M19.5 11.5l3.2 3.2-1.4 1.4-3.2-3.2v2.1h-2V10h5.1v1.5z'/>\
</svg>");
  background-repeat: no-repeat; background-size: contain;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,0.85);
  display: none; align-items: center; justify-content: center; z-index: 2000;
}
.lightbox.open { display: flex; }
.lightbox-inner { max-width: min(92vw, 1400px); max-height: 90vh; position: relative; }
.lightbox-inner img {
  width: 100%; height: auto; border-radius: 12px;
  box-shadow: 0 10px 34px rgba(0,0,0,0.6);
  display: block;
}
.lightbox-close {
  position: absolute; top: -44px; right: 0;
  background: rgba(0,0,0,0.7); color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 0.35rem 0.6rem; border-radius: 8px; cursor: pointer;
}

/* CTA */
.cta { background: linear-gradient(to bottom, #1a1a1a, #111); text-align: center; padding: 3rem 1.5rem 3.5rem; }
.cta h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); margin-bottom: 1.2rem; font-weight: 600; }
.btn-cv {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 0.9rem 1.6rem; border-radius: 8px;
  background: rgba(255,255,255,0.08); color: #fff; text-decoration: none;
  font-weight: 600; border: 1px solid rgba(255,255,255,0.15);
  transition: background 0.3s, transform 0.3s, border-color 0.3s;
}
.btn-cv:hover { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.22); transform: translateY(-2px); }
.btn-cv img { width: 20px; height: 20px; filter: brightness(0) invert(1); }

/* FOOTER */
footer {
  background: #000; color: #aaa; text-align: center;
  padding: 2rem 1.5rem; display: flex; flex-direction: column; gap: 0.5rem;
}
.footer-social { display: flex; justify-content: center; align-items: center; gap: 1rem; flex-wrap: wrap; }
.footer-social img { width: 24px; height: 24px; filter: brightness(0) invert(1); transition: transform 0.3s, filter 0.3s; }
.footer-social img:hover { transform: scale(1.15); filter: brightness(0.8) invert(1); }
.footer-text { font-size: 0.9rem; }


/* 1) Allontana leggermente il "Suggerimento" dal biglietto */
.tip {
  margin-top: clamp(1.1rem, 2.2vw, 1.5rem);
}

/* Mockup un po' più piccolo su desktop */
@media (min-width: 1025px) {
  .lightbox-inner { max-width: min(80vw, 1100px); }
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .bc-prev { left: -40px; }
  .bc-next { right: -40px; }
}

@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  #menu {
    position: absolute; top: calc(100% + 8px); right: 10px;
    background: rgba(0,0,0,0.95); flex-direction: column; gap: 1rem; padding: 1rem;
    border-radius: 10px; width: 200px; max-height: 0; opacity: 0; overflow: hidden;
    pointer-events: none; transform: translateY(-6px);
    transition: max-height 0.35s ease, opacity 0.35s ease, transform 0.35s ease;
  }
  #menu.open { max-height: 500px; opacity: 1; pointer-events: auto; transform: translateY(0); }
  #menu li { text-align: right; }

  .service-header { padding-top: 7rem; }

  .bc-stage { min-height: clamp(420px, 78vw, 560px); }
  .bc-slider { margin-bottom: 1rem; }
  .tip { margin-top: 1rem; }

  .services-offerti .services-cols { grid-template-columns: 1fr 1fr; }
  .bc-prev { left: -26px; }
  .bc-next { right: -26px; }
}

@media (max-width: 520px) {
  nav { padding: 0.55rem 0.9rem; }
  .service-header { padding-top: 6.5rem; }
  .service-block { padding: 1.2rem; }
  .tech-rotator { height: 210px; }
  .services-offerti .services-cols { grid-template-columns: 1fr; gap: 0.25rem 0; }
  .footer-text { font-size: 0.82rem; }

  .bc-stage { min-height: clamp(420px, 90vw, 600px); }
}
