/* ==========================================
   EVENTI MODAL - CSS CUSTOM SPECIFICO
   ========================================== */

/* CSS Variables */
:root {
  /* Tuff Colors (Parco di Veio earth tones) */
  --tuff-700: #5d4e37; /* Titoli principali */
  --tuff-600: #6b5b47; /* Testi secondari */
  --tuff-500: #8b7355; /* Testi di supporto */
  
  /* Green Accent */
  --mpso-green: #10b981; /* Accent color */
  --mpso-green-hover: #059669; /* Hover state */
  --mpso-green-light: rgba(16, 185, 129, 0.1); /* Background light */
  
  /* Neutral Grays */
  --gray-50: #f8fafb;
  --gray-100: #f1f5f9;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-600: #6b7280;
  
  /* Status Colors */
  --red-doc: #ef4444; /* PDF files */
  --blue-doc: #3b82f6; /* Word files */
  --green-doc: #10b981; /* Excel files */
  --gray-doc: #6b7280; /* Generic files */
}

/* Modal Container */
.mpso-event-modal {
  /* Dimensioni finestra */
  max-width: 64rem; /* 1024px */
  width: 95vw; /* 95% viewport su mobile */
  max-height: 90vh; /* 90% altezza viewport */
  
  /* Posizionamento centrale */
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  
  /* Styling */
  background: white;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: none;
  
  /* Scroll interno */
  overflow-y: auto;
  overflow-x: hidden;
  
  /* Z-index per overlay */
  z-index: 1000;
}

.mpso-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 999;
}

/* Modal Header */
.mpso-modal-header {
  padding: 2rem 2rem 1rem 2rem;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #f8fafb 0%, #ffffff 100%);
  border-radius: 1rem 1rem 0 0;
}

.mpso-modal-title {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 2rem; /* 32px */
  font-weight: 700;
  color: #5d4e37; /* Tuff-700 */
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.mpso-modal-subtitle {
  font-family: 'Roboto', sans-serif;
  font-size: 1.125rem; /* 18px */
  font-weight: 500;
  color: #8b7355; /* Tuff-600 */
  margin-bottom: 0;
  line-height: 1.4;
}

/* Modal Content */
.mpso-modal-content {
  padding: 2rem;
}

/* Event Info Section */
.mpso-info-section {
  margin-bottom: 2rem;
}

.mpso-info-card {
  background: #f8fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.5rem;
  height: 100%;
  transition: box-shadow 0.3s ease;
}

.mpso-info-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mpso-info-title {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 1rem; /* 16px */
  font-weight: 600;
  color: #5d4e37; /* Tuff-700 */
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mpso-info-date {
  font-family: 'Roboto', sans-serif;
  font-size: 1.125rem; /* 18px */
  font-weight: 500;
  color: #6b5b47; /* Tuff-600 */
  margin-bottom: 0.25rem;
}

.mpso-info-time {
  font-family: 'Roboto', sans-serif;
  font-size: 1rem; /* 16px */
  font-weight: 400;
  color: #8b7355; /* Tuff-500 */
  margin-bottom: 0;
}

.mpso-info-location {
  font-family: 'Roboto', sans-serif;
  font-size: 1.125rem; /* 18px */
  font-weight: 500;
  color: #6b5b47; /* Tuff-600 */
  margin-bottom: 0;
}

/* Description Section */
.mpso-description-section {
  margin-bottom: 2rem;
}

.mpso-section-title {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 1.25rem; /* 20px */
  font-weight: 700;
  color: #5d4e37; /* Tuff-700 */
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #10b981; /* Green accent */
}

.mpso-description-content {
  font-family: 'Roboto', sans-serif;
  font-size: 1rem; /* 16px */
  font-weight: 400;
  color: #6b5b47; /* Tuff-600 */
  line-height: 1.7;
  white-space: pre-line;
}

/* Photo Gallery Section */
.mpso-gallery-section {
  margin-bottom: 2rem;
}

.mpso-photo-grid {
  margin-top: 1rem;
}

.mpso-photo-item {
  margin-bottom: 1rem;
}

.mpso-photo-image {
  width: 100%;
  height: 200px; /* Altezza fissa */
  object-fit: cover;
  border-radius: 0.5rem;
  border: 2px solid #e5e7eb;
  transition: all 0.3s ease;
  cursor: pointer;
}

.mpso-photo-image:hover {
  border-color: #10b981;
  opacity: 0.9;
  transform: scale(1.02);
  box-shadow: 0 8px 16px rgba(16, 185, 129, 0.2);
}

/* Documents Section */
.mpso-documents-section {
  margin-bottom: 1rem;
}

.mpso-documents-list {
  margin-top: 1rem;
}

.mpso-document-item {
  background: #f8fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
  transition: all 0.3s ease;
}

.mpso-document-item:hover {
  background: #f1f5f9;
  border-color: #10b981;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
}

.mpso-doc-icon {
  font-size: 1.5rem; /* 24px */
  width: 2rem;
  text-align: center;
}

.mpso-doc-icon.fa-file-pdf {
  color: #ef4444; /* Red */
}

.mpso-doc-icon.fa-file-word {
  color: #3b82f6; /* Blue */
}

.mpso-doc-icon.fa-file-excel {
  color: #10b981; /* Green */
}

.mpso-doc-icon.fa-file {
  color: #6b7280; /* Gray */
}

.mpso-doc-name {
  font-family: 'Roboto', sans-serif;
  font-size: 1rem; /* 16px */
  font-weight: 500;
  color: #5d4e37; /* Tuff-700 */
  margin-bottom: 0.25rem;
}

.mpso-doc-type {
  font-family: 'Roboto', sans-serif;
  font-size: 0.875rem; /* 14px */
  font-weight: 400;
  color: #8b7355; /* Tuff-500 */
  margin-bottom: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mpso-download-btn {
  background: #10b981;
  color: white;
  border: none;
  border-radius: 0.375rem;
  padding: 0.5rem 1rem;
  font-family: 'Roboto', sans-serif;
  font-size: 0.875rem; /* 14px */
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
}

.mpso-download-btn:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.mpso-download-btn i {
  margin-right: 0.375rem;
}

/* Close Button */
.mpso-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
}

.mpso-modal-close:hover {
  background: #f3f4f6;
  border-color: #10b981;
  color: #10b981;
  transform: scale(1.1);
}

.mpso-modal-close i {
  font-size: 1rem;
  color: #6b7280;
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
  .mpso-event-modal {
    width: 95vw;
    max-height: 95vh;
    margin: 2.5vh auto;
  }

  .mpso-modal-header {
    padding: 1.5rem 1.5rem 1rem 1.5rem;
  }

  .mpso-modal-content {
    padding: 1.5rem;
  }

  .mpso-modal-title {
    font-size: 1.5rem; /* 24px su mobile */
  }

  .mpso-modal-subtitle {
    font-size: 1rem; /* 16px su mobile */
  }

  .mpso-info-card {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .mpso-photo-image {
    height: 150px; /* Altezza ridotta su mobile */
  }

  .mpso-document-item {
    padding: 0.75rem;
  }

  .mpso-doc-name {
    font-size: 0.875rem; /* 14px su mobile */
  }

  .mpso-download-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem; /* 12px su mobile */
  }
}

@media (max-width: 480px) {
  .mpso-modal-close {
    top: 0.5rem;
    right: 0.5rem;
    width: 2rem;
    height: 2rem;
  }
}

/* ==========================================
   PHOTO MODAL - LIGHTBOX FUNCTIONALITY
   ========================================== */

.photo-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-modal-container {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.photo-modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: white;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.photo-modal-image {
  max-width: 90vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.photo-modal-caption {
  padding: 1rem 1.5rem;
  background: white;
  width: 100%;
  text-align: center;
}

.photo-modal-caption h4 {
  font-family: 'Roboto', sans-serif;
  font-size: 1.125rem;
  font-weight: 500;
  color: #5d4e37;
  margin: 0;
  line-height: 1.4;
}

.photo-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 3rem;
  height: 3rem;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.photo-modal-close:hover {
  background: white;
  transform: scale(1.1);
}

.photo-modal-close i {
  font-size: 1.25rem;
  color: #5d4e37;
}

@media (max-width: 768px) {
  .photo-modal-image {
    max-width: 95vw;
    max-height: 75vh;
  }

  .photo-modal-close {
    width: 2.5rem;
    height: 2.5rem;
    top: 0.5rem;
    right: 0.5rem;
  }

  .photo-modal-close i {
    font-size: 1rem;
  }

  .photo-modal-caption {
    padding: 0.75rem 1rem;
  }

  .photo-modal-caption h4 {
    font-size: 1rem;
  }
}
