.gallery-section {
  padding: 80px 20px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  position: relative;
}

.gallery-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23007bff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
  z-index: 0;
}

.gallery-container {
  max-width: 1200px;
  margin: auto;
  position: relative;
  z-index: 1;
}

.gallery-header {
  text-align: center;
  margin-bottom: 50px;
}

.gallery-subtitle {
  color: #377dff;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.gallery-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.4;
}

.gallery-title span {
  color: #377dff;
}

.gallery-description {
  color: #666;
  max-width: 600px;
  margin: 0 auto 30px;
  line-height: 1.6;
}

.gallery-filters {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 20px;
  border: 1px solid #ddd;
  border-radius: 25px;
  background: white;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.filter-btn:hover,
.filter-btn.active {
  background: #377dff;
  color: white;
  border-color: #377dff;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-5px);
}

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(55, 125, 255, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 20px;
  text-align: center;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay h3 {
  color: white;
  font-size: 1.2rem;
  margin-bottom: 10px;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.gallery-overlay p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  margin-bottom: 15px;
  transform: translateY(20px);
  transition: transform 0.3s ease 0.1s;
}

.view-project {
  color: white;
  text-decoration: none;
  padding: 8px 20px;
  border: 2px solid white;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 500;
  transform: translateY(20px);
  transition: all 0.3s ease 0.2s;
}

.view-project:hover {
  background: white;
  color: #377dff;
}

.gallery-item:hover .gallery-overlay h3,
.gallery-item:hover .gallery-overlay p,
.gallery-item:hover .view-project {
  transform: translateY(0);
}

.gallery-category {
  position: absolute;
  top: 15px;
  left: 15px;
  background: rgba(55, 125, 255, 0.9);
  color: white;
  padding: 5px 15px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
  z-index: 1;
}

.load-more {
  display: block;
  margin: 40px auto 0;
  padding: 12px 30px;
  background: #377dff;
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.load-more:hover {
  background: #2f68f9;
  transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 1200px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 992px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
  }
  
  .gallery-item img {
    height: 220px;
  }
}

@media (max-width: 768px) {
  .gallery-section {
    padding: 60px 15px;
  }
  
  .gallery-title {
    font-size: 1.8rem;
  }
  
  .gallery-filters {
    gap: 10px;
  }
  
  .filter-btn {
    padding: 6px 15px;
    font-size: 0.85rem;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
  }
  
  .gallery-item img {
    height: 200px;
  }
  
  .gallery-overlay h3 {
    font-size: 1.1rem;
  }
  
  .gallery-overlay p {
    font-size: 0.85rem;
  }
}

@media (max-width: 576px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }
  
  .gallery-item img {
    height: 250px;
  }
  
  .gallery-filters {
    flex-direction: column;
    align-items: center;
  }
  
  .filter-btn {
    width: 100%;
    max-width: 200px;
  }
}

/* Add touch-friendly styles */
@media (hover: none) {
  .gallery-item:hover {
    transform: none;
  }
  
  .gallery-item:hover img {
    transform: none;
  }
  
  .gallery-overlay {
    opacity: 1;
    background: rgba(55, 125, 255, 0.8);
  }
  
  .gallery-overlay h3,
  .gallery-overlay p,
  .view-project {
    transform: translateY(0);
  }
  
  .load-more:hover {
    transform: none;
  }
}

/* Add print styles */
@media print {
  .gallery-filters,
  .load-more {
    display: none;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .gallery-item {
    break-inside: avoid;
  }
  
  .gallery-overlay {
    display: none;
  }
  
  .gallery-category {
    background: #377dff;
    color: white;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
} 