/* Portfolio Filter Section */
.portfolio-filter-section {
  padding: 40px 0;
  background: #f8f9fa;
}

.filter-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.filter-btn {
  background: white;
  border: 2px solid #e74c3c;
  color: #e74c3c;
  padding: 12px 24px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.filter-btn:hover,
.filter-btn.active {
  background: #e74c3c;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

/* Portfolio Gallery */
.portfolio-gallery {
  padding: 80px 0;
  background: white;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 20px;
}

.portfolio-item {
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  transition: all 0.4s ease;
  position: relative;
  height: 280px;
}

.portfolio-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.portfolio-image {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.portfolio-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.portfolio-item:hover .portfolio-image img {
  transform: scale(1.1);
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.9) 0%, rgba(192, 57, 43, 0.9) 100%);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  padding: 30px;
}

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

.portfolio-overlay h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  font-weight: bold;
}

.portfolio-overlay p {
  font-size: 1rem;
  margin-bottom: 20px;
  opacity: 0.9;
}

.view-project {
  background: white;
  color: #e74c3c;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.view-project:hover {
  background: #f8f9fa;
  transform: scale(1.05);
}

/* Portfolio Filter Animation */
.portfolio-item {
  animation: fadeIn 0.6s ease;
}

.portfolio-item.hidden {
  display: none;
}

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

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.8);
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background-color: white;
  margin: 2% auto;
  border-radius: 15px;
  width: 90%;
  max-width: 1000px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  position: absolute;
  right: 20px;
  top: 15px;
  z-index: 10001;
  cursor: pointer;
  background: white;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.close:hover {
  color: #e74c3c;
  transform: scale(1.1);
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 400px;
}

.modal-image {
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px 0 0 15px;
}

.modal-info {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.modal-info h2 {
  color: #333;
  margin-bottom: 10px;
  font-size: 2rem;
}

.modal-info > p {
  color: #e74c3c;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 30px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.project-details {
  margin-bottom: 30px;
}

.detail-item {
  margin-bottom: 15px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.detail-item strong {
  color: #333;
  min-width: 100px;
  font-weight: 600;
}

.detail-item span {
  color: #666;
  flex: 1;
}

.detail-item ul {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
}

.detail-item li {
  color: #666;
  margin-bottom: 5px;
  padding-left: 15px;
  position: relative;
}

.detail-item li::before {
  content: '✓';
  color: #27ae60;
  font-weight: bold;
  position: absolute;
  left: 0;
}

.modal-info p:last-of-type {
  color: #666;
  line-height: 1.6;
  margin-bottom: 30px;
}

.project-buttons {
  display: flex;
  gap: 15px;
}

/* CTA Section */
.cta-section {
  padding: 80px 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-align: center;
}

.cta-section h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.cta-section p {
  font-size: 1.2rem;
  margin-bottom: 40px;
  opacity: 0.9;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .portfolio-item {
    height: 250px;
  }

  .filter-buttons {
    gap: 10px;
  }

  .filter-btn {
    padding: 10px 18px;
    font-size: 0.9rem;
  }

  .modal-content {
    width: 95%;
    margin: 5% auto;
  }

  .modal-body {
    grid-template-columns: 1fr;
  }

  .modal-image img {
    border-radius: 15px 15px 0 0;
    height: 250px;
  }

  .modal-info {
    padding: 30px 20px;
  }

  .modal-info h2 {
    font-size: 1.5rem;
  }

  .cta-section h2 {
    font-size: 2rem;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
}

@media screen and (max-width: 480px) {
  .portfolio-gallery {
    padding: 60px 0;
  }

  .portfolio-item {
    height: 220px;
  }

  .portfolio-overlay {
    padding: 20px;
  }

  .portfolio-overlay h3 {
    font-size: 1.2rem;
  }

  .filter-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
  }

  .modal-info {
    padding: 20px 15px;
  }

  .detail-item {
    flex-direction: column;
    gap: 5px;
  }

  .detail-item strong {
    min-width: auto;
  }
}

/* Loading Animation */
.portfolio-item.loading {
  opacity: 0.5;
  pointer-events: none;
}

/* Enhanced Hover Effects */
.portfolio-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
  z-index: 1;
}

.portfolio-item:hover::before {
  transform: translateX(100%);
}
