/* ====================================================================
   TECNOCOSTEX CHILD — Header & Footer Theme
   Replica fiel de la paleta, tipografía y animaciones del diseño
   aprobado (landing ProCoser) para que header y footer de Blocksy
   se vean consistentes en TODO el sitio.
   ==================================================================== */

/* La tipografía Inter se carga vía wp_enqueue_style() en functions.php
   (mejor práctica WordPress: evita @import, que bloquea el render). */

/* ===== VARIABLES (idénticas a la landing aprobada) ===== */
:root {
  --tcx-navy: #0A1628;
  --tcx-navy-mid: #0F2040;
  --tcx-navy-light: #1E3A5F;
  --tcx-cyan: #00C8FF;
  --tcx-cyan-dark: #0099CC;
  --tcx-cyan-glow: rgba(0,200,255,0.15);
  --tcx-gold: #FFB800;
  --tcx-gold-light: #FFD060;
  --tcx-white: #FFFFFF;
  --tcx-text-light: #B8D4E8;
  --tcx-text-muted: #7A9BB5;
  --tcx-card-bg: #0D1E35;
  --tcx-card-border: rgba(0,200,255,0.2);
  --tcx-success: #00E676;
  --tcx-radius: 16px;
  --tcx-radius-sm: 8px;
  --tcx-shadow-cyan: 0 0 40px rgba(0,200,255,0.2);
  --tcx-shadow-gold: 0 0 30px rgba(255,184,0,0.3);
}

/* ===== OCULTAR HEADER/FOOTER NATIVO DE BLOCKSY =====
   No se modifica ningún archivo de Blocksy: solo se oculta vía CSS
   para que nuestro header/footer (inyectados por hooks de WordPress)
   sean los únicos visibles. Reversible en cualquier momento. */
#header.header,
.header-mobile-leftside,
.site-header,
header.site-header,
#colophon,
.footer-bar-on,
footer.footer,
.ct-footer {
  display: none !important;
}

/* ===== BASE TIPOGRÁFICA TRANSVERSAL ===== */
body.tcx-custom-header-footer {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===== SCROLLBAR (idéntico a la landing) ===== */
body.tcx-custom-header-footer::-webkit-scrollbar { width: 6px; }
body.tcx-custom-header-footer::-webkit-scrollbar-track { background: var(--tcx-navy); }
body.tcx-custom-header-footer::-webkit-scrollbar-thumb { background: var(--tcx-cyan-dark); border-radius: 3px; }

/* =====================================================================
   NAVBAR
   ===================================================================== */
.tcx-navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(10,22,40,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--tcx-card-border);
  padding: 12px 24px;
  transition: all 0.3s ease;
}
.tcx-navbar.tcx-scrolled { padding: 8px 24px; }

.tcx-nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}

.tcx-nav-logo { display: flex; align-items: center; }
.tcx-nav-logo img { height: 50px; width: auto; border-radius: 8px; }

.tcx-nav-menu { display: flex; align-items: center; }
.tcx-nav-links {
  display: flex; align-items: center; gap: 28px;
  list-style: none; margin: 0; padding: 0;
}
.tcx-nav-links a {
  color: var(--tcx-text-light);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  transition: color 0.2s ease;
  white-space: nowrap;
}
.tcx-nav-links a:hover,
.tcx-nav-links .current-menu-item > a {
  color: var(--tcx-cyan);
}
.tcx-nav-links li { position: relative; }
.tcx-nav-links ul {
  list-style: none; margin: 0; padding: 8px 0;
  position: absolute; top: 100%; left: 0;
  background: var(--tcx-card-bg);
  border: 1px solid var(--tcx-card-border);
  border-radius: var(--tcx-radius-sm);
  min-width: 200px;
  box-shadow: var(--tcx-shadow-cyan);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all 0.25s ease;
  z-index: 10;
}
.tcx-nav-links li:hover > ul {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.tcx-nav-links ul a { display: block; padding: 8px 18px; }

.tcx-nav-cta {
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: white; border: none; padding: 10px 20px;
  border-radius: 50px; font-weight: 700; font-size: 0.85rem;
  cursor: pointer; text-decoration: none;
  display: flex; align-items: center; gap: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap; flex-shrink: 0;
}
.tcx-nav-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(37,211,102,0.4); }

/* Botón hamburguesa (solo visible en mobile) */
.tcx-nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 32px; height: 24px; flex-direction: column;
  justify-content: space-between; padding: 0;
}
.tcx-nav-toggle span {
  display: block; height: 2px; width: 100%;
  background: var(--tcx-cyan); border-radius: 2px;
  transition: all 0.3s ease;
}
.tcx-nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.tcx-nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.tcx-nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* Espaciador para compensar el navbar fijo (no aplicar en pantallas que ya manejan su propio offset) */
body.tcx-custom-header-footer {
  padding-top: 76px;
}

/* =====================================================================
   FOOTER
   ===================================================================== */
.tcx-footer {
  background: #050D1A;
  border-top: 1px solid var(--tcx-card-border);
  padding: 48px 24px 100px;
  color: var(--tcx-text-light);
}
.tcx-footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px;
}
.tcx-footer-logo img { height: 50px; margin-bottom: 16px; border-radius: 8px; }
.tcx-footer-desc { color: var(--tcx-text-muted); font-size: 0.85rem; line-height: 1.7; max-width: 420px; }
.tcx-footer-title {
  font-size: 0.85rem; font-weight: 700; color: var(--tcx-cyan);
  text-transform: uppercase; letter-spacing: 2px; margin-bottom: 16px;
}
.tcx-footer-links { list-style: none; margin: 0; padding: 0; }
.tcx-footer-links li { margin-bottom: 10px; }
.tcx-footer-links a {
  color: var(--tcx-text-muted); text-decoration: none;
  font-size: 0.85rem; transition: color 0.2s;
}
.tcx-footer-links a:hover { color: var(--tcx-cyan); }
.tcx-footer-links ul { list-style: none; padding-left: 14px; margin-top: 8px; }

.tcx-footer-bottom {
  max-width: 1200px; margin: 32px auto 0;
  border-top: 1px solid var(--tcx-card-border); padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.tcx-footer-bottom p { color: var(--tcx-text-muted); font-size: 0.78rem; margin: 0; }

/* =====================================================================
   WHATSAPP FLOATING BUTTON
   ===================================================================== */
.tcx-wa-float {
  position: fixed; bottom: 100px; right: 24px; z-index: 999;
  width: 62px; height: 62px; border-radius: 50%;
  background: linear-gradient(135deg, #25D366, #128C7E);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; text-decoration: none;
  box-shadow: 0 8px 30px rgba(37,211,102,0.5);
  animation: tcx-wa-bounce 2s ease-in-out infinite;
  transition: transform 0.2s;
}
.tcx-wa-float:hover { transform: scale(1.1); }
@keyframes tcx-wa-bounce {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.tcx-wa-float-tooltip {
  position: absolute; right: 70px; top: 50%; transform: translateY(-50%);
  background: white; color: #128C7E; padding: 8px 14px;
  border-radius: 20px; font-size: 0.78rem; font-weight: 700;
  white-space: nowrap; box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.tcx-wa-float:hover .tcx-wa-float-tooltip { opacity: 1; }

/* =====================================================================
   MOBILE WA BAR
   ===================================================================== */
.tcx-wa-mobile-bar {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
  background: linear-gradient(90deg, #128C7E, #25D366);
  padding: 14px 20px;
  align-items: center; justify-content: space-between;
  gap: 12px;
}
.tcx-wa-mobile-eyebrow { font-size: 0.7rem; opacity: 0.9; margin-bottom: 2px; color: white; }
.tcx-wa-mobile-text { color: white; font-size: 0.85rem; font-weight: 600; flex: 1; }
.tcx-wa-mobile-btn {
  background: white; color: #128C7E;
  padding: 10px 20px; border-radius: 50px;
  font-weight: 800; font-size: 0.9rem; text-decoration: none;
  white-space: nowrap; display: flex; align-items: center; gap: 6px;
}

/* =====================================================================
   RESPONSIVE — breakpoints idénticos a la landing aprobada
   ===================================================================== */
@media (max-width: 1024px) {
  .tcx-footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .tcx-nav-toggle { display: flex; }
  .tcx-nav-menu {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(10,22,40,0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--tcx-card-border);
    padding: 16px 24px;
  }
  .tcx-nav-menu.tcx-open { display: block; }
  .tcx-nav-links {
    flex-direction: column; align-items: flex-start; gap: 4px;
  }
  .tcx-nav-links a { display: block; padding: 10px 0; width: 100%; }
  .tcx-nav-links ul {
    position: static; opacity: 1; visibility: visible; transform: none;
    border: none; box-shadow: none; padding-left: 14px;
    background: transparent;
  }
  .tcx-nav-links li:hover > ul { transform: none; }
  .tcx-nav-cta { padding: 8px 14px; font-size: 0.78rem; }

  .tcx-footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .tcx-footer { padding-bottom: 120px; }
  .tcx-wa-mobile-bar { display: flex; }
  .tcx-wa-float { bottom: 84px; }

  body.tcx-custom-header-footer { padding-top: 68px; }
}

@media (prefers-reduced-motion: reduce) {
  .tcx-wa-float,
  .tcx-navbar,
  .tcx-nav-cta {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
