/* ============================================================
   GALERIA.CSS — Group SIE
   Estilos de la sección de galería, filtro desplegable y lightbox.
   Vinculado en <head> después de styles.css.
============================================================ */

/* ── Variables heredadas del sitio ── */
:root {
  --g-orange:   #FF6200;
  --g-orange-dk:#FF6200;
  --g-accent:   #FF6200;
  --g-bg:       #151515;
  --g-panel:    #FFFFFF;
  --g-border:   #FF6200;
  --g-text:     #000000;
  --g-muted:    rgba(255,255,255,0.45);
  --g-radius:   8px;
  --g-transition: 0.3s ease;
}

/* ════════════════════════════════════════
   SECCION GALERIA
════════════════════════════════════════ */
#galeria {
  background: var(--g-bg);
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}

/* Textura de fondo sutil */
#galeria::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg,   transparent, transparent 48px, rgba(232,93,4,0.025) 48px, rgba(232,93,4,0.025) 49px),
    repeating-linear-gradient(90deg,  transparent, transparent 48px, rgba(232,93,4,0.025) 48px, rgba(232,93,4,0.025) 49px);
  pointer-events: none;
}

#galeria .container { position: relative; z-index: 1; }

/* ── Bloque de titulo ── */
.gal-title-block {
  text-align: center;
  margin-bottom: 2.5rem;
}
.gal-eyebrow {
  display: block;
  font-family: 'Bruno Ace SC', cursive;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--g-accent);
  margin-bottom: 0.5rem;
}
.gal-title-block h2 {
  font-family: 'Bruno Ace SC', sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 900;
  color: #FF6200;
  margin-bottom: 0.5rem;
}
.gal-title-block h1 {
  font-family: 'Bruno', sans-serif;
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 350;
  color: #FFFFFF;
  margin-bottom: 0.5rem;
}
.gal-title-block p {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.88rem;
  color: var(--g-muted);
}
.gal-title-block::after {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  background: var(--g-orange);
  margin: 1rem auto 0;
  border-radius: 2px;
}

/* ════════════════════════════════════════
   FILTRO — MENU DESPLEGABLE
════════════════════════════════════════ */
.gal-filter-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
  position: relative;
  z-index: 50;
}

.gal-dropdown {
  position: relative;
  display: inline-block;
}

/* Botón principal del desplegable */
.gal-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1.25rem;
  background: var(--g-panel);
  border: 2px solid #FF6200;
  border-radius: 50px;
  color: #FF6200;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: var(--g-transition);
  white-space: nowrap;
  min-width: 220px;
  justify-content: space-between;
}
.gal-dropdown-btn:hover {
  border-color: var(--g-orange);
  background: rgba(232,93,4,0.08);
}
.gal-dropdown-btn.open {
  border-color: var(--g-orange);
  background: rgba(232,93,4,0.1);
  border-radius: 12px 12px 0 0;
}

.gal-dropdown-icon {
  font-size: 1rem;
}
.gal-dropdown-label {
  flex: 1;
  text-align: left;
}
.gal-dropdown-arrow {
  font-size: 0.65rem;
  transition: transform var(--g-transition);
  opacity: 0.6;
}
.gal-dropdown-btn.open .gal-dropdown-arrow {
  transform: rotate(180deg);
}

/* Lista desplegable */
.gal-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--g-panel);
  border: 1.5px solid var(--g-orange);
  border-top: none;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.25s ease;
  pointer-events: none;
  z-index: 100;
}
.gal-dropdown-menu.open {
  max-height: 500px;
  opacity: 1;
  pointer-events: all;
}

.gal-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1.25rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(#000000);
  cursor: pointer;
  transition: background var(--g-transition), color var(--g-transition);
  border-bottom: 1px solid var(--g-border);
}
.gal-dropdown-item:last-child { border-bottom: none; }
.gal-dropdown-item:hover {
  background: rgba(232,93,4,0.1);
  color: #FF6200;
}
.gal-dropdown-item.active {
  color: var(--g-orange);
  font-weight: 700;
}
.gal-dropdown-item .item-icon { font-size: 1rem; }
.cat-svg-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--g-accent);
  opacity: .75;
}
.cat-svg-icon svg {
  width: 16px;
  height: 16px;
}
.gal-dropdown-item:hover .cat-svg-icon,
.gal-dropdown-item.active .cat-svg-icon {
  opacity: 1;
  color: var(--g-accent);
}
.gal-dropdown-item .item-count {
  margin-left: auto;
  font-size: 0.65rem;
  background: rgba(255,255,255,0.06);
  color: var(--g-muted);
  padding: 2px 8px;
  border-radius: 100px;
}
.gal-dropdown-item.active .item-count {
  background: rgba(232,93,4,0.2);
  color: var(--g-orange);
}

/* Contador de resultados */
.gal-count {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  color: var(--g-muted);
  text-align: center;
  margin-bottom: 1.5rem;
  letter-spacing: 0.04em;
}
.gal-count span { color: var(--g-accent); font-weight: 700; }

/* ════════════════════════════════════════
   GRID DE IMAGENES
════════════════════════════════════════ */
.gal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 1100px) { .gal-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px)  { .gal-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
@media (max-width: 480px)  { .gal-grid { grid-template-columns: 1fr; } }

/* Item de galería */
.gal-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--g-radius);
  cursor: pointer;
  background: #1a1a1a;
  aspect-ratio: 4 / 3;

  /* Animación de entrada */
  opacity: 0;
  transform: translateY(20px) scale(0.97);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease,
    box-shadow 0.3s ease;
}
.gal-item.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.gal-item.hiding {
  opacity: 0;
  transform: scale(0.93);
  pointer-events: none;
}

.gal-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s cubic-bezier(0.25,0.46,0.45,0.94), filter 0.4s ease;
  filter: brightness(0.85);
}
.gal-item:hover img {
  transform: scale(1.08);
  filter: brightness(1);
}
.gal-item:hover {
  box-shadow: 0 8px 32px rgba(232,93,4,0.3);
}

/* Overlay en hover */
.gal-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.85) 0%,
    rgba(232,93,4,0.12) 55%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
}
.gal-item:hover .gal-overlay { opacity: 1; }

.gal-overlay-cat {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--g-accent);
  margin-bottom: 0.2rem;
}
.gal-overlay-title {
  font-family: 'Anek Telugu', sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

/* Badge de categoria (esquina) */
.gal-cat-badge {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  background: rgba(232,93,4,0.88);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 100px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}
.gal-item:hover .gal-cat-badge { opacity: 1; }

/* Icono de lupa */
.gal-zoom-icon {
  position: absolute;
  top: .55rem;
  right: .55rem;
  width: 32px;
  height: 32px;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s;
  z-index: 3;
}
.gal-zoom-icon svg {
  width: 16px;
  height: 16px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}
.gal-item:hover .gal-zoom-icon {
  opacity: 1;
  transform: scale(1);
  background: rgba(255,98,0,.8);
}

/* Estado vacío */
.gal-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1rem;
  color: var(--g-muted);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.88rem;
}
.gal-empty .gal-empty-icon {
  display: block;
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.35;
}

/* ════════════════════════════════════════
   LIGHTBOX / MODAL
════════════════════════════════════════ */
.gal-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.96);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.gal-lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.gal-lb-inner {
  position: relative;
  max-width: 980px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  transform: scale(0.96);
  transition: transform 0.3s ease;
}
.gal-lightbox.open .gal-lb-inner {
  transform: scale(1);
}

/* Imagen principal del lightbox */
.gal-lb-img-wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
  border-radius: 10px;
  overflow: visible;
  min-height: 200px;
}
.gal-lb-img-wrap img {
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 10px;
  display: block;
  transition: opacity 0.2s ease;
}

/* Spinner de carga */
.gal-lb-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
  border-radius: 10px;
}
.gal-lb-spinner::after {
  content: "";
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: var(--g-orange);
  border-radius: 50%;
  animation: gal-spin 0.7s linear infinite;
}
@keyframes gal-spin { to { transform: rotate(360deg); } }

/* Boton cerrar */
.gal-lb-close {
  position: fixed;
  top: 1.2rem;
  right: 1.2rem;
  width: 44px;
  height: 44px;
  background: rgba(255,98,0,.9);
  border: 2px solid rgba(255,255,255,.3);
  border-radius: 50%;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.gal-lb-close:hover {
  background: var(--g-orange-dk);
  transform: scale(1.1) rotate(90deg);
}

/* Botones anterior / siguiente */
.gal-lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.25s ease;
  z-index: 5;
  box-shadow: 0 2px 16px rgba(0,0,0,0.6);
}
.gal-lb-nav:hover {
  background: var(--g-orange);
  border-color: var(--g-orange);
  transform: translateY(-50%) scale(1.1);
}
/* Flechas SVG */
.gal-lb-prev { left: 14px; }
.gal-lb-next { right: 14px; }

.gal-lb-prev::after,
.gal-lb-next::after {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
.gal-lb-prev::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 18 9 12 15 6'/%3E%3C/svg%3E");
  margin-right: 2px;
}
.gal-lb-next::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E");
  margin-left: 2px;
}
.gal-lb-nav:hover::after {
  filter: brightness(1.2);
}

@media (max-width: 600px) {
  .gal-lb-prev { left: 6px; }
  .gal-lb-next { right: 6px; }
  .gal-lb-nav  { width: 42px; height: 42px; }
  .gal-lb-prev::after, .gal-lb-next::after { width: 18px; height: 18px; }
}

/* Info del lightbox */
.gal-lb-info {
  text-align: center;
  width: 100%;
}
.gal-lb-cat {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--g-accent);
  margin-bottom: 0.3rem;
}
.gal-lb-title {
  font-family: 'Anek Telugu', sans-serif;
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.3rem;
}
.gal-lb-desc {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  color: var(--g-muted);
  line-height: 1.65;
  max-width: 520px;
  margin: 0 auto;
}
.gal-lb-counter {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.06em;
  margin-top: 0.4rem;
}
.gal-lb-counter span { color: var(--g-accent); font-weight: 700; }

/* Puntos indicadores */
.gal-lb-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  max-width: 320px;
  margin: 0.4rem auto 0;
}
.gal-lb-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  padding: 0;
}
.gal-lb-dot.active {
  background: var(--g-orange);
  transform: scale(1.4);
}




@media (max-width: 500px) {
  
  
}
@keyframes wa-pulse {
  0%,100% { box-shadow: 0 6px 24px rgba(37,211,102,0.45); }
  50%      { box-shadow: 0 6px 30px rgba(37,211,102,0.7), 0 0 0 8px rgba(37,211,102,0.1); }
}
