/*
Theme Name: SymbolDex
Theme URI: https://symboldex.guslok.com/
Author: SymbolDex
Description: Tema ultraligero creado específicamente para SymbolDex Core. Diseñado para símbolos, emoji, Unicode y colecciones bilingües ES/EN.
Version: 1.3.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: symboldex-theme
*/

:root{
  --sx-bg:#f7f7fb;
  --sx-surface:#ffffff;
  --sx-surface-2:#f0efff;
  --sx-text:#17171d;
  --sx-muted:#696b76;
  --sx-line:#e6e5ef;
  --sx-accent:#5b43f1;
  --sx-accent-2:#8a5cf5;
  --sx-header:rgba(255,255,255,.92);
  --sx-shadow:0 16px 50px rgba(31,24,72,.08);
  --sx-radius:22px;
  --sx-content:1180px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--sx-bg);color:var(--sx-text);font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,"Apple Color Emoji","Segoe UI Emoji",sans-serif;font-size:16px;line-height:1.6;-webkit-font-smoothing:antialiased}
a{color:var(--sx-accent);text-decoration-thickness:1px;text-underline-offset:3px}
a:hover{color:#412acc}
img{max-width:100%;height:auto}
button,input,select,textarea{font:inherit}
::selection{background:#dcd7ff;color:#17171d}

.sx-site-header{position:sticky;top:0;z-index:1000;background:var(--sx-header);backdrop-filter:saturate(160%) blur(16px);border-bottom:1px solid rgba(230,229,239,.9)}
.admin-bar .sx-site-header{top:32px}
.sx-header-inner{width:min(var(--sx-content),calc(100% - 32px));min-height:72px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;gap:22px}
.sx-brand{display:flex;align-items:center;gap:11px;color:var(--sx-text);text-decoration:none;min-width:0}
.sx-brand:hover{color:var(--sx-text)}
.sx-brand-mark{width:42px;height:42px;display:grid;place-items:center;border-radius:13px;background:linear-gradient(135deg,#17171d,#29263b);color:#fff;font-size:17px;font-weight:900;letter-spacing:-.04em;box-shadow:0 8px 24px rgba(23,23,29,.16)}
.sx-brand-copy{display:flex;flex-direction:column;line-height:1.05}
.sx-brand-name{font-weight:900;letter-spacing:.08em;font-size:17px}
.sx-brand-tag{margin-top:5px;color:var(--sx-muted);font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}
.sx-nav{display:flex;align-items:center;gap:6px}
.sx-nav a{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:7px 12px;border-radius:11px;color:var(--sx-muted);text-decoration:none;font-size:13px;font-weight:750}
.sx-nav a:hover,.sx-nav a[aria-current="page"]{background:var(--sx-surface-2);color:var(--sx-accent)}
.sx-nav .sx-nav-primary{background:var(--sx-text);color:#fff;padding-inline:14px}
.sx-nav .sx-nav-primary:hover{background:var(--sx-accent);color:#fff}

.sx-main{min-height:65vh}
body:not(.symboldex-page) .sx-main{width:min(860px,calc(100% - 32px));margin:0 auto;padding:48px 0 72px}
.sx-content-card{background:var(--sx-surface);border:1px solid var(--sx-line);border-radius:var(--sx-radius);padding:clamp(24px,4vw,46px);box-shadow:var(--sx-shadow)}
.sx-entry-title{margin:0 0 24px;font-size:clamp(34px,5vw,58px);line-height:1.05;letter-spacing:-.035em}
.sx-entry-content h2{margin-top:1.8em;font-size:30px;line-height:1.15}
.sx-entry-content h3{margin-top:1.6em;font-size:23px;line-height:1.2}
.sx-entry-content p,.sx-entry-content li{color:#393a43}

.sx-site-footer{margin-top:30px;border-top:1px solid var(--sx-line);background:#fff}
.sx-footer-inner{width:min(var(--sx-content),calc(100% - 32px));margin:0 auto;padding:38px 0 26px;display:grid;grid-template-columns:1fr auto;gap:30px;align-items:start}
.sx-footer-brand{font-weight:900;letter-spacing:.09em;font-size:15px;color:var(--sx-text)}
.sx-footer-copy{max-width:620px;margin:8px 0 0;color:var(--sx-muted);font-size:13px}
.sx-footer-links{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:7px 14px}
.sx-footer-links a{color:var(--sx-muted);font-size:13px;text-decoration:none}
.sx-footer-links a:hover{color:var(--sx-accent)}
.sx-footer-bottom{width:min(var(--sx-content),calc(100% - 32px));margin:0 auto;padding:16px 0 28px;border-top:1px solid var(--sx-line);color:#8a8b94;font-size:12px}

/* Integración directa con SymbolDex Core */
.symboldex-page{
  --sd-bg:var(--sx-bg);
  --sd-card:var(--sx-surface);
  --sd-text:var(--sx-text);
  --sd-muted:var(--sx-muted);
  --sd-line:var(--sx-line);
  --sd-accent:var(--sx-accent);
  --sd-accent2:var(--sx-accent-2);
}
.symboldex-page .sd-wrap{padding-top:38px}
.symboldex-page .sd-hero{position:relative;overflow:hidden;border-radius:30px;background:radial-gradient(circle at 85% 10%,rgba(139,92,246,.15),transparent 33%),radial-gradient(circle at 10% 100%,rgba(91,67,241,.12),transparent 35%),linear-gradient(135deg,#fff,#f4f2ff);box-shadow:var(--sx-shadow)}
.symboldex-page .sd-hero:before{content:"∞  ✦  →  ♡  ✓  π  ☺  €";position:absolute;right:-20px;top:12px;color:rgba(91,67,241,.06);font-weight:900;font-size:42px;letter-spacing:.18em;transform:rotate(-8deg);pointer-events:none;white-space:nowrap}
.symboldex-page .sd-brandmark{background:linear-gradient(135deg,#17171d,#332d5d);box-shadow:0 14px 35px rgba(24,20,55,.22)}
.symboldex-page .sd-hero h1,.symboldex-page .sd-list-head h1,.symboldex-page .sd-entity h1{letter-spacing:-.04em}
.symboldex-page .sd-search input{border-width:1px;box-shadow:0 12px 35px rgba(36,27,97,.1);outline:none;transition:border-color .2s ease,box-shadow .2s ease,transform .2s ease}
.symboldex-page .sd-search input:focus{border-color:#b9afff;box-shadow:0 15px 40px rgba(91,67,241,.15);transform:translateY(-1px)}
.symboldex-page .sd-category{box-shadow:0 2px 0 rgba(32,24,75,.02);transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease}
.symboldex-page .sd-category:hover{transform:translateY(-2px);border-color:#cbc4ff;box-shadow:0 12px 30px rgba(30,20,80,.07)}
.symboldex-page .sd-lang a{box-shadow:0 4px 15px rgba(31,24,72,.04)}
.symboldex-page .sd-copy-card{box-shadow:var(--sx-shadow)}
.symboldex-page .sd-copy{min-height:62px;box-shadow:0 12px 30px rgba(91,67,241,.22);transition:transform .15s ease,box-shadow .15s ease}
.symboldex-page .sd-copy:hover{transform:translateY(-2px);box-shadow:0 16px 34px rgba(91,67,241,.28)}
.symboldex-page .sd-data{transition:border-color .15s ease,box-shadow .15s ease}
.symboldex-page .sd-data:hover{border-color:#d0caff;box-shadow:0 8px 22px rgba(30,20,80,.05)}
.symboldex-page .sd-glyph-grid a{box-shadow:0 2px 0 rgba(32,24,75,.02)}
.symboldex-page .sd-glyph-grid a:hover{border-color:#cbc4ff;box-shadow:0 10px 28px rgba(30,20,80,.08)}
.symboldex-page .sd-section>p{max-width:850px;color:#3d3e48}

/* Página raíz: la cabecera ya ofrece identidad; compactamos ligeramente */
.home.symboldex-page .sx-site-header .sx-nav-primary{display:none}

@media(max-width:782px){.admin-bar .sx-site-header{top:46px}}
@media(max-width:720px){
  .sx-header-inner{width:min(100% - 22px,var(--sx-content));min-height:64px;gap:10px}
  .sx-brand-tag{display:none}
  .sx-brand-mark{width:38px;height:38px;border-radius:11px}
  .sx-brand-name{font-size:15px}
  .sx-nav a{padding:7px 9px;font-size:12px}
  .sx-nav .sx-nav-primary{display:none}
  .sx-footer-inner{grid-template-columns:1fr}
  .sx-footer-links{justify-content:flex-start}
}
@media(max-width:460px){
  .sx-nav .sx-nav-home{display:none}
  .sx-header-inner{width:min(100% - 18px,var(--sx-content))}
  .symboldex-page .sd-wrap{padding-top:22px}
}


/* v1.1.0 — contextual language navigation + dark mode */
.sx-theme-toggle{
  width:38px;height:38px;display:inline-grid;place-items:center;flex:0 0 38px;
  border:1px solid var(--sx-line);border-radius:11px;background:var(--sx-surface);
  color:var(--sx-muted);cursor:pointer;transition:background .18s ease,color .18s ease,border-color .18s ease,transform .18s ease
}
.sx-theme-toggle:hover{background:var(--sx-surface-2);color:var(--sx-accent);transform:translateY(-1px)}
.sx-theme-icon{font-size:19px;line-height:1}

html[data-theme="dark"]{
  color-scheme:dark;
  --sx-bg:#0e0f15;
  --sx-surface:#171821;
  --sx-surface-2:#24223a;
  --sx-text:#f2f3f7;
  --sx-muted:#a9acb8;
  --sx-line:#2c2e3a;
  --sx-accent:#9b87ff;
  --sx-accent-2:#795cf6;
  --sx-header:rgba(14,15,21,.91);
  --sx-shadow:0 18px 55px rgba(0,0,0,.28);
}
html[data-theme="dark"] body{background:var(--sx-bg);color:var(--sx-text)}
html[data-theme="dark"] a:hover{color:#b9abff}
html[data-theme="dark"] ::selection{background:#51419d;color:#fff}
html[data-theme="dark"] .sx-site-header{border-bottom-color:rgba(44,46,58,.92)}
html[data-theme="dark"] .sx-brand-mark{background:linear-gradient(135deg,#282938,#171821);box-shadow:0 8px 24px rgba(0,0,0,.35)}
html[data-theme="dark"] .sx-nav .sx-nav-primary{background:#f0eff7;color:#16171d}
html[data-theme="dark"] .sx-nav .sx-nav-primary:hover{background:#fff;color:#111218}
html[data-theme="dark"] .sx-site-footer{background:#12131a}
html[data-theme="dark"] .sx-entry-content p,
html[data-theme="dark"] .sx-entry-content li{color:#c1c3cc}

html[data-theme="dark"] .symboldex-page{
  --sd-bg:var(--sx-bg);--sd-card:var(--sx-surface);--sd-text:var(--sx-text);--sd-muted:var(--sx-muted);--sd-line:var(--sx-line);--sd-accent:var(--sx-accent);--sd-accent2:var(--sx-accent-2)
}
html[data-theme="dark"] .symboldex-page .sd-hero{
  background:radial-gradient(circle at 85% 10%,rgba(155,135,255,.15),transparent 33%),radial-gradient(circle at 10% 100%,rgba(121,92,246,.12),transparent 35%),linear-gradient(135deg,#171821,#151522)
}
html[data-theme="dark"] .symboldex-page .sd-hero:before{color:rgba(174,158,255,.07)}
html[data-theme="dark"] .symboldex-page .sd-search input,
html[data-theme="dark"] .symboldex-page .sd-search-results,
html[data-theme="dark"] .symboldex-page .sd-lang a,
html[data-theme="dark"] .symboldex-page .sd-language-grid a{background:var(--sx-surface);color:var(--sx-text)}
html[data-theme="dark"] .symboldex-page .sd-search input::placeholder{color:#777b89}
html[data-theme="dark"] .symboldex-page .sd-search-results a:hover{background:#20212c}
html[data-theme="dark"] .symboldex-page .sd-data button,
html[data-theme="dark"] .symboldex-page .sd-example button{background:#2a2744;color:#ece9ff}
html[data-theme="dark"] .symboldex-page .sd-method kbd{background:#20212a;border-color:#414452;color:#f0f1f5}
html[data-theme="dark"] .symboldex-page .sd-method code{background:#282440;color:#c9c0ff}
html[data-theme="dark"] .symboldex-page .sd-section>p{color:#b8bac5}
html[data-theme="dark"] .symboldex-page .sd-glyph,
html[data-theme="dark"] .symboldex-page .sd-title-glyph,
html[data-theme="dark"] .symboldex-page .sd-glyph-grid span,
html[data-theme="dark"] .symboldex-page .sd-search-results b{color:var(--sx-text)!important}

@media(max-width:520px){
  .sx-theme-toggle{width:36px;height:36px;flex-basis:36px}
}


/* SymbolDex institutional/legal pages + contact form */
.sx-content-card{width:min(920px,calc(100% - 32px));margin:38px auto;padding:clamp(24px,4vw,48px);background:var(--sx-card);border:1px solid var(--sx-line);border-radius:24px;box-shadow:0 14px 42px rgba(23,20,45,.06)}
.sx-entry-title{margin:0 0 26px;font-size:clamp(34px,5vw,52px);line-height:1.04;letter-spacing:-.035em}
.sx-entry-content{font-size:16px;line-height:1.75}
.sx-entry-content a{color:var(--sx-accent)}
.sx-entry-content ul{padding-left:22px}
.sx-contact-form-wrap{margin-top:28px}
.sx-contact-form{display:grid;gap:18px}
.sx-contact-form label{display:grid;gap:7px;font-weight:750;color:var(--sx-text)}
.sx-contact-form input,.sx-contact-form textarea{width:100%;box-sizing:border-box;border:1px solid var(--sx-line);border-radius:13px;background:var(--sx-card);color:var(--sx-text);font:inherit;padding:12px 14px;outline:none}
.sx-contact-form input:focus,.sx-contact-form textarea:focus{border-color:var(--sx-accent);box-shadow:0 0 0 3px rgba(106,78,226,.12)}
.sx-contact-form button{justify-self:start;border:0;border-radius:12px;background:var(--sx-accent);color:#fff;font-weight:850;padding:12px 20px;cursor:pointer}
.sx-hp{position:absolute!important;left:-10000px!important;width:1px!important;height:1px!important;overflow:hidden!important}
.sx-form-notice{padding:12px 14px;border-radius:12px;margin-bottom:18px;font-weight:700}
.sx-form-success{background:#e9f8ef;color:#176a36;border:1px solid #bce8cb}
.sx-form-error{background:#fff0f0;color:#a32424;border:1px solid #f1c1c1}
html[data-theme="dark"] .sx-content-card{background:var(--sx-card);box-shadow:none}
html[data-theme="dark"] .sx-contact-form input,html[data-theme="dark"] .sx-contact-form textarea{background:#171820}
html[data-theme="dark"] .sx-form-success{background:#10291a;color:#9de0b4;border-color:#245c36}
html[data-theme="dark"] .sx-form-error{background:#301719;color:#ffb1b1;border-color:#683033}
@media(max-width:620px){.sx-content-card{margin:22px auto;padding:22px;border-radius:18px}}

/* SymbolDex AdSense placements */
.sd-ad{margin:26px 0;padding:10px 0;text-align:center;overflow:hidden;clear:both}
.sd-ad-label{display:block;margin:0 0 7px;color:var(--sx-muted);font-size:11px;line-height:1.2;text-transform:uppercase;letter-spacing:.08em}
.sd-ad-inner{width:100%;min-height:110px;display:flex;align-items:center;justify-content:center;overflow:hidden}
.sd-ad .adsbygoogle{display:block;width:100%;min-height:90px}
@media(min-width:768px){.sd-ad-inner{min-height:140px}.sd-ad .adsbygoogle{min-height:120px}}
@media(max-width:767px){.sd-ad{margin:20px 0}.sd-ad-inner{min-height:100px}}
