/* ================================
   ESTILOS SECCIÓN PROYECTOS MODERNO
   ================================ */

/* Encabezado de sección Proyecto Destacado */
#proyecto-destacado {
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.05) 0%, rgba(0, 212, 255, 0.02) 100%);
  position: relative;
  overflow: hidden;
}

#proyecto-destacado::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

/* Títulos de proyectos con animación */
#proyecto-destacado h2,
#proyectos h2 {
  font-family: 'Syne', sans-serif;
  font-weight: 900;
  letter-spacing: -1px;
  animation: slideDown 0.8s ease-out, pulseGlow 2s ease-in-out infinite;
  position: relative;
  z-index: 2;
}

#proyecto-destacado h2,
#proyectos h2 {
  color: #fff;
}

#proyecto-destacado h2 .text-primary,
#proyectos h2 .text-primary {
  color: #0d6efd;
  font-weight: 900;
}

/* Descripción con mejor estilo */
#proyecto-destacado .text-light-emphasis,
#proyectos .text-light-emphasis {
  font-size: 1.1rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  transition: all 0.3s ease;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* Divisor mejorado */
#proyecto-destacado .divider-custom,
#proyectos .divider-custom {
  animation: expandWidth 0.8s ease-out, shimmer 2s ease-in-out infinite;
}

/* Card del proyecto destacado */
.project-card {
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.1) 0%, rgba(0, 212, 255, 0.05) 100%);
  border: 2px solid rgba(13, 110, 253, 0.2) !important;
  border-radius: 20px !important;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: slideUp 0.8s ease-out backwards;
  position: relative;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0d6efd, #00d4ff);
  animation: slideRight 0.8s ease-out;
}

@keyframes slideRight {
  from {
    transform: scaleX(0);
    transform-origin: left;
  }
  to {
    transform: scaleX(1);
    transform-origin: left;
  }
}

.project-card:hover {
  border-color: #00d4ff !important;
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.15) 0%, rgba(0, 212, 255, 0.1) 100%);
  box-shadow: 0 0 40px rgba(0, 212, 255, 0.3), 0 20px 60px rgba(13, 110, 253, 0.2);
  transform: translateY(-10px);
}

/* Carrusel mejorado */
.carousel-tall {
  height: 320px;
  border-radius: 15px;
  overflow: hidden;
}

.carousel-tall img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: rgba(13, 110, 253, 0.1);
}

.carousel-control-prev,
.carousel-control-next {
  opacity: 0;
  transition: all 0.3s ease;
  width: 50px;
  height: 50px;
  background: rgba(0, 212, 255, 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(0, 212, 255, 0.3);
}

/* Featured (destacado) carousel: same look as project cards but larger */
#carouselDestacado .carousel-tall {
  height: 520px; /* larger height for featured project */
}

@media (max-width: 992px) {
  #carouselDestacado .carousel-tall {
    height: 380px;
  }
}

@media (max-width: 576px) {
  #carouselDestacado .carousel-tall {
    height: 260px;
  }
}

.project-card:hover .carousel-control-prev,
.project-card:hover .carousel-control-next {
  opacity: 1;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  background: rgba(0, 212, 255, 0.4);
  border-color: #00d4ff;
}

/* Títulos de proyecto */
.project-card h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  background: linear-gradient(135deg, #fff 0%, #00d4ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: slideInLeft 0.8s ease-out;
  transition: all 0.3s ease;
  margin-bottom: 1.2rem;
}

.project-card:hover h3 {
  transform: translateX(10px);
}

/* Descripción del proyecto */
.project-card .card-body p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.75);
  transition: all 0.3s ease;
  animation: fadeInUp 0.8s ease-out 0.2s both;
  margin-bottom: 1.2rem;
}

/* Proyecto Destacado - Reducir padding */
#proyecto-destacado .project-card .card-body {
  padding: 2rem !important;
}

.project-card:hover .card-body p {
  color: rgba(255, 255, 255, 0.9);
}

/* Badges/etiquetas de tecnologías */
.badge {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  padding: 0.6rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(13, 110, 253, 0.3);
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.2) 0%, rgba(0, 212, 255, 0.1) 100%);
  color: #00d4ff;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeInUp 0.6s ease-out backwards;
}

.badge:nth-child(1) { animation-delay: 0.1s; }
.badge:nth-child(2) { animation-delay: 0.2s; }
.badge:nth-child(3) { animation-delay: 0.3s; }
.badge:nth-child(4) { animation-delay: 0.4s; }
.badge:nth-child(5) { animation-delay: 0.5s; }
.badge:nth-child(6) { animation-delay: 0.6s; }
.badge:nth-child(7) { animation-delay: 0.7s; }
.badge:nth-child(8) { animation-delay: 0.8s; }
.badge:nth-child(9) { animation-delay: 0.9s; }

.project-card:hover .badge {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.3) 0%, rgba(13, 110, 253, 0.2) 100%);
  border-color: #00d4ff;
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
  transform: scale(1.05);
}

/* Botones mejorados */
.project-card .btn {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  padding: 0.8rem 1.5rem;
  border-radius: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  animation: slideInUp 0.8s ease-out backwards;
}

.project-card .btn:nth-of-type(1) { animation-delay: 0.1s; }
.project-card .btn:nth-of-type(2) { animation-delay: 0.2s; }
.project-card .btn:nth-of-type(3) { animation-delay: 0.3s; }

.project-card .btn-primary {
  background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
  border: none;
  box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

.project-card .btn-primary:hover {
  background: linear-gradient(135deg, #00d4ff 0%, #0d6efd 100%);
  box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
  transform: translateY(-3px);
}

.project-card .btn-outline-primary {
  border: 2px solid #0d6efd;
  color: #0d6efd;
  background: transparent;
}

.project-card .btn-outline-primary:hover {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(13, 110, 253, 0.1) 100%);
  border-color: #00d4ff;
  color: #00d4ff;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.project-card .btn-outline-secondary {
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.7);
}

.project-card .btn-outline-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #00d4ff;
  color: #00d4ff;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

/* Sección Mis Proyectos */
#proyectos {
  position: relative;
  overflow: hidden;
}

#proyectos::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent 0%,
    rgba(0, 212, 255, 0.05) 25%,
    rgba(0, 212, 255, 0.05) 75%,
    transparent 100%);
  animation: gradientShift 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes gradientShift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(50%); }
}

/* Botones de filtro mejorados */
.tab-btn {
  font-family: 'Poppins', sans-serif !important;
  font-weight: 700 !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative;
  overflow: hidden;
  animation: slideUp 0.6s ease-out backwards;
}

.tab-btn:nth-of-type(1) { animation-delay: 0.2s; }
.tab-btn:nth-of-type(2) { animation-delay: 0.3s; }

.tab-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.tab-btn:hover::before {
  left: 100%;
}

.tab-btn.active {
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.4) !important;
  transform: scale(1.05);
}

.tab-btn:not(.active) {
  opacity: 0.7;
  transition: all 0.3s ease;
}

.tab-btn:not(.active):hover {
  opacity: 1;
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3) !important;
}

/* Grid de proyectos */
#proyectos-lista {
  animation: fadeIn 0.8s ease-out;
  position: relative;
  z-index: 2;
}

/* Animaciones keyframes comunes */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes expandWidth {
  from {
    width: 0;
  }
  to {
    width: 60px;
  }
}

@keyframes shimmer {
  0%, 100% {
    box-shadow: 0 0 5px rgba(13, 110, 253, 0.3);
  }
  50% {
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.6);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    filter: drop-shadow(0 0 5px rgba(13, 110, 253, 0.3));
  }
  50% {
    filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.6));
  }
}

/* Responsive */
@media (max-width: 768px) {
  .carousel-tall {
    height: 280px;
  }

  .project-card h3 {
    font-size: 1.3rem;
  }

  .project-card .btn {
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
  }

  #proyecto-destacado h2,
  #proyectos h2 {
    font-size: 2rem;
  }
}

@media (max-width: 576px) {
  .carousel-tall {
    height: 250px;
  }

  .carousel-control-prev,
  .carousel-control-next {
    width: 40px;
    height: 40px;
  }

  .project-card h3 {
    font-size: 1.2rem;
  }

  .badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
  }

  #proyecto-destacado h2,
  #proyectos h2 {
    font-size: 1.5rem;
  }
}
