/*
Theme Name: Golden Point
Theme URI: https://goldenpoint.es
Author: Golden Point
Description: Tema de goldenpoint.es: portada, menú principal y acceso a torneos, rankings y panel de organizadores. Funciona junto al plugin «Golden Point Torneos».
Version: 1.0.4
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: golden-point
*/

/* ==========================================================================
   Tipografía de rótulo: Barlow Condensed (SIL Open Font License, ver assets/fonts/OFL.txt)
   El resto del tema usa la fuente del sistema, igual que el plugin.
   ========================================================================== */
@font-face {
	font-family: "Barlow Condensed";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("assets/fonts/BarlowCondensed-Bold.woff") format("woff");
}
@font-face {
	font-family: "Barlow Condensed";
	font-style: normal;
	font-weight: 800;
	font-display: swap;
	src: url("assets/fonts/BarlowCondensed-ExtraBold.woff") format("woff");
}

/* ==========================================================================
   Variables
   ========================================================================== */
:root {
	--gpt-navy: #0e2038;
	--gpt-navy-2: #1b3558;
	--gpt-navy-deep: #091526;
	--gpt-gold: #f5b800;
	--gpt-gold-hover: #ffc61f;
	--gpt-gold-soft: #fff3c4;
	--gpt-gold-ink: #6b4f00;
	--gpt-gold-num: #8a6500;
	--gpt-bg: #f6f3ea;
	--gpt-surface: #ffffff;
	--gpt-ink: #18212f;
	--gpt-muted: #5a6577;
	--gpt-line: #e7e1cf;
	--gpt-line-strong: #cfc8b0;
	--gpt-ok: #15803d;
	--gpt-ok-soft: #dcfce7;
	--gpt-radius: 12px;
	--gpt-shadow: 0 1px 2px rgba(14, 32, 56, .06), 0 4px 14px rgba(14, 32, 56, .06);
	--gpt-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
	--gpt-text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ==========================================================================
   Base
   ========================================================================== */
.gpt *, .gpt *::before, .gpt *::after { box-sizing: border-box; }

body.gpt {
	margin: 0;
	background: var(--gpt-bg);
	color: var(--gpt-ink);
	font-family: var(--gpt-text);
	font-size: 17px;
	line-height: 1.55;
	-webkit-text-size-adjust: 100%;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}
.gpt main { flex: 1; }
.gpt img { max-width: 100%; height: auto; }
.gpt a { color: var(--gpt-navy-2); }
.gpt a:focus-visible, .gpt button:focus-visible { outline: 3px solid var(--gpt-gold); outline-offset: 2px; }

.gpt-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.gpt-skip {
	position: absolute; left: -999px; top: 0; z-index: 100;
	background: var(--gpt-gold); color: var(--gpt-navy);
	padding: 8px 14px; border-radius: 0 0 8px 0; font-weight: 700;
}
.gpt-skip:focus { left: 0; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.gpt-show-s { display: none; }

/* ==========================================================================
   Cabecera (misma altura y aspecto que las páginas del plugin)
   ========================================================================== */
.gpt-header {
	background: var(--gpt-navy);
	color: #fff;
	position: relative; top: 0; z-index: 50;
	border-bottom: 3px solid var(--gpt-gold);
}
/* Fija solo en pantallas grandes; en el móvil se desplaza con la página. */
@media (min-width: 900px) {
	.gpt-header { position: sticky; }
	.admin-bar .gpt-header { top: 32px; }
}

.gpt-header-in { display: flex; align-items: center; gap: 10px; min-height: 56px; }

.gpt-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff !important; flex: none; }
.gpt-word { font-weight: 800; letter-spacing: .14em; font-size: 15px; color: #fff; }
.gpt-word b { color: var(--gpt-gold); font-weight: 800; margin-left: .35em; }
.gpt-custom-logo { display: block; max-height: 40px; width: auto; }

.gpt-nav { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; margin-left: 10px; }
.gpt-nav::-webkit-scrollbar { display: none; }
.gpt-menu { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
.gpt-menu li { margin: 0; }
.gpt-menu a {
	display: block; color: #dbe4f0 !important; text-decoration: none;
	font-size: 14px; font-weight: 600; white-space: nowrap;
	padding: 8px 10px; border-radius: 8px;
}
.gpt-menu a:hover, .gpt-menu a:focus-visible { background: rgba(255, 255, 255, .1); color: #fff !important; }
.gpt-menu a[aria-current="page"],
.gpt-menu .current-menu-item > a,
.gpt-menu .current_page_item > a {
	color: #fff !important; box-shadow: inset 0 -3px 0 var(--gpt-gold); border-radius: 8px 8px 0 0;
}

.gpt-cta {
	flex: none; display: inline-flex; align-items: center; min-height: 38px; padding: 6px 14px;
	background: var(--gpt-gold); color: var(--gpt-navy) !important;
	font-weight: 700; font-size: 14px; text-decoration: none; white-space: nowrap;
	border-radius: 10px;
}
.gpt-cta:hover { background: var(--gpt-gold-hover); }
.gpt-header .gpt-cta:focus-visible, .gpt-header a:focus-visible { outline-color: #fff; }

@media (max-width: 560px) {
	.gpt-word { display: none; }
	.gpt-nav { margin-left: 2px; }
	.gpt-hide-s { display: none; }
	.gpt-show-s { display: inline; }
	.gpt-cta { padding: 6px 11px; }
}

/* ==========================================================================
   Botones y chips
   ========================================================================== */
.gpt-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 0; }
.gpt-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 10px 22px; border-radius: 10px;
	font-weight: 700; font-size: 16px; line-height: 1.2; text-decoration: none; cursor: pointer;
	border: 2px solid transparent;
	transition: background .15s, border-color .15s, color .15s;
}
.gpt-btn-gold { background: var(--gpt-gold); border-color: var(--gpt-gold); color: var(--gpt-navy) !important; }
.gpt-btn-gold:hover { background: var(--gpt-gold-hover); border-color: var(--gpt-gold-hover); }
.gpt-btn-line { background: transparent; border-color: rgba(255, 255, 255, .45); color: #fff !important; }
.gpt-btn-line:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }

.gpt-chip {
	display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
	padding: 2px 10px; border-radius: 999px; background: #eef0f4; color: #475467;
	font-size: 13px; font-weight: 700; line-height: 1.6; white-space: nowrap;
}
.gpt-chip i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: gpt-pulse 1.6s ease-in-out infinite; }
.gpt-chip.is-live { background: var(--gpt-ok-soft); color: var(--gpt-ok); }
.gpt-chip.is-ready { background: var(--gpt-gold); color: var(--gpt-navy); }
.gpt-chip.is-open { background: var(--gpt-gold-soft); color: var(--gpt-gold-ink); }
.gpt-chip.is-reg { background: var(--gpt-navy); color: #fff; }
.gpt-chip.is-done { background: #e4e7ec; color: #344054; }
@keyframes gpt-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }

/* ==========================================================================
   Portada · cabecera con la pista
   ========================================================================== */
.gpt-hero { background: var(--gpt-navy); color: #fff; overflow: hidden; }
.gpt-hero-in { display: grid; gap: 30px; padding-top: 40px; padding-bottom: 44px; align-items: center; }
.gpt-hero h1 {
	font-family: var(--gpt-display); font-weight: 800;
	font-size: clamp(56px, 15vw, 118px); line-height: .9; letter-spacing: -.005em;
	margin: 0; text-wrap: balance; color: #fff;
}
.gpt-lead { font-size: clamp(17px, 2.4vw, 20px); line-height: 1.5; color: #cfd9e8; max-width: 36ch; margin: 18px 0 0; }
.gpt-hero-art { width: 100%; max-width: 640px; }
.gpt-court { display: block; width: 100%; height: auto; }

@media (min-width: 900px) {
	.gpt-hero-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; padding-top: 72px; padding-bottom: 72px; }
	.gpt-hero h1 { font-size: clamp(84px, 8.4vw, 118px); }
	.gpt-hero-art { justify-self: end; }
}

/* Una sola jugada al cargar: la bola dibuja su trayectoria. */
@media (prefers-reduced-motion: no-preference) {
	.gpt-reveal { stroke-dasharray: 1; stroke-dashoffset: 1; animation: gpt-draw 1.25s cubic-bezier(.3, .6, .35, 1) .45s forwards; }
	.gpt-court-ball { transform-box: fill-box; transform-origin: center; animation: gpt-ball .35s cubic-bezier(.2, 1.4, .4, 1) 1.65s both; }
}
@keyframes gpt-draw { to { stroke-dashoffset: 0; } }
@keyframes gpt-ball { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: scale(1); } }

/* ==========================================================================
   Secciones
   ========================================================================== */
.gpt-section { padding: clamp(40px, 7vw, 72px) 0; }
.gpt-sechead { margin-bottom: 22px; }
.gpt-sechead-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.gpt-section h2 {
	font-family: var(--gpt-display); font-weight: 800; color: var(--gpt-navy);
	font-size: clamp(34px, 5.4vw, 48px); line-height: 1; margin: 0; letter-spacing: 0;
}
.gpt-sub { color: var(--gpt-muted); margin: 8px 0 0; }
.gpt-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--gpt-navy) !important; text-decoration: none; white-space: nowrap; }
.gpt-more:hover { text-decoration: underline; }
.gpt-ico { flex: none; vertical-align: -3px; }

/* Ahora en pista */
.gpt-live { background: #fff; border-bottom: 1px solid var(--gpt-line); padding: clamp(32px, 5vw, 48px) 0; }
.gpt-board { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.gpt-call {
	display: grid; gap: 10px; padding: 16px 18px; border-radius: var(--gpt-radius);
	background: var(--gpt-navy); color: #fff !important; text-decoration: none;
	border-left: 6px solid var(--gpt-navy-2);
}
.gpt-call.is-ready { border-left-color: var(--gpt-gold); }
.gpt-call.is-playing { border-left-color: #22c55e; }
.gpt-call:hover { background: var(--gpt-navy-2); }
.gpt-call-court { font-family: var(--gpt-display); font-weight: 800; font-size: 36px; line-height: 1; color: var(--gpt-gold); }
.gpt-call-teams { display: grid; gap: 2px; font-size: 18px; font-weight: 600; line-height: 1.3; }
.gpt-call-teams em { font-style: normal; font-size: 13px; color: #9fb0c8; }
.gpt-call-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.gpt-call-meta { font-size: 13px; color: #9fb0c8; }

/* Torneos */
.gpt-tgrid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.gpt-tcard {
	display: flex; flex-direction: column; gap: 10px; padding: 18px;
	background: #fff; color: var(--gpt-ink) !important; text-decoration: none;
	border: 1.5px solid var(--gpt-line); border-top: 4px solid var(--gpt-gold);
	border-radius: var(--gpt-radius); box-shadow: var(--gpt-shadow);
	transition: border-color .15s, transform .15s;
}
.gpt-tcard:hover { border-color: var(--gpt-navy); transform: translateY(-2px); }
.gpt-tcard-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gpt-tcard strong { font-size: 20px; line-height: 1.25; color: var(--gpt-navy); }
.gpt-tcard-meta { display: flex; flex-direction: column; gap: 4px; color: var(--gpt-muted); font-size: 15px; }
.gpt-tcard-meta span { display: flex; align-items: center; gap: 8px; }
.gpt-tcard-stats { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--gpt-line); color: var(--gpt-muted); font-size: 15px; }
.gpt-tcard-stats b { color: var(--gpt-navy); }

.gpt-empty {
	padding: 22px; text-align: center; color: var(--gpt-muted);
	background: #fff; border: 1.5px dashed var(--gpt-line-strong); border-radius: var(--gpt-radius);
}
.gpt-empty p { margin: 0 auto; max-width: 56ch; }
.gpt-empty-admin { margin-top: 12px !important; padding-top: 12px; border-top: 1px solid var(--gpt-line); font-size: 15px; }

/* Cómo se sigue un torneo */
.gpt-how { padding-top: 0; }
.gpt-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
.gpt-steps li { border-top: 3px solid var(--gpt-navy); padding-top: 14px; }
.gpt-step-n { display: block; font-family: var(--gpt-display); font-weight: 800; font-size: 72px; line-height: .9; color: var(--gpt-gold-num); }
.gpt-steps h3 { font-family: var(--gpt-display); font-weight: 700; font-size: 28px; line-height: 1.1; margin: 8px 0 6px; color: var(--gpt-navy); }
.gpt-steps p { margin: 0; color: var(--gpt-muted); max-width: 34ch; }
@media (min-width: 760px) { .gpt-steps { grid-template-columns: repeat(3, 1fr); gap: 32px; } }

/* Organizadores */
.gpt-org { background: var(--gpt-navy); color: #fff; }
.gpt-org h2 { color: #fff; }
.gpt-org-in { display: grid; gap: 32px; align-items: center; }
.gpt-org .gpt-lead { margin-top: 16px; }
.gpt-feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.gpt-feats li { display: flex; align-items: flex-start; gap: 12px; font-size: 18px; line-height: 1.35; color: #e8eef7; }
.gpt-feats .gpt-ico { margin-top: 2px; color: var(--gpt-gold); width: 22px; height: 22px; }
@media (min-width: 860px) { .gpt-org-in { grid-template-columns: 1.1fr 1fr; gap: 64px; } }

/* ==========================================================================
   Pie
   ========================================================================== */
.gpt-footer { background: var(--gpt-navy-deep); color: #aab6c8; margin-top: auto; }
.gpt-footer-in { display: grid; gap: 22px; padding-top: 34px; padding-bottom: 22px; }
.gpt-footer-brand p { margin: 10px 0 0; font-size: 15px; max-width: 34ch; }
.gpt-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.gpt-footer a { color: #dbe4f0; }
.gpt-footer a:hover { color: #fff; }
.gpt-footer-contact { margin: 0; }
.gpt-copy { padding-top: 14px; padding-bottom: 26px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 14px; }
@media (min-width: 860px) { .gpt-footer-in { grid-template-columns: 1.2fr 1fr auto; align-items: start; } }

/* ==========================================================================
   Páginas, entradas y 404
   ========================================================================== */
.gpt-main { padding-top: 40px; padding-bottom: 56px; }
.gpt-narrow { max-width: 820px; }
.gpt-title { font-family: var(--gpt-display); font-weight: 800; color: var(--gpt-navy); font-size: clamp(38px, 6vw, 58px); line-height: 1; margin: 0 0 22px; }
.gpt-prose { font-size: 18px; line-height: 1.65; }
.gpt-prose > * { max-width: 68ch; }
.gpt-prose > .alignwide, .gpt-prose > .alignfull, .gpt-prose > .gp-embed, .gpt-prose > figure, .gpt-prose > table { max-width: none; }
.gpt-prose h2, .gpt-prose h3 { font-family: var(--gpt-display); font-weight: 800; color: var(--gpt-navy); line-height: 1.05; margin: 1.6em 0 .5em; }
.gpt-prose h2 { font-size: 38px; }
.gpt-prose h3 { font-size: 28px; }
.gpt-prose a { color: var(--gpt-navy-2); text-underline-offset: 3px; }
.gpt-post { padding: 18px 0; border-bottom: 1px solid var(--gpt-line); }
.gpt-post h2 { font-family: var(--gpt-display); font-weight: 800; font-size: 32px; line-height: 1.05; margin: 0; }
.gpt-post h2 a { color: var(--gpt-navy); text-decoration: none; }
.gpt-post h2 a:hover { text-decoration: underline; }
.gpt-post-date { color: var(--gpt-muted); font-size: 14px; margin: 6px 0 0; }
.gpt-404 { text-align: center; max-width: 560px; }
.gpt-404-code { font-family: var(--gpt-display); font-weight: 800; font-size: clamp(96px, 28vw, 180px); line-height: .85; color: var(--gpt-gold-num); margin: 0; }
.gpt-404 .gpt-actions { justify-content: center; }
.gpt-404 .gpt-btn-line { color: var(--gpt-navy) !important; border-color: var(--gpt-line-strong); }
.gpt-404 .gpt-btn-line:hover { border-color: var(--gpt-navy); background: #fff; }
.navigation.pagination { margin-top: 26px; }
.navigation.pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.navigation.pagination .page-numbers { padding: 8px 14px; border: 1.5px solid var(--gpt-line-strong); border-radius: 10px; text-decoration: none; color: var(--gpt-navy); background: #fff; }
.navigation.pagination .current { background: var(--gpt-navy); color: #fff; border-color: var(--gpt-navy); }

/* Publicidad (zonas del plugin Golden Point Torneos) */
.gpt-adsec { padding: 0 0 clamp(28px, 5vw, 48px); }
.gpt .gp-ad { margin: 0; text-align: center; }
.gpt .gp-ad-label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gpt-muted); margin-bottom: 5px; }
.gpt .gp-ad-sponsor a { display: block; text-decoration: none; }
.gpt .gp-ad-sponsor img { display: block; margin: 0 auto; max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--gpt-line); background: #fff; }
.gpt .gp-ad-adsense { overflow: hidden; }
.gpt .gp-ad-adsense .gp-ad-label { visibility: hidden; }
.gpt .gp-ad-adsense:has(ins.adsbygoogle[data-ad-status="filled"]) .gp-ad-label { visibility: visible; }
.gpt .gp-ad-adsense ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }
.gpt .gp-ad:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none; }
.gpt .gp-ad-ph { border: 2px dashed var(--gpt-line-strong); border-radius: 12px; background: #fffdf3; padding: 12px 14px; display: grid; gap: 4px; font-size: 13.5px; color: var(--gpt-muted); }
.gpt .gp-ad-ph strong { color: var(--gpt-navy); }

@media (prefers-reduced-motion: reduce) {
	.gpt-chip i { animation: none; }
	.gpt-btn, .gpt-tcard { transition: none; }
	.gpt-tcard:hover { transform: none; }
}
