/* ==========================================================================
   Empresas Familiar Paraguay — Hoja de estilos principal
   Diseño corporativo, moderno y accesible. Optimizado para rendimiento.
   ========================================================================== */

:root {
  --ef-navy: #0f2741;
  --ef-navy-700: #143654;
  --ef-blue: #1d6fb8;
  --ef-blue-600: #1a5f9e;
  --ef-teal: #0fae9b;
  --ef-gold: #f2b134;
  --ef-ink: #1f2a37;
  --ef-muted: #5b6b7c;
  --ef-line: #e3e9ef;
  --ef-bg: #ffffff;
  --ef-bg-alt: #f5f8fb;
  --ef-radius: 14px;
  --ef-shadow: 0 10px 30px rgba(15, 39, 65, .08);
  --ef-shadow-sm: 0 4px 14px rgba(15, 39, 65, .06);
  --ef-font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--ef-font);
  color: var(--ef-ink);
  background: var(--ef-bg);
  line-height: 1.65;
  margin: 0;
}

h1, h2, h3, h4, h5, h6 { color: var(--ef-navy); font-weight: 700; line-height: 1.25; }

a { color: var(--ef-blue); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--ef-blue-600); }

img { max-width: 100%; height: auto; }

.btn { border-radius: 10px; font-weight: 600; padding: .55rem 1.25rem; }
.btn-primary { background: var(--ef-blue); border-color: var(--ef-blue); }
.btn-primary:hover, .btn-primary:focus { background: var(--ef-blue-600); border-color: var(--ef-blue-600); }
.btn-outline-secondary { border-color: var(--ef-line); color: var(--ef-navy); }
.btn-outline-secondary:hover { background: var(--ef-navy); border-color: var(--ef-navy); color: #fff; }

.skip-link {
  position: absolute; top: .5rem; left: .5rem; z-index: 1080;
  background: var(--ef-navy); color: #fff; padding: .5rem .9rem; border-radius: 8px;
}

/* ── Topbar ─────────────────────────────────────────────────────────────── */
.topbar { background: var(--ef-navy); color: #cfe0f0; font-size: .85rem; padding: .4rem 0; }
.topbar a { color: #cfe0f0; }
.topbar a:hover { color: #fff; }
.topbar-social a { font-size: 1rem; }

/* ── Header / Nav ───────────────────────────────────────────────────────── */
.site-header { background: #fff; box-shadow: var(--ef-shadow-sm); z-index: 1030; }
.navbar { padding-top: .75rem; padding-bottom: .75rem; }
.navbar-brand { font-weight: 800; color: var(--ef-navy); }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 12px; margin-right: .6rem;
  background: linear-gradient(135deg, var(--ef-blue), var(--ef-teal)); color: #fff; font-size: 1.3rem;
}
.brand-text { display: inline-flex; flex-direction: column; line-height: 1; }
.brand-title { font-size: 1.05rem; font-weight: 800; color: var(--ef-navy); }
.brand-sub { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ef-teal); font-weight: 700; }
.navbar-nav .nav-link { color: var(--ef-ink); font-weight: 600; padding: .5rem .9rem; border-radius: 8px; }
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active { color: var(--ef-blue); background: var(--ef-bg-alt); }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  background: radial-gradient(1200px 500px at 80% -10%, rgba(15,174,155,.18), transparent),
              linear-gradient(180deg, #0f2741 0%, #143a5e 100%);
  color: #eaf2fb; padding: 4.5rem 0 5rem;
}
.hero-title { color: #fff; font-size: clamp(1.9rem, 4vw, 3rem); margin: 1rem 0; }
.hero-lead { font-size: 1.15rem; color: #cfe0f0; max-width: 38rem; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .4rem; background: rgba(255,255,255,.1);
  color: #d7e6f6; padding: .35rem .8rem; border-radius: 999px; font-size: .82rem; font-weight: 600;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 1rem; }
.hero-actions .btn-outline-secondary { color: #fff; border-color: rgba(255,255,255,.4); }
.hero-actions .btn-outline-secondary:hover { background: #fff; color: var(--ef-navy); }
.hero-note { color: #a9c4dd; font-size: .85rem; }
.hero-card { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: var(--ef-radius); padding: 1.5rem; backdrop-filter: blur(4px); }
.hero-card-row { display: flex; align-items: center; gap: .9rem; padding: .8rem 0; border-bottom: 1px solid rgba(255,255,255,.1); color: #eaf2fb; font-weight: 600; }
.hero-card-row:last-child { border-bottom: 0; }
.hero-card-row i { font-size: 1.4rem; color: var(--ef-gold); }

/* ── Secciones ──────────────────────────────────────────────────────────── */
.section { padding: 4rem 0; }
.section-alt { background: var(--ef-bg-alt); }
.section-head { margin-bottom: 2.5rem; }
.section-eyebrow { display: inline-block; color: var(--ef-teal); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; }
.section-title { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: .4rem 0; }
.section-sub { color: var(--ef-muted); max-width: 42rem; margin: 0 auto; }
.section-head.text-center .section-sub { margin: 0 auto; }

/* ── Tarjetas de servicio ───────────────────────────────────────────────── */
.service-card, .service-row {
  display: block; background: #fff; border: 1px solid var(--ef-line);
  border-radius: var(--ef-radius); padding: 1.6rem; box-shadow: var(--ef-shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; height: 100%;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--ef-shadow); border-color: #cfe0f0; }
.service-row { display: flex; gap: 1.1rem; align-items: flex-start; }
.service-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; min-width: 54px; border-radius: 14px; margin-bottom: 1rem;
  background: linear-gradient(135deg, rgba(29,111,184,.12), rgba(15,174,155,.12)); color: var(--ef-blue); font-size: 1.5rem;
}
.service-row .service-icon { margin-bottom: 0; }
.service-card h3, .service-row h2 { font-size: 1.15rem; }
.service-card p, .service-row p { color: var(--ef-muted); margin-bottom: .8rem; }
.service-more, .link-more { color: var(--ef-blue); font-weight: 600; }

/* ── Lista de características ────────────────────────────────────────────── */
.feature-list { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.feature-list li { padding: .4rem 0; color: var(--ef-ink); }
.feature-list i { color: var(--ef-teal); margin-right: .5rem; }

/* ── Stats ──────────────────────────────────────────────────────────────── */
.stat-card { background: #fff; border: 1px solid var(--ef-line); border-radius: var(--ef-radius); padding: 1.5rem; text-align: center; box-shadow: var(--ef-shadow-sm); }
.stat-num { display: block; font-size: 2rem; font-weight: 800; color: var(--ef-blue); }
.stat-label { color: var(--ef-muted); font-size: .9rem; }

/* ── Tarjetas de artículo ───────────────────────────────────────────────── */
.article-card { border: 1px solid var(--ef-line); border-radius: var(--ef-radius); overflow: hidden; box-shadow: var(--ef-shadow-sm); transition: transform .2s ease, box-shadow .2s ease; }
.article-card:hover { transform: translateY(-4px); box-shadow: var(--ef-shadow); }
.article-card-img { display: block; aspect-ratio: 16 / 9; background: var(--ef-bg-alt); overflow: hidden; }
.article-card-img img { width: 100%; height: 100%; object-fit: cover; }
.article-card-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 2.5rem; color: #b9c8d6; }
.article-card-cat { display: inline-block; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ef-teal); margin-bottom: .5rem; }
.article-card-title { font-size: 1.1rem; }
.article-card-title a { color: var(--ef-navy); }
.article-card-title a:hover { color: var(--ef-blue); }
.article-card-excerpt { color: var(--ef-muted); font-size: .92rem; }
.article-card-meta { color: var(--ef-muted); font-size: .82rem; border-top: 1px solid var(--ef-line); padding-top: .7rem; }

/* ── Page hero ──────────────────────────────────────────────────────────── */
.page-hero { background: linear-gradient(180deg, var(--ef-navy) 0%, var(--ef-navy-700) 100%); color: #fff; padding: 3rem 0; }
.page-hero-title { color: #fff; font-size: clamp(1.7rem, 3.5vw, 2.5rem); }
.page-hero-sub { color: #cfe0f0; max-width: 46rem; margin-bottom: 0; }
.page-hero-icon { display: inline-flex; width: 64px; height: 64px; align-items: center; justify-content: center; border-radius: 16px; background: rgba(255,255,255,.1); font-size: 1.8rem; color: var(--ef-gold); margin-bottom: 1rem; }

/* ── Breadcrumbs ────────────────────────────────────────────────────────── */
.breadcrumbs-wrap { background: var(--ef-bg-alt); border-bottom: 1px solid var(--ef-line); padding: .7rem 0; }
.breadcrumb { font-size: .88rem; }
.breadcrumb-item a { color: var(--ef-muted); }
.breadcrumb-item.active { color: var(--ef-navy); font-weight: 600; }

/* ── Cuerpo de contenido ────────────────────────────────────────────────── */
.content-body { font-size: 1.05rem; color: #2c3a47; }
.content-body h2 { font-size: 1.5rem; margin: 2rem 0 .8rem; }
.content-body h3 { font-size: 1.2rem; margin: 1.5rem 0 .6rem; }
.content-body p { margin-bottom: 1rem; }
.content-body ul, .content-body ol { margin-bottom: 1rem; padding-left: 1.3rem; }
.content-body li { margin-bottom: .4rem; }
.content-body .border { border-color: var(--ef-line) !important; }

/* ── Artículo ───────────────────────────────────────────────────────────── */
.article-head { margin-bottom: 1.5rem; }
.article-title { font-size: clamp(1.6rem, 3vw, 2.3rem); margin: .4rem 0 1rem; }
.article-meta { color: var(--ef-muted); font-size: .9rem; display: flex; flex-wrap: wrap; gap: 1rem; }
.article-figure { margin: 0 0 1.5rem; border-radius: var(--ef-radius); overflow: hidden; }
.article-figure img { width: 100%; object-fit: cover; }

/* ── Sidebar ────────────────────────────────────────────────────────────── */
.sidebar-box { background: #fff; border: 1px solid var(--ef-line); border-radius: var(--ef-radius); padding: 1.4rem; margin-bottom: 1.5rem; box-shadow: var(--ef-shadow-sm); }
.sidebar-title { border-bottom: 2px solid var(--ef-bg-alt); padding-bottom: .6rem; margin-bottom: 1rem; }
.category-list { list-style: none; padding: 0; margin: 0; }
.category-list li { border-bottom: 1px solid var(--ef-line); }
.category-list li:last-child { border-bottom: 0; }
.category-list a { display: flex; justify-content: space-between; align-items: center; padding: .6rem 0; color: var(--ef-ink); font-weight: 500; }
.category-list a:hover { color: var(--ef-blue); }
.category-list .badge { background: var(--ef-bg-alt); color: var(--ef-muted); }
.sidebar-cta { background: var(--ef-navy); color: #fff; }
.sidebar-cta h2 { color: #fff; }

/* ── FAQ ────────────────────────────────────────────────────────────────── */
.faq-group-title { margin: 1.5rem 0 1rem; color: var(--ef-blue); }
.accordion-button { font-weight: 600; color: var(--ef-navy); }
.accordion-button:not(.collapsed) { background: var(--ef-bg-alt); color: var(--ef-blue); box-shadow: none; }
.accordion-button:focus { box-shadow: 0 0 0 .2rem rgba(29,111,184,.18); }

/* ── Formularios ────────────────────────────────────────────────────────── */
.form-card { background: #fff; border: 1px solid var(--ef-line); border-radius: var(--ef-radius); padding: 2rem; box-shadow: var(--ef-shadow-sm); }
.form-label { font-weight: 600; color: var(--ef-navy); }
.form-control, .form-select { border-radius: 10px; border-color: var(--ef-line); padding: .6rem .85rem; }
.form-control:focus, .form-select:focus { border-color: var(--ef-blue); box-shadow: 0 0 0 .2rem rgba(29,111,184,.15); }
.hp-field { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.contact-info-list { list-style: none; padding: 0; margin: 0; }
.contact-info-list li { display: flex; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--ef-line); }
.ci-icon { display: inline-flex; width: 44px; height: 44px; min-width: 44px; align-items: center; justify-content: center; border-radius: 12px; background: var(--ef-bg-alt); color: var(--ef-blue); font-size: 1.2rem; }

/* ── Newsletter ─────────────────────────────────────────────────────────── */
.newsletter-band { background: linear-gradient(135deg, var(--ef-blue), var(--ef-teal)); color: #fff; padding: 3rem 0; }
.newsletter-band h2 { color: #fff; }
.newsletter-note { display: block; margin-top: .5rem; color: rgba(255,255,255,.85); }
.newsletter-note a { color: #fff; text-decoration: underline; }

/* ── CTA ────────────────────────────────────────────────────────────────── */
.cta-band { background: var(--ef-navy); color: #fff; padding: 3.5rem 0; }
.cta-title { color: #fff; }
.cta-sub { color: #cfe0f0; margin-bottom: 1.5rem; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer { background: #0c2038; color: #b6c8da; }
.footer-title, .footer-heading { color: #fff; }
.footer-heading { font-size: .95rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.footer-about { font-size: .92rem; color: #9fb4c8; }
.footer-links, .footer-contact { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .5rem; }
.footer-links a { color: #b6c8da; font-size: .92rem; }
.footer-links a:hover { color: #fff; }
.footer-contact li { display: flex; gap: .6rem; margin-bottom: .6rem; font-size: .9rem; color: #9fb4c8; }
.footer-social a { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: 10px; background: rgba(255,255,255,.08); color: #fff; margin-right: .4rem; margin-top: .8rem; }
.footer-social a:hover { background: var(--ef-blue); }
.footer-disclaimer { border-top: 1px solid rgba(255,255,255,.1); padding-top: 1.2rem; color: #8aa0b6; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); color: #8aa0b6; }

/* ── Cookie consent ─────────────────────────────────────────────────────── */
.cookie-consent { position: fixed; bottom: 1rem; left: 1rem; right: 1rem; z-index: 1060; background: var(--ef-navy); color: #eaf2fb; border-radius: var(--ef-radius); box-shadow: 0 12px 40px rgba(0,0,0,.3); padding: 1.2rem 1.4rem; }
.cookie-inner { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.cookie-text { font-size: .9rem; flex: 1 1 360px; }
.cookie-text a { color: #9fd0ff; text-decoration: underline; }
.cookie-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.cookie-settings { border-top: 1px solid rgba(255,255,255,.15); margin-top: 1rem; padding-top: 1rem; }
.cookie-settings .form-check-label { color: #eaf2fb; font-size: .9rem; }
@media (min-width: 768px) { .cookie-consent { left: auto; right: 1.5rem; bottom: 1.5rem; max-width: 540px; } }

/* ── Ventana de acceso (gate) ───────────────────────────────────────────── */
.access-gate {
  position: fixed; inset: 0; z-index: 1080;
  display: flex; align-items: center; justify-content: center;
  padding: 1.25rem;
  background: linear-gradient(135deg, rgba(15,39,65,.97), rgba(20,58,94,.97));
  backdrop-filter: blur(4px);
}
.access-gate-box {
  background: #fff; border-radius: 18px; max-width: 480px; width: 100%;
  padding: 2.2rem 1.8rem; text-align: center; box-shadow: 0 25px 60px rgba(0,0,0,.4);
  animation: gateIn .35s ease;
}
@keyframes gateIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.access-gate-icon {
  width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 16px;
  display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: #fff;
  background: linear-gradient(135deg, var(--ef-blue), var(--ef-teal));
}
.access-gate-title { font-size: 1.4rem; margin-bottom: .8rem; }
.access-gate-text { color: var(--ef-muted); font-size: .95rem; margin-bottom: 1rem; }
.access-gate-text.small { font-size: .82rem; }
.access-gate-text a { color: var(--ef-blue); text-decoration: underline; }
body.gate-open { overflow: hidden; }

/* ── Back to top ────────────────────────────────────────────────────────── */
.back-to-top { position: fixed; bottom: 1.2rem; right: 1.2rem; z-index: 1040; width: 46px; height: 46px; border-radius: 50%; display: none; align-items: center; justify-content: center; padding: 0; box-shadow: var(--ef-shadow); }
.back-to-top.show { display: inline-flex; }

/* ── Error ──────────────────────────────────────────────────────────────── */
.error-section { padding: 5rem 0; }
.error-code { font-size: clamp(4rem, 12vw, 8rem); font-weight: 800; color: var(--ef-blue); line-height: 1; }

/* ── Utilidades responsive ──────────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .navbar-nav { padding-top: .5rem; }
  .hero { padding: 3rem 0; }
}

/* Respeta la preferencia de reducir movimiento. */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
