/* ==========================================================================
   TRAZZA.ME — SISTEMA GLOBAL DE UI (HEADER, SUBMENÚS, MÓVIL, FOOTER, LIGHTBOX)
   Homologación visual y funcional para las 29 páginas del sitio.
   ========================================================================== */

:root {
  --tz-bg-page: #F4F3EF;
  --tz-bg-card: #FFFFFF;
  --tz-black: #0A0A0A;
  --tz-dark: #1F2937;
  --tz-muted: #4B5563;
  --tz-yellow: #FACC15;
  --tz-gold: #CA8A04;
  --tz-border: rgba(0, 0, 0, 0.08);
  --tz-shadow-dropdown: 0 20px 45px rgba(0, 0, 0, 0.14);
}

/* ---------- 1. MASTER HEADER & DESKTOP NAVIGATION ---------- */
.site-header {
  width: 100%;
  padding: 14px 0;
  background: rgba(244, 243, 239, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  left: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: padding 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.site-header.scrolled {
  padding: 10px 0;
  background: rgba(244, 243, 239, 0.99);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
}

.site-header.site-header-overlay {
  position: absolute;
  top: 0;
  left: 0;
  background: linear-gradient(180deg, rgba(244, 243, 239, 0.96) 0%, rgba(244, 243, 239, 0.72) 65%, transparent 100%);
  border-bottom: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.site-header.site-header-overlay.scrolled {
  position: fixed;
  background: rgba(244, 243, 239, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
}

.site-header .nav-inner {
  max-width: 1540px;
  width: 100%;
  margin: 0 auto;
  padding: 0 clamp(16px, 2.2vw, 32px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-header .brand-logo {
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.65rem;
  letter-spacing: -0.04em;
  color: var(--tz-black);
  display: inline-flex;
  align-items: baseline;
  text-decoration: none;
  flex-shrink: 0;
}

.site-header .brand-logo .dot {
  color: var(--tz-gold);
}

.site-header .nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.8vw, 28px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-header .nav-links > li {
  position: relative;
}

.site-header .nav-link,
.site-header .nav-dropdown-trigger {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--tz-dark);
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 4px;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.site-header .nav-link:hover,
.site-header .nav-dropdown-trigger:hover,
.site-header .nav-link.is-active,
.site-header .nav-dropdown.is-active > .nav-dropdown-trigger {
  color: var(--tz-gold);
}

.site-header .nav-link.nav-saas {
  color: var(--tz-gold);
  font-weight: 700;
}

.site-header .nav-chevron {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
  opacity: 0.75;
}

.site-header .nav-dropdown.open .nav-chevron {
  transform: rotate(180deg);
}

/* Dropdown Panel */
.site-header .nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 270px;
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  padding: 10px;
  box-shadow: var(--tz-shadow-dropdown);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 1100;
  list-style: none;
}

/* Invisible hover bridge so moving mouse down doesn't close menu */
.site-header .nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
}

.site-header .nav-dropdown.open > .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

@media (hover: hover) and (min-width: 1025px) {
  .site-header .nav-dropdown:hover > .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }
  .site-header .nav-dropdown:hover .nav-chevron {
    transform: rotate(180deg);
  }
}

.site-header .nav-dropdown-menu li {
  margin: 0;
}

.site-header .nav-dropdown-menu a {
  display: flex;
  flex-direction: column;
  padding: 9px 13px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--tz-dark);
  transition: background 0.15s ease, color 0.15s ease;
}

.site-header .nav-dropdown-menu a:hover,
.site-header .nav-dropdown-menu a.is-active {
  background: #FEF9C3;
  color: var(--tz-black);
}

.site-header .nav-dd-title {
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.25;
}

.site-header .nav-dd-sub {
  font-size: 0.73rem;
  color: var(--tz-muted);
  margin-top: 2px;
  line-height: 1.3;
}

/* Desktop CTA Button */
.site-header .nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.site-header .tz-nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--tz-black);
  color: #FFFFFF !important;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 9999px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.site-header .tz-nav-cta:hover {
  background: #1F2937;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

/* Hamburger Button (Hidden on Desktop) */
.nav-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #FFFFFF;
  color: var(--tz-black);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease;
}

.nav-hamburger:hover {
  background: #FEF9C3;
}

@media (max-width: 1024px) {
  .site-header .nav-links,
  .site-header .tz-nav-cta {
    display: none !important;
  }
  .nav-hamburger {
    display: inline-flex;
  }
}

/* ---------- 2. MOBILE DRAWER & ACCORDION SUBMENUS ---------- */
.tz-mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.tz-mobile-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.tz-mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(88vw, 370px);
  height: 100dvh;
  background: #FFFFFF;
  z-index: 1999;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.2);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tz-mobile-drawer.open {
  transform: translateX(0);
}

.tz-mobile-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: var(--tz-bg-page);
}

.tz-mobile-close {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #FFFFFF;
  color: var(--tz-black);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tz-mobile-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 24px;
}

.tz-mob-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 12px;
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--tz-black);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  width: 100%;
  background: transparent;
  border-left: none;
  border-right: none;
  border-top: none;
  text-align: left;
  cursor: pointer;
}

.tz-mob-link.is-active {
  color: var(--tz-gold);
}

.tz-mob-acc-panel {
  display: none;
  padding: 6px 0 10px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: #FAFAFA;
  border-radius: 0 0 10px 10px;
}

.tz-mob-acc.open .tz-mob-acc-panel {
  display: block;
}

.tz-mob-acc.open .nav-chevron {
  transform: rotate(180deg);
}

.tz-mob-sublink {
  display: block;
  padding: 9px 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--tz-dark);
  text-decoration: none;
  border-radius: 8px;
}

.tz-mob-sublink:hover,
.tz-mob-sublink.is-active {
  background: #FEF9C3;
  color: var(--tz-black);
}

.tz-mobile-drawer-foot {
  padding: 14px 16px 18px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: var(--tz-bg-page);
}

.tz-mobile-wa-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 18px;
  border-radius: 9999px;
  background: #16A34A;
  color: #FFFFFF !important;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
}

.tz-mobile-pay-note {
  font-size: 0.72rem;
  color: var(--tz-muted);
  text-align: center;
  margin-top: 10px;
  line-height: 1.4;
}

/* ---------- 3. GLOBAL PAYMENT & TRUST STRIP ---------- */
.tz-payment-strip {
  background: #18181B;
  color: #F4F4F5;
  border-top: 2px solid var(--tz-yellow);
  padding: 18px 0;
  font-family: 'Inter', system-ui, sans-serif;
}

.tz-payment-strip-inner {
  max-width: 1540px;
  margin: 0 auto;
  padding: 0 clamp(16px, 2.5vw, 36px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  font-size: 0.84rem;
  line-height: 1.45;
}

.tz-payment-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tz-payment-item strong {
  color: var(--tz-yellow);
}

/* ---------- 4. UNIFIED MASTER FOOTER ---------- */
.site-footer.tz-master-footer {
  background: #0A0A0A;
  color: #E5E7EB;
  padding: 56px 0 28px;
  font-family: 'Inter', system-ui, sans-serif;
}

.site-footer.tz-master-footer .container {
  max-width: 1540px;
  margin: 0 auto;
  padding: 0 clamp(18px, 2.5vw, 36px);
}

.site-footer.tz-master-footer .footer-top-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
}

@media (max-width: 960px) {
  .site-footer.tz-master-footer .footer-top-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .site-footer.tz-master-footer .footer-top-grid {
    grid-template-columns: 1fr;
  }
}

.site-footer.tz-master-footer .brand-logo {
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.65rem;
  letter-spacing: -0.04em;
  color: #FFFFFF;
  margin-bottom: 10px;
}

.site-footer.tz-master-footer .brand-logo .dot {
  color: var(--tz-yellow);
}

.site-footer.tz-master-footer .footer-col h4 {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #FFFFFF;
  margin: 0 0 14px;
}

.site-footer.tz-master-footer .footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer.tz-master-footer .footer-col li {
  margin-bottom: 8px;
  font-size: 0.84rem;
  color: #9CA3AF;
}

.site-footer.tz-master-footer .footer-col a {
  color: #D1D5DB;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer.tz-master-footer .footer-col a:hover {
  color: var(--tz-yellow);
}

.site-footer.tz-master-footer .footer-social-icons {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.site-footer.tz-master-footer .footer-social-icons a {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.site-footer.tz-master-footer .footer-social-icons a:hover {
  background: var(--tz-yellow);
  color: #0A0A0A;
}

.site-footer.tz-master-footer .footer-bottom-line {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  color: #9CA3AF;
}

/* ---------- 5. GLOBAL GALLERY LIGHTBOX ---------- */
.tz-lb-clickable {
  cursor: zoom-in !important;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.tz-lb-clickable:hover {
  filter: brightness(1.04);
}

.tz-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(9, 9, 11, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
  padding: 20px;
}

.tz-lightbox.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.tz-lb-dialog {
  position: relative;
  max-width: 92vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.tz-lb-img {
  max-width: 90vw;
  max-height: 76vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  background: #18181B;
  user-select: none;
}

.tz-lb-meta {
  margin-top: 14px;
  text-align: center;
  max-width: 720px;
  color: #F4F4F5;
  font-family: 'Inter', system-ui, sans-serif;
}

.tz-lb-caption {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
  color: #FFFFFF;
}

.tz-lb-counter {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--tz-yellow);
  background: rgba(250, 204, 21, 0.14);
  padding: 3px 10px;
  border-radius: 9999px;
}

.tz-lb-close,
.tz-lb-nav {
  position: fixed;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(24, 24, 27, 0.78);
  color: #FFFFFF;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 10001;
}

.tz-lb-close:hover,
.tz-lb-nav:hover {
  background: var(--tz-yellow);
  color: #0A0A0A;
  border-color: var(--tz-yellow);
}

.tz-lb-close {
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 1.6rem;
  line-height: 1;
}

.tz-lb-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  font-size: 1.5rem;
}

.tz-lb-prev {
  left: 16px;
}

.tz-lb-next {
  right: 16px;
}

.tz-lb-nav.hidden {
  display: none;
}

@media (max-width: 640px) {
  .tz-lb-nav {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
    top: auto;
    bottom: 22px;
    transform: none;
  }
  .tz-lb-prev {
    left: 20px;
  }
  .tz-lb-next {
    right: 20px;
  }
  .tz-lb-img {
    max-height: 68vh;
  }
}
