/* ============================================================
   NGN Costa Rica — Páginas de Servicio
   CSS autónomo para páginas: central-telefonica-ip, pbx-ip-costa-rica,
   voip-empresas, videovigilancia, redes-empresariales,
   migracion-central-analogica
   ============================================================ */

/* ── 1. RESET / BASE ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #111827;
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ── 2. CLASES UTILITARIAS FALTANTES (Tailwind purgado) ─────── */

/* Colores de fondo */
.bg-blue-50   { background-color: #eff6ff; }
.bg-blue-100  { background-color: #dbeafe; }
.bg-green-50  { background-color: #f0fdf4; }
.bg-red-50    { background-color: #fef2f2; }
.bg-white\/80 { background-color: rgba(255,255,255,0.8); }

/* Colores de borde */
.border-b        { border-bottom-width: 1px; border-bottom-style: solid; }
.border-t        { border-top-width:    1px; border-top-style:    solid; }
.border-l-4      { border-left-width:   4px; border-left-style:   solid; }
.border-gray-100 { border-color: #f3f4f6; }
.border-blue-200 { border-color: #bfdbfe; }
.border-green-200{ border-color: #bbf7d0; }
.border-green-500{ border-color: #22c55e; }
.border-red-500  { border-color: #ef4444; }

/* Colores de texto */
.text-blue-300  { color: #93c5fd; }
.text-blue-900  { color: #1e3a8a; }
.text-gray-200  { color: #e5e7eb; }
.text-gray-300  { color: #d1d5db; }
.text-gray-400  { color: #9ca3af; }
.text-green-800 { color: #166534; }
.text-green-900 { color: #14532d; }
.text-red-800   { color: #991b1b; }
.text-left      { text-align: left; }

/* Espaciado: margin */
.ml-4    { margin-left:   1rem; }
.mx-1    { margin-left: 0.25rem; margin-right: 0.25rem; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-16   { margin-top: 4rem; }
.mb-1    { margin-bottom: 0.25rem; }
.mb-14   { margin-bottom: 3.5rem; }

/* Espaciado: padding */
.px-2   { padding-left: 0.5rem;  padding-right: 0.5rem; }
.px-3   { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-8   { padding-left: 2rem;    padding-right: 2rem; }
.p-5    { padding: 1.25rem; }
.pb-5   { padding-bottom: 1.25rem; }
.pb-6   { padding-bottom: 1.5rem; }
.pt-4   { padding-top: 1rem; }
.pt-6   { padding-top: 1.5rem; }
.py-1   { padding-top: 0.25rem;  padding-bottom: 0.25rem; }
.py-4   { padding-top: 1rem;     padding-bottom: 1rem; }
.py-5   { padding-top: 1.25rem;  padding-bottom: 1.25rem; }
.py-16  { padding-top: 4rem;     padding-bottom: 4rem; }
.py-20  { padding-top: 5rem;     padding-bottom: 5rem; }
.py-24  { padding-top: 6rem;     padding-bottom: 6rem; }

/* Tamaño: width / height */
.w-4  { width:  1rem; }
.w-5  { width:  1.25rem; }
.w-8  { width:  2rem; }
.w-10 { width:  2.5rem; }
.h-4  { height: 1rem; }
.h-5  { height: 1.25rem; }
.h-8  { height: 2rem; }
.h-10 { height: 2.5rem; }
.h-auto { height: auto; }

/* Ancho máximo */
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }

/* Flex */
.flex-shrink-0 { flex-shrink: 0; }
.focus\:outline-none:focus { outline: none; }

/* Tipografía */
.text-4xl    { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl    { font-size: 3rem;    line-height: 1; }
.leading-tight { line-height: 1.25; }
.leading-none  { line-height: 1; }

/* Grid */
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Border radius */
.rounded-sm  { border-radius: 0.125rem; }
.rounded-xl  { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-r-xl { border-top-right-radius: 0.75rem; border-bottom-right-radius: 0.75rem; }

/* Sombras */
.shadow-xl {
  box-shadow:
    0 20px 25px -5px rgba(0,0,0,0.1),
    0  8px 10px -6px rgba(0,0,0,0.1);
}

/* Ring (outline via box-shadow) */
.ring-1       { box-shadow: 0 0 0 1px var(--ring-color, #e5e7eb); }
.ring-gray-200 { --ring-color: #e5e7eb; }
.ring-1.ring-gray-200 {
  box-shadow: 0 0 0 1px #e5e7eb;
}

/* Space-between hijos */
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-x-2 > * + * { margin-left: 0.5rem; }

/* Transiciones */
.transition-colors {
  transition-property: color, background-color, border-color;
  transition-duration: 150ms;
  transition-timing-function: ease;
}
.transition-shadow {
  transition-property: box-shadow;
  transition-duration: 200ms;
  transition-timing-function: ease;
}

/* Estados hover */
.hover\:bg-blue-50:hover   { background-color: #eff6ff; }
.hover\:bg-blue-700:hover  { background-color: #1d4ed8; }
.hover\:bg-gray-100:hover  { background-color: #f3f4f6; }
.hover\:bg-gray-50:hover   { background-color: #f9fafb; }
.hover\:bg-green-600:hover { background-color: #16a34a; }
.hover\:border-blue-400:hover { border-color: #60a5fa; }
.hover\:shadow-md:hover {
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
}
.hover\:shadow-lg:hover {
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
}
.hover\:text-blue-600:hover { color: #2563eb; }
.hover\:underline:hover     { text-decoration: underline; }
.hover\:-translate-y-0\.5:hover { transform: translateY(-2px); }

/* ── 3. RESPONSIVE — breakpoints ───────────────────────────── */
@media (min-width: 640px) {
  .sm\:flex-row  { flex-direction: row; }
  .sm\:text-xl   { font-size: 1.25rem; line-height: 1.75rem; }
  .sm\:px-0      { padding-left: 0; padding-right: 0; }
}

@media (min-width: 768px) {
  .md\:flex          { display: flex !important; }
  .md\:hidden        { display: none !important; }
  .md\:flex-row      { flex-direction: row; }
  .md\:gap-6         { gap: 1.5rem; }
  .md\:gap-14        { gap: 3.5rem; }
  .md\:grid-cols-2   { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3   { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4   { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:mt-0          { margin-top: 0; }
  .md\:text-sm       { font-size: 0.875rem; line-height: 1.25rem; }
  .md\:text-2xl      { font-size: 1.5rem;   line-height: 2rem; }
  .md\:text-3xl      { font-size: 1.875rem; line-height: 2.25rem; }
  .md\:text-4xl      { font-size: 2.25rem;  line-height: 2.5rem; }
  .md\:text-5xl      { font-size: 3rem;     line-height: 1; }
  .md\:text-left     { text-align: left; }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:text-6xl    { font-size: 3.75rem; line-height: 1; }
}

/* ── 4. NAVEGACIÓN ──────────────────────────────────────────── */
nav.sticky {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 8px rgba(0,0,0,0.10);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

nav.sticky a {
  color: #374151;
  font-weight: 500;
  transition: color 150ms ease;
}

nav.sticky a:hover { color: #2563eb; }

nav.sticky ul li a {
  padding: 0.25rem 0;
  position: relative;
}

nav.sticky ul li a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: #2563eb;
  transition: width 200ms ease;
}

nav.sticky ul li a:hover::after { width: 100%; }

#mobileMenu {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

#mobileMenu a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  transition: background 150ms ease, color 150ms ease;
}

#mobileMenu a:hover {
  background: #eff6ff;
  color: #2563eb;
}

/* ── 5. HERO ────────────────────────────────────────────────── */
header[role="banner"],
section[style*="gradient"] {
  position: relative;
}

header[role="banner"] h1,
.text-white h1 {
  letter-spacing: -0.02em;
}

/* Botones en hero */
header[role="banner"] a[class*="bg-blue"],
section[style*="gradient"] a[class*="rounded-lg"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  transition: all 200ms ease;
  cursor: pointer;
  white-space: nowrap;
}

/* Migas de pan */
nav[aria-label="Ruta de navegación"],
nav[aria-label="Breadcrumb"] {
  font-size: 0.875rem;
  color: #6b7280;
}

nav[aria-label="Ruta de navegación"] a,
nav[aria-label="Breadcrumb"] a {
  color: #6b7280;
  transition: color 150ms ease;
}

nav[aria-label="Ruta de navegación"] a:hover,
nav[aria-label="Breadcrumb"] a:hover { color: #2563eb; }

/* ── 6. TARJETAS DE BENEFICIOS ──────────────────────────────── */
.bg-white.border.border-gray-200.rounded-lg,
.bg-white.rounded-xl,
.bg-white.border.border-gray-200.rounded-xl {
  transition: box-shadow 200ms ease, transform 200ms ease;
}

.bg-white.border.border-gray-200.rounded-lg:hover,
.bg-white.rounded-xl:hover {
  box-shadow: 0 8px 20px rgba(0,0,0,0.09);
  transform: translateY(-2px);
}

/* Icono emoji en tarjeta */
.bg-white.border h3 + p,
.bg-white.rounded-xl h3 + p {
  color: #4b5563;
}

/* ── 7. SECCIÓN CÓMO TRABAJAMOS (números circulares) ─────────── */
div[style*="border-radius:50%"],
div[style*="border-radius: 50%"] {
  flex-shrink: 0;
}

/* ── 8. CASO DE ÉXITO ───────────────────────────────────────── */
.shadow-lg.p-8,
.shadow-lg.rounded-lg {
  border: 1px solid #e5e7eb;
}

/* Estadísticas numéricas */
.text-3xl.font-extrabold.text-blue-600 {
  font-size: 2rem;
  letter-spacing: -0.03em;
}

/* ── 9. FAQ ACORDEÓN — patrón 1 (.faq-question / .faq-answer) ─ */
.faq-question {
  display: flex;
  width: 100%;
  text-align: left;
  padding: 1.125rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  background: #fff;
  border: none;
  cursor: pointer;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: background 150ms ease;
  line-height: 1.5;
}

.faq-question:hover { background: #eff6ff; }

.faq-icon {
  flex-shrink: 0;
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 50%;
  background: #dbeafe;
  color: #2563eb;
  font-weight: 700;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 150ms ease, color 150ms ease;
  user-select: none;
}

.faq-question:hover .faq-icon {
  background: #2563eb;
  color: #fff;
}

.faq-answer {
  padding: 1rem 1.25rem 1.5rem;
  color: #374151;
  font-size: 0.9875rem;
  line-height: 1.7;
  border-top: 1px solid #f3f4f6;
  background: #fafafa;
}

.faq-answer.hidden,
.faq-body.hidden {
  display: none;
}

/* ── 10. FAQ ACORDEÓN — patrón 2 (.faq-btn / .faq-body) ───────
   (videovigilancia, redes-empresariales, migracion)            */
.faq-btn {
  display: flex;
  width: 100%;
  text-align: left;
  padding: 1.125rem 1.5rem;
  font-size: 0.9875rem;
  font-weight: 600;
  color: #111827;
  background: #fff;
  border: none;
  cursor: pointer;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: background 150ms ease;
  border-radius: 0;
  line-height: 1.5;
}

.faq-btn:hover { background: #eff6ff; }

/* El .faq-icon en patrón 2 es el <span> flecha dentro del círculo azul */
.faq-btn .faq-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  transition: transform 200ms ease;
  background: none;
  border-radius: 0;
}

.faq-btn .faq-icon::before {
  content: '';
  display: block;
  width: 7px;
  height: 7px;
  border-right: 2.5px solid #2563eb;
  border-bottom: 2.5px solid #2563eb;
  transform: rotate(45deg);
  margin-top: -3px;
}

/* El contenedor circular (outer span) hereda las clases utilitarias del HTML */
.faq-btn:hover .faq-icon::before { border-color: #1d4ed8; }

.faq-btn[aria-expanded="true"] .faq-icon::before { border-color: #fff; }

.faq-body {
  padding: 1rem 1.5rem 1.5rem;
  color: #374151;
  font-size: 0.9875rem;
  line-height: 1.7;
  border-top: 1px solid #f3f4f6;
  background: #fafafa;
}

/* ── 11. SECCIÓN CTA FINAL ──────────────────────────────────── */
section[style*="gradient"] .flex.flex-col a,
section[style*="gradient"] .flex.flex-col.sm\:flex-row a {
  text-align: center;
}

/* ── 12. SERVICIOS RELACIONADOS ─────────────────────────────── */
a.bg-white.border.border-gray-200.rounded-lg.block {
  text-decoration: none;
  color: inherit;
  transition: box-shadow 200ms ease, transform 200ms ease, border-color 200ms ease;
}

a.bg-white.border.border-gray-200.rounded-lg.block:hover {
  box-shadow: 0 10px 24px rgba(0,0,0,0.10);
  transform: translateY(-2px);
  border-color: #60a5fa;
}

/* ── 13. BOTÓN FLOTANTE WHATSAPP ────────────────────────────── */
a.fixed.bottom-6.right-6 {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  background: #22c55e;
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 9999px;
  box-shadow: 0 4px 16px rgba(34,197,94,0.45);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}

a.fixed.bottom-6.right-6:hover {
  background: #16a34a;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34,197,94,0.55);
}

@media (min-width: 768px) {
  a.fixed.bottom-6.right-6 { display: none; }
}

/* ── 14. FOOTER ─────────────────────────────────────────────── */
footer.bg-gray-100 {
  background: #f3f4f6;
  border-top: 1px solid #e5e7eb;
}

footer a {
  transition: color 150ms ease;
}

footer a:hover { color: #2563eb; }

/* ── 15. ESTILOS ESPECÍFICOS POR COMPONENTE (mejoras visuales) ─ */

/* Bloque de destacado azul en sección "qué es" */
.bg-blue-600.text-white.p-6.rounded-lg {
  background: linear-gradient(135deg, #1d4ed8, #2563eb) !important;
  border-radius: 0.75rem;
  box-shadow: 0 4px 20px rgba(37,99,235,0.30);
}

/* Bloque rojo (central analógica NO puede hacer) */
.bg-red-50.border-l-4.border-red-500 {
  border-left: 4px solid #ef4444;
  background: #fef2f2;
  border-radius: 0 0.75rem 0.75rem 0;
  padding: 1.25rem 1.5rem;
}

/* Bloque verde (red empresarial correcta) */
.bg-green-50.border.border-green-200 {
  background: #f0fdf4;
  border-color: #bbf7d0;
  border-radius: 0.75rem;
  padding: 1.5rem;
}

/* Bloque azul (hikvision / comparación) */
.bg-blue-50.border.border-blue-200 {
  background: #eff6ff;
  border-color: #bfdbfe;
  border-radius: 0.75rem;
  padding: 1.5rem;
}

/* Imagen con ring en sección "qué es" */
.rounded-xl.overflow-hidden.shadow-xl {
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow:
    0 20px 25px -5px rgba(0,0,0,0.10),
    0  8px 10px -6px rgba(0,0,0,0.08),
    0 0 0 1px #e5e7eb;
}

/* Tarjetas con ring */
.ring-1.ring-gray-200 {
  box-shadow: 0 0 0 1px #e5e7eb !important;
}

/* Pasos "Cómo trabajamos" con flex gap */
.flex.gap-4 {
  gap: 1rem;
}

/* Íconos cuadrados en tarjetas "Por qué NGN" */
.flex-shrink-0.w-10.h-10.rounded-lg {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Blockquote de caso de éxito oscuro */
blockquote p.italic {
  font-style: italic;
  color: #d1d5db;
  border-left: 3px solid #3b82f6;
  padding-left: 1.25rem;
  margin: 0 auto;
  text-align: left;
  max-width: 680px;
}

blockquote cite {
  color: #9ca3af;
  font-style: normal;
}

/* ── 16. MEJORAS TIPOGRÁFICAS GLOBALES ──────────────────────── */
h1, h2, h3, h4 {
  letter-spacing: -0.015em;
  line-height: 1.2;
}

h2.text-3xl, h2.text-4xl {
  margin-bottom: 1rem;
}

p.text-lg.text-gray-600,
p.text-lg.text-gray-700 {
  line-height: 1.75;
}

/* Separador visual entre secciones (border-top inline) */
.mt-8.pt-6[style*="border-top"],
.pt-6[style*="border-top:1px solid"] {
  border-top: 1px solid #e5e7eb;
}

/* ── 17. LISTA DE CHECKS (✓ ✗) ──────────────────────────────── */
ul.space-y-1 li,
ul.space-y-2 li {
  line-height: 1.6;
}

/* ── 18. BADGES / CHIPS de hero ─────────────────────────────── */
div[style*="border-radius:9999px"],
div[style*="rounded-full"] {
  display: inline-flex;
  align-items: center;
}

/* ── 19. PERFORMANCE: font-display swap para fuentes externas ── */
/* (No hay Google Fonts en estas páginas — nada que hacer aquí) */

/* ── 20. UTILIDADES DE ACCESIBILIDAD ────────────────────────── */
:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  border-radius: 3px;
}

button:focus:not(:focus-visible) { outline: none; }

/* Smooth scroll target offset (nav sticky) */
section[id], header[id] {
  scroll-margin-top: 4.5rem;
}
