/* ═══════════════════════════════════════════════════
   DIRECTORIO ESOTÉRICO — Design System v2
   Dark theme · Professional · Responsive
═══════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────── */
:root {
  --bg:           #080d1a;
  --surface:      #0d1426;
  --card:         #101828;
  --card-hover:   #141e32;
  --soft:         #192035;
  --border:       #1e2d4a;
  --border-light: #253660;
  --text:         #eef2ff;
  --muted:        #7a8aaa;
  --muted-light:  #a8b8d0;
  --primary:      #7c3aed;
  --primary-h:    #6d28d9;
  --primary-l:    #a78bfa;
  --primary-glow: rgba(124,58,237,.22);
  --accent:       #10b981;
  --danger:       #ef4444;
  --warning:      #f59e0b;
  --radius-sm:    8px;
  --radius:       12px;
  --radius-lg:    18px;
  --shadow:       0 8px 32px rgba(0,0,0,.5);
  --shadow-sm:    0 2px 12px rgba(0,0,0,.35);
  --t:            .18s ease;
  --font:         'Inter', system-ui, -apple-system, Arial, sans-serif;
}

/* ── Reset ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary-l); text-decoration: none; transition: color var(--t); }
a:hover { color: #c4b5fd; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; color: var(--text); }
p { color: var(--muted-light); }

/* ── Layout ─────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 22px; }

/* ── Navigation ─────────────────────────────────── */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  gap: 16px;
  position: relative;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.brand {
  color: #fff;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  text-decoration: none;
}
.brand-text    { display: flex; flex-direction: column; gap: 1px; }
.brand-name    { font-size: 17px; font-weight: 800; letter-spacing: -.3px; line-height: 1.2; white-space: nowrap; }
.brand-tagline { font-size: 10px; font-weight: 400; color: var(--muted); letter-spacing: .1px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.brand-icon {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--primary), #a78bfa);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
}
.nav-links {
  display: flex;
  gap: 2px;
  align-items: center;
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--muted-light);
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--t);
}
.nav-links a:hover { color: var(--text); background: var(--soft); text-decoration: none; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

/* ── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--primary);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  font-family: var(--font);
  text-decoration: none;
  transition: all var(--t);
  white-space: nowrap;
  line-height: 1;
}
.btn:hover {
  background: var(--primary-h);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 18px var(--primary-glow);
}
.btn:active { transform: translateY(0); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--muted-light);
}
.btn-outline:hover {
  border-color: var(--primary-l);
  color: var(--primary-l);
  background: var(--primary-glow);
  box-shadow: none;
  transform: none;
}
.btn-danger  { background: var(--danger); }
.btn-danger:hover  { background: #dc2626; box-shadow: 0 4px 16px rgba(239,68,68,.3); }
.btn-accent  { background: var(--accent); }
.btn-accent:hover  { background: #059669; }
.btn-sm  { padding: 6px 12px; font-size: 13px; border-radius: 6px; }
.btn-lg  { padding: 13px 28px; font-size: 16px; border-radius: var(--radius); }

/* ── Cards ──────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all var(--t);
}
a.card:hover {
  border-color: var(--border-light);
  background: var(--card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text);
}
a.card:hover p { color: var(--muted-light); }
a.card strong { color: var(--text); display: block; margin-bottom: 6px; font-size: 15px; }

/* ── Grid ───────────────────────────────────────── */
.grid   { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ── Hero ───────────────────────────────────────── */
.hero {
  padding: 60px 0 36px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -120px; right: -80px;
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(124,58,237,.13) 0%, transparent 68%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -60px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(16,185,129,.07) 0%, transparent 68%);
  pointer-events: none;
}
.hero h1 {
  font-size: clamp(24px, 3.2vw, 38px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
  position: relative;
  color: var(--text);
  background: linear-gradient(135deg, #fff 45%, #c4b5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 17px;
  color: var(--muted-light);
  line-height: 1.75;
  position: relative;
}
.hero-intro {
  font-size: 16px;
  color: var(--muted-light);
  line-height: 1.8;
  position: relative;
}

/* ── Search bar ─────────────────────────────────── */
.searchbar {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 10px;
  align-items: center;
}

/* ── Forms ──────────────────────────────────────── */
input, select, textarea {
  width: 100%;
  padding: 11px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  transition: border-color var(--t), box-shadow var(--t);
  outline: none;
  appearance: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary-l);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
input[type="checkbox"],
input[type="radio"] {
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  appearance: auto;
  -webkit-appearance: auto;
  border: none;
  background: none;
  box-shadow: none;
  flex-shrink: 0;
  cursor: pointer;
}
/* ── CKEditor 4: neutralise global form resets ── */
.cke input, .cke select, .cke textarea,
.cke_dialog input, .cke_dialog select, .cke_dialog textarea {
  all: revert !important;
  font-family: inherit;
}
.cke_toolbar, .cke_toolgroup, .cke_button, .cke_combo {
  display: revert !important;
  width: revert !important;
  padding: revert !important;
}

/* ── CKEditor 4: dark theme ── */
/* Outer chrome & background */
.cke_chrome { border: 1px solid var(--border) !important; border-radius: var(--radius-sm) !important; }
/* Toolbar bar */
.cke_top {
  background: var(--surface) !important;
  border-bottom: 1px solid var(--border) !important;
  padding: 6px 4px !important;
}
/* Bottom resize bar */
.cke_bottom {
  background: var(--surface) !important;
  border-top: 1px solid var(--border) !important;
}
/* Separators between toolbar groups */
.cke_toolbar_separator {
  background: var(--border) !important;
}
/* Toolbar button icons — make them appear light */
.cke_button_icon { filter: brightness(0) invert(0.75) !important; }
/* Button text (e.g. "Source") */
.cke_button_label { color: #b0bdd0 !important; font-size: 12px !important; }
/* Button hover/active */
.cke_button:hover,
.cke_button_on { background: rgba(255,255,255,.08) !important; border-radius: 3px !important; }
/* Format / combo dropdown label */
.cke_combo_text { color: #b0bdd0 !important; }
.cke_combo_arrow { border-top-color: #b0bdd0 !important; }
.cke_combo__format .cke_combo_text { min-width: 90px !important; }
/* Combo button border */
.cke_combo_button {
  background: transparent !important;
  border: 1px solid var(--border) !important;
  border-radius: 3px !important;
}
.cke_combo_button:hover { background: rgba(255,255,255,.08) !important; }
/* Dropdown panels */
.cke_panel, .cke_combopanel {
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
}
.cke_panel_list li a,
.cke_panel_listItem a { color: var(--text) !important; }
.cke_panel_listItem a:hover { background: rgba(255,255,255,.08) !important; }
/* Content area stays white for readability */
.cke_editable { background: #fff !important; color: #111 !important; }
/* Dialogs */
.cke_dialog_body {
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
}
.cke_dialog_title { background: var(--surface) !important; color: var(--text) !important; border-bottom: 1px solid var(--border) !important; }
.cke_dialog_footer { background: var(--surface) !important; border-top: 1px solid var(--border) !important; }
.cke_dialog_ui_labeled_label,
.cke_dialog_ui_html { color: var(--text) !important; }
/* Toolbar group items wrapper — transparent */
.cke_toolbox { background: transparent !important; }
.cke_toolbar { background: transparent !important; }
input::placeholder { color: var(--muted); }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a8aaa' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
select option { background: var(--card); }
textarea { min-height: 120px; resize: vertical; }
label {
  display: block;
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 6px;
  color: var(--muted-light);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.form-group { margin-bottom: 20px; }
.required { color: var(--danger); }
.input-addon {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  background: var(--soft);
  border: 1px solid var(--border);
  border-right: 0;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  height: 44px;
}
.input-addon + input, .input-addon + .input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* ── Badges ─────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(124,58,237,.15);
  color: #c4b5fd;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  border: 1px solid rgba(124,58,237,.25);
}
.badge-success { background: rgba(16,185,129,.15); color: #6ee7b7; border-color: rgba(16,185,129,.25); }
.badge-warning { background: rgba(245,158,11,.15);  color: #fcd34d; border-color: rgba(245,158,11,.25); }
.badge-danger  { background: rgba(239,68,68,.15);   color: #fca5a5; border-color: rgba(239,68,68,.25); }

/* ── Alerts ─────────────────────────────────────── */
.alert {
  padding: 13px 18px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-success { background: rgba(16,185,129,.1);  color: #6ee7b7; border: 1px solid rgba(16,185,129,.22); }
.alert-error   { background: rgba(239,68,68,.1);   color: #fca5a5; border: 1px solid rgba(239,68,68,.22); }

/* ── Table ──────────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  padding: 10px 14px;
  border-bottom: 2px solid var(--border);
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--muted);
  font-weight: 600;
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--muted-light); }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: rgba(255,255,255,.018); }

/* ── KPI ────────────────────────────────────────── */
.kpi { font-size: 36px; font-weight: 800; color: var(--text); line-height: 1; }

/* ── Footer ─────────────────────────────────────── */
.footer {
  padding: 44px 0 28px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: 72px;
  font-size: 14px;
}
.footer p { color: var(--muted); margin-bottom: 10px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 0; }
.footer-links a {
  color: var(--muted);
  padding: 4px 12px;
  border-radius: 6px;
  transition: all var(--t);
  font-size: 13px;
}
.footer-links a:hover { color: var(--text); background: var(--soft); text-decoration: none; }

/* ── Sidebar layout ─────────────────────────────── */
.sidebar-layout { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: start; }
.sidebar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  position: sticky;
  top: 20px;
}
.sidebar a { display: block; padding: 10px 13px; border-radius: var(--radius-sm); color: var(--muted-light); font-size: 14px; font-weight: 500; transition: all var(--t); }
.sidebar a:hover { background: var(--soft); color: var(--text); text-decoration: none; }
.sidebar a.active { background: var(--primary-glow); color: var(--primary-l); padding-left: 15px; border-left: 2px solid var(--primary-l); }

/* ── Misc ───────────────────────────────────────── */
.actions      { display: flex; gap: 10px; flex-wrap: wrap; }
.service-list { display: grid; gap: 14px; }
.muted        { color: var(--muted); }
.small        { font-size: 13px; }
.loc    { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; }
.loc-link {
  color: var(--muted-light);
  text-decoration: none;
  border-bottom: 1px dashed var(--border);
  transition: color var(--t), border-color var(--t);
}
.loc-link:hover { color: var(--primary-l); border-color: var(--primary-l); }

/* ── Professional card ───────────────────────────────────── */
.pro-card { display: flex; flex-direction: column; gap: 8px; }
.pro-card__badges { display: flex; flex-wrap: wrap; gap: 5px; }
.pro-card__name { font-size: 16px; font-weight: 700; margin: 0; line-height: 1.3; }
.pro-card__name a { color: var(--text); text-decoration: none; }
.pro-card__name a:hover { color: var(--primary-l); }
.pro-card__desc { font-size: 13px; color: var(--muted); margin: 0; flex: 1; }
.pro-card__loc {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px;
  font-size: 12px; color: var(--muted); margin: 0;
}
.loc-item { display: inline-flex; align-items: center; gap: 3px; }
.loc-sep  { color: var(--border); font-weight: 300; }
.pro-card__actions { margin-top: auto; padding-top: 4px; }
.badge-accent { background: rgba(124,58,237,.25); color: var(--primary-l); }
.text-center  { text-align: center; }
.divider      { border: none; border-top: 1px solid var(--border); margin: 28px 0; }
.mt-1 { margin-top: 8px; }  .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 28px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 28px; }

/* ── Section title ──────────────────────────────── */
.section-title {
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── Breadcrumb ─────────────────────────────────── */
.breadcrumb { margin-bottom: 20px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; list-style: none; padding: 0; margin: 0; font-size: 13px; }
.breadcrumb li { display: flex; align-items: center; gap: 4px; color: var(--muted); }
.breadcrumb li + li::before { content: "/"; opacity: .35; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--text); }

/* ── Cover image ────────────────────────────────── */
.hero-cover img { width: 100%; height: auto; border-radius: var(--radius-lg); }

/* ── Profile score chip ─────────────────────────── */
.score-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px;
  background: rgba(16,185,129,.12); color: #6ee7b7;
  border: 1px solid rgba(16,185,129,.2); font-size: 12px; font-weight: 600;
}

/* ── Blog ───────────────────────────────────────── */
.blog-layout     { display: grid; grid-template-columns: 1fr 280px; gap: 28px; align-items: start; }
.blog-list       { display: grid; gap: 24px; }
.blog-card       { display: grid; }
.blog-cover-thumb { width: 100%; height: 200px; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; }
.blog-card-body  { padding: 18px; }
.blog-title      { font-size: 18px; margin-bottom: 8px; }
.blog-title a    { color: var(--text); transition: color var(--t); }
.blog-title a:hover { color: #c4b5fd; text-decoration: none; }
.blog-cat-link   { display: block; padding: 8px 12px; border-radius: var(--radius-sm); color: var(--muted); margin-bottom: 2px; font-size: 14px; transition: all var(--t); }
.blog-cat-link:hover, .blog-cat-link.active { background: var(--soft); color: var(--text); text-decoration: none; }
.blog-post       { max-width: 800px; }
.blog-excerpt    { font-size: 17px; color: var(--muted-light); margin-bottom: 20px; border-left: 3px solid var(--primary-l); padding-left: 16px; font-style: italic; }
.blog-content    { line-height: 1.88; font-size: 16px; margin-top: 28px; }
.blog-content h2 { font-size: 23px; margin-top: 36px; margin-bottom: 12px; }
.blog-content h3 { font-size: 19px; margin-top: 26px; margin-bottom: 8px; }
.blog-content p  { margin-bottom: 16px; }
.blog-content img { max-width: 100%; height: auto; border-radius: var(--radius); margin: 20px 0; }
.blog-content a  { color: var(--primary-l); }
.blog-content blockquote { border-left: 4px solid var(--primary-l); margin: 24px 0; padding: 16px 20px; background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; }
.blog-content pre { background: var(--surface); border-radius: var(--radius-sm); padding: 18px; overflow-x: auto; font-size: 13px; border: 1px solid var(--border); }
.pagination { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 36px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 8px 14px; border-radius: var(--radius-sm); background: var(--card); border: 1px solid var(--border); color: var(--muted-light); font-size: 14px; transition: all var(--t); }
.pagination a:hover { background: var(--primary); color: #fff; border-color: var(--primary); text-decoration: none; }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 600; }

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 768px) {
  .nav-toggle { display: flex; align-items: center; }
  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    z-index: 200;
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .nav-links form { width: 100%; }
  .nav-links form .btn { width: 100%; justify-content: center; }
}
@media (max-width: 900px) {
  .searchbar { grid-template-columns: 1fr; }
  .sidebar-layout { grid-template-columns: 1fr; }
  .blog-layout { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 24px; }
  .footer { margin-top: 48px; }
  .sidebar { position: static; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .actions .btn { flex: 1; justify-content: center; }
  .container { padding: 0 16px; }
}

/* ── Load more ──────────────────────────────────── */
.load-more-wrap { text-align: center; margin: 28px 0 8px; }
.load-more-btn  { min-width: 160px; }
.load-more-btn:disabled { opacity: .5; cursor: not-allowed; }