/* Stili per il layout delle singole realizzazioni */

.realizzazione-dettaglio {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1rem;
  min-width: 620px;
}

/* Breadcrumb */
.breadcrumb {
  margin-bottom: 2rem;
  font-size: 0.9rem;
  color: #666;
}

.breadcrumb a {
  color: #0073aa;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb .separator {
  margin: 0 0.5rem;
  color: #999;
}

.breadcrumb .current {
  color: #333;
  font-weight: 500;
}

/* Header della realizzazione */
.realizzazione-header {
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.2rem;
    border-radius: 12px;
    border-left: 5px solid #0073aa;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.header-text h1 {
  color: #333;
  margin-bottom: 1rem;
  font-size: 2.5rem;
}

.realizzazione-meta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.realizzazione-location {
  font-size: 1.1rem;
  color: #666;
  margin: 0;
}

.tipi-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.tipo-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  color: white;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: capitalize;
}

.tipo-badge.ristorante { background: #28a745; }
.tipo-badge.pizzeria { background: #fd7e14; }
.tipo-badge.bar { background: #6f42c1; }
.tipo-badge.pasticceria { background: #e83e8c; }
.tipo-badge.bisteccheria { background: #dc3545; }
.tipo-badge.scuola { background: #20c997; }
.tipo-badge.trattoria { background: #dc3545; }
.tipo-badge.osteria { background: #17a2b8; }
.tipo-badge.default { background: #6c757d; }
.tipo-badge.agriturismo { background: #ffc107; color: #212529; }
.tipo-badge.supermercato { background: #007bff; }
.tipo-badge.mensa { background: #fd7e14; }
.tipo-badge.pesce { background: #17a2b8; }
.tipo-badge.panificazione { background: #d7cf39; }
.tipo-badge.orientale { background: #1762b8; }

.badge-ambito{background: #968686;}

.header-stats {
  display: flex;
  gap: 1.5rem;
}

.stat-item {
    text-align: center;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-width: 80px;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: bold;
  color: #0073aa;
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Descrizione */
.realizzazione-descrizione {
  background: #f9f9f9;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  border-left: 4px solid #0073aa;
}

.realizzazione-descrizione p {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.6;
}

.description-section {
  margin: 2rem 0;
  text-align: center;
}

.realizzazione-description {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #555;
  max-width: 800px;
  margin: 0 auto;
}

/* Sezione disegno CAD */
.cad-section {
  margin: 3rem 0;
  background: #f8f9fa;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.cad-section h2 {
  color: #333;
  margin: 0;
  padding: 1.5rem 1.5rem 0;
  font-size: 1.5rem;
}

.cad-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  padding: 1.5rem;
  align-items: center;
}

.cad-image-wrapper {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cad-image-wrapper:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.cad-image {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
  background: white;
  transition: opacity 0.3s ease;
}

.cad-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cad-image-wrapper:hover .cad-overlay {
  opacity: 1;
}

.cad-info {
  text-align: center;
  color: white;
}

.cad-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 0.5rem;
}

.cad-label {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
}

.cad-description {
  padding: 1rem;
}

.cad-description h3 {
  color: #0073aa;
  margin: 0 0 1rem 0;
  font-size: 1.3rem;
}

.cad-description p {
  margin: 0;
  line-height: 1.6;
  color: #666;
}

/* Responsive per CAD */
@media (max-width: 768px) {
  .cad-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .cad-image {
    max-height: 300px;
  }
  
  .cad-section h2 {
    text-align: center;
  }
}

/* Galleria */
.gallery-section {
  margin: 2rem 0;
}

.gallery-section h2 {
  color: #333;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.foto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.foto-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.foto-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.foto-preview {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.foto-item:hover .foto-preview {
  transform: scale(1.05);
}

.foto-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.foto-item:hover .foto-overlay {
  opacity: 1;
}

.foto-info {
  text-align: center;
  color: white;
}

.zoom-icon {
  font-size: 2rem;
  color: white;
}

/* Descrizioni delle immagini */
.foto-nome {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
  color: white;
  padding: 0.75rem;
  font-size: 0.9rem;
  text-align: center;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  margin: 0;
}

.foto-item:hover .foto-nome {
  transform: translateY(0);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.9);
  backdrop-filter: blur(5px);
}

.lightbox-content {
  position: relative;
  margin: auto;
  padding: 0;
  width: 90%;
  max-width: 1200px;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  cursor: grab;
  transition: transform 0.1s ease;
}

.lightbox-content img:active {
  cursor: grabbing;
}

.lightbox-content img.zoomed {
  cursor: grab;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
}

.lightbox-close:hover {
  color: #0073aa;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  color: white;
  border: none;
  font-size: 2rem;
  padding: 1rem;
  cursor: pointer;
  border-radius: 50%;
  backdrop-filter: blur(10px);
  transition: background 0.3s ease;
}

.lightbox-nav:hover {
  background: rgba(255,255,255,0.3);
}

.lightbox-prev {
  left: 30px;
}

.lightbox-next {
  right: 30px;
}

.lightbox-counter {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 1rem;
  backdrop-filter: blur(10px);
}

.lightbox-description {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 20px;
  font-size: 1rem;
  text-align: center;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
}

.lightbox-help {
  position: absolute;
  top: 20px;
  left: 20px;
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 1rem;
  border-radius: 8px;
  font-size: 0.8rem;
  backdrop-filter: blur(10px);
  opacity: 0.8;
}

.lightbox-help div {
  margin-bottom: 0.25rem;
}

.lightbox-help div:last-child {
  margin-bottom: 0;
}

/* Messaggio nessuna immagine */
.no-images-message {
  text-align: center;
  padding: 3rem 1rem;
  background: #f9f9f9;
  border-radius: 8px;
  color: #666;
}

.no-images-message p {
  margin: 0.5rem 0;
}

.text-muted {
  opacity: 0.7;
}

/* Sezione mappa */
.realizzazione-mappa {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f9f9f9;
  border-radius: 8px;
  border-left: 4px solid #0073aa;
}

.realizzazione-mappa h3 {
  margin: 0 0 1rem 0;
  color: #333;
  font-size: 1.3rem;
}

.mappa-container {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.mappa-container iframe {
  width: 100%;
  height: 300px;
  border: 0;
  display: block;
}

.mappa-info {
  padding: 1rem;
  background: white;
  border-top: 1px solid #eee;
  text-align: center;
}

.btn-mappa {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: #4285f4;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 500;
  transition: background 0.3s ease;
}

.btn-mappa:hover {
  background: #3367d6;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

/* Footer della realizzazione */
.realizzazione-footer {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #eee;
}

.btn-back {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: #0073aa;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  transition: background 0.3s ease;
}

.btn-back:hover {
  background: #005a87;
}

/* Realizzazioni correlate */
.realizzazioni-correlate {
  /* margin: 3rem 0 2rem 0; */
  padding: 2rem;
  background: #f8f9fa;
  border-radius: 12px;
}

.realizzazioni-correlate h3 {
  text-align: center;
  margin-bottom: 2rem;
  color: #333;
  font-size: 1.5rem;
}

.correlate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.correlata-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.correlata-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.correlata-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.correlata-info {
  padding: 1rem;
}

.correlata-info h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  color: #333;
}

.correlata-info .location {
  margin: 0 0 0.5rem 0;
  font-size: 0.8rem;
  color: #666;
}

.correlata-info .tipo-badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
}

.correlata-location {
    margin: 0 0 1rem 0;
    color: #666;
    font-size: 0.9rem;
}

.btn-correlata {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.85rem;
    transition: background 0.3s ease;
}

.btn-correlata:hover {
    background: #005a87;
}

.mappa-link {
    padding: 1rem;
    background: white;
    border-top: 1px solid #eee;
    text-align: center;
}

.btn-mappa {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #4285f4;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.btn-mappa:hover {
    background: #3367d6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
  .realizzazione-dettaglio {
    padding: 1rem;
    min-width: unset!important;
  }
  
  .header-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .header-text h1 {
    font-size: 2rem;
  }
  
  .header-stats {
    justify-content: center;
  }
  
  .galleria-grid {
    grid-template-columns: 1fr;
  }
  
  .lightbox-nav {
    font-size: 1.5rem;
    padding: 0.5rem;
  }
  
  .lightbox-close {
    top: 10px;
    right: 20px;
    font-size: 30px;
  }
  
  .immagine-descrizione {
    font-size: 0.8rem;
    padding: 0.5rem;
  }
  
  .lightbox-description {
    bottom: 60px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
  
  .realizzazione-mappa {
    margin: 1.5rem 0;
    padding: 1rem;
  }
  
  .mappa-container iframe {
    height: 250px;
  }
  
  .mappa-link {
      padding: 1rem;
      background: white;
      border-top: 1px solid #eee;
      text-align: center;
  }

  .btn-mappa {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
  
  /* .correlate-grid {
    grid-template-columns: 1fr;
  } */
  
  .tipi-badges {
    gap: 0.25rem;
  }
  
  .tipo-badge {
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
  }
}

/* Video Section */
.video-section {
  margin: 3rem 0;
  padding: 2rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
  border-left: 5px solid #dc3545;
}

.video-section h3 {
  margin-bottom: 1.5rem;
  color: #333;
  font-size: 1.5rem;
  text-align: center;
}

.video-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-fallback {
  text-align: center;
  margin-top: 1rem;
}

.video-fallback a {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background: #ff0000;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.video-fallback a:hover {
  background: #cc0000;
  color: white;
}

/* Responsive video */
@media (max-width: 768px) {
  .video-section {
    margin: 2rem 0;
    padding: 1.5rem;
  }
  
  .video-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
  }
}