/*
Theme Name: ورزش ایران
Theme URI: https://sportiran.local
Author: Sportiran
Description: قالب خبری ورزشی راست‌چین بر اساس طرح ورزش نیوز. همه بخش‌های سایت از پیشخوان وردپرس قابل تنظیم هستند.
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sportiran
Tags: rtl-language-support, news, blog, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, two-columns, three-columns
*/

:root {
	--sport-header: #071d35;
	--sport-accent: #ef3340;
	--sport-bg: #f4f6f9;
	--sport-text: #172338;
	--sport-box-title: #0b2745;
	--sport-muted: #9caabd;
	--sport-border: #e4e8ee;
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	font-family: "Vazirmatn", Tahoma, sans-serif;
	background: var(--sport-bg);
	color: var(--sport-text);
	line-height: 1.7;
}

a {
	text-decoration: none;
	color: inherit;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.skip-link {
	position: absolute;
	right: 12px;
	top: -40px;
	z-index: 100000;
	background: var(--sport-accent);
	color: #fff;
	padding: 8px 14px;
	border-radius: 6px;
}

.skip-link:focus {
	top: 12px;
}

/* Header */

.header {
	background: var(--sport-header);
	color: white;
}

.header-top {
	max-width: 1400px;
	margin: auto;
	height: 85px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 20px;
	gap: 16px;
}

.logo {
	display: flex;
	align-items: center;
	gap: 12px;
	color: white;
}

.custom-logo {
	width: auto;
	height: 45px;
	object-fit: contain;
}

.logo-icon {
	width: 45px;
	height: 45px;
	flex-shrink: 0;
	background: var(--sport-accent);
	clip-path: polygon(0 15%, 65% 0, 100% 25%, 55% 100%, 35% 75%, 60% 32%, 10% 50%);
}

.logo-text strong {
	display: block;
	font-size: 28px;
	font-weight: 800;
}

.logo-text span {
	color: var(--sport-muted);
	font-size: 11px;
}

.search,
.search-form.search {
	width: 300px;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 30px;
	padding: 0;
	color: var(--sport-muted);
	font-size: 13px;
	display: flex;
	align-items: center;
}

.search input[type="search"],
.search-form.search input[type="search"] {
	width: 100%;
	background: transparent;
	border: 0;
	outline: none;
	color: #fff;
	font-family: inherit;
	font-size: 13px;
	padding: 11px 18px;
}

.search input::placeholder,
.search-form.search input::placeholder {
	color: var(--sport-muted);
}

.main-nav {
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-inner {
	max-width: 1400px;
	margin: auto;
	display: flex;
	align-items: center;
	padding: 0 20px;
	height: 55px;
}

.nav-inner ul {
	display: flex;
	align-items: center;
	gap: 32px;
	list-style: none;
	margin: 0;
	padding: 0;
	width: 100%;
	height: 55px;
}

.nav-inner a {
	font-size: 13px;
	color: #dce3ed;
	position: relative;
	white-space: nowrap;
	display: inline-block;
}

.nav-inner a:hover,
.nav-inner .current-menu-item > a,
.nav-inner .current_page_item > a,
.nav-inner a.active {
	color: white;
}

.nav-inner .current-menu-item > a::after,
.nav-inner .current_page_item > a::after,
.nav-inner a.active::after {
	content: "";
	position: absolute;
	bottom: -19px;
	right: 0;
	left: 0;
	height: 3px;
	background: var(--sport-accent);
}

.nav-inner li {
	position: relative;
	margin: 0;
}

.nav-inner ul ul {
	display: none;
	position: absolute;
	top: 100%;
	right: 0;
	background: var(--sport-header);
	min-width: 190px;
	height: auto;
	flex-direction: column;
	gap: 0;
	padding: 8px 0;
	z-index: 30;
	border-radius: 0 0 8px 8px;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.nav-inner li:hover > ul {
	display: flex;
}

.nav-inner ul ul a {
	padding: 10px 16px;
	display: block;
}

.nav-inner ul ul a::after {
	display: none;
}

/* Breaking */

.breaking {
	background: white;
	border-bottom: 1px solid #e5e8ed;
}

.breaking-inner {
	max-width: 1400px;
	margin: auto;
	height: 48px;
	display: flex;
	align-items: center;
	gap: 15px;
	padding: 0 20px;
}

.breaking-title {
	background: var(--sport-accent);
	color: white;
	padding: 7px 15px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 700;
	white-space: nowrap;
}

.breaking-text {
	color: #4d5969;
	font-size: 12px;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

/* Layout */

.container {
	max-width: 1400px;
	margin: 20px auto;
	padding: 0 20px;
}

.layout {
	display: grid;
	grid-template-columns: 250px minmax(0, 1fr) 285px;
	gap: 18px;
	align-items: start;
}

.layout.is-two-cols {
	grid-template-columns: 250px minmax(0, 1fr);
}

/* Cards */

.box {
	background: white;
	border: 1px solid var(--sport-border);
	border-radius: 8px;
	overflow: hidden;
	margin-bottom: 18px;
}

.box-title {
	background: var(--sport-box-title);
	color: white;
	padding: 13px 16px;
	font-size: 14px;
	font-weight: 700;
}

.box-title span {
	color: var(--sport-accent);
}

/* Live scores */

.match {
	padding: 13px 12px;
	border-bottom: 1px solid #edf0f4;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 5px;
	font-size: 11px;
}

.team {
	flex: 1;
}

.team:first-child {
	text-align: right;
}

.team:last-child {
	text-align: left;
}

.score {
	font-size: 14px;
	font-weight: 800;
	white-space: nowrap;
	text-align: center;
}

.live {
	display: block;
	color: var(--sport-accent);
	font-size: 9px;
	margin-top: 4px;
}

.view-all {
	padding: 13px;
	text-align: center;
	font-size: 11px;
	color: var(--sport-accent);
	font-weight: 700;
}

.view-all a {
	color: var(--sport-accent);
}

/* Thumbs */

.thumb-wrap {
	display: block;
	overflow: hidden;
	background: #0b2745;
	line-height: 0;
}

.thumb-wrap .thumb-img,
.thumb-wrap img,
.thumb-wrap .thumb-placeholder {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
	display: block;
}

.thumb-placeholder {
	background: linear-gradient(135deg, #0b2745, #071d35);
}

.thumb-wrap--hero {
	position: absolute;
	inset: 0;
}

.thumb-wrap--card {
	aspect-ratio: 16 / 10;
}

.thumb-wrap--latest {
	width: 80px;
	height: 55px;
	flex-shrink: 0;
	border-radius: 5px;
}

.thumb-wrap--popular {
	width: 65px;
	height: 50px;
	flex-shrink: 0;
	border-radius: 5px;
}

.thumb-wrap--video {
	aspect-ratio: 16 / 10;
}

/* Hero / slider */

.hero-slider {
	position: relative;
	margin-bottom: 18px;
	border-radius: 8px;
	overflow: hidden;
}

.hero {
	position: relative;
	display: none;
	aspect-ratio: 16 / 7;
	border-radius: 8px;
	overflow: hidden;
	background: var(--sport-header);
	margin-bottom: 0;
}

.hero-slider .hero.is-active,
.center-column > .hero {
	display: block;
}

.center-column > .hero {
	margin-bottom: 18px;
}

.hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.05) 65%);
	z-index: 1;
}

.hero-content {
	position: absolute;
	z-index: 2;
	right: 30px;
	bottom: 30px;
	color: white;
	max-width: 650px;
}

.hero-dots {
	position: absolute;
	left: 16px;
	bottom: 16px;
	z-index: 3;
	display: flex;
	gap: 6px;
}

.hero-dot {
	width: 8px;
	height: 8px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.45);
	cursor: pointer;
	padding: 0;
}

.hero-dot.is-active {
	background: var(--sport-accent);
}

.category {
	display: inline-block;
	background: var(--sport-accent);
	border-radius: 5px;
	padding: 5px 10px;
	font-size: 11px;
	margin-bottom: 10px;
	color: white;
}

.hero h1 {
	font-size: 28px;
	line-height: 1.7;
	margin-bottom: 8px;
}

.hero p {
	font-size: 12px;
	color: #ddd;
}

/* News grid */

.news-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
}

.news-card {
	background: white;
	border: 1px solid var(--sport-border);
	border-radius: 7px;
	overflow: hidden;
	display: block;
}

.news-card .thumb-wrap--card {
	background: #dce3ed;
}

.news-content {
	padding: 12px;
}

.news-category {
	font-size: 10px;
	color: var(--sport-accent);
	font-weight: 700;
	margin-bottom: 5px;
}

.news-card h3 {
	font-size: 13px;
	line-height: 1.7;
}

.news-card:hover h3 {
	color: var(--sport-accent);
}

.news-meta {
	color: #9ba5b2;
	font-size: 9px;
	margin-top: 10px;
}

/* Latest */

.latest {
	margin-top: 18px;
}

.latest-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	border-bottom: 1px solid #edf0f4;
	color: inherit;
}

.latest-item:hover h3 {
	color: var(--sport-accent);
}

.latest-item .thumb-wrap--latest {
	background: #dce3ed;
}

.latest-text {
	flex: 1;
}

.latest-text h3 {
	font-size: 12px;
	line-height: 1.7;
}

.latest-text span {
	color: #9ba5b2;
	font-size: 9px;
}

/* League table */

.league-select {
	padding: 10px 12px;
	border-bottom: 1px solid #eee;
	font-size: 11px;
	color: #555;
}

.league-select select {
	width: 100%;
	border: 0;
	background: transparent;
	font-family: inherit;
	font-size: 12px;
	color: #333;
	cursor: pointer;
	outline: none;
}

.table-scroll {
	max-height: 340px;
	overflow: auto;
}

.empty-box {
	padding: 16px 12px;
	font-size: 12px;
	color: #9ba5b2;
	text-align: center;
}

.js-scores-body.is-loading,
.js-table-body.is-loading {
	opacity: 0.45;
	pointer-events: none;
}

.league-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: 10px;
}

.league-table th,
.league-table td {
	padding: 9px 5px;
	border-bottom: 1px solid #edf0f4;
	text-align: center;
}

.league-table th {
	color: #9ba5b2;
	font-weight: 500;
}

.league-table td:first-child {
	color: #8c97a5;
}

.team-name {
	text-align: right;
	font-weight: 600;
}

/* Popular */

.popular-item {
	display: flex;
	gap: 10px;
	padding: 12px;
	border-bottom: 1px solid #edf0f4;
	align-items: center;
}

.popular-item:hover h4 {
	color: var(--sport-accent);
}

.popular-number {
	color: var(--sport-accent);
	font-weight: 800;
	font-size: 15px;
	min-width: 16px;
}

.popular-item .thumb-wrap--popular {
	background: #dce3ed;
}

.popular-item h4 {
	font-size: 10px;
	line-height: 1.7;
}

/* Video */

.video {
	position: relative;
	display: block;
}

.play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.7);
	color: white;
	display: grid;
	place-items: center;
	font-size: 20px;
	z-index: 2;
	pointer-events: none;
}

.video-title {
	padding: 12px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.7;
}

/* Banner */

.bottom-banner {
	margin-top: 0;
	margin-bottom: 18px;
	height: 90px;
	border-radius: 8px;
	overflow: hidden;
	position: relative;
	background: linear-gradient(90deg, rgba(7, 29, 53, 0.95), rgba(7, 29, 53, 0.35)), var(--sport-header);
	background-size: cover;
	background-position: center;
	display: block;
}

.bottom-banner div {
	height: 100%;
	display: flex;
	align-items: center;
	padding: 25px;
	color: white;
	font-weight: 800;
	font-size: 18px;
}

/* Single / page */

.page-heading {
	margin-bottom: 18px;
}

.page-heading h1 {
	font-size: 22px;
	font-weight: 800;
}

.article {
	background: white;
	border: 1px solid var(--sport-border);
	border-radius: 8px;
	overflow: hidden;
	margin-bottom: 18px;
}

.article-hero {
	background: #0b2745;
	line-height: 0;
	text-align: center;
}

.article-hero img {
	width: 100%;
	height: auto;
	max-height: 520px;
	object-fit: contain;
	object-position: center;
	display: block;
	margin: 0 auto;
}

.article-body {
	padding: 28px;
}

.article-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 16px;
	color: #9ba5b2;
	font-size: 12px;
	margin: 10px 0 22px;
}

.article-body h1 {
	font-size: 26px;
	line-height: 1.8;
	margin-bottom: 6px;
}

.post-content {
	font-size: 15px;
	line-height: 2;
}

.post-content > * {
	margin-bottom: 1em;
}

.post-content h2,
.post-content h3,
.post-content h4 {
	margin: 1.4em 0 0.6em;
	line-height: 1.7;
}

.post-content h2 { font-size: 22px; }
.post-content h3 { font-size: 18px; }

.post-content ul,
.post-content ol {
	padding-right: 1.4em;
}

.post-content blockquote {
	border-right: 3px solid var(--sport-accent);
	background: #f8fafc;
	padding: 12px 16px;
	border-radius: 0 8px 8px 0;
}

.post-content a {
	color: var(--sport-accent);
}

.post-content img,
.post-content figure {
	border-radius: 8px;
}

.post-content figcaption {
	font-size: 12px;
	color: #9ba5b2;
	margin-top: 6px;
}

.post-content iframe,
.post-content video {
	max-width: 100%;
}

.post-content .aligncenter {
	margin-left: auto;
	margin-right: auto;
}

.post-content .wp-caption {
	max-width: 100%;
}

.post-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 24px;
}

.post-tags a {
	background: #f4f6f9;
	border: 1px solid var(--sport-border);
	border-radius: 20px;
	padding: 4px 12px;
	font-size: 12px;
}

.post-nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-bottom: 18px;
}

.post-nav a {
	background: white;
	border: 1px solid var(--sport-border);
	border-radius: 8px;
	padding: 14px;
	font-size: 13px;
	display: block;
}

.post-nav span {
	display: block;
	color: #9ba5b2;
	font-size: 11px;
	margin-bottom: 4px;
}

.related-grid {
	padding: 12px;
	margin: 0;
}

.comment-author img {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: inline-block;
	vertical-align: middle;
	margin-left: 8px;
}

/* Comments */

.comments-area {
	background: white;
	border: 1px solid var(--sport-border);
	border-radius: 8px;
	padding: 24px;
	margin-bottom: 18px;
}

.comments-area h2,
.comments-area h3 {
	font-size: 16px;
	margin-bottom: 16px;
}

.comment-list {
	list-style: none;
}

.comment-list .comment {
	padding: 14px 0;
	border-bottom: 1px solid #edf0f4;
}

.comment-author {
	font-weight: 700;
	font-size: 13px;
}

.comment-metadata {
	font-size: 11px;
	color: #9ba5b2;
	margin: 4px 0 8px;
}

.comment-content {
	font-size: 14px;
}

.comment-respond {
	margin-top: 20px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	border: 1px solid var(--sport-border);
	border-radius: 8px;
	padding: 10px 12px;
	font-family: inherit;
	font-size: 13px;
	margin-bottom: 10px;
}

.comment-form .submit,
.btn-submit {
	background: var(--sport-accent);
	color: white;
	border: 0;
	border-radius: 8px;
	padding: 10px 18px;
	font-family: inherit;
	font-weight: 700;
	cursor: pointer;
}

/* Pagination / empty */

.pagination,
.nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin: 8px 0 18px;
}

.pagination a,
.pagination span,
.nav-links a,
.nav-links span {
	background: white;
	border: 1px solid var(--sport-border);
	padding: 8px 14px;
	border-radius: 6px;
	font-size: 13px;
}

.pagination .current,
.nav-links .current {
	background: var(--sport-header);
	color: white;
	border-color: var(--sport-header);
}

.empty-state {
	background: white;
	border: 1px solid var(--sport-border);
	border-radius: 8px;
	padding: 40px 24px;
	text-align: center;
	color: #4d5969;
}

.empty-state h2 {
	margin-bottom: 8px;
	color: var(--sport-text);
}

/* Footer */

.site-footer {
	background: var(--sport-header);
	color: #dce3ed;
	margin-top: 10px;
}

.footer-inner {
	max-width: 1400px;
	margin: auto;
	padding: 22px 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	font-size: 12px;
}

.site-footer a {
	color: #fff;
}

/* Widgets */

.widget ul {
	list-style: none;
	padding: 8px 0;
}

.widget li {
	padding: 8px 14px;
	border-bottom: 1px solid #edf0f4;
	font-size: 12px;
}

.widget select,
.widget input[type="search"],
.widget input[type="text"] {
	width: calc(100% - 24px);
	margin: 12px;
	border: 1px solid var(--sport-border);
	border-radius: 8px;
	padding: 8px 10px;
	font-family: inherit;
}

.search-page .search-form.search {
	width: 100%;
	max-width: 420px;
	background: white;
	border: 1px solid var(--sport-border);
	margin: 0 auto 18px;
}

.search-page .search-form.search input {
	color: var(--sport-text);
}

.search-page .search-form.search input::placeholder {
	color: #9ba5b2;
}

/* Responsive */

@media (max-width: 1100px) {
	.layout,
	.layout.is-two-cols {
		grid-template-columns: 220px minmax(0, 1fr);
	}

	.right-column {
		display: none;
	}

	.search,
	.search-form.search {
		width: 220px;
	}
}

@media (max-width: 800px) {
	.header-top {
		height: 70px;
	}

	.header .search,
	.header .search-form.search {
		display: none;
	}

	.nav-inner,
	.nav-inner ul {
		overflow-x: auto;
		gap: 25px;
	}

	.layout,
	.layout.is-two-cols {
		grid-template-columns: 1fr;
	}

	.left-column {
		order: 2;
	}

	.center-column {
		order: 1;
	}

	.news-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.hero {
		aspect-ratio: 16 / 8;
	}

	.hero h1,
	.article-body h1 {
		font-size: 21px;
	}

	.post-nav {
		grid-template-columns: 1fr;
	}

	.footer-inner {
		flex-direction: column;
		text-align: center;
	}
}

@media (max-width: 500px) {
	.container {
		padding: 0 10px;
	}

	.news-grid {
		grid-template-columns: 1fr;
	}

	.hero {
		aspect-ratio: 16 / 9;
	}

	.article-hero img {
		max-height: 280px;
	}

	.hero-content {
		right: 18px;
		bottom: 18px;
		left: 18px;
	}

	.hero h1 {
		font-size: 18px;
	}

	.logo-text strong {
		font-size: 22px;
	}

	.article-body {
		padding: 18px;
	}
}
