/* construccion.css - limpio */

/* ===== ESTILOS ESPECÍFICOS CONSTRUCCIÓN ===== */
.construccion-main {
  padding-top: var(--header-height);
  background: var(--color-light);
}

/* Hero Section */
.hero-construccion {
  position: relative;
  height: calc(100vh - var(--header-height));
  background: linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.85)),
              url('../assets/images/trabajadores-de-la-construccion-al-atardecer.jpg') center/cover;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-white);
  padding: 0 2rem;
  margin-bottom: 4rem;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.25rem;
  font-weight: 300;
  max-width: 800px;
  margin: 0 auto;
  opacity: 0.9;
}

/* Filtros */
.filtros-container {
  background: var(--color-white);
  padding: 1.5rem 0;
  position: sticky;
  top: var(--header-height);
  z-index: 900;
  box-shadow: 0 2px 15px rgba(0,0,0,0.08);
  margin-bottom: 3rem;
}

.filtros-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0 2rem;
}

.filtro-btn {
  background: none;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  padding: 0.75rem 2rem;
  border-radius: 30px;
  cursor: pointer;
  transition: all var(--transition);
  font-weight: 600;
  font-size: 0.95rem;
}

.filtro-btn.active,
.filtro-btn:hover {
  background: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-2px);
}

/* Grid de Proyectos */
.proyectos-grid-container {
  padding: 2rem 2rem 4rem;
}

.proyectos-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}

.proyecto-card {
  background: var(--color-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 25px rgba(0,0,0,0.08);
  transition: transform var(--transition);
  position: relative;
}

.proyecto-card:hover {
  transform: translateY(-10px);
}

.proyecto-imagen {
  position: relative;
  height: 300px;
  overflow: hidden;
}

.proyecto-imagen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.proyecto-card:hover img {
  transform: scale(1.08);
}

.proyecto-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  color: var(--color-white);
  padding: 2rem;
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-align: left;
}

.proyecto-card:hover .proyecto-overlay {
  opacity: 1;
}

.ver-detalle {
  background: var(--color-accent);
  color: var(--color-primary);
  border: none;
  padding: 0.8rem 1.8rem;
  border-radius: 25px;
  margin-top: 1.5rem;
  cursor: pointer;
  font-weight: 700;
  transition: all var(--transition);
  align-self: center;
}

.ver-detalle:hover {
  background: var(--color-white);
  box-shadow: 0 3px 15px rgba(255, 217, 0, 0.3);
}

.proyecto-info {
  padding: 1.5rem;
}

.proyecto-categoria {
  display: block;
  color: var(--color-accent);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.proyecto-info h4 {
  color: var(--color-primary);
  font-size: 0.9rem;
  line-height: 1.4;
  min-height: 3.5rem;
}

/* Lightbox - Versión mejorada */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.98);
  z-index: 10000;
  overflow: hidden;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  margin: 2rem auto;
  background: var(--color-white);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-main-image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
}

.lightbox-main-image img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.lightbox-thumbnails {
  display: flex;
  gap: 0.8rem;
  padding: 1rem 2rem;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--color-accent) transparent;
  margin-bottom: 1rem;
}

/* Scrollbar personalizada para thumbnails */
.lightbox-thumbnails::-webkit-scrollbar {
  height: 6px;
}

.lightbox-thumbnails::-webkit-scrollbar-thumb {
  background: var(--color-accent);
  border-radius: 4px;
}

.lightbox-thumbnail {
  width: 80px;
  height: 60px;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  object-fit: cover;
}

.lightbox-thumbnail.active,
.lightbox-thumbnail:hover {
  opacity: 1;
  border-color: var(--color-accent);
  transform: scale(1.05);
}

.lightbox-controls {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 1rem;
  pointer-events: none;
}

.lightbox-arrow {
  pointer-events: all;
  background: rgba(255, 215, 0, 0.95);
  color: var(--color-primary);
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  backdrop-filter: blur(2px);
}

.lightbox-arrow:hover {
  transform: scale(1.2) translateY(-2px);
  background: var(--color-accent);
}

.close-lightbox {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 2.2rem;
  color: var(--color-white) !important;
  cursor: pointer;
  z-index: 10001;
  transition: all var(--transition);
  background: rgba(0, 0, 0, 0.9);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding-bottom: 3px;
  border: 2px solid var(--color-accent);
}

.close-lightbox:hover {
  transform: rotate(90deg) scale(1.1);
  background: var(--color-accent);
  color: var(--color-primary) !important;
}

/* Ajustes responsive */
@media (max-width: 768px) {
  .lightbox-content {
    max-width: 95%;
    max-height: 95vh;
  }
  
  .lightbox-main-image {
    padding: 1rem;
  }
  
  .lightbox-main-image img {
    max-height: 60vh;
  }
  
  .lightbox-arrow {
    width: 35px;
    height: 35px;
    font-size: 1.2rem;
  }
  
  .close-lightbox {
    top: 10px;
    right: 10px;
    width: 35px;
    height: 35px;
    font-size: 1.8rem;
  }
  
  .lightbox-thumbnail {
    width: 60px;
    height: 45px;
  }
}

@media (max-width: 768px) {
  .hero-construccion {
      height: 60vh;
      margin-bottom: 2rem;
  }
  
  .proyectos-grid {
      grid-template-columns: 1fr;
      gap: 2rem;
  }
  
  .filtros-content {
      justify-content: flex-start;
      padding: 0 1rem;
  }
  
  .filtro-btn {
      width: 100%;
      text-align: center;
  }
  
  .lightbox-content {
      flex-direction: column;
      padding: 1.5rem;
  }
  
  .lightbox-content img {
      width: 100%;
      height: 300px;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
      font-size: 2rem;
  }
  
  .hero-subtitle {
      font-size: 1rem;
  }
  
  .proyecto-imagen {
      height: 200px;
  }
}
