/* ═══════════════════════════════════════════════
   Trazo — Galería Cartas 3D  |  trazo-galeria.css
   v1.1 — fix flechas Font Awesome + dots móvil
═══════════════════════════════════════════════ */

:root {
  --tgc-acento: #2363F1;
  --tgc-fondo:  #E5E7EB;
  --tgc-oscuro: #1C2533;
}

/* ── Sección ───────────────────────────────── */
.tgc-section {
  background-color: var(--tgc-fondo);
  padding: 70px 0 80px;
  overflow: hidden;
  font-family: 'Poppins', sans-serif;
}

.tgc-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ── Header ────────────────────────────────── */
.tgc-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 60px;
}

.tgc-label {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: var(--tgc-oscuro) !important;
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  padding: 6px 14px !important;
  border-radius: 50px !important;
  margin-bottom: 14px !important;
}

.tgc-dot {
  width: 7px !important;
  height: 7px !important;
  background: var(--tgc-acento) !important;
  border-radius: 50% !important;
  display: inline-block !important;
  flex-shrink: 0 !important;
}

.tgc-titulo {
  font-size: 45px;
  font-weight: 700;
  color: #000;
  line-height: 1.1;
}

.tgc-subtexto {
  font-size: 15px;
  color: #555;
  max-width: 300px;
  line-height: 1.6;
  text-align: right;
}

/* ── Stage 3D ──────────────────────────────── */
.tgc-stage {
  perspective: 1400px;
  perspective-origin: 50% 40%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  height: 440px;
  user-select: none;
}

/* ── Carta ─────────────────────────────────── */
.tgc-carta {
  position: absolute;
  width: 360px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.22);
  cursor: pointer;
  transition:
    transform 0.6s cubic-bezier(.4,0,.2,1),
    box-shadow 0.6s cubic-bezier(.4,0,.2,1),
    opacity   0.6s ease;
  will-change: transform;
  background: var(--tgc-oscuro);
}

.tgc-carta[data-pos="center"] {
  transform: translateX(0) translateZ(80px) rotateY(0deg);
  box-shadow: 0 40px 100px rgba(0,0,0,.28);
  z-index: 10;
}
.tgc-carta[data-pos="left"] {
  transform: translateX(-310px) translateZ(-60px) rotateY(18deg) scale(0.88);
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
  z-index: 5;
  opacity: 0.92;
}
.tgc-carta[data-pos="right"] {
  transform: translateX(310px) translateZ(-60px) rotateY(-18deg) scale(0.88);
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
  z-index: 5;
  opacity: 0.92;
}
.tgc-carta[data-pos="hidden-left"] {
  transform: translateX(-520px) translateZ(-140px) rotateY(28deg) scale(0.72);
  opacity: 0.45;
  z-index: 2;
  pointer-events: none;
}
.tgc-carta[data-pos="hidden-right"] {
  transform: translateX(520px) translateZ(-140px) rotateY(-28deg) scale(0.72);
  opacity: 0.45;
  z-index: 2;
  pointer-events: none;
}
.tgc-carta[data-pos="left"]:hover,
.tgc-carta[data-pos="right"]:hover { opacity: 1; }

/* ── Foto ──────────────────────────────────── */
.tgc-foto {
  position: relative;
  height: 360px;
  overflow: hidden;
}
.tgc-foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.tgc-carta[data-pos="center"]:hover .tgc-foto img {
  transform: scale(1.04);
}
.tgc-foto::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 50%, rgba(0,0,0,.6) 100%);
  pointer-events: none;
}

/* Badge etiqueta */
.tgc-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  background: rgba(28,37,51,.75);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 13px;
  border-radius: 50px;
}

/* Ícono expandir */
.tgc-expand {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(6px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .3s;
}
.tgc-carta[data-pos="center"]:hover .tgc-expand { opacity: 1; }
.tgc-expand i {
  color: #fff;
  font-size: 14px;
}

/* Número */
.tgc-num {
  position: absolute;
  bottom: 14px;
  right: 16px;
  z-index: 3;
  color: rgba(255,255,255,.6);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
}

/* ══════════════════════════════════════════════
   NAVEGACIÓN — !important para sobrescribir tema
══════════════════════════════════════════════ */
.tgc-nav {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 20px !important;
  margin-top: 40px !important;
  padding: 0 !important;
  list-style: none !important;
}

/* Flechas — Font Awesome */
.tgc-arrow {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  border-radius: 50% !important;
  background: var(--tgc-oscuro) !important;
  border: none !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background .2s, transform .2s !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
  box-shadow: none !important;
  outline: none !important;
}
.tgc-arrow:hover,
.tgc-arrow:focus {
  background: var(--tgc-acento) !important;
  transform: scale(1.08) !important;
  box-shadow: none !important;
}
.tgc-arrow i {
  color: #fff !important;
  font-size: 15px !important;
  line-height: 1 !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
  height: auto !important;
}
/* SVG fallback oculto */
.tgc-arrow svg { display: none !important; }

/* Dots ─────────────────────────────────────── */
.tgc-nav .tgc-dots {
  display: flex !important;
  gap: 8px !important;
  align-items: center !important;
  padding: 0 !important;
  margin: 0 !important;
  list-style: none !important;
}

/* Triple especificidad para ganarle a cualquier tema */
.tgc-section .tgc-nav .tgc-dot-btn,
.tgc-section .tgc-nav button.tgc-dot-btn,
.tgc-dot-btn.tgc-dot-btn.tgc-dot-btn {
  /* Dimensiones — máxima especificidad */
  width: 8px !important;
  height: 8px !important;
  min-width: 8px !important;
  min-height: 8px !important;
  max-width: 8px !important;
  max-height: 8px !important;
  /* Reset forma */
  border-radius: 50% !important;
  background: #C4C7CC !important;
  background-color: #C4C7CC !important;
  display: inline-flex !important;
  cursor: pointer !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  border-width: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  transition: all .35s !important;
  flex-shrink: 0 !important;
  line-height: 1 !important;
  font-size: 0 !important;
  text-indent: -9999px !important;
  overflow: hidden !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

.tgc-section .tgc-nav .tgc-dot-btn.active,
.tgc-dot-btn.tgc-dot-btn.tgc-dot-btn.active {
  background: var(--tgc-acento) !important;
  background-color: var(--tgc-acento) !important;
  width: 26px !important;
  min-width: 26px !important;
  max-width: 26px !important;
  border-radius: 4px !important;
}

.tgc-section .tgc-nav .tgc-dot-btn:hover,
.tgc-dot-btn.tgc-dot-btn.tgc-dot-btn:hover {
  background: var(--tgc-acento) !important;
  background-color: var(--tgc-acento) !important;
  opacity: .7 !important;
}

/* ── Lightbox ──────────────────────────────── */
.tgc-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}
.tgc-lightbox.open {
  opacity: 1;
  pointer-events: all;
}
.tgc-lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.88);
  backdrop-filter: blur(12px);
  cursor: zoom-out;
}
.tgc-lb-box {
  position: relative;
  z-index: 2;
  max-width: 90vw;
  max-height: 88vh;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 60px 120px rgba(0,0,0,.5);
  transform: scale(.92);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.tgc-lightbox.open .tgc-lb-box { transform: scale(1); }
.tgc-lb-img {
  display: block;
  max-width: 90vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
}
.tgc-lb-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,.8) 0%, transparent 100%);
  padding: 28px 24px 18px;
  color: #fff;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.tgc-lb-sublabel {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  margin-bottom: 4px;
}
.tgc-lb-title   { font-size: 18px; font-weight: 700; }
.tgc-lb-counter { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.55); }

.tgc-lb-close {
  position: absolute;
  top: 16px; right: 16px;
  z-index: 3;
  width: 40px !important; height: 40px !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,.15) !important;
  backdrop-filter: blur(6px);
  border: none !important;
  cursor: pointer;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background .2s;
  padding: 0 !important;
}
.tgc-lb-close:hover { background: rgba(255,255,255,.28) !important; }
.tgc-lb-close i {
  color: #fff !important;
  font-size: 16px !important;
}

.tgc-lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px !important; height: 48px !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,.12) !important;
  backdrop-filter: blur(6px);
  border: none !important;
  cursor: pointer;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background .2s, transform .2s;
  padding: 0 !important;
}
.tgc-lb-arrow:hover {
  background: rgba(255,255,255,.25) !important;
  transform: translateY(-50%) scale(1.08);
}
.tgc-lb-prev { left: -70px; }
.tgc-lb-next { right: -70px; }
.tgc-lb-arrow i {
  color: #fff !important;
  font-size: 18px !important;
}

/* ── Responsive ────────────────────────────── */
@media (max-width: 900px) {
  .tgc-header      { flex-direction: column; gap: 16px; align-items: flex-start; }
  .tgc-subtexto    { text-align: left; max-width: 100%; }
  .tgc-titulo      { font-size: 34px; }
  .tgc-stage       { height: 360px; }
  .tgc-carta       { width: 280px; }
  .tgc-foto        { height: 280px; }
  .tgc-carta[data-pos="left"]  { transform: translateX(-220px) translateZ(-60px) rotateY(18deg) scale(0.88); }
  .tgc-carta[data-pos="right"] { transform: translateX(220px)  translateZ(-60px) rotateY(-18deg) scale(0.88); }
  .tgc-carta[data-pos="hidden-left"]  { transform: translateX(-390px) translateZ(-140px) rotateY(28deg) scale(0.72); }
  .tgc-carta[data-pos="hidden-right"] { transform: translateX(390px)  translateZ(-140px) rotateY(-28deg) scale(0.72); }
}

@media (max-width: 600px) {
  .tgc-inner    { padding: 0 20px; }
  .tgc-titulo   { font-size: 28px; }
  .tgc-stage    { height: 320px; }
  .tgc-carta    { width: 250px; }
  .tgc-foto     { height: 260px; }
  .tgc-carta[data-pos="left"]  { transform: translateX(-180px) translateZ(-60px) rotateY(18deg) scale(0.88); }
  .tgc-carta[data-pos="right"] { transform: translateX(180px)  translateZ(-60px) rotateY(-18deg) scale(0.88); }
  .tgc-carta[data-pos="hidden-left"],
  .tgc-carta[data-pos="hidden-right"] { opacity: 0; }
  .tgc-lb-prev { left: 8px; }
  .tgc-lb-next { right: 8px; }
  /* Dots en móvil — refuerzo extra */
  .tgc-nav     { gap: 10px !important; margin-top: 28px !important; }
  .tgc-dots    { gap: 6px !important; }
  .tgc-dot-btn {
    width: 8px !important; height: 8px !important;
    min-width: 8px !important; min-height: 8px !important;
    max-width: 8px !important; max-height: 8px !important;
  }
  .tgc-dot-btn.active {
    width: 22px !important;
    max-width: 22px !important;
  }
}
