/* ============================================================
   TECNISERVICE GALLERY — Estilos
   Mismo estilo visual de la galería de Nuestro Trabajo
   ============================================================ */

.tsg-wrapper * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.tsg-wrapper {
  background: #ffffff;
  width: 100%;
  padding: 90px 0;
}

/* ============================================================
   ENCABEZADO
   ============================================================ */
.tsg-header {
  text-align: center;
  margin-bottom: 48px;
}

.tsg-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #ea6424;
  margin-bottom: 14px;
  justify-content: center;
}

.tsg-tag::before,
.tsg-tag::after {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: #ea6424;
  flex-shrink: 0;
}

.tsg-title {
  font-family: 'Barlow', sans-serif;
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  font-weight: 900;
  line-height: 1.1;
  color: #1b1d35;
  margin-bottom: 14px;
}

.tsg-title em {
  color: #ea6424;
  font-style: normal;
}

.tsg-desc {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: #6b7280;
  line-height: 1.80;
  max-width: 520px;
  margin: 0 auto;
}

/* ============================================================
   FILTROS
   ============================================================ */
.tsg-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.tsg-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 20px;
  border-radius: 50px;
  border: 2px solid #e2e2da;
  background: transparent;
  color: #6b7280;
  font-family: 'Barlow', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.tsg-filter i {
  font-size: 12px;
}

.tsg-filter:hover {
  border-color: #ea6424;
  color: #ea6424;
}

.tsg-filter.active {
  background: #ea6424;
  border-color: #ea6424;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(234, 100, 36, 0.30);
}

/* ============================================================
   CONTADOR
   ============================================================ */
.tsg-counter {
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 28px;
}

.tsg-count {
  color: #ea6424;
  font-weight: 700;
}

/* ============================================================
   GRID
   ============================================================ */
.tsg-grid {
  display: grid;
  gap: 14px;
}

.tsg-cols-2 { grid-template-columns: repeat(2, 1fr); }
.tsg-cols-3 { grid-template-columns: repeat(3, 1fr); }
.tsg-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ============================================================
   ITEM
   ============================================================ */
.tsg-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  display: block;
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.tsg-item.tsg-show {
  opacity: 1;
  transform: scale(1);
}

.tsg-item.tsg-hide {
  opacity: 0;
  transform: scale(0.94);
  pointer-events: none;
  position: absolute;
  visibility: hidden;
  width: 0;
  height: 0;
  overflow: hidden;
}

.tsg-item.tsg-hidden-item {
  display: none;
}

/* Imagen */
.tsg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.tsg-item:hover .tsg-img {
  transform: scale(1.08);
}

/* Overlay */
.tsg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(27, 29, 53, 0.90) 0%,
    rgba(27, 29, 53, 0.40) 50%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
}

.tsg-item:hover .tsg-overlay {
  opacity: 1;
}

/* Ícono zoom */
.tsg-zoom {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(234, 100, 36, 0.90);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.tsg-zoom i {
  color: #ffffff;
  font-size: 16px;
}

.tsg-item:hover .tsg-zoom {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Info inferior del item */
.tsg-item-cat {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: #ea6424;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  display: block;
  margin-bottom: 4px;
}

.tsg-item-name {
  font-family: 'Barlow', sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.3;
  display: block;
}

/* ============================================================
   BOTÓN CARGAR MÁS
   ============================================================ */
.tsg-more-wrap {
  text-align: center;
  margin-top: 40px;
}

.tsg-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: transparent;
  color: #1b1d35;
  font-family: 'Barlow', sans-serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 13px 32px;
  border-radius: 6px;
  border: 2px solid #e2e2da;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tsg-more-btn:hover {
  border-color: #ea6424;
  color: #ea6424;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(234, 100, 36, 0.15);
}

.tsg-more-btn i { font-size: 13px; }

.tsg-more-btn.tsg-hidden {
  display: none;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.tsg-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.tsg-lightbox.tsg-lb-open {
  display: flex;
  animation: tsg-lb-in 0.3s ease;
}

@keyframes tsg-lb-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.tsg-lb-content {
  position: relative;
  max-width: 1000px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.tsg-lb-img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 10px;
  object-fit: contain;
  display: block;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.50);
}

.tsg-lb-info {
  text-align: center;
}

.tsg-lb-cat {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #ea6424;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: block;
  margin-bottom: 5px;
}

.tsg-lb-name {
  font-family: 'Barlow', sans-serif;
  font-size: 18px;
  font-weight: 900;
  color: #ffffff;
  display: block;
}

.tsg-lb-close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.20);
  color: #ffffff;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.25s ease;
  z-index: 10;
}

.tsg-lb-close:hover {
  background: #ea6424;
  border-color: #ea6424;
}

.tsg-lb-prev,
.tsg-lb-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.10);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  z-index: 10;
}

.tsg-lb-prev { left: 20px; }
.tsg-lb-next { right: 20px; }

.tsg-lb-prev:hover,
.tsg-lb-next:hover {
  background: #ea6424;
  border-color: #ea6424;
}

.tsg-lb-counter {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.50);
  z-index: 10;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .tsg-cols-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .tsg-wrapper { padding: 64px 0; }
  .tsg-cols-3,
  .tsg-cols-4 { grid-template-columns: repeat(2, 1fr); }
  .tsg-grid   { gap: 10px; }
  .tsg-lb-prev { left: 8px; }
  .tsg-lb-next { right: 8px; }
}

@media (max-width: 480px) {
  .tsg-wrapper { padding: 52px 0; }
  .tsg-cols-2,
  .tsg-cols-3,
  .tsg-cols-4 { grid-template-columns: repeat(2, 1fr); }
  .tsg-grid   { gap: 8px; }
  .tsg-filter { padding: 7px 14px; font-size: 12px; }
}
