/* ============================================================
   TrucosConsejos — global design system
   Layered on top of Bootstrap 5.3
   ============================================================ */

:root {
  --tc-primary: #4f46e5;
  --tc-primary-dark: #4338ca;
  --tc-primary-soft: #eef2ff;
  --tc-accent: #059669;
  --tc-accent-dark: #047857;
  --tc-ink: #0f172a;
  --tc-body: #334155;
  --tc-muted: #64748b;
  --tc-line: #e2e8f0;
  --tc-surface: #f8fafc;
  --tc-radius: 14px;
  --tc-shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --tc-shadow-md: 0 10px 30px -12px rgba(15, 23, 42, .18);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--tc-body);
  background: #fff;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, .navbar-brand { color: var(--tc-ink); font-weight: 700; }

a { color: var(--tc-primary); }
a:hover { color: var(--tc-primary-dark); }

/* ---------- Navbar ---------- */
.site-navbar {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--tc-line);
}
.site-navbar .nav-link {
  color: var(--tc-body);
  font-weight: 500;
  border-radius: 8px;
  padding: .45rem .85rem;
}
.site-navbar .nav-link:hover { color: var(--tc-primary); background: var(--tc-primary-soft); }
.site-navbar .nav-link.active { color: var(--tc-primary); background: var(--tc-primary-soft); }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--tc-primary), #7c3aed);
  color: #fff;
  font-size: 1.05rem;
}
.brand-text { font-weight: 800; letter-spacing: -.02em; color: var(--tc-ink); }

.btn-accent {
  background: var(--tc-accent);
  border: 1px solid var(--tc-accent);
  color: #fff;
  font-weight: 600;
}
.btn-accent:hover { background: var(--tc-accent-dark); border-color: var(--tc-accent-dark); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1000px 400px at 85% -10%, rgba(124, 58, 237, .14), transparent 60%),
    radial-gradient(800px 350px at 10% -20%, rgba(79, 70, 229, .16), transparent 60%),
    var(--tc-surface);
  border-bottom: 1px solid var(--tc-line);
  padding: 4rem 0 3.5rem;
}
.hero h1 { font-weight: 800; letter-spacing: -.03em; font-size: clamp(1.9rem, 4vw, 2.9rem); }
.hero .lead { color: var(--tc-muted); max-width: 640px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: #fff;
  border: 1px solid var(--tc-line);
  color: var(--tc-primary);
  font-size: .82rem;
  font-weight: 600;
  border-radius: 999px;
  padding: .35rem .9rem;
  box-shadow: var(--tc-shadow-sm);
}

/* ---------- Sections & cards ---------- */
.section { padding: 3.5rem 0; }
.section-alt { background: var(--tc-surface); border-top: 1px solid var(--tc-line); border-bottom: 1px solid var(--tc-line); }
.section-title { font-weight: 800; letter-spacing: -.02em; margin-bottom: .5rem; }
.section-sub { color: var(--tc-muted); max-width: 640px; margin: 0 auto 2rem; }

.tc-card {
  background: #fff;
  border: 1px solid var(--tc-line);
  border-radius: var(--tc-radius);
  box-shadow: var(--tc-shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
  height: 100%;
}
.tc-card:hover { transform: translateY(-3px); box-shadow: var(--tc-shadow-md); }
.tc-card .card-body { padding: 1.6rem; }
.tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border-radius: 12px;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  background: var(--tc-primary-soft);
  color: var(--tc-primary);
}

/* ---------- Tool panel ---------- */
.tool-panel {
  background: #fff;
  border: 1px solid var(--tc-line);
  border-radius: var(--tc-radius);
  box-shadow: var(--tc-shadow-md);
  padding: 2rem;
}
.drop-zone {
  border: 2px dashed #c7d2fe;
  border-radius: var(--tc-radius);
  background: var(--tc-primary-soft);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.drop-zone:hover, .drop-zone.dragover { border-color: var(--tc-primary); background: #e0e7ff; }
.drop-zone i { font-size: 2.2rem; color: var(--tc-primary); }
.drop-zone .dz-hint { color: var(--tc-muted); font-size: .9rem; }

.btn-primary {
  background: var(--tc-primary);
  border-color: var(--tc-primary);
  font-weight: 600;
}
.btn-primary:hover, .btn-primary:focus { background: var(--tc-primary-dark); border-color: var(--tc-primary-dark); }

/* ---------- Steps ---------- */
.step-card { text-align: center; padding: 1.5rem 1.2rem; }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--tc-primary), #7c3aed);
  color: #fff;
  font-weight: 700;
  margin-bottom: .8rem;
}

/* ---------- Feature list ---------- */
.feature-row { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.4rem; }
.feature-row i { color: var(--tc-accent); font-size: 1.25rem; margin-top: .15rem; }
.feature-row h3 { font-size: 1.05rem; margin-bottom: .25rem; }
.feature-row p { margin-bottom: 0; color: var(--tc-muted); }

/* ---------- Article / long-form content ---------- */
.article { max-width: 800px; margin: 0 auto; }
.article h2 { font-size: 1.55rem; margin-top: 2.4rem; margin-bottom: .8rem; letter-spacing: -.01em; }
.article h3 { font-size: 1.2rem; margin-top: 1.8rem; margin-bottom: .6rem; }
.article p, .article li { line-height: 1.75; }
.article ul, .article ol { padding-left: 1.3rem; }
.article .table { --bs-table-striped-bg: var(--tc-surface); }

/* ---------- FAQ ---------- */
.accordion-item { border-color: var(--tc-line); }
.accordion-button { font-weight: 600; color: var(--tc-ink); }
.accordion-button:not(.collapsed) { background: var(--tc-primary-soft); color: var(--tc-primary-dark); box-shadow: none; }
.accordion-button:focus { box-shadow: 0 0 0 .2rem rgba(79, 70, 229, .15); }

/* ---------- Forms ---------- */
.form-control, .form-select {
  border-color: var(--tc-line);
  border-radius: 10px;
  padding: .6rem .85rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--tc-primary);
  box-shadow: 0 0 0 .2rem rgba(79, 70, 229, .12);
}
.form-label { font-weight: 600; color: var(--tc-ink); }

/* ---------- Result box ---------- */
.result-box {
  border: 1px solid var(--tc-line);
  border-radius: var(--tc-radius);
  background: var(--tc-surface);
  padding: 1.5rem;
}
.result-box img { max-width: 100%; height: auto; border-radius: 10px; box-shadow: var(--tc-shadow-sm); }
.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: #fff;
  border: 1px solid var(--tc-line);
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--tc-body);
  padding: .3rem .8rem;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--tc-primary), #7c3aed);
  border-radius: var(--tc-radius);
  color: #fff;
  padding: 2.5rem 2rem;
}
.cta-band h2 { color: #fff; }
.cta-band .btn { background: #fff; color: var(--tc-primary-dark); font-weight: 700; border: 0; }

/* ---------- Footer ---------- */
.site-footer { background: #0f172a; color: #cbd5e1; margin-top: 4rem; }
.footer-brand { color: #fff; }
.footer-heading { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: #94a3b8; font-weight: 700; margin-bottom: 1rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .55rem; }
.footer-links a { color: #cbd5e1; text-decoration: none; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-muted { color: #94a3b8; font-size: .95rem; }
.footer-bottom { border-top: 1px solid #1e293b; font-size: .88rem; color: #94a3b8; }

/* ---------- Canvas tools ---------- */
.canvas-frame {
  border: 1px solid var(--tc-line);
  border-radius: var(--tc-radius);
  background:
    repeating-conic-gradient(#f1f5f9 0% 25%, #ffffff 0% 50%) 50% / 22px 22px;
  padding: .75rem;
}
.canvas-frame canvas { max-width: 100%; height: auto; border-radius: 8px; display: block; margin: 0 auto; }

@media (max-width: 575.98px) {
  .tool-panel { padding: 1.25rem; }
  .hero { padding: 3rem 0 2.5rem; }
}
