/*
Theme Name: Music Lite
Theme URI: https://example.com
Author: Your Name
Description: قالب سبک وردپرس برای انتشار موزیک، آلبوم و موزیک ویدیو
Version: 1.0
Text Domain: music-lite
*/

/* ===== فونت‌های لوکال (بدون وابستگی به گوگل فونت) ===== */
@font-face {
	font-family: 'IRANSans';
	src: url('fonts/webfonts/IRANSansWeb-Regular.woff2') format('woff2'),
	     url('fonts/webfonts/IRANSansWeb-Regular.woff') format('woff');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'IRANSans';
	src: url('fonts/webfonts/IRANSansWeb-Medium.woff2') format('woff2'),
	     url('fonts/webfonts/IRANSansWeb-Medium.woff') format('woff');
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Estedad';
	src: url('fonts/webfonts/Estedad-Thin.woff2') format('woff2');
	font-weight: 300;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Estedad';
	src: url('fonts/webfonts/Estedad-Medium.woff2') format('woff2');
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Estedad';
	src: url('fonts/webfonts/Estedad-Bold.woff2') format('woff2');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Estedad';
	src: url('fonts/webfonts/Estedad-Black.woff2') format('woff2');
	font-weight: 900;
	font-style: normal;
	font-display: swap;
}

/* ===== توکن‌های طراحی ===== */
:root {
	--bg: #eef0f1;
	--bg-elevated: #ffffff;
	--bg-elevated-2: #f2f3f4;
	--border: #e3e5e7;
	--text: #17181a;
	--text-muted: #6b7379;
	--accent: #c62b46;
	--accent-dim: #a02238;
	--accent-ink: #ffffff;
	--header-bg: #101114;
	--header-text: #ffffff;
	--quick-nav-bg: #24272d;
	--radius-lg: 16px;
	--radius-md: 10px;
	--radius-sm: 6px;
	--font: 'IRANSans', Tahoma, sans-serif;
	--font-heading: 'Estedad', 'IRANSans', Tahoma, sans-serif;
}

/* ===== Reset ساده ===== */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	overflow-x: clip;
	max-width: 100%;
}

body {
	margin: 0;
	font-family: var(--font);
	background: var(--bg);
	color: var(--text);
	line-height: 1.8;
	direction: rtl;
	overflow-x: clip;
	max-width: 100%;
}

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

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

.container {
	width: 100%;
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 16px;
}

/* ===== هدر ===== */
.site-header {
	background: var(--header-bg);
	padding: 10px 0 0;
	position: sticky;
	top: 0;
	z-index: 50;
}

.site-header .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	position: relative;
	padding-bottom: 10px;
}

.site-brand {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;
	min-width: 0;
}

.site-logo {
	flex: 0 0 auto;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--accent);
	color: var(--accent-ink);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	font-weight: 800;
	font-family: var(--font-heading);
}

.site-name {
	font-size: 15px;
	font-weight: 700;
	font-family: var(--font-heading);
	color: var(--header-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 120px;
}

/* ===== آیکون اکولایزر - امضای بصری قالب ===== */
.eq-icon {
	display: inline-flex;
	align-items: flex-end;
	gap: 2px;
	height: 14px;
	margin-inline-end: 8px;
}

.eq-icon span {
	display: block;
	width: 3px;
	background: var(--accent);
	border-radius: 2px;
	animation: eq-bounce 1.1s ease-in-out infinite;
}

.eq-icon span:nth-child(1) { height: 40%; animation-delay: 0s; }
.eq-icon span:nth-child(2) { height: 100%; animation-delay: .2s; }
.eq-icon span:nth-child(3) { height: 65%; animation-delay: .4s; }

@keyframes eq-bounce {
	0%, 100% { transform: scaleY(.4); }
	50% { transform: scaleY(1); }
}

@media (prefers-reduced-motion: reduce) {
	.eq-icon span { animation: none; }
}

/* ===== مطالب ویژه (استوری) ===== */
.featured-stories {
	background: var(--bg-elevated);
	border-bottom: 1px solid var(--border);
	padding: 18px 0;
}

.stories-track {
	display: flex;
	gap: 18px;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	-ms-overflow-style: none;
	scrollbar-width: none;
	padding-bottom: 4px;
}

.stories-track::-webkit-scrollbar {
	display: none;
}

.story-item {
	flex: 0 0 auto;
	width: 104px;
	text-align: center;
	scroll-snap-align: start;
}

.story-circle {
	display: block;
	width: 96px;
	height: 96px;
	border-radius: 50%;
	padding: 3px;
	margin: 0 auto 8px;
	background: linear-gradient(135deg, var(--accent), var(--accent-dim));
	overflow: hidden;
}

.story-circle img,
.story-circle-placeholder {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid var(--bg-elevated);
	display: block;
	background: var(--bg-elevated-2);
}

.story-caption {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.story-singer {
	font-size: 12px;
	font-weight: 700;
	color: var(--text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.story-song {
	font-size: 11px;
	color: var(--text-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ===== نوار میانبر نوع محتوا (کنار لوگو) ===== */
.quick-nav {
	flex: 1;
	min-width: 0;
}

.quick-nav ul {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 6px;
	background: var(--quick-nav-bg);
	border-radius: var(--radius-lg);
	overflow-x: auto;
	scrollbar-width: none;
}

.quick-nav ul::-webkit-scrollbar {
	display: none;
}

.quick-nav a {
	display: block;
	white-space: nowrap;
	color: var(--header-text);
	background: transparent;
	padding: 9px 14px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 500;
	transition: background .15s ease;
}

.quick-nav a.is-active,
.quick-nav a:hover {
	background: var(--accent);
}

/* ===== نوار جستجو ===== */
.search-bar {
	margin: 18px 0;
	background: var(--bg-elevated-2);
	border-radius: var(--radius-md);
	padding: 6px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.search-bar input[type="search"] {
	flex: 1;
	min-width: 0;
	border: 0;
	background: transparent;
	padding: 10px 14px;
	font-family: var(--font);
	font-size: 14px;
	color: var(--text);
	outline: none;
}

.search-bar button {
	flex: 0 0 auto;
	border: 0;
	background: var(--accent);
	color: var(--accent-ink);
	font-family: var(--font);
	font-weight: 700;
	font-size: 14px;
	padding: 12px 22px;
	border-radius: var(--radius-sm);
	cursor: pointer;
}

/* ===== باکس معرفی صفحه اصلی ===== */
.intro-card {
	background: var(--bg-elevated);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 14px 16px;
	text-align: right;
	margin-bottom: 22px;
}

.intro-card h1 {
	font-family: var(--font-heading);
	font-size: 17px;
	margin: 0 0 6px;
}

.intro-card p {
	color: var(--text-muted);
	font-size: 13px;
	margin: 0;
	line-height: 1.9;
}

/* ===== شبکه فید صفحه اصلی ===== */
.feed-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 14px;
}

.feed-card {
	background: var(--bg-elevated);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 10px;
	min-width: 0;
}

.feed-card-title {
	background: var(--bg-elevated-2);
	border-radius: 999px;
	padding: 8px 12px;
	font-size: 12px;
	font-weight: 700;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-bottom: 8px;
}

.feed-card-cover {
	display: block;
	position: relative;
	border-radius: var(--radius-md);
	overflow: hidden;
	aspect-ratio: 1/1;
	margin-bottom: 8px;
}

.feed-card-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.badge-overlay {
	position: absolute;
	top: 8px;
	inset-inline-end: 8px;
	background: rgba(0,0,0,.6);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	padding: 3px 10px;
	border-radius: 999px;
}

.mini-player {
	display: flex;
	align-items: center;
	gap: 6px;
	background: var(--bg-elevated-2);
	border-radius: 999px;
	padding: 6px 10px;
	margin-bottom: 8px;
}

.mini-player button {
	flex: 0 0 auto;
	width: 26px;
	height: 26px;
	border: 0;
	background: var(--accent);
	color: var(--accent-ink);
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	padding: 0;
}

.mini-player .mp-mute,
.mini-player .mp-more {
	background: transparent;
	color: var(--text-muted);
}

.mini-player input[type="range"],
.full-player input[type="range"] {
	flex: 1;
	accent-color: var(--accent);
	height: 4px;
	min-width: 0;
}

.feed-card-more {
	display: block;
	text-align: center;
	background: var(--header-bg);
	color: var(--header-text);
	font-weight: 700;
	font-size: 13px;
	padding: 10px;
	border-radius: var(--radius-md);
}

.feed-pagination {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin: 24px 0;
}

.feed-pagination a,
.feed-pagination span {
	background: var(--bg-elevated);
	border: 1px solid var(--border);
	padding: 8px 16px;
	border-radius: 999px;
	font-size: 13px;
}

.feed-pagination .current {
	background: var(--accent);
	color: var(--accent-ink);
	border-color: var(--accent);
}

@media (max-width: 360px) {
	.feed-grid {
		grid-template-columns: 1fr;
	}
}

/* ===== دسته‌بندی‌های صفحه اصلی ===== */
.home-category {
	margin: 28px 0;
}

.home-category h2 {
	font-size: 18px;
	font-weight: 700;
	font-family: var(--font-heading);
	display: flex;
	align-items: center;
	margin-bottom: 14px;
}

.music-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
}

.music-card {
	background: var(--bg-elevated);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	overflow: hidden;
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
	display: block;
	min-width: 0;
}

.music-card:hover {
	transform: translateY(-4px);
	border-color: var(--accent-dim);
	box-shadow: 0 12px 24px -8px rgba(45, 225, 194, .25);
}

.music-card img {
	aspect-ratio: 1/1;
	object-fit: cover;
	transition: transform .4s ease;
}

.music-card:hover img {
	transform: scale(1.06) rotate(1deg);
}

.music-card .info {
	padding: 10px;
}

.music-card .title {
	font-size: 14px;
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.music-card .singer {
	font-size: 12px;
	color: var(--text-muted);
}

.badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	background: var(--accent);
	color: var(--accent-ink);
	padding: 2px 9px;
	border-radius: 20px;
	margin-inline-start: 6px;
}

/* ===== تک پست ===== */
.single-music {
	max-width: 800px;
	margin: 24px auto;
}

.single-music h1 {
	font-size: 26px;
	font-weight: 800;
	font-family: var(--font-heading);
}

.single-music .meta {
	color: var(--text-muted);
	font-size: 13px;
	margin-bottom: 14px;
}

.single-music .meta .singer-en {
	color: var(--text-muted);
	font-weight: 400;
}

.single-video {
	position: relative;
	width: 100%;
	aspect-ratio: 16/9;
	border-radius: var(--radius-lg);
	overflow: hidden;
	margin-bottom: 18px;
	background: #000;
}

.single-video video,
.single-video iframe {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.single-cover {
	position: relative;
	max-height: 420px;
	overflow: hidden;
	border-radius: var(--radius-lg);
	margin-bottom: 18px;
}

.single-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ===== مسیر نان (breadcrumb) ===== */
.breadcrumb {
	background: var(--bg-elevated-2);
	border-radius: var(--radius-md);
	padding: 12px 16px;
	font-size: 13px;
	color: var(--text-muted);
	margin: 16px 0;
}

.breadcrumb a {
	color: var(--accent);
}

.breadcrumb .sep {
	margin: 0 4px;
	color: var(--text-muted);
}

/* ===== ردیف افقی اسکرول (پیشنهادی/مرتبط) ===== */
.scroll-row {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scrollbar-width: none;
	padding-bottom: 6px;
	margin: 14px 0;
}

.scroll-row::-webkit-scrollbar {
	display: none;
}

.scroll-row-top {
	margin-top: 18px;
}

.compact-card {
	flex: 0 0 110px;
	width: 110px;
	scroll-snap-align: start;
}

.compact-cover {
	aspect-ratio: 1/1;
	border-radius: var(--radius-md);
	overflow: hidden;
	background: var(--bg-elevated-2);
	margin-bottom: 6px;
}

.compact-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.compact-title {
	font-size: 12px;
	font-weight: 500;
	text-align: center;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	line-height: 1.5;
}

/* ===== باکس عنوان تک‌پست ===== */
.title-box {
	background: var(--header-bg);
	color: var(--header-text);
	border-radius: var(--radius-lg);
	padding: 16px 18px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 14px;
}

.title-box-text {
	flex: 1;
	min-width: 0;
}

.title-box h1 {
	font-size: 19px;
	font-weight: 800;
	font-family: var(--font-heading);
	margin: 0 0 6px;
	overflow-wrap: break-word;
	word-break: break-word;
}

.title-box-meta {
	font-size: 12px;
	color: rgba(255,255,255,.65);
}

.title-box-icon {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	background: var(--accent);
	border-radius: var(--radius-md);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
}

/* ===== پلیر کامل تک‌پست ===== */
.full-player-label {
	font-size: 13px;
	color: var(--text-muted);
	margin: 18px 0 8px;
}

.full-player {
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--bg-elevated);
	border: 1px solid var(--border);
	border-radius: 999px;
	padding: 8px 14px;
	max-width: 100%;
}

.full-player .fp-play {
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 50%;
	background: var(--accent);
	color: var(--accent-ink);
	cursor: pointer;
	font-size: 13px;
}

.full-player .fp-time {
	flex: 0 0 auto;
	font-size: 12px;
	color: var(--text-muted);
	min-width: 78px;
}

.full-player .fp-progress {
	flex: 1;
	accent-color: var(--accent);
}

.full-player .fp-mute {
	flex: 0 0 auto;
	border: 0;
	background: transparent;
	color: var(--text-muted);
	cursor: pointer;
	font-size: 15px;
}

/* ===== دکمه‌های دانلود (دوستونه) ===== */
.download-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
	margin: 16px 0;
}

.download-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	background: var(--accent);
	color: var(--accent-ink);
	text-align: center;
	padding: 13px 10px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 700;
	transition: filter .15s ease, transform .15s ease;
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.download-btn:hover {
	filter: brightness(1.08);
	transform: translateY(-1px);
}

@media (max-width: 380px) {
	.download-grid {
		grid-template-columns: 1fr;
	}
}

/* ===== لینک‌های میان‌بر خواننده/دسته ===== */
.quick-links {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 8px 0 4px;
}

.quick-link-pill {
	display: block;
	text-align: center;
	background: var(--header-bg);
	color: var(--header-text);
	font-weight: 700;
	font-size: 13px;
	padding: 12px;
	border-radius: var(--radius-md);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ===== عنوان بخش با آیکون (مرتبط/پیشنهادی) ===== */
.section-heading {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 15px;
	margin-bottom: 10px;
}

.section-heading-icon {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	background: var(--accent);
	color: var(--accent-ink);
	border-radius: var(--radius-sm);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
}

/* ===== دکمه‌های آهنگ قبلی/بعدی - چسبیده به گوشه تصویر کاور ===== */
.cover-tab {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	writing-mode: vertical-rl;
	background: rgba(16,17,20,.8);
	color: var(--header-text);
	font-size: 12px;
	font-weight: 700;
	padding: 12px 6px;
	z-index: 5;
}

.next-tab {
	inset-inline-end: 0;
	border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.prev-tab {
	inset-inline-start: 0;
	border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* متن آهنگ تاشو */
.lyrics-toggle {
	margin: 20px 0;
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	overflow: hidden;
	background: var(--bg-elevated);
}

.lyrics-toggle summary {
	cursor: pointer;
	padding: 12px 16px;
	font-weight: 700;
	list-style: none;
	display: flex;
	align-items: center;
}

.lyrics-toggle summary::-webkit-details-marker {
	display: none;
}

.lyrics-toggle summary::after {
	content: "+";
	margin-inline-start: auto;
	color: var(--accent);
	font-size: 18px;
}

.lyrics-toggle[open] summary::after {
	content: "−";
}

.lyrics-toggle .lyrics-content {
	padding: 14px 16px;
	white-space: pre-line;
	color: var(--text-muted);
	border-top: 1px solid var(--border);
}

.tags-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 16px 0;
}

.tags-list a {
	background: var(--bg-elevated-2);
	border: 1px solid var(--border);
	padding: 4px 12px;
	border-radius: 20px;
	font-size: 12px;
	color: var(--text-muted);
	transition: color .15s ease, border-color .15s ease;
}

.tags-list a:hover {
	color: var(--accent);
	border-color: var(--accent-dim);
}

/* مرتبط با خواننده */
.related-section {
	margin: 30px 0;
}

/* ===== فوتر ===== */
.site-footer {
	text-align: center;
	padding: 24px 0;
	color: var(--text-muted);
	font-size: 13px;
	border-top: 1px solid var(--border);
	margin-top: 40px;
}

/* ===== ریسپانسیو ===== */
@media (max-width: 900px) {
	.music-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 600px) {
	.music-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}
	.story-item {
		width: 84px;
	}
	.story-circle {
		width: 76px;
		height: 76px;
	}
	.site-name {
		font-size: 14px;
	}
}

@media (max-width: 380px) {
	.music-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ===== دسکتاپ / تبلت: استفاده بهتر از فضا ===== */
@media (min-width: 700px) {
	.feed-grid {
		grid-template-columns: repeat(3, 1fr);
	}
	.quick-links {
		flex-direction: row;
	}
	.quick-link-pill {
		flex: 1;
	}
}

@media (min-width: 1000px) {
	.feed-grid {
		grid-template-columns: repeat(4, 1fr);
	}
	.single-music {
		margin: 32px auto;
	}
}
