/* Portfolio Styles */
.portfolio-filter {
  margin-bottom: 40px;
}

.filter-btn {
  background: transparent;
  border: 2px solid #e8e8e8;
  color: #666;
  padding: 12px 25px;
  margin: 0 5px 10px;
  border-radius: 30px;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
}

.filter-btn:hover,
.filter-btn.active {
  background: #ffc107;
  border-color: #ffc107;
  color: #fff;
}

.portfolio-card {
  background: #fff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 25px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  width: 100%;
  height: 100%;
}

.portfolio-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.portfolio-image {
  position: relative;
  overflow: hidden;
  height: 280px;
  width: 100%;
}

.portfolio-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.portfolio-card:hover .portfolio-image img {
  transform: scale(1.1);
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
}

.portfolio-card:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-content {
  text-align: center;
  color: #fff;
  padding: 20px;
}

.portfolio-content h4 {
  color: #fff;
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 600;
}

.portfolio-content p {
  color: #fff;
  margin-bottom: 15px;
  font-size: 18px;
}

.portfolio-link {
  display: inline-block;
  width: 40px;
  height: 40px;
  background: #ffc107;
  color: #fff;
  border-radius: 50%;
  text-align: center;
  line-height: 40px;
  transition: all 0.3s ease;
}

.portfolio-link:hover {
  background: #fff;
  color: #ffc107;
  transform: scale(1.1);
}

.portfolio-info {
  padding: 20px;
}

.portfolio-info h5 {
  color: #333;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 16px;
}

.portfolio-info span {
  color: #666;
  font-size: 13px;
  font-weight: 400;
}

/* Counter Styles */
.counter {
  font-size: 48px;
  font-weight: 700;
  color: #ffc107;
  margin-bottom: 10px;
  display: block;
}

/* CTA Buttons */
.cta-buttons {
  margin-top: 30px;
}

.cta-buttons .btn {
  margin: 0 10px 10px;
}

/* Portfolio Grid - Mejorado el espaciado */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 40px;
  margin: 0 auto;
  max-width: 1400px;
  padding: 0 20px;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .portfolio-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 35px;
  }
}

@media (max-width: 992px) {
  .portfolio-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
  }
  
  .portfolio-image {
    height: 260px;
  }
}

@media (max-width: 768px) {
  .portfolio-filter {
    margin-bottom: 30px;
  }
  
  .filter-btn {
    padding: 10px 20px;
    margin: 0 3px 8px;
    font-size: 14px;
  }
  
  .portfolio-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    padding: 0 15px;
  }
  
  .portfolio-image {
    height: 240px;
  }
  
  .portfolio-content h4 {
    font-size: 16px;
  }
  
  .portfolio-content p {
    font-size: 13px;
  }
  
  .counter {
    font-size: 36px;
  }
  
  .cta-buttons .btn {
    margin: 0 5px 10px;
    padding: 12px 20px;
    font-size: 14px;
  }
}

@media (max-width: 576px) {
  .portfolio-filter {
    margin-bottom: 25px;
  }
  
  .filter-btn {
    padding: 8px 15px;
    margin: 0 2px 5px;
    font-size: 13px;
  }
  
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 15px;
  }
  
  .portfolio-image {
    height: 220px;
  }
  
  .portfolio-info {
    padding: 15px;
  }
  
  .portfolio-info h5 {
    font-size: 15px;
  }
  
  .portfolio-info span {
    font-size: 12px;
  }
  
  .counter {
    font-size: 32px;
  }
}

/* Animation Enhancements */
.portfolio-item {
  animation: fadeInUp 0.6s ease forwards;
  width: 100%;
  height: 100%;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hover Effects */
.portfolio-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, #ffc107, #ff8c00);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.portfolio-card:hover::before {
  opacity: 0.05;
}

/* Loading Animation */
.portfolio-grid {
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* Smooth Transitions */
.portfolio-item {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item:hover {
  transform: translateY(-5px) scale(1.02);
}

/* Enhanced Filter Buttons */
.filter-btn {
  position: relative;
  overflow: hidden;
}

.filter-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: #ffc107;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
  z-index: -1;
}

.filter-btn:hover::before,
.filter-btn.active::before {
  width: 100%;
  height: 100%;
}

/* Better spacing for portfolio section */
#scroll-to-portfolio .container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

@media (max-width: 768px) {
  #scroll-to-portfolio .container {
    padding: 0 15px;
  }
}
