/* ==========================================================================
   Wismify Help Center — shared stylesheet (light theme)
   ========================================================================== */

:root {
  --green:        #10B981;
  --green-hover:  #059669;
  --green-deep:   #047857;
  --green-tint:   #f0fdf4;
  --green-tint-2: #ecfdf5;

  --bg:        #ffffff;
  --bg-alt:    #f8faf9;
  --text:      #111827;
  --body:      #374151;
  --muted:     #6b7280;
  --border:    #e5e7eb;

  --shadow:     0 1px 2px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.05);
  --shadow-lg:  0 4px 12px rgba(0,0,0,0.06), 0 18px 40px rgba(0,0,0,0.08);

  --radius-card: 16px;
  --radius-btn:  10px;
  --radius-pill: 999px;

  --maxw: 1080px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { color: var(--text); line-height: 1.25; margin: 0 0 .5em; }
h1 { font-weight: 800; letter-spacing: -0.02em; }
h2 { font-weight: 700; letter-spacing: -0.01em; }
h3 { font-weight: 700; }

p { margin: 0 0 1em; }

a { color: var(--green-deep); text-decoration: none; }
a:hover { color: var(--green-hover); text-decoration: underline; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

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

/* ------------------------------------------------------------------ Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; color: var(--text); }
.brand img { height: 24px; width: auto; display: block; }
.footer-brand .brand img { height: 26px; }

/* Ilustraciones unDraw en las tarjetas de categoría */
.cat-illus { display: flex; align-items: center; justify-content: center; height: 104px; margin-bottom: 16px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.cat-illus img { max-height: 100%; max-width: 78%; width: auto; display: block; }

/* Selector de idioma EN/ES */
.lang-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; background: var(--bg); }
.lang-switch a { padding: 5px 11px; font-size: .8rem; font-weight: 600; color: var(--muted); line-height: 1; }
.lang-switch a:hover { text-decoration: none; color: var(--text); }
.lang-switch a.active { background: var(--green); color: #fff; }
.brand .brand-name { font-size: 1.05rem; }
.brand .brand-sub {
  color: var(--muted);
  font-weight: 500;
  font-size: .95rem;
  padding-left: 10px;
  margin-left: 4px;
  border-left: 1px solid var(--border);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links a {
  color: var(--body);
  font-weight: 500;
  font-size: .94rem;
  padding: 8px 12px;
  border-radius: var(--radius-btn);
}
.nav-links a:hover { color: var(--text); background: var(--bg-alt); text-decoration: none; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: .94rem;
  padding: 10px 18px;
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease, transform .1s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-hover); color: #fff; text-decoration: none; box-shadow: 0 6px 16px rgba(16,185,129,.28); }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--green); color: var(--green-deep); text-decoration: none; }
.btn-lg { padding: 14px 26px; font-size: 1rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  padding: 8px;
  cursor: pointer;
  color: var(--text);
}

/* -------------------------------------------------------------------- Hero */
.hero {
  background: linear-gradient(180deg, var(--green-tint) 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border);
  padding: 84px 0 72px;
  text-align: center;
}
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--green-deep);
  background: #fff;
  border: 1px solid #d1fae5;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  margin-bottom: 14px;
}
.hero .lead {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 32px;
}

/* ------------------------------------------------------------------ Search */
.search {
  position: relative;
  max-width: 620px;
  margin: 0 auto;
  text-align: left;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 6px 8px 6px 20px;
  box-shadow: var(--shadow);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search-box:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(16,185,129,.14), var(--shadow);
}
.search-box svg { flex: none; color: var(--muted); }
.search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 1.02rem;
  color: var(--text);
  background: transparent;
  padding: 10px 0;
}
.search-box input::placeholder { color: #9ca3af; }
.search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: none;
  z-index: 40;
  max-height: 60vh;
  overflow-y: auto;
}
.search-results.open { display: block; }
.search-results a {
  display: block;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.search-results a:last-child { border-bottom: none; }
.search-results a:hover, .search-results a.active { background: var(--green-tint); text-decoration: none; }
.search-results .r-title { font-weight: 600; font-size: .96rem; }
.search-results .r-cat { font-size: .8rem; color: var(--muted); margin-top: 2px; }
.search-results .r-empty { padding: 18px; color: var(--muted); font-size: .92rem; }

/* --------------------------------------------------------------- Sections */
.section { padding: 72px 0; }
.section.alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 44px; }
.section-head h2 { font-size: 1.9rem; margin-bottom: 10px; }
.section-head p { color: var(--muted); font-size: 1.05rem; margin: 0; }

/* ----------------------------------------------------------- Category grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}
.cat-card {
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 26px;
  box-shadow: var(--shadow);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--green);
  text-decoration: none;
}
.cat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--green-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--green);
}
.cat-icon svg { width: 26px; height: 26px; }
.cat-card h3 { font-size: 1.18rem; margin-bottom: 6px; color: var(--text); }
.cat-card p { color: var(--muted); font-size: .95rem; margin: 0 0 16px; }
.cat-count {
  font-size: .82rem;
  font-weight: 600;
  color: var(--green-deep);
  background: var(--green-tint-2);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  display: inline-block;
}

/* -------------------------------------------------------------- Help band */
.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.help-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 32px;
  box-shadow: var(--shadow);
  text-align: center;
}
.help-card .cat-icon { margin: 0 auto 18px; }
.help-card h3 { font-size: 1.25rem; margin-bottom: 8px; }
.help-card p { color: var(--muted); margin-bottom: 22px; }

/* ------------------------------------------------------------ Breadcrumbs */
.breadcrumb {
  font-size: .88rem;
  color: var(--muted);
  padding: 26px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.breadcrumb a { color: var(--muted); font-weight: 500; }
.breadcrumb a:hover { color: var(--green-deep); }
.breadcrumb .sep { color: #cbd5e1; }
.breadcrumb .current { color: var(--text); font-weight: 600; }

/* --------------------------------------------------------- Category header */
.page-head { padding: 26px 0 40px; }
.page-head .cat-icon { margin-bottom: 20px; }
.page-head h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 12px; }
.page-head .lead { font-size: 1.12rem; color: var(--muted); max-width: 680px; margin: 0; }

/* ---------------------------------------------------------- Article lists */
.article-list { display: grid; gap: 14px; padding-bottom: 72px; }
.article-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 22px;
  box-shadow: var(--shadow);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.article-item:hover {
  transform: translateY(-2px);
  border-color: var(--green);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}
.article-item .doc-ic {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--green-tint);
  color: var(--green);
  display: flex; align-items: center; justify-content: center;
}
.article-item .doc-ic svg { width: 20px; height: 20px; }
.article-item .a-body { flex: 1; }
.article-item .a-title { font-weight: 600; color: var(--text); font-size: 1.02rem; }
.article-item .a-desc { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.article-item .a-arrow { color: var(--muted); flex: none; transition: transform .14s ease, color .14s ease; }
.article-item:hover .a-arrow { transform: translateX(3px); color: var(--green); }

/* ------------------------------------------------------------- Article body */
.article-wrap { display: grid; grid-template-columns: 1fr; gap: 0; }
.article {
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 0 72px;
}
.article h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: 10px; }
.article .article-meta { color: var(--muted); font-size: .9rem; margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.article .prose { max-width: 70ch; }
.article .prose p, .article .prose li { color: var(--body); }
.article .prose h2 { font-size: 1.45rem; margin: 40px 0 14px; }
.article .prose h3 { font-size: 1.15rem; margin: 28px 0 10px; }
.article .prose ul, .article .prose ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.article .prose li { margin-bottom: .5em; }
.article .prose ol { counter-reset: step; }
.article .prose strong { color: var(--text); font-weight: 600; }
.article .prose a { font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.article .prose code {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: .88em;
  font-family: 'SFMono-Regular', ui-monospace, Menlo, Consolas, monospace;
  color: var(--green-deep);
}

/* Callout */
.callout {
  display: flex;
  gap: 14px;
  background: var(--green-tint);
  border: 1px solid #d1fae5;
  border-left: 4px solid var(--green);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 24px 0;
}
.callout svg { flex: none; color: var(--green-deep); margin-top: 2px; }
.callout .c-body { font-size: .96rem; }
.callout .c-body strong { color: var(--green-deep); }
.callout p:last-child { margin-bottom: 0; }

/* Related + feedback */
.related {
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.related h3 { font-size: 1.05rem; margin-bottom: 14px; }
.related ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.related a { font-weight: 500; }
.feedback {
  margin-top: 40px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px;
  text-align: center;
}
.feedback h3 { font-size: 1.15rem; margin-bottom: 6px; }
.feedback p { color: var(--muted); margin-bottom: 18px; }

/* --------------------------------------------------------------------- FAQ */
.faq-list { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; padding-bottom: 40px; }
details.faq {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
details.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 22px;
  font-weight: 600;
  color: var(--text);
  font-size: 1.02rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary .chev {
  flex: none;
  color: var(--muted);
  transition: transform .2s ease;
}
details.faq[open] summary .chev { transform: rotate(180deg); color: var(--green); }
details.faq[open] summary { color: var(--green-deep); }
details.faq .faq-body { padding: 0 22px 20px; color: var(--body); }
details.faq .faq-body p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------------ Contact */
.contact-hero { text-align: center; max-width: 640px; margin: 0 auto; padding: 20px 0 44px; }
.contact-hero .cat-icon { margin: 0 auto 22px; width: 60px; height: 60px; }
.contact-hero .cat-icon svg { width: 30px; height: 30px; }
.contact-hero h1 { font-size: clamp(1.9rem,4vw,2.6rem); margin-bottom: 12px; }
.contact-hero .lead { font-size: 1.12rem; color: var(--muted); }
.contact-cta { margin: 28px 0 12px; }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  max-width: 760px;
  margin: 48px auto 0;
}
.info-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow);
}
.info-card .cat-icon { width: 44px; height: 44px; margin-bottom: 14px; }
.info-card .cat-icon svg { width: 22px; height: 22px; }
.info-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.info-card p { color: var(--muted); font-size: .93rem; margin: 0; }
.contact-form {
  max-width: 620px;
  margin: 52px auto 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 32px;
  box-shadow: var(--shadow);
}
.contact-form h2 { font-size: 1.3rem; text-align: center; margin-bottom: 6px; }
.contact-form .form-note { text-align: center; color: var(--muted); font-size: .9rem; margin-bottom: 24px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .9rem; color: var(--text); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%;
  font-family: inherit;
  font-size: .98rem;
  color: var(--text);
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  background: #fff;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(16,185,129,.14); }
.field textarea { resize: vertical; min-height: 120px; }

/* ------------------------------------------------------------------ Footer */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 56px 0 32px;
  margin-top: 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { color: var(--muted); font-size: .92rem; max-width: 260px; }
.footer-col h4 {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--body); font-size: .93rem; font-weight: 500; }
.footer-col a:hover { color: var(--green-deep); }
.footer-bottom {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: .88rem;
}
.footer-bottom a { color: var(--muted); }

/* ------------------------------------------------------------- Responsive */
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 12px 16px 18px;
    box-shadow: var(--shadow);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; }
  .nav-links .btn { justify-content: center; margin-top: 4px; }
  .nav-toggle { display: inline-flex; }
  .hero { padding: 56px 0 48px; }
  .section { padding: 52px 0; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .brand .brand-sub { display: none; }
  .card-grid { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------- Accessibility */
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--green);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
