/*
Theme Name:  Lutador
Description: Tema del Lutador Open (header y footer oscuros, contenido claro). Requiere el plugin "Lutador Open" para ranking y eventos.
Version: 1.3.1
Author:      DMZ Digital
Text Domain: lutador
Requires PHP: 7.4
*/

:root {
  --lo-bg: #121316;
  --lo-fg: #f8fafc;
  --lo-card: #1b1c20;
  --lo-border: #2c2e34;
  --lo-primary: #f97316;
  --lo-primary-hover: #ea6c00;
  --lo-muted: #24262b;
  --lo-muted-fg: #9ca3af;
  --lo-header-h: 4.5rem;
  /* Contenido claro */
  --page-bg: #f5f4f1;
  --page-fg: #16181d;
  --page-muted: #66625b;
  --page-border: #e5e2dc;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--lo-bg);
  color: var(--lo-fg);
  font-family: 'Geist', system-ui, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--lo-primary); }
img { max-width: 100%; height: auto; }
body.nav-open { overflow: hidden; }
.skip-link { position: absolute; left: -999px; top: .5rem; z-index: 100; background: var(--lo-primary); color: #000; padding: .5rem 1rem; border-radius: .375rem; font-weight: 700; }
.skip-link:focus { left: .5rem; }
:focus-visible { outline: 2px solid var(--lo-primary); outline-offset: 2px; }

/* ── Barra del próximo evento ───────────────────────────────────────────── */
.topbar { background: linear-gradient(90deg, #c2410c, #f97316 55%, #fb923c); color: #1c0a00; font-size: .8125rem; }
.topbar-inner { max-width: 72rem; margin: 0 auto; padding: .4rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.topbar-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-sep { opacity: .55; margin: 0 .35rem; }
.topbar-count { font-weight: 700; }
.topbar-link { color: #1c0a00; font-weight: 700; text-decoration: none; white-space: nowrap; }
.topbar-link:hover { text-decoration: underline; }
@media (max-width: 640px) { .topbar-date { display: none; } .topbar { font-size: .75rem; } }

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--lo-border);
  background: rgba(18, 19, 22, .92);
  backdrop-filter: blur(10px);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; position: relative; } }
.site-header-inner {
  max-width: 72rem; margin: 0 auto; padding: 0 1rem;
  height: var(--lo-header-h); display: flex; align-items: center; gap: 2rem;
}
.site-logo {
  font-family: 'Teko', sans-serif; font-weight: 700; font-size: 2.4rem; line-height: 1;
  letter-spacing: .025em; text-decoration: none; user-select: none;
  display: flex; align-items: center; padding-top: .3rem; flex-shrink: 0;
}
.site-logo .solid  { color: var(--lo-primary); }
.site-logo .stroke { color: transparent; -webkit-text-stroke: 2px var(--lo-primary); }
.site-logo-img { display: block; height: 2.5rem; width: auto; max-width: 14rem; object-fit: contain; margin-top: -.3rem; }
/* Logos JPG con fondo negro: el negro se funde con el fondo oscuro del header/footer */
.site-header .site-logo-img, .site-footer .site-logo-img { mix-blend-mode: lighten; }
.footer-logo-img { height: 1.875rem; margin-top: 0; }
@media (max-width: 640px) { .site-logo-img { height: 1.875rem; max-width: 11rem; } }

.site-nav { flex: 1; display: flex; align-items: center; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .25rem; font-size: .9375rem; }
.site-nav li { position: relative; }
.site-nav a { color: #d1d5db; text-decoration: none; transition: color .15s, background .15s; display: inline-flex; align-items: center; gap: .25rem; padding: .5rem .75rem; border-radius: .375rem; font-weight: 500; }
.site-nav a:hover { color: #fff; background: rgba(255,255,255,.06); }
.site-nav .current-menu-item > a, .site-nav .current-menu-ancestor > a { color: #fff; box-shadow: inset 0 -2px 0 var(--lo-primary); border-radius: 0; }
.site-nav .menu-item-has-children > a::after { content: ''; width: .35rem; height: .35rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); opacity: .6; margin-left: .35rem; }
.site-nav .sub-menu {
  position: absolute; left: 0; top: 100%; min-width: 13rem; padding-top: .5rem;
  display: block; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; transform: translateY(-4px);
}
.site-nav .sub-menu::before { content: ''; position: absolute; inset: .5rem 0 0; background: var(--lo-card); border: 1px solid var(--lo-border); border-radius: .5rem; box-shadow: 0 16px 32px -8px rgba(0,0,0,.6); z-index: -1; }
.site-nav li:hover > .sub-menu, .site-nav li:focus-within > .sub-menu { opacity: 1; pointer-events: auto; transform: none; }
.site-nav .sub-menu li { display: block; }
.site-nav .sub-menu a { display: flex; padding: .55rem 1rem; border-radius: 0; box-shadow: none; }
.site-nav .sub-menu li:first-child a { margin-top: .35rem; }
.site-nav .sub-menu li:last-child a { margin-bottom: .35rem; }
.site-nav .sub-menu { flex-direction: column; gap: 0; }
.site-nav .nav-search, .site-nav .nav-cta-mobile { display: none; }

.header-actions { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: .5rem; border: 1px solid var(--lo-border); background: transparent; color: #e5e7eb; cursor: pointer; transition: background .15s, border-color .15s; }
.icon-btn:hover { background: rgba(255,255,255,.06); border-color: #3a3d44; }
.nav-cta { display: inline-flex; align-items: center; gap: .4rem; height: 2.5rem; padding: 0 1rem; border-radius: .5rem; background: var(--lo-primary); color: #120700; font-weight: 700; font-size: .875rem; text-decoration: none; white-space: nowrap; transition: background .15s, transform .15s; }
.nav-cta:hover { background: #fb8a3c; transform: translateY(-1px); }
.nav-toggle { display: none; }
.burger, .burger::before, .burger::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .2s, background .2s; }
.burger::before, .burger::after { content: ''; position: absolute; left: 0; }
.burger::before { top: -6px; } .burger::after { top: 6px; }
.nav-open .burger { background: transparent; }
.nav-open .burger::before { transform: translateY(6px) rotate(45deg); }
.nav-open .burger::after { transform: translateY(-6px) rotate(-45deg); }

.header-search { border-top: 1px solid var(--lo-border); background: var(--lo-bg); }
.header-search-inner { max-width: 72rem; margin: 0 auto; padding: .75rem 1rem; display: flex; gap: .5rem; }
.header-search input, .nav-search input { flex: 1; min-width: 0; height: 2.75rem; padding: 0 1rem; border-radius: .5rem; border: 1px solid var(--lo-border); background: var(--lo-card); color: var(--lo-fg); font: inherit; font-size: 1rem; }
.header-search input:focus, .nav-search input:focus { outline: none; border-color: var(--lo-primary); }
.header-search button { height: 2.75rem; padding: 0 1.25rem; border-radius: .5rem; border: 0; background: #f8fafc; color: #121316; font: inherit; font-weight: 700; cursor: pointer; }

@media (max-width: 960px) {
  .header-actions .nav-cta-account { width: 2.5rem; padding: 0; justify-content: center; }
  .header-actions .nav-cta-text { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none; position: fixed; left: 0; right: 0; bottom: 0; top: var(--lo-nav-top, var(--lo-header-h));
    background: var(--lo-bg); padding: 1.25rem 1rem 2rem; overflow-y: auto; flex-direction: column; align-items: stretch; gap: 1.25rem; z-index: 60;
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; font-size: 1.125rem; }
  .site-nav > ul > li { border-bottom: 1px solid var(--lo-border); }
  .site-nav a { padding: .9rem .25rem; width: 100%; border-radius: 0; }
  .site-nav .current-menu-item > a { box-shadow: inset 3px 0 0 var(--lo-primary); padding-left: .75rem; }
  .site-nav .sub-menu { position: static; opacity: 1; pointer-events: auto; padding: 0 0 .5rem .75rem; transform: none; }
  .site-nav .sub-menu::before { display: none; }
  .site-nav .sub-menu a { padding: .5rem .25rem; font-size: 1rem; color: var(--lo-muted-fg); margin: 0 !important; }
  .site-nav .menu-item-has-children > a::after { display: none; }
  .site-nav .nav-search { display: block; }
  .nav-search input { width: 100%; }
  .site-nav .nav-cta-mobile { display: flex; justify-content: center; height: 3rem; font-size: 1rem; }
}

/* ── Redes sociales (cabecera, menú móvil y pie) ────────────────────────── */
.social-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .25rem; }
.social-list a { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border-radius: .5rem; color: var(--lo-muted-fg); text-decoration: none; transition: color .15s, background .15s, border-color .15s; }
.social-list a:hover { color: #fff; background: rgba(255,255,255,.06); }
.header-social { padding-right: .5rem; margin-right: .25rem; border-right: 1px solid var(--lo-border); }
.site-nav .nav-social { display: none; }
@media (max-width: 1100px) { .header-social { display: none; } }
@media (max-width: 960px) {
  .site-nav .nav-social { display: flex; flex-direction: row; justify-content: center; gap: .75rem; }
  .site-nav .nav-social li { border: 0; }
  .site-nav .nav-social a { width: 3rem; height: 3rem; padding: 0; border: 1px solid var(--lo-border); border-radius: 999px; }
  .site-nav .nav-social svg { width: 22px; height: 22px; }
}

/* ── Chat flotante de WhatsApp ──────────────────────────────────────────── */
.wa-chat { position: fixed; right: 1rem; bottom: 1rem; z-index: 70; display: flex; flex-direction: column; align-items: flex-end; gap: .75rem; font-size: .9375rem; }
.wa-toggle { display: inline-flex; align-items: center; justify-content: center; width: 3.5rem; height: 3.5rem; border-radius: 999px; background: #25d366; color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.25); transition: transform .15s, background .15s; }
.wa-toggle:hover { background: #1ebe5b; transform: scale(1.06); }
.wa-toggle svg { width: 30px; height: 30px; }
.wa-panel { width: min(21rem, calc(100vw - 2rem)); border-radius: 1rem; overflow: hidden; background: #efeae2; color: #111b21; box-shadow: 0 12px 40px rgba(0,0,0,.3); }
.wa-panel[hidden] { display: none; }
.wa-head { display: flex; align-items: center; gap: .75rem; padding: .875rem 1rem; background: #075e54; color: #fff; }
.wa-head strong, .wa-head small { display: block; line-height: 1.3; }
.wa-head small { opacity: .8; font-size: .75rem; }
.wa-avatar { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: 999px; background: #25d366; flex-shrink: 0; }
.wa-close { margin-left: auto; width: 2rem; height: 2rem; border: 0; border-radius: 999px; background: transparent; color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.wa-close:hover { background: rgba(255,255,255,.15); }
.wa-body { padding: 1rem 1rem 1.5rem; }
.wa-bubble { position: relative; display: inline-block; max-width: 85%; margin: 0; padding: .5rem .75rem; background: #fff; border-radius: 0 .5rem .5rem .5rem; box-shadow: 0 1px 1px rgba(0,0,0,.1); line-height: 1.45; }
.wa-form { display: flex; gap: .5rem; padding: .625rem; background: #f0f2f5; }
.wa-form input { flex: 1; min-width: 0; height: 2.75rem; padding: 0 1rem; border: 0; border-radius: 999px; background: #fff; color: #111b21; font: inherit; font-size: 1rem; }
.wa-form input:focus { outline: 2px solid #25d366; }
.wa-form button { width: 2.75rem; height: 2.75rem; flex-shrink: 0; border: 0; border-radius: 999px; background: #25d366; color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.nav-open .wa-chat { display: none; }

/* ── Main ───────────────────────────────────────────────────────────────── */
.site-main { flex: 1; background: var(--page-bg); color: var(--page-fg); }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer { background: #0e0f11; border-top: 3px solid var(--lo-primary); color: var(--lo-muted-fg); font-size: .875rem; }
.footer-inner { max-width: 72rem; margin: 0 auto; padding: 3rem 1rem 2rem; display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .footer-inner { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-col h2 { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: #f8fafc; margin: 0 0 1rem; font-weight: 700; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.footer-col a { color: var(--lo-muted-fg); text-decoration: none; transition: color .15s; }
.footer-col a:hover { color: #fff; }
.footer-col .footer-more { color: var(--lo-primary); }
.footer-brand p { margin: .75rem 0 1.25rem; line-height: 1.6; max-width: 22rem; }
.footer-logo { font-size: 2rem; }
.footer-col .footer-social { flex-direction: row; flex-wrap: wrap; gap: .5rem; }
.footer-col .footer-social a { width: 2.5rem; height: 2.5rem; border: 1px solid var(--lo-border); border-radius: 999px; color: #e5e7eb; }
.footer-col .footer-social a:hover { border-color: var(--lo-primary); color: #fff; }
.footer-bottom { max-width: 72rem; margin: 0 auto; padding: 1.25rem 1rem 2rem; border-top: 1px solid var(--lo-border); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; font-size: .8125rem; }
.footer-bottom a { color: var(--lo-muted-fg); }
.footer-bottom a:hover { color: #fff; }

/* ── Regular WordPress content (pages, posts) ───────────────────────────── */
.entry { max-width: 48rem; margin: 0 auto; padding: 2.5rem 1rem 3.5rem; }
.entry-title { font-size: 2rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; margin: 0 0 .5rem; color: var(--page-fg); }
.entry-title a { color: var(--page-fg); text-decoration: none; }
.entry-meta { color: var(--page-muted); font-size: .875rem; margin-bottom: 1.5rem; }
.entry-content { font-size: 1.0625rem; line-height: 1.75; color: #2c2f35; }
.entry-content h2, .entry-content h3 { margin-top: 2rem; color: var(--page-fg); }
.entry-content a { color: #c2410c; }
.entry-content blockquote { border-left: 3px solid var(--lo-primary); margin-left: 0; padding-left: 1rem; color: var(--page-muted); }
.entry-content .wp-block-button__link { background: var(--lo-primary); color: #000; border-radius: .5rem; font-weight: 700; }
.post-list { max-width: 48rem; margin: 0 auto; padding: 2.5rem 1rem 3.5rem; display: flex; flex-direction: column; gap: 1rem; }
.post-card { background: #fff; border: 1px solid var(--page-border); border-radius: .625rem; padding: 1.5rem; box-shadow: 0 1px 2px rgba(28,25,23,.06); }
.post-card .entry-title { font-size: 1.25rem; }
.pagination { max-width: 48rem; margin: 0 auto 3rem; padding: 0 1rem; display: flex; gap: .5rem; }
.pagination a, .pagination span { padding: .375rem .75rem; border: 1px solid var(--page-border); border-radius: .375rem; color: var(--page-muted); text-decoration: none; background: #fff; }
.pagination .current { background: var(--page-fg); color: #fff; border-color: var(--page-fg); }
.not-found { text-align: center; padding: 6rem 1rem; color: var(--page-fg); }
.not-found h1 { font-family: 'Teko', sans-serif; font-size: 6rem; color: var(--lo-primary); margin: 0; line-height: 1; }
.not-found a { color: #c2410c; font-weight: 600; }
.not-found-search { display: flex; gap: .5rem; max-width: 26rem; margin: 1.5rem auto; }
.not-found-search input { flex: 1; min-width: 0; height: 2.75rem; padding: 0 1rem; border: 1px solid var(--page-border); border-radius: .5rem; font: inherit; background: #fff; }
.not-found-search button { height: 2.75rem; padding: 0 1.25rem; border: 0; border-radius: .5rem; background: var(--page-fg); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
