/*
Theme Name: Spolink Lite
Theme URI: https://spolink.ir
Author: Spolink
Description: قالب سبک، راست‌چین و واکنش‌گرای اسپولینک برای معرفی ورزشکاران، مربیان، پیشکسوتان و مکان‌های ورزشی. همراه افزونه‌ی Spolink Core.
Version: 1.2.0
Requires at least: 6.2
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: spolink-lite
Tags: rtl-language-support, one-column, custom-logo, custom-menu, featured-images, threaded-comments
*/

@font-face {
	font-family: "Vazirmatn";
	src: url("assets/fonts/Vazirmatn-Variable.woff2") format("woff2-variations"), url("assets/fonts/Vazirmatn-Variable.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

:root {
	--c-accent: #17b07b;
	--c-accent-dark: #0e8a5f;
	--c-accent-soft: #e7f7f0;
	--c-dark: #0b0b0b;
	--c-text: #1c1f23;
	--c-muted: #667085;
	--c-line: #e8eaee;
	--c-bg: #f5f6f8;
	--c-card: #fff;
	--radius: 12px;
	--shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 2px 8px rgba(16, 24, 40, .06);
	--header-h: 72px;
	--spl-accent: var(--c-accent);
	--spl-accent-dark: var(--c-accent-dark);
	--spl-accent-soft: var(--c-accent-soft);
	--spl-text: var(--c-text);
	--spl-muted: var(--c-muted);
	--spl-line: var(--c-line);
	--spl-shadow: var(--shadow);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
	margin: 0;
	font-family: "Vazirmatn", Tahoma, system-ui, sans-serif;
	font-size: 16px;
	line-height: 1.8;
	color: var(--c-text);
	background: var(--c-bg);
	direction: rtl;
	-webkit-font-smoothing: antialiased;
	font-feature-settings: "ss01";
}
img, svg, video, iframe { max-width: 100%; }
img { height: auto; }
a { color: var(--c-accent-dark); }
a:hover { color: var(--c-accent); }
h1, h2, h3, h4 { line-height: 1.5; font-weight: 800; margin: 0 0 .6em; }
input, select, textarea, button { font-family: inherit; }
:focus-visible { outline: 3px solid rgba(23, 176, 123, .45); outline-offset: 2px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link:focus { position: fixed !important; top: 8px; right: 8px; z-index: 1000; width: auto; height: auto; clip: auto; padding: .5em 1em; background: #fff; color: var(--c-text); border-radius: 8px; }

.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 16px; }
.container--narrow { max-width: 820px; }
.page-pad { padding-block: 1.5rem 3rem; }
.card { background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .4em;
	min-height: 42px; padding: .45em 1.1em; border-radius: 8px; border: 1px solid var(--c-accent);
	background: var(--c-accent); color: #fff; font-weight: 700; font-size: .92rem; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--c-accent-dark); border-color: var(--c-accent-dark); color: #fff; }
.btn--light { background: #fff; border-color: #fff; color: var(--c-accent-dark); }
.btn--light:hover { background: var(--c-accent-soft); border-color: var(--c-accent-soft); color: var(--c-accent-dark); }
.btn--lg { min-height: 50px; padding-inline: 1.8em; font-size: 1rem; }

/* Header layouts chosen in the Customizer. */
.site-header--minimal .site-nav { justify-content: flex-end; gap: 1.5rem; }
.site-actions__extra { display: flex; align-items: center; }
@media (min-width: 961px) {
	.site-header--centered .site-header__inner { flex-wrap: wrap; justify-content: center; padding-block: .75rem; }
	.site-header--centered .site-brand { flex: 1 1 100%; display: flex; justify-content: center; }
	.site-header--centered .site-search { order: 3; }
	.site-header--centered .site-nav { flex: 0 1 auto; gap: 1.5rem; }
}

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--hdr-bg, var(--c-dark)); color: var(--hdr-fg, #fff); }
.header-static .site-header { position: relative; }
.header-static .site-header--over { position: absolute; inset-inline: 0; }
.admin-bar .site-header { top: 32px; }
.site-header--over { background: linear-gradient(to bottom, rgba(0, 0, 0, .65), rgba(0, 0, 0, 0)); margin-bottom: calc(var(--header-h) * -1); transition: background .2s; }
.site-header--over:not(.is-solid) { color: #fff; }
.site-header--over.is-solid { background: var(--hdr-bg, var(--c-dark)); }
.site-header__inner { display: flex; align-items: center; gap: 1rem; min-height: var(--header-h); }
.site-brand { flex: none; }
.site-brand a { display: flex; align-items: center; color: inherit; text-decoration: none; }
.site-brand img { max-height: 44px; width: auto; }
.site-brand__name { font-size: 1.3rem; font-weight: 900; letter-spacing: -.01em; }
.site-search { position: relative; flex: 0 1 300px; display: flex; align-items: center; }
.site-search .icon { position: absolute; inset-inline-start: 12px; color: #9aa0a6; pointer-events: none; }
.site-search input { width: 100%; height: 40px; padding: 0 2.4em 0 1em; border: 1px solid rgba(255, 255, 255, .12); border-radius: 999px; background: rgba(255, 255, 255, .08); color: #fff; font-size: .88rem; }
.site-search input::placeholder { color: #b8bcc2; }
.site-search input:focus { outline: none; border-color: var(--c-accent); background: rgba(255, 255, 255, .14); }
.site-nav { display: flex; align-items: center; gap: 1rem; flex: 1; justify-content: space-between; min-width: 0; }
.site-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.site-nav .menu > li { position: relative; }
.site-nav .menu a { display: block; padding: .5em .8em; color: inherit; text-decoration: none; font-weight: 600; font-size: .95rem; border-radius: 8px; }
.site-nav .menu a:hover, .site-nav .menu .current-menu-item > a { color: var(--c-accent); }
.site-nav .sub-menu { list-style: none; margin: 0; padding: .4rem; position: absolute; top: 100%; inset-inline-start: 0; min-width: 200px; background: #161616; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s; }
.site-nav li:hover > .sub-menu, .site-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.site-actions { display: flex; align-items: center; gap: .6rem; }
.icon-link { display: inline-flex; align-items: center; gap: .35em; padding: .4em; color: #fff; text-decoration: none; font-size: .9rem; border-radius: 8px; }
.icon-link:hover { color: var(--c-accent); }
.nav-toggle { display: none; margin-inline-start: auto; width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: inherit; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle__close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: inline; }

/* ---------- Hero ---------- */
.hero { position: relative; display: flex; align-items: center; min-height: clamp(460px, 62vh, 620px); padding: calc(var(--header-h) + 2rem) 0 3rem; background: #0f2a1f url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cpath d='M0 40h80M40 0v80' stroke='%23ffffff' stroke-opacity='.04'/%3E%3C/svg%3E"); color: #fff; overflow: hidden; isolation: isolate; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, rgba(0, 0, 0, .35), rgba(0, 0, 0, .55)); }
.hero__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.hero__inner { display: grid; justify-items: center; gap: 1.1rem; text-align: center; }
.hero__title { margin: 0; font-size: clamp(1.8rem, 5vw, 3.2rem); font-weight: 900; text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }
.hero__sub { margin: 0; font-size: clamp(.95rem, 2vw, 1.15rem); font-weight: 600; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.hero__search { width: 100%; max-width: 980px; text-align: start; }
.hero .spl-search { gap: 0; color: var(--c-text); }
.hero .spl-search__tabs { gap: 0; justify-content: flex-start; }
.hero .spl-search__tab span { border: 0; border-radius: 10px 10px 0 0; background: rgba(255, 255, 255, .82); color: var(--c-text); padding: .55em 1.1em; font-weight: 600; }
.hero .spl-search__tab input:checked + span { background: #fff; color: var(--c-accent-dark); }
.hero .spl-search__row { background: #fff; padding: 1rem; border-radius: 0 0 12px 12px; box-shadow: 0 12px 40px rgba(0, 0, 0, .25); }
.hero .spl-search__row .spl-btn { flex: 1 1 160px; }

/* ---------- Sections ---------- */
.section { padding-block: 2rem; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.section__title { font-size: clamp(1.2rem, 2.5vw, 1.5rem); margin-bottom: 1rem; }
.section__more { font-weight: 600; text-decoration: none; }
.pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.pills a { display: inline-flex; align-items: center; gap: .5em; padding: .4em 1em; border-radius: 999px; background: #fff; border: 1px solid var(--c-line); color: var(--c-text); text-decoration: none; font-weight: 600; font-size: .92rem; }
.pills a span { color: var(--c-muted); font-weight: 400; font-size: .85em; }
.pills a:hover { border-color: var(--c-accent); color: var(--c-accent-dark); }
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding: 2rem; border-radius: var(--radius); background: linear-gradient(135deg, #17b07b, #0e8a5f); color: #fff; }
.cta__title { margin: 0 0 .3em; font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
.cta p { margin: 0; opacity: .95; }

/* ---------- Archives ---------- */
.archive-head { margin-bottom: 1rem; }
.archive-head__title { font-size: clamp(1.3rem, 3vw, 1.8rem); margin: 0; }
.archive-head__desc { color: var(--c-muted); }
.archive-search { margin-bottom: .5rem; }
.nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; margin: 2rem 0 0; }
.nav-links .page-numbers { min-width: 42px; height: 42px; padding: 0 .8em; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--c-line); background: #fff; color: var(--c-text); text-decoration: none; }
.nav-links .page-numbers.current { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }
.nav-links .dots { border: 0; background: none; }

/* ---------- Blog ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.post-card { position: relative; background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.post-card__media { display: block; aspect-ratio: 16 / 9; background: var(--c-bg); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card__body { padding: 1rem 1.2rem 1.2rem; }
.post-card__title { font-size: 1.05rem; margin: 0 0 .3em; }
.post-card__title a { color: inherit; text-decoration: none; }
.post-card__title a::after { content: ""; position: absolute; inset: 0; }
.post-card__meta { margin: 0; color: var(--c-muted); font-size: .82rem; }
.post-card__excerpt { margin: .4em 0 0; color: #475467; font-size: .92rem; }
.entry { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: clamp(1.1rem, 3vw, 2.2rem); box-shadow: var(--shadow); }
.entry-title { font-size: clamp(1.4rem, 3.5vw, 2rem); }
.entry-meta { color: var(--c-muted); font-size: .88rem; margin-top: -.3em; }
.entry-thumb { margin: 0 0 1.5rem; }
.entry-thumb img { border-radius: 10px; width: 100%; }
.entry-content { line-height: 2.05; overflow-wrap: break-word; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content img { border-radius: 8px; }
.entry-content blockquote { margin: 1.5em 0; padding: .5em 1.2em; border-inline-start: 4px solid var(--c-accent); background: var(--c-accent-soft); border-radius: 8px; }
.entry-content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--c-line); padding: .5em .7em; }
.entry-content .wp-block-image figcaption, .wp-caption-text { color: var(--c-muted); font-size: .85rem; text-align: center; }
.alignleft { float: left; margin: .3em 0 1em 1.5em; }
.alignright { float: right; margin: .3em 1.5em 1em 0; }
.aligncenter { display: block; margin-inline: auto; }
.post-navigation .nav-links { justify-content: space-between; }
.post-navigation a { display: block; padding: .8em 1em; background: #fff; border: 1px solid var(--c-line); border-radius: 10px; text-decoration: none; color: var(--c-text); font-size: .92rem; }
.comments { margin-top: 1.5rem; }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-inline-start: 1.5rem; }
.comment-body { padding: 1rem 0; border-bottom: 1px solid var(--c-line); }
.comment-author img { border-radius: 50%; vertical-align: middle; margin-inline-end: .5em; }
.comment-form input:not([type="checkbox"]):not([type="submit"]), .comment-form textarea, .search-form input[type="search"] { width: 100%; padding: .6em .8em; border: 1px solid var(--c-line); border-radius: 10px; font-size: 16px; }
.search-form { display: flex; gap: .5rem; }
.search-form label { flex: 1; }
.search-form .search-submit { padding: .5em 1.2em; border: 0; border-radius: 10px; background: var(--c-accent); color: #fff; font-weight: 700; cursor: pointer; }
.notfound { text-align: center; padding-block: 4rem; }
.notfound .spl-search { text-align: start; margin: 1.5rem 0; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 2rem; background: var(--ftr-bg, var(--c-dark)); color: var(--ftr-fg, #c9ccd1); font-size: .92rem; }
.site-footer__widgets { display: grid; gap: 2rem; padding-block: 2.5rem 0; }
.site-footer__widgets--2 { grid-template-columns: repeat(2, 1fr); }
.site-footer__widgets--3 { grid-template-columns: repeat(3, 1fr); }
.site-footer__widgets--4 { grid-template-columns: repeat(4, 1fr); }
.footer-widget + .footer-widget { margin-top: 1.25rem; }
.footer-widget__title { margin: 0 0 .7em; font-size: 1rem; color: #fff; }
.footer-widget ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45em; }
.footer-widget p { margin: 0 0 .6em; }
.site-footer__inner { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1.5rem 3rem; padding-block: 2.5rem; }
.site-footer__about { max-width: 420px; }
.site-footer__brand { margin: 0 0 .3em; color: #fff; font-size: 1.2rem; font-weight: 900; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:not(.btn) { opacity: .95; }
.site-footer a:hover { color: var(--c-accent); }
.footer-menu, .site-footer__social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.site-footer__social a { display: inline-block; padding: .3em .9em; border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; }
.site-footer__badge img { background: #fff; border-radius: 8px; padding: 4px; }
.site-footer__copy { border-top: 1px solid rgba(255, 255, 255, .08); padding-block: 1rem; font-size: .82rem; color: #9aa0a6; text-align: center; }

/* ---------- Listing page tweaks in this theme ---------- */
.spl-profile__head { box-shadow: var(--shadow); }
.spl-card { box-shadow: var(--shadow); }

/* ---------- Mobile ---------- */
@media (max-width: 960px) {
	.nav-toggle { display: inline-flex; }
	.site-search { flex: 1 1 auto; }
	.site-nav {
		position: fixed; inset: var(--header-h) 0 0 0; z-index: 49; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 1rem;
		padding: 1rem 16px 2rem; background: var(--hdr-bg, var(--c-dark)); overflow-y: auto; transform: translateX(100%); visibility: hidden; transition: transform .2s, visibility .2s;
	}
	.admin-bar .site-nav { top: calc(var(--header-h) + 46px); }
	.nav-open .site-nav { transform: none; visibility: visible; }
	.nav-open { overflow: hidden; }
	.site-nav .menu { flex-direction: column; }
	.site-nav .menu a { padding: .8em .5em; font-size: 1.05rem; border-bottom: 1px solid rgba(255, 255, 255, .06); border-radius: 0; }
	.site-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; background: transparent; padding: 0 1rem 0 0; }
	.site-actions { flex-wrap: wrap; }
	.site-actions .btn { flex: 1 1 100%; }
	.site-footer__widgets--3, .site-footer__widgets--4 { grid-template-columns: repeat(2, 1fr); }
	.header-static .site-nav { position: absolute; top: 100%; bottom: auto; height: calc(100vh - var(--header-h)); }
	.header-static.admin-bar .site-nav { top: 100%; }
}
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }
@media (max-width: 640px) {
	:root { --header-h: 60px; }
	body { font-size: 15px; }
	.site-header__inner { gap: .5rem; }
	.site-brand__name { font-size: 1.1rem; }
	.site-search input { height: 38px; font-size: 16px; }
	.hero { min-height: 0; padding-bottom: 2rem; }
	.hero .spl-search__tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
	.hero .spl-search__tab span { white-space: nowrap; padding: .5em .8em; font-size: .85rem; }
	.hero .spl-search__row { border-radius: 0 0 12px 12px; padding: .75rem; }
	.hero .spl-search__row > .spl-input, .hero .spl-search__row .spl-btn { flex: 1 1 100%; }
	.cta { padding: 1.4rem; }
	.cta .btn { width: 100%; }
	.section { padding-block: 1.4rem; }
	.site-footer__widgets { grid-template-columns: 1fr !important; gap: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
	.site-header, .site-footer, .nav-toggle { display: none; }
	body { background: #fff; }
}
