/*
Theme Name: APKHeart Lite
Theme URI: https://apkheart.com
Author: APKHeart
Author URI: https://apkheart.com
Description: Lightweight custom theme for APK download websites.
Version: 1.4.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: apkheart-lite
*/

:root {
	--apkheart-primary: #2563eb;
	--apkheart-primary-dark: #1d4ed8;
	--apkheart-soft: #eff6ff;
	--bg: #f5f7fb;
	--card: #ffffff;
	--text: #0f172a;
	--muted: #64748b;
	--border: #dce3ee;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	background: #f5f7fb;
	color: var(--text);
}

.container {
	width: min(1180px, 100% - 32px);
	margin: 0 auto;
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 90;
	background: rgba(255, 255, 255, 0.95);
	border-bottom: 1px solid #e2e8f0;
	backdrop-filter: blur(8px);
}

.header-inner {
	display: grid;
	grid-template-columns: 170px 1fr 250px;
	gap: 16px;
	align-items: center;
	padding: 13px 0;
}

.brand a {
	color: #0f172a;
	text-decoration: none;
	font-weight: 800;
	font-size: 1.35rem;
	letter-spacing: -0.02em;
}

.main-nav ul {
	list-style: none;
	display: flex;
	gap: 20px;
	margin: 0;
	padding: 0;
	align-items: center;
}

.main-nav a {
	color: #1e293b;
	text-decoration: none;
	font-weight: 700;
	font-size: 0.95rem;
}

.main-nav a:hover {
	color: var(--apkheart-primary);
}

.header-search input[type="search"] {
	width: 100%;
	padding: 10px 14px;
	border-radius: 999px;
	border: 1px solid #dbe3ee;
	background: #fff;
	color: #0f172a;
}

.header-search .search-submit {
	display: none;
}

.home-main {
	padding: 22px 0 40px;
}

.home-static-intro {
	margin-bottom: 6px;
}

.home-static-body > *:first-child {
	margin-top: 0;
}

.home-static-body h1:first-child,
.home-static-body h2:first-child {
	margin-top: 0;
}

/* Profile Villa–inspired home sections */
.home-pv .pv-hero-strip {
	padding: 12px 0 8px;
}

.premium-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr);
	gap: 16px;
	align-items: stretch;
}

.premium-hero-main {
	padding: 28px 26px;
	border-radius: 20px;
	background: linear-gradient(135deg, #0f172a 0%, #1e293b 40%, #334155 100%);
	color: #fff;
	position: relative;
	overflow: hidden;
}

.premium-hero-main::after {
	content: "";
	position: absolute;
	inset: auto -120px -120px auto;
	width: 260px;
	height: 260px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.1);
}

.pv-hero-title {
	margin: 0 0 10px;
	font-size: clamp(1.7rem, 3vw, 2.3rem);
	font-weight: 800;
	color: #ffffff;
	letter-spacing: -0.02em;
}

.pv-hero-sub {
	margin: 0;
	max-width: 700px;
	color: rgba(255, 255, 255, 0.86);
	font-size: 1.01rem;
	line-height: 1.65;
}

.trust-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
	margin-top: 14px;
}

.trust-pill {
	display: inline-flex;
	align-items: center;
	padding: 7px 12px;
	background: rgba(255, 255, 255, 0.14);
	border: 1px solid rgba(255, 255, 255, 0.24);
	border-radius: 999px;
	font-size: 0.8rem;
	font-weight: 700;
	color: #eff6ff;
}

.premium-hero-side {
	border-radius: 20px;
	border-color: #dbe3ee;
	background: #ffffff;
}

.premium-hero-side h3 {
	margin: 0 0 14px;
	font-size: 1rem;
	color: #0f172a;
}

.hero-stats {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin-bottom: 12px;
}

.hero-stat {
	padding: 10px 12px;
	border-radius: 12px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
}

.hero-stat strong {
	display: block;
	font-size: 1.15rem;
	color: #0f172a;
}

.hero-stat span {
	font-size: 0.8rem;
	color: #64748b;
}

.hero-note {
	margin: 0;
	font-size: 0.9rem;
	color: #475569;
	line-height: 1.6;
}

.pv-section-head h2 {
	margin: 0;
	font-size: 1.35rem;
	font-weight: 800;
	color: #0f172a;
}

.pv-browse-grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 12px;
}

.pv-browse-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 16px 10px;
	background: #fff;
	border: 1px solid var(--border);
	border-radius: 14px;
	text-decoration: none;
	color: #1f2937;
	font-weight: 700;
	font-size: 0.88rem;
	box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
	transition: border-color 0.15s, box-shadow 0.15s;
}

.pv-browse-card:hover {
	border-color: #c8ead6;
	box-shadow: 0 8px 22px rgba(26, 159, 83, 0.12);
	color: var(--apkheart-primary-dark);
}

.pv-browse-icon {
	font-size: 1.45rem;
	line-height: 1;
}

.pv-empty,
.pv-empty-grid {
	grid-column: 1 / -1;
	color: var(--muted);
	font-size: 0.95rem;
	margin: 0;
	padding: 8px 0;
}

code.apk-mono {
	font-size: 0.78rem;
	word-break: break-all;
	background: #f3f4f6;
	padding: 2px 6px;
	border-radius: 4px;
}

@media (max-width: 1100px) {
	.pv-browse-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.pv-browse-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.top-categories {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 14px;
}

.top-categories a {
	text-decoration: none;
	color: #14532d;
	background: var(--apkheart-soft);
	border: 1px solid #c8ead6;
	padding: 8px 12px;
	border-radius: 999px;
	font-weight: 700;
	font-size: 0.82rem;
}

.top-categories a:first-child {
	background: linear-gradient(135deg, #2563eb, #1d4ed8);
	color: #fff;
	border-color: #1d4ed8;
}

.hero-layout {
	display: grid;
	grid-template-columns: 1.65fr 1fr;
	gap: 16px;
}

.card {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

.thumb img,
.single-thumb img {
	width: 100%;
	height: auto;
	display: block;
}

.hero-feature .thumb img {
	aspect-ratio: 16 / 8;
	object-fit: cover;
}

.card-body {
	padding: 14px 16px;
}

.badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 0.74rem;
	font-weight: 700;
	color: #fff;
	background: var(--apkheart-primary);
}

.hero-feature h1,
.hero-feature h1 a {
	margin: 12px 0 10px;
	font-size: 1.8rem;
	line-height: 1.2;
}

h1 a,
h2 a,
h3 a {
	color: inherit;
	text-decoration: none;
}

h1 a:hover,
h2 a:hover,
h3 a:hover {
	color: var(--apkheart-primary);
}

p {
	color: var(--muted);
	line-height: 1.6;
}

.btn {
	display: inline-block;
	padding: 10px 14px;
	border-radius: 10px;
	font-weight: 700;
	font-size: 0.9rem;
	text-decoration: none;
	background: var(--apkheart-primary);
	color: #fff;
}

.btn:hover {
	background: var(--apkheart-primary-dark);
}

.btn-soft {
	background: #edf9f2;
	color: #0f6c37;
}

.btn-small {
	padding: 7px 11px;
	font-size: 0.8rem;
	border-radius: 8px;
}

.app-meta-row {
	display: flex;
	align-items: center;
	gap: 10px;
}

.meta-text {
	color: var(--muted);
	font-size: 0.8rem;
}

.hero-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.quick-list {
	padding-bottom: 4px;
}

.quick-head {
	padding: 12px 14px 6px;
	border-bottom: 1px solid var(--border);
	background: #fff;
}

.quick-head h2 {
	font-size: 1.05rem;
	margin: 0;
}

.top-app-row {
	display: grid;
	grid-template-columns: 24px 52px 1fr;
	gap: 10px;
	padding: 11px 12px;
	border-top: 1px solid var(--border);
}

.rank {
	font-weight: 800;
	color: #4b5563;
	font-size: 0.9rem;
	align-self: center;
}

.mini-thumb img {
	width: 52px;
	height: 52px;
	object-fit: cover;
	border-radius: 12px;
}

.mini-placeholder,
.icon-placeholder,
.thumb-placeholder {
	background: #e5e7eb;
}

.mini-placeholder {
	width: 52px;
	height: 52px;
	border-radius: 12px;
}

.icon-placeholder {
	width: 72px;
	height: 72px;
	border-radius: 18px;
}

.thumb-placeholder {
	width: 100%;
	height: 260px;
}

.top-app-content h3 {
	margin: 0 0 4px;
	font-size: 0.92rem;
	line-height: 1.3;
}

.section {
	padding-top: 24px;
}

.section-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
}

.section-head h2 {
	margin: 0;
	font-size: 1.45rem;
	letter-spacing: -0.01em;
	font-weight: 800;
}

.section-head a {
	color: var(--apkheart-primary);
	font-weight: 700;
	text-decoration: none;
}

.post-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.app-card {
	display: grid;
	grid-template-columns: 72px 1fr;
	align-items: center;
	padding: 12px;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.app-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.app-card .thumb img {
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: 18px;
}

.app-card .card-body {
	padding: 0 0 0 12px;
}

.app-card h2,
.app-card h3 {
	margin: 0 0 6px;
	font-size: 1.02rem;
	line-height: 1.4;
}

.app-card p {
	margin: 0;
	font-size: 0.9rem;
}

.app-chips {
	margin-top: 8px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.app-chips span {
	display: inline-block;
	background: #f3f4f6;
	border: 1px solid var(--border);
	border-radius: 999px;
	font-size: 0.74rem;
	padding: 3px 8px;
	color: #374151;
}

.app-card-foot {
	margin-top: 8px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.collections-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
}

.collection-card {
	text-decoration: none;
	padding: 18px;
	color: #111827;
	background: linear-gradient(120deg, #ffffff 0%, #f0fdf4 100%);
	border: 1px solid #dcf2e5;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.collection-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 24px rgba(37, 99, 235, 0.15);
}

.collection-card h3 {
	margin: 0 0 8px;
	font-size: 1.05rem;
}

.collection-card p {
	margin: 0;
}

.updates-list {
	padding: 4px 12px;
}

.update-row {
	padding: 10px 0;
	display: grid;
	grid-template-columns: 52px 1fr auto;
	gap: 10px;
	align-items: center;
	border-bottom: 1px solid var(--border);
}

.update-row:last-child {
	border-bottom: 0;
}

.update-content h3 {
	margin: 0 0 4px;
	font-size: 0.97rem;
}

.single-layout {
	max-width: 1180px;
}

.single-card h1 {
	margin: 12px 0 0;
	line-height: 1.2;
}

.single-premium-grid {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
	gap: 16px;
}

.single-side {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.side-download-box h3 {
	margin: 0 0 8px;
}

.full-btn {
	width: 100%;
	text-align: center;
}

.app-info-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 8px;
}

.app-info-list li {
	font-size: 0.92rem;
	color: #374151;
}

.single-meta {
	display: flex;
	gap: 10px;
	align-items: center;
}

.content-area {
	font-size: 1rem;
}

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

.pagination-wrap {
	margin-top: 18px;
}

.site-footer {
	background: #111827;
	color: #d1d5db;
	padding: 20px 0;
}

.footer-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	font-size: 0.92rem;
}

.site-footer a {
	color: #d1d5db;
	text-decoration: none;
}

.subhead {
	margin: 0 0 10px;
	font-size: 1.15rem;
}

.changelog-block {
	border-top: 1px solid var(--border);
}

.changelog-body {
	color: var(--muted);
	font-size: 0.95rem;
	line-height: 1.65;
}

.changelog-body p {
	margin-top: 0;
}

.app-about-block,
.app-features-block {
	border-top: 1px solid var(--border);
}

.about-body,
.features-body {
	color: #374151;
	font-size: 0.95rem;
	line-height: 1.65;
}

.about-lead {
	margin-bottom: 1rem;
	padding: 12px 14px;
	background: var(--apkheart-soft);
	border-radius: 10px;
	border: 1px solid #c8ead6;
	font-size: 0.95rem;
	color: #166534;
}

.apk-screenshots {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 12px;
}

.apk-screenshots .shot-link {
	display: block;
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid var(--border);
	background: #f3f4f6;
}

.apk-screenshots img {
	width: 100%;
	height: auto;
	display: block;
	vertical-align: middle;
}

.play-store-btn {
	margin-top: 10px;
}

.xapk-btn {
	margin-top: 10px;
}

.older-table-wrap {
	overflow-x: auto;
}

.older-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.92rem;
}

.older-table th,
.older-table td {
	padding: 10px 8px;
	border-bottom: 1px solid var(--border);
	text-align: left;
	white-space: nowrap;
}

.older-table th {
	font-size: 0.8rem;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.badge-soft {
	background: var(--apkheart-soft);
	color: #14532d;
}

/* Homepage v4 layout */
.home-v4 .section {
	padding-top: 22px;
}

.v4-hero-layout {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
	gap: 16px;
}

.v4-feature {
	display: grid;
	grid-template-columns: 1.35fr 1fr;
}

.v4-feature-thumb img {
	height: 100%;
	object-fit: cover;
	aspect-ratio: 16 / 10;
}

.v4-feature-body {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.v4-kicker {
	display: inline-block;
	margin-bottom: 8px;
	font-size: 0.76rem;
	font-weight: 800;
	color: #1d4ed8;
	background: #eff6ff;
	border: 1px solid #dbeafe;
	border-radius: 999px;
	padding: 4px 9px;
	width: fit-content;
}

.v4-feature-body h1 {
	margin: 0 0 10px;
	font-size: clamp(1.45rem, 2.2vw, 1.85rem);
	line-height: 1.2;
}

.v4-quick-links {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 14px;
}

.v4-quick-links a {
	text-decoration: none;
	font-weight: 700;
	font-size: 0.84rem;
	padding: 8px 13px;
	border-radius: 10px;
	background: #fff;
	color: #0f172a;
	border: 1px solid #dbe3ee;
}

.v4-quick-links a:hover {
	background: #eff6ff;
	border-color: #c8d9f8;
	color: #1d4ed8;
}

.v4-rank .top-app-row:first-of-type {
	border-top: 0;
}

.v4-updates .updates-list {
	padding: 8px 14px;
}

.v4-update-row {
	grid-template-columns: 48px 1fr auto;
}

.v4-collections-grid {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1100px) {
	.header-inner {
		grid-template-columns: 150px 1fr 220px;
	}
}

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

	.premium-hero {
		grid-template-columns: 1fr;
	}

	.premium-hero-main {
		padding: 22px 18px;
	}

	.hero-layout {
		grid-template-columns: 1fr;
	}

	.v4-hero-layout {
		grid-template-columns: 1fr;
	}

	.v4-feature {
		grid-template-columns: 1fr;
	}

	.v4-collections-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

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

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

	.single-premium-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 640px) {
	.container {
		width: min(1180px, 100% - 20px);
	}

	.main-nav ul {
		flex-wrap: wrap;
		gap: 10px 14px;
	}

	.hero-feature h1,
	.hero-feature h1 a {
		font-size: 1.4rem;
	}

	.update-row {
		grid-template-columns: 52px 1fr;
	}

	.update-row .btn {
		grid-column: 2 / 3;
		justify-self: start;
		margin-top: 6px;
	}

	.footer-inner {
		flex-direction: column;
		align-items: flex-start;
	}

	.v4-collections-grid {
		grid-template-columns: 1fr;
	}
}

/* APK store inspired homepage */
.ap-home {
	padding-top: 18px;
}

.ap-hero {
	display: grid;
	grid-template-columns: 1.2fr 1fr;
	padding: 0;
	overflow: hidden;
	background: linear-gradient(110deg, #dbe8ff 0%, #d2ddff 40%, #f1dcff 100%);
}

.ap-hero-copy {
	padding: 42px 34px;
}

.ap-hero-copy h1 {
	margin: 0 0 10px;
	font-size: clamp(1.7rem, 3vw, 2.7rem);
	line-height: 1.2;
}

.ap-hero-copy p {
	margin: 0 0 18px;
	font-size: 1rem;
	max-width: 520px;
}

.ap-hero-preview {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 18px 12px 0;
}

.ap-phone-frame {
	display: block;
	width: min(290px, 90%);
	border: 8px solid #0f172a;
	border-radius: 32px;
	overflow: hidden;
	box-shadow: 0 18px 40px rgba(15, 23, 42, 0.28);
}

.ap-phone-frame img {
	display: block;
	width: 100%;
	height: auto;
}

.ap-section .section-head h2 {
	font-size: 2rem;
}

.ap-horizontal-grid {
	display: grid;
	grid-template-columns: repeat(8, minmax(0, 1fr));
	gap: 12px;
}

.ap-store-card {
	padding: 10px;
}

.ap-store-thumb img,
.ap-store-thumb .icon-placeholder {
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: 14px;
}

.ap-store-body {
	padding-top: 8px;
}

.ap-store-body h3 {
	margin: 0 0 4px;
	font-size: 0.95rem;
	line-height: 1.3;
	min-height: 2.4em;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ap-store-body .meta-text {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ap-rating {
	margin-top: 4px;
	font-size: 0.8rem;
	color: #f59e0b;
	font-weight: 700;
}

.ap-mini-cats {
	margin-top: 14px;
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 10px;
}

.ap-mini-col {
	background: #fff;
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 10px 10px;
}

.ap-mini-col strong {
	display: block;
	font-size: 0.88rem;
	margin-bottom: 4px;
}

.ap-mini-col span {
	font-size: 0.76rem;
	color: var(--muted);
}

.ap-updates-list {
	padding: 8px 14px;
}

@media (max-width: 1100px) {
	.ap-horizontal-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
	.ap-mini-cats {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 900px) {
	.ap-hero {
		grid-template-columns: 1fr;
	}
	.ap-hero-copy {
		padding: 26px 18px;
	}
	.ap-section .section-head h2 {
		font-size: 1.55rem;
	}
}

@media (max-width: 640px) {
	.ap-horizontal-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.ap-mini-cats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

