/* ======================================================
   TARJETA DE PROYECTOS - HA INGENIEROS
   Animación 3D con capas traseras
   ====================================================== */

.cardProyecto {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  border-radius: 24px;
  line-height: 1.6;
  transition: all 0.48s cubic-bezier(0.23, 1, 0.32, 1);
}

.contentProyecto {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding: 40px 32px;
  border-radius: 22px;
  color: #ffffff;
  overflow: visible;
  background: linear-gradient(135deg, var(--primary, #0b6db6) 0%, var(--primary-dark, #135479) 100%);
  box-shadow: 0 10px 40px rgba(11, 109, 182, 0.3), 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.48s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Capa decorativa trasera 1 - Azul claro */
.contentProyecto::before {
  position: absolute;
  content: "";
  top: -4%;
  left: 50%;
  width: 90%;
  height: 90%;
  transform: translate(-50%);
  background: linear-gradient(145deg, #a8d4f0 0%, #7bbce6 100%);
  z-index: -1;
  transform-origin: bottom;
  border-radius: inherit;
  transition: all 0.48s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Capa decorativa trasera 2 - Gris azulado claro */
.contentProyecto::after {
  position: absolute;
  content: "";
  top: -8%;
  left: 50%;
  width: 80%;
  height: 80%;
  transform: translate(-50%);
  background: linear-gradient(145deg, #d0e4f2 0%, #b8d4e8 100%);
  z-index: -2;
  transform-origin: bottom;
  border-radius: inherit;
  transition: all 0.48s cubic-bezier(0.23, 1, 0.32, 1);
}

.contentProyecto .titleProyecto {
  z-index: 1;
  font-weight: 700;
  font-size: 32px;
  line-height: 1.2;
  color: #ffffff;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.contentProyecto .copyProyecto {
  z-index: 1;
  opacity: 1;
  font-size: 18px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  margin: 0;
  transition: all 0.48s cubic-bezier(0.23, 1, 0.32, 1);
}

/* ======================================================
   HOVER - Animación con capas giratorias
   ====================================================== */

.cardProyecto:hover {
  transform: translate(0px, -16px);
}

.cardProyecto:hover .contentProyecto {
  box-shadow: 0 20px 60px rgba(11, 109, 182, 0.35), 0 8px 20px rgba(0, 0, 0, 0.15);
}

.cardProyecto:hover .contentProyecto::before {
  rotate: -8deg;
  top: 0;
  width: 100%;
  height: 100%;
  box-shadow: 0 10px 40px rgba(11, 109, 182, 0.25);
}

.cardProyecto:hover .contentProyecto::after {
  rotate: 8deg;
  top: 0;
  width: 100%;
  height: 100%;
  box-shadow: 0 8px 30px rgba(11, 109, 182, 0.2);
}

/* ======================================================
   SECCIÓN DE BÚSQUEDA Y FILTROS
   ====================================================== */

.seccionProyectos {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 20px;
}

.proyectos-header {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-bottom: 50px;
  animation: fadeInUp 0.8s ease-out;
}

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

.proyectos-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}

/* ======================================================
   CARRUSEL AUTOMÁTICO
   ====================================================== */

.carrusel-container {
  position: relative;
  width: 100%;
  height: 400px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  z-index: 1;
  background: linear-gradient(135deg, #e0e7ef 0%, #c5d2df 100%);
}

.carrusel-slides {
  position: relative;
  width: 100%;
  height: 100%;
  background: transparent;
}

.carrusel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.carrusel-slide.active {
  opacity: 1;
}

.carrusel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carrusel-indicadores {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.15);
  padding: 8px 16px;
  border-radius: 30px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.carrusel-indicador {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.carrusel-indicador:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: scale(1.2);
}

.carrusel-indicador.active {
  background: #ffffff;
  width: 24px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.4);
}

.proyectos-filtros {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 8px 32px rgba(11, 109, 182, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(11, 109, 182, 0.1);
  transition: all 0.3s ease;
}

.proyectos-filtros:hover {
  box-shadow: 0 12px 40px rgba(11, 109, 182, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

/* Modo oscuro - Contenedor de filtros */
html[data-theme="dark"] .proyectos-filtros {
  background: linear-gradient(135deg, #0d1f2d 0%, #1a2f42 100%);
  border: 1px solid rgba(94, 179, 240, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(94, 179, 240, 0.1);
}

html[data-theme="dark"] .proyectos-filtros:hover {
  box-shadow: 0 12px 40px rgba(94, 179, 240, 0.2), 0 2px 6px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] .filtros-titulo {
  color: #e2e8f0;
}

html[data-theme="dark"] .filtros-titulo svg {
  fill: #5eb3f0;
}

html[data-theme="dark"] .proyectos-contador {
  color: #5eb3f0;
  background: linear-gradient(135deg, rgba(94, 179, 240, 0.15), rgba(94, 179, 240, 0.2));
  border: 1px solid rgba(94, 179, 240, 0.3);
}

html[data-theme="dark"] .proyectos-contador:hover {
  background: linear-gradient(135deg, rgba(94, 179, 240, 0.2), rgba(94, 179, 240, 0.25));
}

html[data-theme="dark"] .busqueda-input-wrapper svg {
  fill: #94a3b8;
}

.filtros-header-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.filtros-titulo {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary, #1f2937);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.proyectos-contador {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary, #0b6db6);
  background: linear-gradient(135deg, rgba(11, 109, 182, 0.1), rgba(19, 84, 121, 0.15));
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid rgba(11, 109, 182, 0.2);
  transition: all 0.3s ease;
}

.proyectos-contador:hover {
  background: linear-gradient(135deg, rgba(11, 109, 182, 0.15), rgba(19, 84, 121, 0.2));
  transform: scale(1.05);
}

.filtros-titulo svg {
  width: 20px;
  height: 20px;
  fill: var(--primary, #0b6db6);
}

.filtros-controles {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.busqueda-input-wrapper {
  position: relative;
  flex: 1;
  min-width: 280px;
}

.busqueda-input-wrapper svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  fill: #9ca3af;
  pointer-events: none;
}

.busqueda-input {
  width: 100%;
  padding: 14px 16px 14px 48px;
  border: 2px solid transparent;
  border-radius: 14px;
  font-size: 15px;
  font-family: inherit;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(#ffffff, #ffffff) padding-box,
              linear-gradient(135deg, rgba(11, 109, 182, 0.2), rgba(19, 84, 121, 0.2)) border-box;
  color: var(--text-primary, #1f2937);
}

.busqueda-input::placeholder {
  color: #9ca3af;
  transition: color 0.3s ease;
}

.busqueda-input:hover {
  background: linear-gradient(#ffffff, #ffffff) padding-box,
              linear-gradient(135deg, rgba(11, 109, 182, 0.4), rgba(19, 84, 121, 0.4)) border-box;
}

.busqueda-input:focus {
  outline: none;
  background: linear-gradient(#ffffff, #ffffff) padding-box,
              linear-gradient(135deg, var(--primary, #0b6db6), var(--primary-dark, #135479)) border-box;
  box-shadow: 0 8px 24px rgba(11, 109, 182, 0.15), 0 0 0 4px rgba(11, 109, 182, 0.08);
  transform: translateY(-1px);
}

.busqueda-input:focus::placeholder {
  color: #cbd5e1;
}

/* Modo oscuro - Input de búsqueda con colores claros */
html[data-theme="dark"] .busqueda-input {
  background: linear-gradient(rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08)) padding-box,
              linear-gradient(135deg, rgba(94, 179, 240, 0.4), rgba(94, 179, 240, 0.3)) border-box;
  color: #e2e8f0;
}

html[data-theme="dark"] .busqueda-input::placeholder {
  color: #94a3b8;
}

html[data-theme="dark"] .busqueda-input:hover {
  background: linear-gradient(rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12)) padding-box,
              linear-gradient(135deg, rgba(94, 179, 240, 0.6), rgba(94, 179, 240, 0.5)) border-box;
  color: #f1f5f9;
}

html[data-theme="dark"] .busqueda-input:focus {
  background: linear-gradient(rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.15)) padding-box,
              linear-gradient(135deg, #5eb3f0, #4a9fd9) border-box;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(94, 179, 240, 0.35), 0 0 0 4px rgba(94, 179, 240, 0.2);
}

.filtros-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filtro-tag {
  padding: 10px 20px;
  border: 2px solid transparent;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  background: linear-gradient(#ffffff, #ffffff) padding-box,
              linear-gradient(135deg, #e5e7eb, #d1d5db) border-box;
  color: var(--text-secondary, #6b7280);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  position: relative;
  overflow: hidden;
}

.filtro-tag::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(11, 109, 182, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.filtro-tag:hover {
  background: linear-gradient(rgba(11, 109, 182, 0.05), rgba(11, 109, 182, 0.08)) padding-box,
              linear-gradient(135deg, var(--primary, #0b6db6), var(--primary-dark, #135479)) border-box;
  color: var(--primary, #0b6db6);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(11, 109, 182, 0.2);
}

.filtro-tag:hover::before {
  width: 300px;
  height: 300px;
}

.filtro-tag.active {
  background: linear-gradient(135deg, var(--primary, #0b6db6), var(--primary-dark, #135479));
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(11, 109, 182, 0.35);
}

.filtro-tag.active::before {
  background: rgba(255, 255, 255, 0.1);
}

/* Modo oscuro - Filtros tags con colores claros */
html[data-theme="dark"] .filtro-tag {
  background: linear-gradient(rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08)) padding-box,
              linear-gradient(135deg, rgba(94, 179, 240, 0.3), rgba(94, 179, 240, 0.25)) border-box;
  color: #cbd5e1;
}

html[data-theme="dark"] .filtro-tag:hover {
  background: linear-gradient(rgba(94, 179, 240, 0.15), rgba(94, 179, 240, 0.2)) padding-box,
              linear-gradient(135deg, #5eb3f0, #4a9fd9) border-box;
  color: #5eb3f0;
  box-shadow: 0 4px 12px rgba(94, 179, 240, 0.3);
}

html[data-theme="dark"] .filtro-tag.active {
  background: linear-gradient(135deg, #5eb3f0, #4a9fd9);
  color: #0a1929;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(94, 179, 240, 0.5);
}

html[data-theme="dark"] .filtro-tag.active::before {
  background: rgba(255, 255, 255, 0.15);
}

.proyectos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 32px;
  margin-top: 40px;
}

.proyectos-grid > * {
  animation: fadeInUp 0.6s ease-out backwards;
}

.proyectos-grid > *:nth-child(1) { animation-delay: 0.1s; }
.proyectos-grid > *:nth-child(2) { animation-delay: 0.2s; }
.proyectos-grid > *:nth-child(3) { animation-delay: 0.3s; }
.proyectos-grid > *:nth-child(4) { animation-delay: 0.4s; }
.proyectos-grid > *:nth-child(5) { animation-delay: 0.5s; }
.proyectos-grid > *:nth-child(6) { animation-delay: 0.6s; }

.no-resultados {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary, #6b7280);
}

.no-resultados svg {
  width: 64px;
  height: 64px;
  fill: #d1d5db;
  margin-bottom: 16px;
}

.no-resultados h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary, #1f2937);
  margin: 0 0 8px 0;
}

.no-resultados p {
  font-size: 15px;
  margin: 0;
}

/* Soporte para usuarios con preferencia de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  .cardProyecto,
  .contentProyecto,
  .contentProyecto::before,
  .contentProyecto::after {
    transition: none;
  }
}

/* ======================================================
   RESPONSIVE - Animación 3D y Filtros
   ====================================================== */

@media (max-width: 1024px) {
  .proyectos-hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .carrusel-container {
    height: 350px;
  }
  
  .proyectos-grid {
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .cardProyecto {
    width: 100%;
    max-width: 100%;
  }
  
  .contentProyecto {
    padding: 32px 24px;
  }
  
  .contentProyecto .titleProyecto {
    font-size: 28px;
  }
  
  .contentProyecto .copyProyecto {
    font-size: 16px;
  }
  
  .carrusel-container {
    height: 280px;
  }
  
  .proyectos-filtros {
    padding: 24px;
  }
  
  .filtros-controles {
    flex-direction: column;
    align-items: stretch;
  }
  
  .busqueda-input-wrapper {
    min-width: 100%;
  }
  
  .proyectos-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}














/* ======================================================
   MODAL DE PROYECTOS - HA INGENIEROS
   Todos los estilos con prefijo "modal-proyecto-"
   ====================================================== */

/* ======================================================
   CARD GALERÍA CON MODAL - Diseño según imagen
====================================================== */
.modal-proyecto-card-galeria {
  background: var(--bg-surface, #ffffff);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.04);
  max-width: 420px;
  width: 100%;
  border: 1px solid rgba(11, 109, 182, 0.08);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  position: relative;
}

.modal-proyecto-card-galeria::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary, #0b6db6), var(--primary-dark, #135479), var(--secondary, #0e0573));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-proyecto-card-galeria:hover {
  transform: translateY(-12px);
  box-shadow: 0 20px 50px rgba(11, 109, 182, .25), 0 8px 20px rgba(0,0,0,.08);
  border-color: rgba(11, 109, 182, 0.2);
}

.modal-proyecto-card-galeria:hover::before {
  opacity: 1;
}

/* Sección superior con imagen de fondo */
.modal-proyecto-header-card {
  padding: 32px 28px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 220px;
}

/* Overlay con color y opacidad del 50% (más transparente) */
.modal-proyecto-header-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(14, 78, 143, 0.5) 0%, rgba(21, 101, 184, 0.5) 100%);
  z-index: 1;
}

.modal-proyecto-icono {
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

.modal-proyecto-card-galeria:hover .modal-proyecto-icono {
  transform: rotate(5deg) scale(1.05);
  background: rgba(255, 255, 255, 0.35);
}

.modal-proyecto-icono svg {
  width: 28px;
  height: 28px;
  fill: #ffffff;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.modal-proyecto-info {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-proyecto-titulo {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  line-height: 1.3;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 2;
}

.modal-proyecto-cliente {
  font-size: 15px;
  font-weight: 500;
  color: #ffffff;
  margin: 0;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 6px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 2;
}

.modal-proyecto-cliente svg {
  width: 16px;
  height: 16px;
  fill: #ffffff;
  opacity: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.modal-proyecto-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
  position: relative;
  z-index: 2;
}

.modal-proyecto-tag {
  font-size: 12px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  color: #ffffff;
  font-weight: 600;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  transition: all 0.25s ease;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.modal-proyecto-tag:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

/* Sección inferior con fondo blanco */
.modal-proyecto-footer-card {
  padding: 24px 28px;
  background: var(--bg-surface, #ffffff);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

html[data-theme="dark"] .modal-proyecto-footer-card {
  background: var(--bg-surface, #16202b);
}

.modal-proyecto-descripcion {
  font-size: 15px;
  line-height: 1.7;
  color: #000000;
  margin: 0;
}

html[data-theme="dark"] .modal-proyecto-descripcion {
  color: #ffffff;
}

/* Títulos en modo oscuro - blancos para mejor visibilidad */
html[data-theme="dark"] .modal-proyecto-titulo {
  color: #ffffff !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] .modal-proyecto-cliente {
  color: rgba(255, 255, 255, 0.95) !important;
}

html[data-theme="dark"] .modal-proyecto-header-text h2 {
  color: #ffffff !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] .modal-proyecto-header-cliente {
  color: rgba(255, 255, 255, 0.95) !important;
}



/* Responsive */
@media (max-width: 480px) {
  .modal-proyecto-card-galeria {
    max-width: 100%;
  }
  
  .modal-proyecto-header-card,
  .modal-proyecto-footer-card {
    padding: 24px 20px;
  }
  
  .modal-proyecto-titulo {
    font-size: 20px;
  }
}

.modal-proyecto-detalles {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.modal-proyecto-tag {
  font-size: 11px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  color: #ffffff;
  font-weight: 500;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-proyecto-descripcion {
  font-size: 14px;
  line-height: 1.6;
  color: #000000;
  margin: 0;
}

.modal-proyecto-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 24px;
  background: var(--primary, #0b6db6);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm, 8px);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
  z-index: 2;
}

.modal-proyecto-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: var(--primary, #0b6db6);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.modal-proyecto-btn:hover::before {
  width: 300px;
  height: 300px;
}

.modal-proyecto-btn:hover {
  transform: translateY(-2px);
  color: #ffffff;
}

.modal-proyecto-btn:active {
  transform: translateY(0);
}

.modal-proyecto-btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 1;
  stroke: currentColor;
  fill: none;
}

.modal-proyecto-btn:hover svg {
  transform: translateX(4px);
}

.modal-proyecto-btn span {
  position: relative;
  z-index: 1;
}

/* ======================================================
   MODAL OVERLAY
====================================================== */
.modal-proyecto-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 32, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              visibility 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  padding: 20px;
}

html[data-theme="dark"] .modal-proyecto-overlay {
  background: rgba(0, 0, 0, 0.85);
}

.modal-proyecto-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ======================================================
   MODAL CONTAINER
====================================================== */
.modal-proyecto-container {
  background: var(--bg-surface, #ffffff);
  border-radius: var(--radius, 14px);
  max-width: 920px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color, #dfe5ec);
  transform: scale(0.9) translateY(30px);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.modal-proyecto-overlay.active .modal-proyecto-container {
  transform: scale(1) translateY(0);
}

/* Scrollbar personalizado */
.modal-proyecto-container::-webkit-scrollbar {
  width: 10px;
}

.modal-proyecto-container::-webkit-scrollbar-track {
  background: var(--bg-muted, #eef2f6);
  border-radius: 10px;
}

.modal-proyecto-container::-webkit-scrollbar-thumb {
  background: var(--primary, #0b6db6);
  border-radius: 10px;
  border: 2px solid var(--bg-muted, #eef2f6);
}

.modal-proyecto-container::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark, #135479);
}

/* ======================================================
   MODAL CLOSE BUTTON
====================================================== */
.modal-proyecto-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  backdrop-filter: blur(10px);
}

.modal-proyecto-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.modal-proyecto-close svg {
  stroke: #ffffff;
  fill: none;
  transition: stroke 0.3s ease;
}

/* ======================================================
   MODAL BANNER
====================================================== */
.modal-proyecto-banner {
  background: linear-gradient(135deg, var(--primary, #0b6db6) 0%, var(--secondary, #0e0573) 100%);
  padding: 48px 40px;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.modal-proyecto-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(11, 109, 182, 0.85) 0%, rgba(14, 5, 115, 0.85) 100%);
  z-index: 1;
}

.modal-proyecto-banner::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 1;
}

.modal-proyecto-header {
  display: flex;
  align-items: center;
  gap: 24px;
  position: relative;
  z-index: 2;
}

.modal-proyecto-header-icono {
  width: 72px;
  height: 72px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
}

.modal-proyecto-header-icono svg {
  width: 36px;
  height: 36px;
  fill: #ffffff;
  filter: drop-shadow(0 2px 6px rgba(255, 255, 255, 0.3));
}

.modal-proyecto-header-text h2 {
  font-size: 28px;
  margin: 0 0 8px 0;
  color: #ffffff;
  font-weight: 700;
  line-height: 1.2;
}

.modal-proyecto-header-cliente {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.modal-proyecto-header-cliente svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  opacity: 0.9;
}

/* ======================================================
   MODAL CONTENT
====================================================== */
.modal-proyecto-content {
  padding: 40px;
}

.modal-proyecto-body {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.modal-proyecto-section {
  position: relative;
}

/* Animación de aparición progresiva para secciones */
.modal-proyecto-section.typing-animation,
.modal-proyecto-galeria.typing-animation {
  opacity: 0;
  transform: translateY(20px);
  animation: typingSlideIn 0.6s ease-out forwards;
}

.modal-proyecto-section h3 {
  font-size: 16px;
  color: var(--primary, #0b6db6);
  margin: 0 0 16px 0;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-proyecto-section h3 svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex-shrink: 0;
}

.modal-proyecto-section h3 svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex-shrink: 0;
}

/* Badge informativo */
.modal-proyecto-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(11, 109, 182, 0.1);
  border-radius: 8px;
  font-size: 14px;
  color: var(--primary, #0b6db6);
  font-weight: 600;
  border: 1px solid rgba(11, 109, 182, 0.2);
}

.modal-proyecto-badge svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

html[data-theme="dark"] .modal-proyecto-badge {
  background: rgba(94, 179, 240, 0.15);
  border-color: rgba(94, 179, 240, 0.3);
  color: #5eb3f0;
}

html[data-theme="dark"] .modal-proyecto-section h3 {
  color: #ffffff;
}

html[data-theme="dark"] .modal-proyecto-section p {
  color: rgba(255, 255, 255, 0.9);
}

html[data-theme="dark"] .modal-proyecto-section li {
  color: rgba(255, 255, 255, 0.9);
}

.modal-proyecto-section p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-main, #000000);
  margin: 0;
}

.modal-proyecto-section ul {
  margin: 16px 0 0 0;
  padding-left: 0;
  list-style: none;
}

.modal-proyecto-section li {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-main, #000000);
  margin-bottom: 12px;
  padding-left: 28px;
  position: relative;
}

/* Animación de escritura progresiva */
.modal-proyecto-section li.typing-animation {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

/* Efecto de cursor parpadeante */
.modal-proyecto-section li.typing-animation::after {
  content: '|';
  animation: blink 0.7s infinite;
  margin-left: 2px;
}

.modal-proyecto-section li.typing-animation[data-escrito="true"]::after {
  display: none;
}

@keyframes blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

@keyframes typingSlideIn {
  0% {
    opacity: 0;
    transform: translateX(-20px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.modal-proyecto-section li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  background: var(--primary, #0b6db6);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: bold;
  line-height: 1;
}

html[data-theme="dark"] .modal-proyecto-section li::before {
  background: #5eb3f0;
}

/* Stats Cards */
.modal-proyecto-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.modal-proyecto-stat-card {
  background: var(--bg-muted, #eef2f6);
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
  border: 1px solid var(--border-color, #dfe5ec);
  transition: all 0.3s ease;
}

/* Animación para stat cards */
.modal-proyecto-stat-card.typing-animation {
  opacity: 0;
  transform: scale(0.9) translateY(20px);
  animation: statCardAppear 0.6s ease-out forwards;
}

@keyframes statCardAppear {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(30px);
  }
  60% {
    opacity: 1;
    transform: scale(1.05) translateY(-5px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-proyecto-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(11, 109, 182, 0.15);
  border-color: var(--primary, #0b6db6);
}

html[data-theme="dark"] .modal-proyecto-stat-card {
  background: var(--bg-muted, #1c2a38);
  border-color: var(--border-color, #243547);
}

.modal-proyecto-stat-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary, #0b6db6);
  line-height: 1;
  margin-bottom: 8px;
  transition: transform 0.3s ease;
}

/* Efecto de énfasis al contar */
.modal-proyecto-stat-value.counting {
  animation: valuePulse 0.5s ease-in-out;
}

@keyframes valuePulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

html[data-theme="dark"] .modal-proyecto-stat-value {
  color: #5eb3f0;
}

.modal-proyecto-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #5f6b7a);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ======================================================
   GALERÍA
====================================================== */
.modal-proyecto-galeria h3 {
  font-size: 16px;
  color: var(--primary, #0b6db6);
  margin: 0 0 20px 0;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-proyecto-galeria h3 svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

html[data-theme="dark"] .modal-proyecto-galeria h3 {
  color: #5eb3f0;
}

.modal-proyecto-galeria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.modal-proyecto-galeria-item {
  aspect-ratio: 4/3;
  background: var(--bg-muted, #eef2f6);
  border-radius: var(--radius-sm, 8px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

/* Animación para items de galería */
.modal-proyecto-galeria-item.typing-animation {
  opacity: 0;
  transform: scale(0.8) rotate(5deg);
  animation: galeriaItemAppear 0.6s ease-out forwards;
}

@keyframes galeriaItemAppear {
  0% {
    opacity: 0;
    transform: scale(0.8) rotate(5deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.modal-proyecto-galeria-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.modal-proyecto-galeria-item:hover img {
  transform: scale(1.1);
}

.modal-proyecto-galeria-item svg {
  width: 48px;
  height: 48px;
  fill: var(--text-muted, #5f6b7a);
  opacity: 0.5;
  transition: all 0.3s ease;
}

.modal-proyecto-galeria-item:hover svg {
  fill: var(--primary, #0b6db6);
  opacity: 0.8;
  transform: scale(1.1);
}

/* ======================================================
   PREVENT SCROLL
====================================================== */
body.modal-proyecto-open {
  overflow: hidden;
}

/* ======================================================
   RESPONSIVE
====================================================== */
@media (max-width: 768px) {
  .modal-proyecto-banner {
    padding: 32px 24px;
  }

  .modal-proyecto-header {
    flex-direction: column;
    text-align: center;
  }

  .modal-proyecto-header-text h2 {
    font-size: 24px;
  }

  .modal-proyecto-content {
    padding: 28px 24px;
  }

  .modal-proyecto-section h3 {
    font-size: 16px;
  }

  .modal-proyecto-galeria-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal-proyecto-content-galeria {
    padding: 28px 20px;
  }
}

@media (max-width: 480px) {
  .modal-proyecto-galeria-grid {
    grid-template-columns: 1fr;
  }

  .modal-proyecto-container {
    border-radius: 12px;
  }
}



