/* ==========================================================================
   BLUE REDES PUBLICIDAD — SISTEMA DE DISEÑO BASE
   Identidad: Blue Design Worldwide Colombia
   Estilo: Minimalista, editorial, tipografía contundente, fondo blanco, sobrio
   ========================================================================== */

/* 1. Design Tokens */
:root {
  /* Paleta Base Estructural */
  --bg-page: #FFFFFF;
  --bg-surface: #FFFFFF;
  --bg-subtle: #F8FAFC;
  --bg-alt: #F1F5F9;
  --bg-dark: #0F172A;
  --bg-modal: rgba(15, 23, 42, 0.65);

  /* Tipografía y Textos */
  --text-main: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --text-inverse: #FFFFFF;
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Bordes & Separadores */
  --border-light: #E2E8F0;
  --border-medium: #CBD5E1;
  --border-subtle: #EDF2F7;
  --border-dark: #0F172A;
  --border-focus: #0F172A;

  /* Radios de Borde */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Sombras Sutiles (No saturadas) */
  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 2px 8px -2px rgba(15, 23, 42, 0.06), 0 1px 4px -1px rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 12px 24px -6px rgba(15, 23, 42, 0.08), 0 4px 8px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 35px -10px rgba(15, 23, 42, 0.12);

  /* Acentos de Marca Sobrios */
  --blue-brand: #0F172A; /* Identidad Blue: Negro / Azul Noche profundo */
  --blue-action: #1E3A8A; /* Azul editorial profundo */
  --blue-highlight: #EFF6FF;
  --blue-badge: #DBEAFE;
  --green-success: #15803D;
  --green-light: #DCFCE7;
  --amber-warning: #B45309;
  --amber-light: #FEF3C7;
  --red-danger: #B91C1C;
  --red-light: #FEE2E2;

  /* Transiciones */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 240ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 350ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --container-max: 1180px;
  --container-narrow: 840px;
}

/* 2. Reset Universal */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-family);
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-page);
  color: var(--text-main);
  overflow-x: clip;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: clip;
}

/* 3. Tipografía & Jerarquía Visual */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family);
  color: var(--text-main);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.025em;
}

h1 {
  font-size: 2.75rem;
  letter-spacing: -0.035em;
  font-weight: 800;
}

h2 {
  font-size: 2rem;
  letter-spacing: -0.03em;
}

h3 {
  font-size: 1.45rem;
  font-weight: 700;
}

h4 {
  font-size: 1.15rem;
  font-weight: 600;
}

p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
}

p.lead {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button {
  font-family: var(--font-family);
  cursor: pointer;
  border: none;
  background: none;
  font-size: 1rem;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* 4. Estructura de Contenedor */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* 5. Header Superior Semántico (Sticky / Fijo al hacer scroll) */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 950;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  height: 72px;
  display: flex;
  align-items: center;
  transition: background-color var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
  border-bottom-color: rgba(226, 232, 240, 0.85);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand-lockup-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.brand-lockup-wrapper:hover {
  opacity: 0.88;
}

.brand-badge-icon {
  width: 42px;
  height: 42px;
  background-color: #0B0F17;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(11, 15, 23, 0.18);
  flex-shrink: 0;
  user-select: none;
}

.brand-text-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  transform: translateY(-2px);
}

.brand-text-main {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.28rem;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin: 0;
  padding: 0;
}

.brand-text-by {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748B;
  letter-spacing: 0.005em;
  line-height: 1.15;
  margin-top: 1px;
}

/* Navegación Desktop */
.desktop-nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-menu-link {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.nav-menu-link:hover {
  color: var(--text-main);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-header-consult {
  font-size: 0.88rem;
  font-weight: 700;
  color: #FFFFFF;
  padding: 9px 18px;
  border: 1px solid var(--text-main);
  border-radius: var(--radius-full);
  background-color: var(--text-main);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.16);
  white-space: nowrap;
  letter-spacing: -0.01em;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.btn-header-consult:hover {
  background-color: #1E293B;
  border-color: #1E293B;
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.24);
}

.btn-header-consult:active {
  transform: translateY(0);
}

.btn-header-consult svg {
  color: #FFFFFF;
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.btn-header-consult:hover svg {
  transform: translate(2px, -2px);
}

.btn-consult-text-short {
  display: none;
}

/* Botón Menú Hamburguesa */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: transparent;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
  transition: all var(--transition-fast);
  z-index: 1002;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.hamburger-btn:hover {
  background: var(--bg-subtle);
  border-color: var(--text-main);
}

.hamburger-bar {
  width: 20px;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center;
  pointer-events: none;
}

.hamburger-btn.open .hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.open .hamburger-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger-btn.open .hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Backdrop Menú Móvil */
.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  touch-action: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}

.mobile-nav-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Drawer Menú Móvil */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  max-width: 90vw;
  height: 100vh;
  height: 100dvh;
  background: var(--bg-surface, #FFFFFF);
  z-index: 1001;
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.32s;
  box-shadow: -10px 0 30px rgba(15, 23, 42, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Encabezado y footer fijos; solo el cuerpo hace scroll */
  touch-action: pan-y;
  overscroll-behavior: contain;
}

.mobile-nav-drawer.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.drawer-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  background: #FFFFFF;
  flex-shrink: 0;
  z-index: 2;
}

.drawer-header .brand-badge-icon {
  width: 34px;
  height: 34px;
  font-size: 1.05rem;
  border-radius: 8px;
}

.drawer-header .brand-text-block {
  transform: translateY(-1.5px);
}

.drawer-header .brand-text-main {
  font-size: 1.1rem;
}

.drawer-header .brand-text-by {
  font-size: 0.70rem;
}

.btn-close-drawer {
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-main);
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  flex-shrink: 0;
}

.btn-close-drawer svg {
  pointer-events: none;
}

.btn-close-drawer:hover {
  background: var(--bg-subtle);
  border-color: var(--text-main);
}

.drawer-body {
  padding: 16px 14px;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
}

.drawer-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drawer-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-fast);
  color: var(--text-main);
}

.drawer-nav-item:hover,
.drawer-nav-item:active {
  background-color: var(--bg-subtle);
}

.drawer-item-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-main);
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.drawer-nav-item:hover .drawer-item-icon-wrap {
  background: var(--text-main);
  color: #FFFFFF;
  border-color: var(--text-main);
}

.drawer-item-content {
  flex: 1;
  min-width: 0;
}

.drawer-item-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
}

.drawer-item-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-item-arrow {
  color: #94A3B8;
  flex-shrink: 0;
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.drawer-nav-item:hover .drawer-item-arrow {
  color: var(--text-main);
  transform: translateX(2px);
}

.drawer-cta-section {
  margin-top: 20px;
  padding: 0 4px;
}

.btn-drawer-consult,
.btn-drawer-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background-color: var(--text-main);
  color: #FFFFFF;
  padding: 13px 18px;
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.16);
}

.btn-drawer-consult:hover,
.btn-drawer-whatsapp:hover {
  background-color: #1E293B;
  transform: translateY(-1px);
  color: #FFFFFF;
}

.drawer-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-light);
  font-size: 0.80rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  background: var(--bg-subtle);
  flex-shrink: 0;
  z-index: 2;
}

body.nav-drawer-open {
  overflow: hidden;
  touch-action: none;
}

/* 6. Footer de Consultoría Blue */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-light);
  background: #FFFFFF;
  padding-top: 56px;
  padding-bottom: 48px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 60px;
  margin-bottom: 48px;
}

.footer-brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-main);
}

.footer-brand-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  max-width: 440px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.footer-col-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-main);
  margin-bottom: 18px;
}

.footer-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav-link {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer-nav-link:hover {
  color: var(--text-main);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.footer-version-tag {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  user-select: none;
}

/* 7. Utilidades de Botón Primario y Secundario */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background-color: var(--text-main);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 16px 32px;
  border-radius: var(--radius-full);
  transition: all var(--transition-normal);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
  user-select: none;
}

.btn-primary:hover {
  background-color: #1E293B;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.16);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: #FFFFFF;
  color: var(--text-main);
  border: 1px solid var(--border-light);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 26px;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  background-color: var(--bg-subtle);
  border-color: var(--text-main);
}

/* 8. Botón Flotante Volver Arriba */
.btn-scroll-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #0F172A;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 990;
}

.btn-scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.btn-scroll-top:hover {
  background-color: #1E293B;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.32);
}

.btn-scroll-top:active {
  transform: translateY(-1px);
}

@media print {
  .btn-scroll-top {
    display: none !important;
  }
}

/* 9. Responsive Breakpoints Base */
@media (max-width: 900px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }
  .footer-top {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .desktop-nav-menu {
    display: none;
  }
  .hamburger-btn {
    display: flex;
  }
}

@media (max-width: 640px) {
  h1 { font-size: 1.95rem; }
  h2 { font-size: 1.5rem; }
  .container, .container-narrow {
    padding-left: 18px;
    padding-right: 18px;
  }
  .btn-primary {
    width: 100%;
    padding: 16px 20px;
  }
  .header-right {
    gap: 8px;
  }
  .btn-header-consult {
    padding: 6px 12px;
    font-size: 0.80rem;
    gap: 5px;
  }
  .btn-consult-text-full {
    display: none;
  }
  .btn-consult-text-short {
    display: inline;
  }
  .brand-lockup-wrapper {
    gap: 10px;
  }
  .brand-badge-icon {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
    border-radius: 8px;
  }
  .brand-text-block {
    display: flex;
    flex-direction: column;
    justify-content: center;
    transform: translateY(-1.5px);
  }
  .brand-text-main {
    font-size: 1.08rem;
    line-height: 1.15;
  }
  .brand-text-by {
    display: block !important;
    font-size: 0.68rem;
    line-height: 1.1;
    margin-top: 1px;
    white-space: nowrap;
    color: #64748B;
  }
  .hamburger-btn {
    width: 36px;
    height: 36px;
    gap: 4px;
    border-radius: 8px;
  }
  .hamburger-bar {
    width: 17px;
    height: 2px;
  }
  .hamburger-btn.open .hamburger-bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }
  .hamburger-btn.open .hamburger-bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }
}

@media (max-width: 360px) {
  .container, .container-narrow {
    padding-left: 10px;
    padding-right: 10px;
  }
  .brand-lockup-wrapper {
    gap: 7px;
  }
  .brand-badge-icon {
    width: 33px;
    height: 33px;
    font-size: 0.95rem;
  }
  .brand-text-main {
    font-size: 0.98rem;
  }
  .brand-text-by {
    font-size: 0.60rem;
  }
  .btn-header-consult {
    padding: 5px 8px;
    font-size: 0.73rem;
    gap: 4px;
  }
  .hamburger-btn {
    width: 33px;
    height: 33px;
  }
}
