/* ===================================================
   Galería Comercial Amito — Estilos profesionales
   =================================================== */

:root {
  --gal-navy:    #1e2d0a;
  --gal-amber:   #c9a020;
  --gal-amber2:  #e2c040;
  --gal-bg:      #f3f1e9;
  --gal-surface: #ffffff;
  --gal-radius:  12px;
  --gal-shadow:  0 4px 24px rgba(30,45,10,.10);
  --gal-shadow2: 0 12px 40px rgba(30,45,10,.18);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--gal-bg);
  font-family: 'Poppins', sans-serif;
  color: #2d3828;
}
body {
  padding-top: 80px;
}

/* Navbar siempre oscuro en galería — sin efecto transparente */
#mainNav {
  background: #131e07 !important;
  padding: 12px 0 !important;
  box-shadow: 0 2px 20px rgba(0,0,0,.3) !important;
}

/* ── HERO BAR ── */
.gal-hero {
  background: linear-gradient(135deg, var(--gal-navy) 0%, #2d4a14 100%);
  padding: 54px 24px 54px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.gal-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.gal-hero-eyebrow {
  font-size: .78rem;
  font-weight: 600;
  color: var(--gal-amber);
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.gal-hero h1 {
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin: 0 0 12px;
  line-height: 1.2;
}
.gal-hero h1 span {
  color: var(--gal-amber);
}
.gal-hero p {
  color: rgba(255,255,255,.65);
  font-size: 1rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ── CONTAINER ── */
.gal-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── FILTER TABS ── */
.gal-filters {
  padding: 36px 0 24px;
}
.gal-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.gal-tab {
  background: var(--gal-surface);
  border: 2px solid #e2e8f0;
  border-radius: 50px;
  padding: 8px 22px;
  font-size: .85rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}
.gal-tab:hover {
  border-color: var(--gal-amber);
  color: var(--gal-navy);
}
.gal-tab.active {
  background: var(--gal-navy);
  border-color: var(--gal-navy);
  color: #fff;
}
.gal-tab .gal-count {
  background: rgba(255,255,255,.22);
  border-radius: 50px;
  padding: 1px 9px;
  font-size: .75rem;
}
.gal-tab:not(.active) .gal-count {
  background: #e2e8f0;
  color: #475569;
}
.gal-tab.active .gal-count {
  background: var(--gal-amber);
  color: var(--gal-navy);
}

/* ── EMPTY STATE ── */
.gal-empty {
  text-align: center;
  padding: 80px 20px;
  color: #94a3b8;
}
.gal-empty i {
  font-size: 4rem;
  margin-bottom: 20px;
  display: block;
  opacity: .4;
}
.gal-empty h4 {
  font-size: 1.2rem;
  color: #64748b;
  margin-bottom: 8px;
}

/* ── IMAGES SECTION ── */
.gal-section {
  padding-bottom: 56px;
}
.gal-section-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gal-navy);
  letter-spacing: .04em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e2e8f0;
}
.gal-section-heading i {
  color: var(--gal-amber);
}
.gal-section-heading .gal-sec-count {
  margin-left: auto;
  background: var(--gal-navy);
  color: #fff;
  border-radius: 50px;
  padding: 2px 12px;
  font-size: .75rem;
}

/* ── MASONRY GRID (images) ── */
.gal-masonry {
  columns: 3;
  column-gap: 18px;
}
@media (max-width: 1024px) { .gal-masonry { columns: 2; } }
@media (max-width: 600px)  { .gal-masonry { columns: 1; } }

.gal-img-item {
  break-inside: avoid;
  margin-bottom: 18px;
  cursor: zoom-in;
  transition: transform .3s, box-shadow .3s;
}
.gal-img-item:hover {
  transform: translateY(-4px);
}
.gal-img-photo {
  position: relative;
  border-radius: var(--gal-radius);
  overflow: hidden;
  box-shadow: var(--gal-shadow);
  background: #e2e8f0;
  transition: box-shadow .3s;
}
.gal-img-item:hover .gal-img-photo {
  box-shadow: var(--gal-shadow2);
}
.gal-img-photo img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform .5s ease;
}
.gal-img-item:hover .gal-img-photo img {
  transform: scale(1.05);
}
.gal-img-overlay {
  position: absolute;
  inset: 0;
  background: rgba(30,45,10,.35);
  opacity: 0;
  transition: opacity .3s;
}
.gal-img-item:hover .gal-img-overlay {
  opacity: 1;
}
.gal-img-overlay-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  border: 2px solid rgba(255,255,255,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.gal-img-caption {
  margin: 0 0 8px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--gal-text, #2d3748);
  line-height: 1.3;
  text-align: center;
}

/* ── VIDEO GRID ── */
.gal-video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px)  { .gal-video-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .gal-video-grid { grid-template-columns: 1fr; } }

.gal-vid-item {
  border-radius: var(--gal-radius);
  overflow: hidden;
  box-shadow: var(--gal-shadow);
  background: var(--gal-surface);
  cursor: pointer;
  transition: transform .3s, box-shadow .3s;
}
.gal-vid-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--gal-shadow2);
}
.gal-vid-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--gal-navy);
  overflow: hidden;
}
.gal-vid-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: .5;
  pointer-events: none;
}
.gal-vid-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30,45,10,.35);
  transition: background .3s;
}
.gal-vid-item:hover .gal-vid-overlay {
  background: rgba(30,45,10,.18);
}
.gal-play-btn {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .25s, background .25s;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
}
.gal-play-btn i {
  font-size: 1.5rem;
  color: var(--gal-navy);
  margin-left: 4px;
}
.gal-vid-item:hover .gal-play-btn {
  transform: scale(1.12);
  background: var(--gal-amber);
}
.gal-vid-item:hover .gal-play-btn i {
  color: var(--gal-navy);
}
.gal-vid-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--gal-amber);
  color: var(--gal-navy);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 50px;
}
.gal-vid-info {
  padding: 14px 16px;
}
.gal-vid-title {
  font-size: .88rem;
  font-weight: 700;
  color: var(--gal-navy);
  line-height: 1.35;
  margin: 0 0 4px;
}
.gal-vid-desc {
  font-size: .78rem;
  color: #64748b;
  line-height: 1.4;
  margin: 0;
}

/* ── LIGHTBOX ── */
.gal-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.gal-lightbox.open {
  opacity: 1;
  pointer-events: all;
}
.gal-lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10,16,24,.94);
  backdrop-filter: blur(6px);
}
.gal-lb-content {
  position: relative;
  z-index: 1;
  max-width: min(1100px, 94vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.gal-lb-img {
  max-width: 100%;
  max-height: calc(90vh - 80px);
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
  display: block;
}
.gal-lb-caption {
  color: rgba(255,255,255,.85);
  font-size: .85rem;
  margin-top: 14px;
  text-align: center;
  max-width: 680px;
}
.gal-lb-caption strong {
  color: #fff;
  display: block;
  font-size: .95rem;
  margin-bottom: 2px;
}
.gal-lb-close {
  position: fixed;
  top: 20px;
  right: 24px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  color: #fff;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: background .2s;
  z-index: 2;
}
.gal-lb-close:hover { background: rgba(255,255,255,.25); }
.gal-lb-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  color: #fff;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: background .2s, transform .2s;
  z-index: 2;
}
.gal-lb-nav:hover { background: rgba(255,255,255,.25); transform: translateY(-50%) scale(1.08); }
.gal-lb-prev { left: 24px; }
.gal-lb-next { right: 24px; }
.gal-lb-counter {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.75);
  font-size: .82rem;
  font-weight: 600;
  background: rgba(0,0,0,.45);
  padding: 4px 14px;
  border-radius: 50px;
  z-index: 2;
}

/* ── VIDEO MODAL ── */
.gal-vmodal {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.gal-vmodal.open {
  opacity: 1;
  pointer-events: all;
}
.gal-vmodal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10,16,24,.94);
  backdrop-filter: blur(8px);
}
.gal-vmodal-content {
  position: relative;
  z-index: 1;
  width: min(900px, 92vw);
}
.gal-vmodal-video-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.7);
  background: #000;
  aspect-ratio: 16/9;
}
.gal-vmodal-video-wrap video {
  width: 100%;
  height: 100%;
  display: block;
}
.gal-vmodal-caption {
  color: rgba(255,255,255,.8);
  font-size: .85rem;
  margin-top: 14px;
  text-align: center;
}
.gal-vmodal-caption strong {
  color: #fff;
  display: block;
  font-size: .95rem;
  margin-bottom: 2px;
}
.gal-vmodal-close {
  position: fixed;
  top: 20px;
  right: 24px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  color: #fff;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: background .2s;
  z-index: 2;
}
.gal-vmodal-close:hover { background: rgba(255,255,255,.25); }

/* ── FOOTER ── */
.gal-footer {
  background: var(--gal-navy);
  color: rgba(255,255,255,.55);
  text-align: center;
  padding: 22px 20px;
  font-size: .82rem;
}
.gal-footer a {
  color: var(--gal-amber);
  text-decoration: none;
  font-weight: 600;
}
.gal-footer a:hover { text-decoration: underline; }

/* ── AOS QUICK ── */
[data-aos] { transition-property: transform, opacity; }

/* ============================================================
   RESPONSIVE MÓVIL
   ============================================================ */

/* ── ≤ 991px : tablet / navbar hamburger ── */
@media (max-width: 991px) {
  body           { padding-top: 70px; }
  .gal-hero      { padding: 42px 20px 42px; }
}

/* ── ≤ 767px : tablet pequeño ── */
@media (max-width: 767px) {
  .gal-filters   { padding: 24px 0 16px; }
  .gal-container { padding: 0 14px; }

  .gal-tab {
    padding: 7px 14px;
    font-size: .8rem;
  }

  .gal-section-heading {
    font-size: .88rem;
    flex-wrap: wrap;
    gap: 6px;
  }
  .gal-section-heading .gal-sec-count { margin-left: 0; }

  .gal-hero          { padding: 34px 16px 38px; }
  .gal-hero-eyebrow  { font-size: .72rem; letter-spacing: .1em; }
  .gal-hero h1       { font-size: clamp(1.5rem, 6vw, 2rem); }
  .gal-hero p        { font-size: .9rem; }
}

/* ── ≤ 480px : móvil ── */
@media (max-width: 480px) {
  body { padding-top: 66px; }

  /* Hero */
  .gal-hero          { padding: 26px 14px 32px; }
  .gal-hero h1       { font-size: 1.55rem; }
  .gal-hero-eyebrow  { display: none; }

  /* Tabs */
  .gal-filter-bar    { gap: 7px; }
  .gal-tab {
    padding: 6px 12px;
    font-size: .76rem;
    gap: 5px;
  }
  .gal-tab .gal-count { padding: 1px 7px; font-size: .68rem; }

  /* Sección */
  .gal-section       { padding-bottom: 32px; }
  .gal-section-heading { font-size: .8rem; }
  .gal-filters       { padding: 16px 0 10px; }

  /* Masonry */
  .gal-masonry       { column-gap: 10px; }
  .gal-img-item      { margin-bottom: 10px; }

  /* Video grid */
  .gal-video-grid    { gap: 12px; }
  .gal-play-btn      { width: 50px; height: 50px; }
  .gal-play-btn i    { font-size: 1.2rem; }

  /* Lightbox — botones más grandes para el dedo */
  .gal-lb-close,
  .gal-vmodal-close  {
    top: 8px; right: 8px;
    width: 42px; height: 42px;
    font-size: 1rem;
  }
  .gal-lb-counter    { top: 10px; font-size: .72rem; padding: 3px 10px; }
  .gal-lb-nav        { width: 40px; height: 40px; font-size: .95rem; }
  .gal-lb-prev       { left: 4px; }
  .gal-lb-next       { right: 4px; }
  .gal-lb-img        { border-radius: 6px; }

  /* Empty state */
  .gal-empty         { padding: 50px 14px; }
  .gal-empty i       { font-size: 3rem; }

  /* Footer */
  .gal-footer        { padding: 16px 12px; }
}

/* ── ≤ 360px : móvil muy pequeño ── */
@media (max-width: 360px) {
  .gal-tab { padding: 5px 10px; font-size: .72rem; }
  .gal-hero h1 { font-size: 1.35rem; }
  .gal-lb-nav { width: 34px; height: 34px; }
}
