/* ============================================================
   FlutterDragon Mobile Apps Page
   Matches the FlutterDragon site (light, clean, Astra-based
   ============================================================ */

:root {
	--fd-text:       #1f2937;
	--fd-text-dim:   #4b5563;
	--fd-text-muted: #6b7280;
	--fd-bg:         #ffffff;
	--fd-bg-soft:    #f7f8fa;
	--fd-border:     #e5e7eb;
	--fd-accent:     #2563eb;        /* Astra blue */
	--fd-accent-dk:  #1d4ed8;
	--fd-radius:     14px;
	--fd-shadow:     0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
	--fd-shadow-hover: 0 10px 30px rgba(16, 24, 40, 0.10), 0 4px 12px rgba(16, 24, 40, 0.06);
}

.fd-apps-wrap {
	color: var(--fd-text);
	font-family: inherit;             /* inherit Astra's font */
	background: var(--fd-bg);
	padding: 48px 24px 80px;
}

.fd-apps-wrap * { box-sizing: border-box; }

.fd-apps-inner {
	max-width: 1100px;
	margin: 0 auto;
}

.fd-page-intro {
	max-width: 720px;
	margin: -16px auto 36px;
	color: var(--fd-text-dim);
	font-size: 16px;
	line-height: 1.7;
}

.fd-page-intro p { margin: 0 0 12px; }
.fd-page-intro a { color: var(--fd-accent); }

/* ---------- Hero ---------- */
.fd-hero {
	text-align: center;
	margin-bottom: 40px;
}

.fd-eyebrow {
	display: inline-block;
	padding: 5px 12px;
	border-radius: 999px;
	background: var(--fd-bg-soft);
	border: 1px solid var(--fd-border);
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--fd-text-muted);
	margin-bottom: 14px;
}

.fd-hero h1 {
	margin: 0 0 12px;
	font-size: clamp(30px, 4vw, 44px);
	line-height: 1.2;
	font-weight: 700;
	color: var(--fd-text);
}

.fd-hero p {
	font-size: 17px;
	color: var(--fd-text-dim);
	max-width: 640px;
	margin: 0 auto;
	line-height: 1.6;
}

/* ---------- Filter bar ---------- */
.fd-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin: 28px 0 36px;
}

.fd-filter button {
	background: #fff;
	color: var(--fd-text-dim);
	border: 1px solid var(--fd-border);
	padding: 8px 16px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	font-family: inherit;
}

.fd-filter button:hover {
	color: var(--fd-accent);
	border-color: var(--fd-accent);
}

.fd-filter button.active {
	background: var(--fd-accent);
	color: #fff;
	border-color: var(--fd-accent);
}

/* ---------- Grid ---------- */
.fd-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 22px;
}

/* ---------- Card ---------- */
.fd-card {
	position: relative;
	background: #fff;
	border: 1px solid var(--fd-border);
	border-radius: var(--fd-radius);
	box-shadow: var(--fd-shadow);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.fd-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--fd-shadow-hover);
	border-color: #d1d5db;
}

.fd-card-head {
	display: flex;
	gap: 14px;
	padding: 22px 22px 14px;
	align-items: center;
}

.fd-icon {
	width: 60px;
	height: 60px;
	border-radius: 14px;
	background: var(--fd-bg-soft);
	border: 1px solid var(--fd-border);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	flex-shrink: 0;
}

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

.fd-icon-fallback {
	font-size: 22px;
	font-weight: 700;
	color: #fff;
	background: var(--fd-accent);
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.fd-title-wrap { min-width: 0; flex: 1; }

.fd-card h2 {
	margin: 0 0 4px;
	font-size: 19px;
	font-weight: 700;
	color: var(--fd-text);
	line-height: 1.3;
}

.fd-card h2 a {
	color: inherit;
	text-decoration: none;
}

.fd-card h2 a:hover { color: var(--fd-accent); }

.fd-cat {
	display: inline-block;
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--fd-text-muted);
	background: var(--fd-bg-soft);
	border: 1px solid var(--fd-border);
	padding: 2px 8px;
	border-radius: 6px;
}

.fd-desc {
	padding: 0 22px 14px;
	color: var(--fd-text-dim);
	font-size: 14.5px;
	line-height: 1.6;
	flex-grow: 1;
}

/* Features pills */
.fd-features {
	padding: 0 22px 16px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
}

.fd-features li {
	list-style: none;
	font-size: 12px;
	color: var(--fd-text-dim);
	background: var(--fd-bg-soft);
	border: 1px solid var(--fd-border);
	padding: 3px 10px;
	border-radius: 999px;
}

/* Screenshots strip */
.fd-shots {
	display: flex;
	gap: 8px;
	padding: 4px 22px 16px;
	overflow-x: auto;
	scrollbar-width: thin;
}

.fd-shots::-webkit-scrollbar { height: 5px; }
.fd-shots::-webkit-scrollbar-thumb { background: var(--fd-border); border-radius: 6px; }

.fd-shots img {
	width: 64px;
	height: 120px;
	object-fit: cover;
	border-radius: 8px;
	border: 1px solid var(--fd-border);
	cursor: pointer;
	flex-shrink: 0;
	transition: transform 0.2s ease;
}

.fd-shots img:hover { transform: scale(1.04); }

/* Card footer */
.fd-card-foot {
	padding: 14px 22px;
	display: flex;
	gap: 10px;
	border-top: 1px solid var(--fd-border);
	background: var(--fd-bg-soft);
}

.fd-btn {
	flex: 1;
	text-align: center;
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
	padding: 10px 12px;
	border-radius: 10px;
	transition: all 0.2s ease;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-family: inherit;
}

.fd-btn-primary {
	background: var(--fd-accent);
	color: #fff;
}

.fd-btn-primary:hover {
	background: var(--fd-accent-dk);
	color: #fff;
}

.fd-btn-ghost {
	background: #fff;
	color: var(--fd-text);
	border: 1px solid var(--fd-border);
}

.fd-btn-ghost:hover {
	border-color: var(--fd-accent);
	color: var(--fd-accent);
}

.fd-btn-disabled {
	opacity: 0.4;
	pointer-events: none;
}

.fd-view-link {
	display: block;
	text-align: center;
	padding: 10px 22px 16px;
	color: var(--fd-accent);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}

.fd-view-link:hover { text-decoration: underline; }

/* Empty state */
.fd-empty {
	text-align: center;
	padding: 50px 20px;
	color: var(--fd-text-muted);
	background: var(--fd-bg-soft);
	border: 1px dashed var(--fd-border);
	border-radius: var(--fd-radius);
}

/* ---------- Lightbox ---------- */
.fd-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.85);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	padding: 30px;
	cursor: zoom-out;
}

.fd-lightbox.open { display: flex; }

.fd-lightbox img {
	max-width: 90vw;
	max-height: 88vh;
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
	cursor: default;
	background: #fff;
}

.fd-lightbox-close {
	position: absolute;
	top: 20px;
	right: 24px;
	color: #fff;
	font-size: 32px;
	cursor: pointer;
	background: rgba(255,255,255,0.15);
	border: none;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.fd-lightbox-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	color: #fff;
	font-size: 28px;
	background: rgba(255,255,255,0.15);
	border: none;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.fd-lightbox-prev { left: 20px; }
.fd-lightbox-next { right: 20px; }

/* ============================================================
   SINGLE APP PAGE
   ============================================================ */

.fd-single-wrap { padding-top: 24px; }

.fd-back-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--fd-text-dim);
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	margin-bottom: 24px;
	padding: 8px 14px;
	border-radius: 999px;
	background: var(--fd-bg-soft);
	border: 1px solid var(--fd-border);
	transition: all 0.2s ease;
}

.fd-back-link:hover {
	color: var(--fd-accent);
	border-color: var(--fd-accent);
}

.fd-single-head {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 28px;
	align-items: center;
	padding: 32px;
	background: var(--fd-bg-soft);
	border: 1px solid var(--fd-border);
	border-radius: 18px;
	margin-bottom: 36px;
}

.fd-single-icon {
	width: 130px;
	height: 130px;
	border-radius: 26px;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--fd-border);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: var(--fd-shadow);
}

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

.fd-single-meta h1 {
	margin: 8px 0 10px;
	font-size: clamp(26px, 4vw, 38px);
	font-weight: 700;
	color: var(--fd-text);
	line-height: 1.15;
}

.fd-single-tagline {
	color: var(--fd-text-dim);
	font-size: 16px;
	line-height: 1.55;
	margin: 0 0 18px;
	max-width: 580px;
}

.fd-single-cta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.fd-section { margin-bottom: 40px; }

.fd-section-title {
	font-size: 22px;
	font-weight: 700;
	color: var(--fd-text);
	margin: 0 0 18px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--fd-border);
}

.fd-single-shots {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}

.fd-single-shots img {
	width: 170px;
	height: 300px;
	object-fit: cover;
	border-radius: 12px;
	border: 1px solid var(--fd-border);
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	background: #fff;
}

.fd-single-shots img:hover {
	transform: scale(1.03);
	box-shadow: var(--fd-shadow-hover);
}

.fd-single-features {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 10px;
}

.fd-single-features li {
	padding: 12px 16px;
	background: #fff;
	border: 1px solid var(--fd-border);
	border-radius: 10px;
	color: var(--fd-text-dim);
	font-size: 14.5px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.fd-single-features li::before {
	content: "✓";
	color: var(--fd-accent);
	font-weight: 800;
}

.fd-single-about .fd-prose {
	color: var(--fd-text-dim);
	font-size: 16px;
	line-height: 1.7;
}

.fd-related-grid { margin-top: 8px; }

/* ---------- Listing card (whole card clickable, matches single-page look) ---------- */
.fd-card-listing {
	position: relative;
	cursor: pointer;
}

.fd-card-listing .fd-card-link {
	position: absolute;
	inset: 0;
	z-index: 1;
}

.fd-card-listing .fd-card-foot {
	pointer-events: none;
}

.fd-card-listing:hover {
	border-color: var(--fd-accent);
}

.fd-card-listing:hover .fd-card-foot .fd-btn {
	background: var(--fd-accent-dk);
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
	.fd-apps-wrap { padding: 32px 16px 56px; }
	.fd-grid { grid-template-columns: 1fr; gap: 18px; }
	.fd-card-foot { flex-direction: column; }
	.fd-btn { width: 100%; }
	.fd-single-head {
		grid-template-columns: 1fr;
		text-align: center;
		padding: 24px;
	}
	.fd-single-icon { margin: 0 auto; width: 110px; height: 110px; }
	.fd-single-cta { justify-content: center; }
	.fd-single-features { grid-template-columns: 1fr; }
	.fd-single-shots img { width: 130px; height: 230px; }
}