/* Estilos adicionales para el portfolio dinámico */

/* Badges y etiquetas */
.featured-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: linear-gradient(45deg, #ff6b6b, #ee5a24);
  color: white;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.status-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 2;
}

.status-badge.ongoing {
  background: linear-gradient(45deg, #4ecdc4, #44a08d);
  color: white;
  box-shadow: 0 2px 8px rgba(78, 205, 196, 0.3);
}

/* Meta información del proyecto */
.project-meta {
  display: flex;
  gap: 15px;
  margin: 10px 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

.project-year,
.project-client {
  background: rgba(255, 255, 255, 0.2);
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 0.8rem;
}

/* Botones de acción en overlay */
.portfolio-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.visit-site {
  background: transparent;
  color: white;
  border: 2px solid white;
  padding: 8px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.visit-site:hover {
  background: white;
  color: #333;
}

/* Loader */
.portfolio-loader {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
  width: 100%;
  grid-column: 1 / -1;
}

.loader-content {
  text-align: center;
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #333;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Error */
.portfolio-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: #f8f9fa;
  border-radius: 10px;
  margin: 20px 0;
}

.error-content h3 {
  color: #e74c3c;
  margin-bottom: 15px;
}

.retry-btn {
  background: #333;
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  margin-top: 15px;
  transition: background 0.3s ease;
}

.retry-btn:hover {
  background: #555;
}

/* Modal mejorado */
.project-header {
  margin-bottom: 30px;
}

.project-meta-detailed {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.project-meta-detailed span {
  background: #f8f9fa;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.9rem;
  color: #666;
}

.project-category {
  background: #333 !important;
  color: white !important;
}

/* Galería del proyecto */
.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin: 25px 0;
}

.project-gallery img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.project-gallery img:hover {
  transform: scale(1.05);
}

/* Tecnologías */
.project-technologies {
  margin: 30px 0;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.tech-tag {
  background: #f8f9fa;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  color: #666;
  border: 1px solid #e9ecef;
}

/* Resultados */
.results-list {
  list-style: none;
  padding: 0;
  margin-top: 15px;
}

.results-list li {
  padding: 8px 0;
  color: #666;
  position: relative;
  padding-left: 25px;
  line-height: 1.5;
}

.result-icon {
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: bold;
}

/* Enlaces del proyecto */
.project-links {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #333;
  color: white;
  padding: 12px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s ease;
}

.project-link:hover {
  background: #555;
}

/* Visor de imágenes */
.image-viewer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-viewer-overlay {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.image-viewer img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.close-viewer {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 30px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: background 0.3s ease;
}

.close-viewer:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Barra de búsqueda (opcional) */
.portfolio-search {
  margin-bottom: 30px;
  text-align: center;
}

.portfolio-search input {
  width: 100%;
  max-width: 400px;
  padding: 12px 20px;
  border: 2px solid #ddd;
  border-radius: 25px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.portfolio-search input:focus {
  outline: none;
  border-color: #333;
}

/* Responsive */
@media screen and (max-width: 768px) {
  .project-meta {
    flex-direction: column;
    gap: 8px;
  }

  .project-meta-detailed {
    flex-direction: column;
    gap: 10px;
  }

  .project-gallery {
    grid-template-columns: 1fr;
  }

  .tech-tags {
    gap: 6px;
  }

  .tech-tag {
    font-size: 0.8rem;
    padding: 4px 10px;
  }

  .featured-badge,
  .status-badge {
    font-size: 0.7rem;
    padding: 4px 8px;
  }

  .image-viewer-overlay {
    max-width: 95%;
    max-height: 95%;
  }

  .close-viewer {
    top: -35px;
    font-size: 25px;
    width: 35px;
    height: 35px;
  }
}
