/*
Theme Name: MacStore 26
Theme URI: http://html5blank.com
Description: Futuristic MacOS Style Theme
Version: 2.0
Author: Refactored by Agent
*/

/* ----------------------------------------------------------------------
   1. Typography & Reset
   ---------------------------------------------------------------------- */
@import url('css/variables.css');

@font-face {
	font-family: iranyekan;
	font-style: normal;
	font-weight: bold;
	src: url('./fonts/eot/iranyekanwebbold.eot');
	src: url('./fonts/eot/iranyekanwebbold.eot?#iefix') format('embedded-opentype'),
		url('./fonts/woff/iranyekanwebbold.woff') format('woff'),
		url('./fonts/ttf/iranyekanwebbold.ttf') format('truetype');
}

@font-face {
	font-family: iranyekan;
	font-style: normal;
	font-weight: 100;
	src: url('./fonts/eot/iranyekanwebthin.eot');
	src: url('./fonts/eot/iranyekanwebthin.eot?#iefix') format('embedded-opentype'),
		url('./fonts/woff/iranyekanwebthin.woff') format('woff'),
		url('./fonts/ttf/iranyekanwebthin.ttf') format('truetype');
}

@font-face {
	font-family: iranyekan;
	font-style: normal;
	font-weight: 300;
	src: url('./fonts/eot/iranyekanweblight.eot');
	src: url('./fonts/eot/iranyekanweblight.eot?#iefix') format('embedded-opentype'),
		url('./fonts/woff/iranyekanweblight.woff') format('woff'),
		url('./fonts/ttf/iranyekanweblight.ttf') format('truetype');
}

@font-face {
	font-family: iranyekan;
	font-style: normal;
	font-weight: normal;
	src: url('./fonts/eot/iranyekanwebregular.eot');
	src: url('./fonts/eot/iranyekanwebregular.eot?#iefix') format('embedded-opentype'),
		url('./fonts/woff/iranyekanwebregular.woff') format('woff'),
		url('./fonts/ttf/iranyekanwebregular.ttf') format('truetype');
}

@font-face {
	font-family: iranyekan;
	font-style: normal;
	font-weight: 500;
	src: url('./fonts/eot/iranyekanwebmedium.eot');
	src: url('./fonts/eot/iranyekanwebmedium.eot?#iefix') format('embedded-opentype'),
		url('./fonts/woff/iranyekanwebmedium.woff') format('woff'),
		url('./fonts/ttf/iranyekanwebmedium.ttf') format('truetype');
}

@font-face {
	font-family: iranyekan;
	font-style: normal;
	font-weight: 800;
	src: url('./fonts/eot/iranyekanwebextrabold.eot');
	src: url('./fonts/eot/iranyekanwebextrabold.eot?#iefix') format('embedded-opentype'),
		url('./fonts/woff/iranyekanwebextrabold.woff') format('woff'),
		url('./fonts/ttf/iranyekanwebextrabold.ttf') format('truetype');
}

@font-face {
	font-family: iranyekan;
	font-style: normal;
	font-weight: 900;
	src: url('./fonts/eot/iranyekanwebblack.eot');
	src: url('./fonts/eot/iranyekanwebblack.eot?#iefix') format('embedded-opentype'),
		url('./fonts/woff/iranyekanwebblack.woff') format('woff'),
		url('./fonts/ttf/iranyekanwebblack.ttf') format('truetype');
}

@font-face {
	font-family: iranyekan;
	font-style: normal;
	font-weight: 950;
	src: url('./fonts/eot/iranyekanwebextrablack.eot');
	src: url('./fonts/eot/iranyekanwebextrablack.eot?#iefix') format('embedded-opentype'),
		url('./fonts/woff/iranyekanwebextrablack.woff') format('woff'),
		url('./fonts/ttf/iranyekanwebextrablack.ttf') format('truetype');
}

* {
	box-sizing: border-box;
}

body {
	background-color: var(--bg-body);
	font-family: var(--font-main);
	color: var(--text-primary);
	line-height: 1.6;
	margin: 0;
	overflow-x: hidden;
	direction: rtl;
}

a {
	color: var(--text-primary);
	text-decoration: none;
	transition: var(--hover-trans);
}

a:hover {
	color: var(--accent-blue);
}

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

/* ----------------------------------------------------------------------
   2. Components & Utilities
   ---------------------------------------------------------------------- */
.glass-panel {
	background: var(--bg-glass);
	backdrop-filter: var(--blur-panel);
	-webkit-backdrop-filter: var(--blur-panel);
	border-bottom: 1px solid var(--border-subtle);
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--radius-pill);
	padding: 10px 24px;
	font-weight: 700;
	cursor: pointer;
	border: none;
	transition: var(--hover-trans);
}

.btn-primary {
	background: var(--accent-blue);
	color: white;
}

.btn-primary:hover {
	box-shadow: var(--shadow-neon);
	transform: translateY(-2px);
}

.app-wrapper {
	padding-top: 80px;
	/* Space for fixed header */
	min-height: 100vh;
}

/* ----------------------------------------------------------------------
   3. Header Styling
   ---------------------------------------------------------------------- */
.app-header {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 70px;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.header-inner {
	width: 100%;
	max-width: 1400px;
	padding: 0 var(--space-md);
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.logo-img {
	height: 40px;
	filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
}

.nav-primary ul {
	display: flex;
	gap: var(--space-lg);
	margin: 0;
	padding: 0;
	list-style: none;
}

.nav-primary a {
	font-weight: 500;
	font-size: 0.95rem;
	color: var(--text-secondary);
}

.nav-primary a:hover,
.nav-primary .current-menu-item a {
	color: var(--text-primary);
	text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.header-actions {
	display: flex;
	gap: var(--space-md);
}

.icon-btn {
	background: transparent;
	border: none;
	color: var(--text-primary);
	font-size: 1.2rem;
	cursor: pointer;
	padding: 8px;
	border-radius: 50%;
	transition: var(--hover-trans);
}

.icon-btn:hover {
	background: rgba(255, 255, 255, 0.1);
	color: var(--accent-blue);
}

/* ----------------------------------------------------------------------
   4. Homepage - Hero
   ---------------------------------------------------------------------- */
.home-container {
	max-width: 1400px;
	margin: 0 auto;
	padding: var(--space-lg);
	width: 100%;
}

.hero-section {
	position: relative;
	height: 400px;
	border-radius: var(--radius-lg);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;
	background: radial-gradient(circle at top right, #1a2a3a 0%, #0d1117 100%);
	margin-bottom: var(--space-xl);
	box-shadow: var(--shadow-md);
}

.hero-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-image: url('https://appcenter.i-phone.ir/wp-content/uploads/2023/10/banner.jpg');
	/* Fallback or dynamic */
	background-size: cover;
	background-position: center;
	opacity: 0.3;
	filter: blur(5px);
	z-index: 0;
}

.hero-content {
	position: relative;
	z-index: 1;
	max-width: 700px;
	padding: var(--space-lg);
}

.hero-title {
	font-size: 3rem;
	font-weight: 800;
	margin-bottom: var(--space-sm);
	background: linear-gradient(to right, #fff, #a371f7);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.hero-subtitle {
	font-size: 1.2rem;
	color: var(--text-secondary);
	margin-bottom: var(--space-lg);
}

.hero-search {
	position: relative;
	width: 100%;
	max-width: 500px;
	margin: 0 auto;
}

.hero-search input {
	width: 100%;
	padding: 16px 20px 16px 50px;
	border-radius: var(--radius-pill);
	border: 1px solid var(--border-highlight);
	background: var(--bg-glass-heavy);
	color: var(--text-primary);
	font-size: 1.1rem;
	font-family: var(--font-main);
	backdrop-filter: blur(10px);
	transition: var(--hover-trans);
}

.hero-search input:focus {
	background: var(--bg-app);
	border-color: var(--accent-blue);
	box-shadow: 0 0 0 4px rgba(47, 129, 247, 0.2);
	outline: none;
}

.search-icon {
	position: absolute;
	left: 20px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--text-secondary);
	font-size: 1.1rem;
}

/* ----------------------------------------------------------------------
   5. Rails & Grids
   ---------------------------------------------------------------------- */
.app-section {
	margin-bottom: var(--space-xl);
}

.section-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: var(--space-md);
	padding: 0 var(--space-xs);
}

.section-header h2 {
	font-size: 1.8rem;
	font-weight: 700;
	margin: 0;
}

.view-all {
	color: var(--accent-blue);
	font-weight: 600;
	font-size: 0.95rem;
}

/* Categories Rail */
.category-rail {
	margin-bottom: var(--space-xl);
}

.rail-header h3 {
	font-size: 1.2rem;
	margin-bottom: var(--space-md);
	color: var(--text-secondary);
}

.rail-scrollable {
	display: flex;
	gap: var(--space-md);
	overflow-x: auto;
	padding-bottom: var(--space-sm);
}

.hide-scrollbar::-webkit-scrollbar {
	display: none;
}

.hide-scrollbar {
	-ms-overflow-style: none;
	scrollbar-width: none;
}

.cat-pill {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 16px;
	border-radius: var(--radius-pill);
	min-width: max-content;
	border: 1px solid var(--border-subtle);
}

.cat-pill img {
	width: 24px;
	height: 24px;
	border-radius: 50%;
}

.cat-pill:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: var(--accent-blue);
}

/* Horizontal Snap Grid */
.horizontal-snap {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 160px;
	/* Card Width */
	gap: var(--space-lg);
	overflow-x: auto;
	padding: var(--space-sm) var(--space-xs) var(--space-lg) var(--space-xs);
	scroll-snap-type: x mandatory;
}

.app-card {
	display: flex;
	flex-direction: column;
	border-radius: var(--radius-md);
	padding: var(--space-md);
	transition: var(--hover-trans);
	scroll-snap-align: start;
	height: 100%;
	position: relative;
}

.app-card:hover {
	transform: translateY(-5px);
	box-shadow: var(--shadow-lg);
	background: rgba(255, 255, 255, 0.08);
}

.card-icon {
	width: 100%;
	aspect-ratio: 1;
	border-radius: 22%;
	/* Squircle approximation */
	overflow: hidden;
	margin-bottom: var(--space-sm);
	box-shadow: var(--shadow-sm);
}

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

.card-info h3 {
	font-size: 1rem;
	margin: 5px 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.version-tag,
.card-meta {
	font-size: 0.8rem;
	color: var(--text-secondary);
	display: block;
}

.card-action {
	margin-top: auto;
	padding-top: var(--space-sm);
	text-align: center;
}

.btn-get {
	background: rgba(255, 255, 255, 0.1);
	color: var(--accent-blue);
	padding: 4px 16px;
	border-radius: var(--radius-pill);
	font-weight: 700;
	font-size: 0.85rem;
	text-transform: uppercase;
	display: inline-block;
}

.app-card:hover .btn-get {
	background: var(--accent-blue);
	color: white;
}

/* Bento Grid */
.bento-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: var(--space-md);
}

.app-row-card {
	display: flex;
	align-items: center;
	padding: var(--space-md);
	border-radius: var(--radius-md);
	gap: var(--space-md);
	transition: var(--hover-trans);
}

.app-row-card:hover {
	background: rgba(255, 255, 255, 0.08);
}

.row-icon {
	width: 50px;
	height: 50px;
	border-radius: 12px;
}

.row-info {
	flex: 1;
}

.row-info h4 {
	margin: 0;
	font-size: 1rem;
}

.row-info p {
	margin: 0;
	color: var(--text-secondary);
	font-size: 0.85rem;
}

.row-action {
	color: var(--accent-blue);
	font-size: 1.2rem;
}

/* Footer */
.app-footer {
	padding: var(--space-xl) 0;
	background: var(--bg-app);
	border-top: 1px solid var(--border-subtle);
	margin-top: auto;
}

.footer-inner {
	max-width: 1200px;
	margin: 0 auto;
	text-align: center;
	color: var(--text-secondary);
}

.footer-logo img {
	height: 30px;
	margin-bottom: var(--space-md);
	opacity: 0.5;
}

.crypto-note {
	font-size: 0.8rem;
	opacity: 0.5;
	margin-top: var(--space-sm);
}

/* ----------------------------------------------------------------------
   6. Single Page Layout
   ---------------------------------------------------------------------- */
.single-container {
	padding-bottom: var(--space-xl);
}

.single-backdrop {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 60vh;
	z-index: -1;
	overflow: hidden;
	mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
	-webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
}

.single-backdrop img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: blur(50px) brightness(0.5);
	transform: scale(1.1);
}

.single-grid {
	display: grid;
	grid-template-columns: 350px 1fr;
	gap: var(--space-xl);
	max-width: 1200px;
	margin: 0 auto;
	padding: var(--space-lg);
}

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

	.sticky-col {
		position: relative;
		top: 0;
	}
}

.single-sidebar.sticky-col {
	position: sticky;
	top: 100px;
	height: fit-content;
}

.app-icon-large {
	border-radius: var(--radius-lg);
	overflow: hidden;
	margin-bottom: var(--space-md);
	box-shadow: var(--shadow-lg);
	aspect-ratio: 1;
}

.game-shape {
	border-radius: var(--radius-lg);
	/* Games could be wider or different shape if needed */
}

.app-actions {
	margin-bottom: var(--space-lg);
}

.btn-block {
	width: 100%;
	margin-bottom: var(--space-sm);
	padding: 14px;
	font-size: 1.1rem;
}

.file-meta {
	display: flex;
	justify-content: space-between;
	font-size: 0.85rem;
	color: var(--text-secondary);
	padding: 0 var(--space-sm);
}

.info-panel {
	border-radius: var(--radius-md);
	padding: var(--space-md);
}

.meta-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.meta-list li {
	padding: 8px 0;
	border-bottom: 1px solid var(--border-subtle);
	display: flex;
	justify-content: space-between;
}

.meta-list li:last-child {
	border-bottom: none;
}

/* Single Content Area */
.header-info h1 {
	font-size: 2.5rem;
	margin-bottom: var(--space-xs);
	background: linear-gradient(to right, #fff, #ddd);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.tagline {
	font-size: 1.2rem;
	color: var(--accent-blue);
	margin-bottom: var(--space-lg);
}

.gallery-section {
	display: flex;
	gap: var(--space-md);
	overflow-x: auto;
	padding-bottom: var(--space-md);
	margin-bottom: var(--space-lg);
}

.screenshot-item {
	min-width: 600px;
	border-radius: var(--radius-md);
	overflow: hidden;
	box-shadow: var(--shadow-md);
}

.screenshot-item img {
	display: block;
}

.description-box,
.features-box {
	border-radius: var(--radius-md);
	padding: var(--space-lg);
	margin-bottom: var(--space-lg);
}

.description-box h2,
.features-box h2 {
	font-size: 1.5rem;
	margin-top: 0;
	margin-bottom: var(--space-md);
	border-bottom: 1px solid var(--border-subtle);
	padding-bottom: var(--space-sm);
}

.content-body {
	font-size: 1.05rem;
	line-height: 1.8;
	color: var(--text-primary);
}

.tilt-effect {
	transition: transform 0.1s ease-out;
}