/* ===== PROJECTS PAGE STYLES ===== */

/* Page Header */
.page-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 8rem 1.5rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: moveGrid 20s linear infinite;
  opacity: 0.3;
}

.page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.6s ease-out;
}

.header-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

/* Projects Section */
.projects-section {
  padding: 5rem 1.5rem;
  background: linear-gradient(180deg, #f9fafb 0%, white 100%);
}

.projects-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

/* Project Cards */
.project-card {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #10b981, #3b82f6);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.project-card:hover::before {
  transform: scaleX(1);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.project-icon {
  font-size: 3.5rem;
  text-align: center;
  animation: float 3s ease-in-out infinite;
}

.project-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: #d1fae5;
  color: #065f46;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  width: fit-content;
}

.project-badge.water {
  background: #dbeafe;
  color: #1e40af;
}

.project-badge.civic {
  background: #fef3c7;
  color: #92400e;
}

.project-card h3 {
  font-size: 1.5rem;
  color: #1f2937;
  margin: 0;
}

.project-card p {
  color: #6b7280;
  line-height: 1.7;
  margin: 0;
}

.project-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 1rem 0;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

.project-stats span {
  color: #6b7280;
  font-size: 0.95rem;
}

.project-stats strong {
  color: #667eea;
  font-weight: 600;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 0.9rem 2rem;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: fit-content;
}

.btn-primary:hover {
  transform: translateX(5px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  animation: fadeIn 0.3s ease-out;
}

.modal.active {
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
}

.modal-content {
  position: relative;
  background: white;
  border-radius: 20px;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  margin: 1rem;
  animation: slideUp 0.4s ease-out;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: #f3f4f6;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  z-index: 1;
}

.modal-close:hover {
  background: #e5e7eb;
  transform: rotate(90deg);
  color: #1f2937;
}

.modal-header {
  padding: 2.5rem 2rem 1.5rem;
  text-align: center;
  background: linear-gradient(135deg, #f9fafb 0%, white 100%);
  border-radius: 20px 20px 0 0;
}

.modal-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: float 3s ease-in-out infinite;
}

.modal-header h2 {
  font-size: 2rem;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.modal-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: #d1fae5;
  color: #065f46;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.modal-badge.water {
  background: #dbeafe;
  color: #1e40af;
}

.modal-badge.civic {
  background: #fef3c7;
  color: #92400e;
}

.modal-body {
  padding: 2rem;
}

.modal-description {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #374151;
  margin-bottom: 2rem;
}

.modal-section {
  margin-bottom: 2rem;
}

.modal-section h3 {
  font-size: 1.3rem;
  color: #1f2937;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e5e7eb;
}

.modal-list {
  list-style: none;
  padding: 0;
}

.modal-list li {
  padding: 0.7rem 0 0.7rem 2rem;
  position: relative;
  color: #6b7280;
  line-height: 1.6;
}

.modal-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: bold;
  font-size: 1.2rem;
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.impact-item {
  text-align: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f9fafb 0%, white 100%);
  border-radius: 15px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.impact-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: #667eea;
  margin-bottom: 0.5rem;
}

.impact-label {
  color: #6b7280;
  font-size: 0.9rem;
}

.status-badge {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  margin-bottom: 1rem;
}

.status-badge.completed {
  background: #d1fae5;
  color: #065f46;
}

.status-badge.progress {
  background: #dbeafe;
  color: #1e40af;
}

.status-badge.proposal {
  background: #fef3c7;
  color: #92400e;
}

/* Responsive */
@media (min-width: 768px) {
  .page-header h1 {
    font-size: 3rem;
  }

  .header-subtitle {
    font-size: 1.2rem;
  }

  .projects-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-card {
    padding: 2.5rem;
  }
}

@media (min-width: 1024px) {
  .projects-container {
    grid-template-columns: repeat(3, 1fr);
  }

  .modal-content {
    margin: 2rem;
  }
}

/* Scroll bar styling for modal */
.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: #5568d3;
}

/* fanampiny element vaovao */
/* Modal badge prototype */
.modal-badge.prototype {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Status badges container */
.status-badges-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}

/* Impact grid avec icônes */
.impact-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.impact-grid .impact-item {
  text-align: center;
}

/* Intervention pillars */
.intervention-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 15px;
}

.pillar {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
  border-left: 4px solid #667eea;
}

.pillar h4 {
  color: #667eea;
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.pillar p {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.6;
}