/* ===================================
   PAGINA SERVIZI - Modal System
   =================================== */

.servizi-section {
  padding: 4rem 0;
  background: #FFFFFF;
}

/* Griglia Card */
.servizi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

/* Card Servizio */
.servizio-card {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.servizio-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.servizio-card:active {
  transform: translateY(-2px);
}

/* Icona */
.servizio-card__icon {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.servizio-card__icon--rosa {
  background: linear-gradient(135deg, rgba(176, 72, 114, 0.1) 0%, rgba(220, 145, 173, 0.15) 100%);
}

.servizio-card__icon--rosa svg {
  color: #B04872;
}

.servizio-card__icon--azzurro {
  background: linear-gradient(135deg, rgba(81, 175, 218, 0.1) 0%, rgba(125, 211, 247, 0.15) 100%);
}

.servizio-card__icon--azzurro svg {
  color: #51AFDA;
}

/* Categoria */
.servizio-card__category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.servizio-card__category--rosa {
  color: #B04872;
}

.servizio-card__category--azzurro {
  color: #51AFDA;
}

/* Titolo */
.servizio-card__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 1rem;
  line-height: 1.3;
}

/* Descrizione */
.servizio-card__description {
  font-size: 1rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

/* Badge */
.servizio-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  align-self: flex-start;
}

.servizio-card__badge--rosa {
  background: rgba(176, 72, 114, 0.1);
  color: #B04872;
}

.servizio-card__badge--azzurro {
  background: rgba(81, 175, 218, 0.1);
  color: #51AFDA;
}

/* ===================================
   MODAL OVERLAY
   =================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal {
  background: #FFFFFF;
  border-radius: 20px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header Modal */
.modal__header {
  padding: 2rem;
  border-bottom: 2px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
}

.modal__title {
  font-size: 2rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 0.5rem 0;
}

.modal__category {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal__close {
  background: #f5f5f5;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-left: 1rem;
}

.modal__close:hover {
  background: #e0e0e0;
  transform: rotate(90deg);
}

/* Body Modal */
.modal__body {
  padding: 2rem;
}

.modal-section {
  margin-bottom: 2rem;
}

.modal-section:last-child {
  margin-bottom: 0;
}

.modal-section h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 1rem;
}

.modal-section p {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: #444;
  margin-bottom: 1rem;
}

/* Efficacia Grid */
.efficacia-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.efficacia-item {
  background: linear-gradient(135deg, rgba(81, 175, 218, 0.08) 0%, rgba(176, 72, 114, 0.08) 100%);
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid rgba(81, 175, 218, 0.2);
  text-align: center;
}

.efficacia-label {
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 0.5rem;
  display: block;
}

.efficacia-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #51AFDA;
  display: block;
}

/* Lista Vantaggi */
.vantaggi-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0 0;
}

.vantaggi-list li {
  padding: 0.75rem 0;
  padding-left: 2rem;
  position: relative;
  font-size: 1.0625rem;
  color: #444;
  line-height: 1.6;
}

.vantaggi-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #4CAF50;
  font-weight: 700;
  font-size: 1.25rem;
}

/* Box Styled */
.info-box {
  padding: 1.25rem;
  border-radius: 12px;
  margin-top: 1rem;
}

.info-box p {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.7;
}

.info-box--fonte {
  background: linear-gradient(135deg, rgba(81, 175, 218, 0.05) 0%, rgba(176, 72, 114, 0.05) 100%);
  border-left: 4px solid #51AFDA;
}

.info-box--note {
  background: #FFF5F8;
  border-left: 4px solid #B04872;
}

.info-box--perchi {
  background: #E3F2FD;
  border: 2px solid #51AFDA;
}

.info-box strong {
  font-weight: 700;
  color: #51AFDA;
}

/* Responsive */
@media (max-width: 1024px) {
  .servizi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .servizi-grid {
    grid-template-columns: 1fr;
  }

  .modal {
    margin: 0;
    max-height: 100vh;
    border-radius: 20px 20px 0 0;
  }

  .modal__header {
    padding: 1.5rem;
  }

  .modal__title {
    font-size: 1.5rem;
  }

  .modal__body {
    padding: 1.5rem;
  }

  .efficacia-grid {
    grid-template-columns: 1fr;
  }
}

/* Prevent body scroll when modal open */
body.modal-open {
  overflow: hidden;
}
