/*--------------------------------------------------------------
Premium Redesign — Stylo Custom (APK theme)
This file only adds NEW component classes used by the redesigned
templates. It does not touch or override the legacy style.css
selectors, so nothing else in the theme is affected.
--------------------------------------------------------------*/

:root {
	--stc-primary: #2e6bff;
	--stc-primary-dark: #1a4fd6;
	--stc-primary-light: #eaf0ff;
	--stc-accent: #17c964;
	--stc-ink: #10162b;
	--stc-ink-soft: #5b6478;
	--stc-border: #e7eaf3;
	--stc-bg-soft: #f5f7fc;
	--stc-white: #ffffff;
	--stc-radius-sm: 8px;
	--stc-radius: 14px;
	--stc-radius-lg: 22px;
	--stc-shadow-sm: 0 2px 8px rgba(16, 22, 43, 0.06);
	--stc-shadow: 0 10px 30px rgba(16, 22, 43, 0.08);
	--stc-shadow-lg: 0 20px 50px rgba(16, 22, 43, 0.14);
	--stc-max-content: 960px;
	--stc-gap: 20px;
}

/*--------------------------------------------------------------
# Utility resets
--------------------------------------------------------------*/
.home-page, .single-app-page, .dl-page-wrap {
	color: var(--stc-ink);
}

.home-page *, .single-app-page *, .dl-page-wrap * {
	box-sizing: border-box;
}

/*--------------------------------------------------------------
# Hero (Homepage)
--------------------------------------------------------------*/
.home-hero {
	background: linear-gradient(135deg, var(--stc-primary) 0%, #6c3ef0 100%);
	border-radius: 0 0 var(--stc-radius-lg) var(--stc-radius-lg);
	padding: 56px 20px 64px;
	text-align: center;
	margin-bottom: 30px;
}

.home-hero-inner {
	max-width: 720px;
	margin: 0 auto;
}

.home-hero-title {
	color: #fff;
	font-weight: 900;
	font-size: 2.4rem;
	line-height: 1.2;
	margin: 0 0 14px;
}

.home-hero-title span {
	display: block;
	font-weight: 700;
	font-size: 1.4rem;
	opacity: 0.92;
	margin-top: 6px;
}

.home-hero-subtitle {
	color: rgba(255, 255, 255, 0.88);
	font-size: 1.05rem;
	margin: 0 0 26px;
}

.home-hero-search {
	max-width: 560px;
	margin: 0 auto;
}

.home-hero-search .searchform .input-group {
	display: flex;
	background: #fff;
	border-radius: 999px;
	box-shadow: var(--stc-shadow-lg);
	overflow: hidden;
}

.home-hero-search .searchinput {
	flex: 1 1 auto;
	border: none;
	padding: 16px 22px;
	font-size: 1rem;
	outline: none;
}

.home-hero-search button {
	border: none;
	background: var(--stc-ink);
	color: #fff;
	padding: 0 26px;
	font-weight: 700;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 8px;
	transition: background 0.15s ease;
}

.home-hero-search button:hover {
	background: var(--stc-primary-dark);
}

.home-hero-tags {
	margin-top: 22px;
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
}

.home-hero-tag {
	display: inline-flex;
	align-items: center;
	color: #fff;
	background: rgba(255, 255, 255, 0.16);
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 999px;
	padding: 8px 18px;
	font-weight: 600;
	font-size: 0.92rem;
	text-decoration: none;
	transition: background 0.15s ease;
}

.home-hero-tag:hover {
	background: rgba(255, 255, 255, 0.3);
	color: #fff;
}

/*--------------------------------------------------------------
# Section headers (Homepage blocks)
--------------------------------------------------------------*/
.home-apps-block {
	margin: 0 auto 34px;
	padding: 0 15px;
}

.home-apps-block .block-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
	flex-wrap: wrap;
	gap: 8px;
}

.home-apps-block .block-header h2 {
	font-size: 1.35rem;
	font-weight: 800;
	margin: 0;
	color: var(--stc-ink);
	display: flex;
	align-items: center;
}

.home-apps-block .block-header h2 span {
	color: var(--stc-primary);
	margin-right: 6px;
}

.home-apps-block .see-more-cat {
	font-weight: 700;
	color: var(--stc-primary);
	text-decoration: none;
	font-size: 0.9rem;
}

.home-apps-block .see-more-cat:hover {
	color: var(--stc-primary-dark);
}

.similar-apps-block .block-header, .similar-apps-block .block-head {
	margin-bottom: 16px;
}

.similar-apps-block .block-header h2, .similar-apps-block .block-head h3 {
	font-size: 1.2rem;
	font-weight: 800;
	margin: 0;
}

/*--------------------------------------------------------------
# App card grid (Homepage / Archives / Category / Similar apps)
--------------------------------------------------------------*/
.app-card-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--stc-gap);
}

.app-card {
	background: var(--stc-white);
	border: 1px solid var(--stc-border);
	border-radius: var(--stc-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.app-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--stc-shadow);
	border-color: transparent;
}

.app-card-thumb {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	background: var(--stc-bg-soft);
}

.app-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.app-card-thumb-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-size: 2.4rem;
	color: var(--stc-border);
}

.app-card-type {
	position: absolute;
	top: 8px;
	left: 8px;
	background: rgba(16, 22, 43, 0.72);
	color: #fff;
	font-size: 0.66rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	padding: 3px 8px;
	border-radius: 999px;
}

.app-card-body {
	padding: 12px 14px 14px;
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
}

.app-card-title {
	font-weight: 700;
	font-size: 0.95rem;
	color: var(--stc-ink);
	text-decoration: none;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 2.4em;
}

.app-card-title:hover {
	color: var(--stc-primary);
}

.app-card-meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 0.76rem;
	color: var(--stc-ink-soft);
	margin: 8px 0 12px;
}

.app-card-version {
	background: var(--stc-primary-light);
	color: var(--stc-primary-dark);
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 999px;
}

.app-card-download {
	margin-top: auto;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--stc-primary);
	color: #fff !important;
	font-weight: 700;
	font-size: 0.86rem;
	padding: 9px 10px;
	border-radius: var(--stc-radius-sm);
	text-decoration: none;
	transition: background 0.15s ease;
}

.app-card-download:hover {
	background: var(--stc-primary-dark);
}

/*--------------------------------------------------------------
# Single APK page (sidebar removed — comfortable centered width)
--------------------------------------------------------------*/
.single-app-page.single-app-page--full {
	max-width: var(--stc-max-content);
	margin-left: auto;
	margin-right: auto;
	float: none;
}

.single-app-page .post-main {
	width: 100%;
	float: none;
}

.single-app-header {
	background: var(--stc-white);
	border: 1px solid var(--stc-border);
	border-radius: var(--stc-radius-lg);
	padding: 24px;
	box-shadow: var(--stc-shadow-sm);
}

.app-header-row {
	display: flex;
	align-items: flex-start;
	gap: 20px;
	flex-wrap: wrap;
}

.app-icon-single {
	flex: 0 0 96px;
	width: 96px;
	height: 96px;
	border-radius: 24px;
	overflow: hidden;
	box-shadow: var(--stc-shadow);
}

.app-icon-single img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.app-title-single {
	flex: 1 1 260px;
	min-width: 0;
}

.app-title-single h1 {
	font-size: 1.6rem;
	font-weight: 800;
	margin: 0 0 8px;
	color: var(--stc-ink);
	word-break: break-word;
}

.single-app-header .app-trusted-label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--stc-accent);
	font-weight: 700;
	font-size: 0.88rem;
	background: rgba(23, 201, 100, 0.1);
	padding: 4px 12px;
	border-radius: 999px;
}

.app-quick-stats {
	margin-top: 10px;
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
	font-size: 0.84rem;
	color: var(--stc-ink-soft);
}

.app-cta-single {
	flex: 0 0 auto;
	width: 100%;
}

@media (min-width: 640px) {
	.app-cta-single {
		width: auto;
		margin-left: auto;
	}
}

.download-btn-single.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	background: linear-gradient(135deg, var(--stc-primary) 0%, var(--stc-primary-dark) 100%);
	color: #fff !important;
	font-weight: 800;
	font-size: 1rem;
	padding: 14px 26px;
	border-radius: 999px;
	text-decoration: none;
	box-shadow: 0 8px 20px rgba(46, 107, 255, 0.32);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	border: none;
	width: 100%;
}

@media (min-width: 640px) {
	.download-btn-single.btn {
		width: auto;
	}
}

.download-btn-single.btn.btn-block {
	width: 100%;
}

.download-btn-single.btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 26px rgba(46, 107, 255, 0.4);
	color: #fff;
}

.download-btn-single .dl-btn-size {
	opacity: 0.85;
	font-weight: 600;
	margin-left: 4px;
}

/* Quick info chips grid — replaces the old bootstrap-column layout */
.app-info-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
}

@media (min-width: 576px) {
	.app-info-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (min-width: 992px) {
	.app-info-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

.app-info-box {
	background: var(--stc-bg-soft);
	border-radius: var(--stc-radius-sm);
	padding: 12px 14px;
}

.app-info-box label {
	display: block;
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--stc-ink-soft);
	font-weight: 700;
	margin-bottom: 4px;
}

.app-info-box a {
	color: var(--stc-primary);
	text-decoration: none;
	font-weight: 600;
	word-break: break-word;
}

/* Screenshots — horizontal scroll-snap gallery, no JS/library needed */
.app-screenshots {
	margin: 26px 0;
}

.screenshots-title {
	font-size: 1.1rem;
	font-weight: 800;
	margin: 0 0 12px;
}

.app-screenshots-track {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding-bottom: 6px;
	-webkit-overflow-scrolling: touch;
}

.app-screenshots-track .screenshot {
	flex: 0 0 auto;
	scroll-snap-align: start;
	border-radius: var(--stc-radius);
	overflow: hidden;
	box-shadow: var(--stc-shadow-sm);
	width: 150px;
}

.app-screenshots-track .screenshot img {
	width: 100%;
	height: auto;
	display: block;
}

/* Entry content typography */
.single-app-page .entry-content {
	background: var(--stc-white);
	border: 1px solid var(--stc-border);
	border-radius: var(--stc-radius-lg);
	padding: 24px;
	margin-top: 20px;
	line-height: 1.75;
}

.single-app-page .entry-content h2 {
	font-size: 1.3rem;
	font-weight: 800;
}

.single-app-page .entry-content h2:first-child {
	margin-top: 0;
}

/*--------------------------------------------------------------
# Table of Contents (native <details>/<summary>, no JS)
--------------------------------------------------------------*/
.stcustom-toc {
	background: var(--stc-bg-soft);
	border: 1px solid var(--stc-border);
	border-radius: var(--stc-radius);
	padding: 4px 18px;
	margin: 0 0 24px;
}

.stcustom-toc-summary {
	cursor: pointer;
	list-style: none;
	font-weight: 800;
	padding: 14px 0;
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--stc-ink);
	user-select: none;
}

.stcustom-toc-summary::-webkit-details-marker {
	display: none;
}

.stcustom-toc-summary::after {
	content: '\f107';
	font-family: 'Font Awesome 5 Free';
	font-weight: 900;
	margin-left: auto;
	transition: transform 0.2s ease;
	color: var(--stc-ink-soft);
}

.stcustom-toc[open] .stcustom-toc-summary::after {
	transform: rotate(180deg);
}

.stcustom-toc-list {
	list-style: none;
	margin: 0 0 14px;
	padding: 0 0 0 6px;
}

.stcustom-toc-sublist {
	padding-left: 18px;
	margin-top: 6px;
}

.stcustom-toc-item {
	padding: 6px 0;
	border-top: 1px dashed var(--stc-border);
}

.stcustom-toc-item:first-child {
	border-top: none;
}

.stcustom-toc-item a {
	color: var(--stc-primary-dark);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.92rem;
}

.stcustom-toc-item a:hover {
	text-decoration: underline;
}

/*--------------------------------------------------------------
# Download page
--------------------------------------------------------------*/
.dl-page-wrap {
	max-width: 640px;
	margin-left: auto;
	margin-right: auto;
	float: none;
}

.download-main {
	width: 100%;
	float: none;
}

.dl-card {
	background: var(--stc-white);
	border: 1px solid var(--stc-border);
	border-radius: var(--stc-radius-lg);
	padding: 28px 24px;
	text-align: center;
}

.dl-card-head {
	display: flex;
	align-items: center;
	gap: 16px;
	text-align: left;
	margin-bottom: 22px;
}

.dl-app-icon {
	border-radius: 20px;
	box-shadow: var(--stc-shadow);
	flex: 0 0 auto;
}

.dl-eyebrow {
	display: block;
	font-size: 0.76rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--stc-ink-soft);
	margin-bottom: 4px;
}

.dl-page-heading {
	font-size: 1.25rem;
	font-weight: 800;
	margin: 0 0 8px;
	word-break: break-word;
}

.dl-version {
	color: var(--stc-primary);
	font-weight: 700;
	font-size: 0.95rem;
}

.dl-meta-chip {
	display: inline-flex;
	align-items: center;
	background: var(--stc-bg-soft);
	border-radius: 999px;
	padding: 4px 12px;
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--stc-ink-soft);
}

.dl-progress-wrap {
	margin: 10px 0 24px;
}

.dl-progress-ring {
	position: relative;
	width: 120px;
	height: 120px;
	margin: 0 auto 14px;
}

.dl-progress-ring svg {
	transform: rotate(-90deg);
}

.dl-ring-bg {
	fill: none;
	stroke: var(--stc-border);
	stroke-width: 8;
}

.dl-ring-fg {
	fill: none;
	stroke: var(--stc-primary);
	stroke-width: 8;
	stroke-linecap: round;
	transition: stroke-dashoffset 1s linear;
}

.dl-progress-number {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 1.6rem;
	font-weight: 900;
	color: var(--stc-ink);
}

.dl-progress-label {
	color: var(--stc-ink-soft);
	font-size: 0.92rem;
	margin: 0;
}

.dl-actions {
	margin: 20px 0;
}

.dl-security-note {
	margin: 12px 0 0;
	font-size: 0.82rem;
	color: var(--stc-accent);
	font-weight: 600;
}

.dl-mirrors {
	border-top: 1px solid var(--stc-border);
	padding-top: 18px;
	margin-top: 6px;
}

.dl-mirrors-title {
	font-size: 0.95rem;
	font-weight: 800;
	margin: 0 0 12px;
}

.dl-mirror-link {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	background: var(--stc-bg-soft);
	color: var(--stc-ink) !important;
	font-weight: 700;
	padding: 12px;
	border-radius: var(--stc-radius-sm);
	text-decoration: none;
	margin-bottom: 10px;
}

.dl-mirror-link:hover {
	background: var(--stc-primary-light);
	color: var(--stc-primary-dark) !important;
}

.dl-back-link {
	margin: 18px 0 0;
}

.dl-back-link a {
	color: var(--stc-ink-soft);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.88rem;
}

.dl-back-link a:hover {
	color: var(--stc-primary);
}

/*--------------------------------------------------------------
# Responsive
--------------------------------------------------------------*/
@media (max-width: 991px) {
	.app-card-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 767px) {
	.app-card-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 14px;
	}

	.home-hero {
		padding: 40px 16px 46px;
	}

	.home-hero-title {
		font-size: 1.7rem;
	}

	.home-hero-title span {
		font-size: 1.1rem;
	}

	.single-app-header, .single-app-page .entry-content, .dl-card {
		padding: 18px;
		border-radius: var(--stc-radius);
	}

	.app-icon-single {
		flex: 0 0 72px;
		width: 72px;
		height: 72px;
		border-radius: 18px;
	}

	.app-title-single h1 {
		font-size: 1.3rem;
	}
}

@media (max-width: 420px) {
	.app-card-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}

	.dl-card-head {
		flex-direction: column;
		text-align: center;
	}

	.dl-card-head-text {
		text-align: center;
	}
}
