:root {
  --giallo-ocra: #d9a441;
  --blu-mediterraneo: #2a4d69;
  --bianco: #fff9f0;
  --grigio-scuro: #333333;
  --rosso-mattone: #b03020;
}

body {
  font-family: 'Georgia', serif;
  font-size: 1.1rem;
  background: var(--bianco);
  color: var(--grigio-scuro);
  margin: 0;
  padding: 0;
}

header {
  position: relative;
  background: url('../images/negozio-quadri.jpg') no-repeat center center/cover;
  color: var(--bianco);
  padding: 4rem 1rem;
  text-align: center;
  box-shadow: inset 0 0 0 1000px rgba(0,0,0,0.45);
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

header h1 {
  margin: 0 0 0.3rem 0;
  font-size: 2.5rem;
  letter-spacing: 3px;
  color: var(--bianco);
}

header h2 {
  margin: 0;
  font-weight: normal;
  font-style: italic;
  font-size: 1.3rem;
  color: var(--bianco);
}

header p {
  color: var(--bianco);
  margin-top: 0.5rem;
  font-size: 1rem;
}

main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

section.servizi {
  margin-bottom: 3rem;
}

section.servizi h3 {
  color: var(--rosso-mattone);
  border-bottom: 2px solid var(--rosso-mattone);
  padding-bottom: 0.3rem;
  margin-bottom: 1rem;
}

.servizi-content {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.img-box, .video-box, .servizi-list {
  flex: 1 1 30%;
  max-width: 30%;
}

.img-box img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.video-box {
  max-height: 300px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

ul.servizi-list {
  list-style: disc inside;
  font-size: 1.25rem;
  line-height: 1.8;
  margin-left: 2rem; /* margine su desktop per separare i bullet */
  margin-top: -3px;
  padding-left: 0; /* gestito dal list-style */
}

section.galleria {
  margin-bottom: 3rem;
}

section.galleria h3 {
  color: var(--rosso-mattone);
  border-bottom: 2px solid var(--rosso-mattone);
  padding-bottom: 0.3rem;
  margin-bottom: 1rem;
  text-align: left;
}

.gallery-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.gallery-container img,
.gallery-container video {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.gallery-container img:hover,
.gallery-container video:hover {
  transform: scale(1.05);
}

.pagination {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  gap: 10px;
  flex-wrap: wrap;
}

.pagination button {
  background-color: var(--giallo-ocra);
  border: 2px solid var(--rosso-mattone);
  color: var(--rosso-mattone);
  font-weight: bold;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 40px;
  user-select: none;
}

.pagination button:hover {
  background-color: var(--rosso-mattone);
  color: var(--bianco);
  border-color: var(--rosso-mattone);
}

.pagination button.active {
  background-color: var(--blu-mediterraneo);
  color: var(--bianco);
  border-color: var(--blu-mediterraneo);
  cursor: default;
}

footer {
  background-color: var(--blu-mediterraneo);
  color: var(--bianco);
  padding: 2rem 1rem;
  text-align: center;
}

footer h3 {
  margin-top: 0;
}

footer a {
  color: var(--giallo-ocra);
  text-decoration: none;
  font-weight: bold;
}

footer a:hover {
  text-decoration: underline;
}

.contact-info {
  margin: 1rem 0;
  font-size: 1.1rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

iframe {
  border: none;
  border-radius: 8px;
  width: 100%;
  max-width: 600px;
  height: 300px;
  margin-top: 1rem;
}

.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
  visibility: visible;
  opacity: 1;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(255,255,255,0.8);
}

.lightbox-content video {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(255,255,255,0.8);
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  color: white;
  cursor: pointer;
  user-select: none;
  padding: 0 0.5rem;
  background: rgba(0,0,0,0.3);
  border-radius: 4px;
  z-index: 10;
}

.lightbox-arrow.left {
  left: -2rem;
}

.lightbox-arrow.right {
  right: -2rem;
}

.lightbox-close {
  position: absolute;
  top: -2rem;
  right: -2rem;
  font-size: 2.2rem;
  color: white;
  cursor: pointer;
  background: rgba(0,0,0,0.4);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.3s ease;
}

.lightbox-close:hover {
  background: rgba(255,0,0,0.6);
}

/* ------------- MOBILE ------------- */
@media (max-width: 900px) {
  .servizi-content {
    flex-direction: column;
    align-items: center; /* centra orizzontalmente i figli */
    text-align: center;
  }

  .img-box,
  .video-box,
  .servizi-list {
    max-width: 100%;
    flex: none;
  }

  /* Lista servizi centrata e con margini azzerati per non spostare a destra */
  .servizi-list {
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 1.2rem;  /* per mostrare bullet a sinistra */
    max-width: 320px;
    text-align: left;      /* bullet allineati a sinistra */
  }

  .servizi-list li {
    font-size: 1.1rem;
    line-height: 1.6;
  }

  .img-box img,
  .video-box video {
    width: 100%;
    max-height: 300px;
    height: 300px;
    object-fit: cover;
  }

  .video-box {
    width: 100%;
    max-width: 100%;
    height: 300px;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
  }

  .video-box video {
    border-radius: 8px;
  }

  .img-box {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-bottom: 1.5rem;
    height: 300px;
    overflow: hidden;
    border-radius: 8px;
  }

  .img-box img {
    border-radius: 8px;
  }

  .gallery-container {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
}
