/*
 * Front Page Styles — Tamoza UI Standard
 *
 * Tamoza UI Standard - Verified: 8pt Logic, Premium Glassmorphism, Centered Layout, Indigo Brand DNA, SF Pro & Cairo Typography.
 *
 * Uses fp- prefix for component classes.
 * Inherits CSS custom properties from style.css :root.
 * Loaded only on the front page via conditional enqueue.
 *
 * @package Tamoza
 * @since 1.2.0
 */

/* ============================================
   RESET — Override theme container/sidebar
   ============================================ */
body.tamoza-front-page-body .tamoza-site-content,
body.tamoza-front-page-body .tamoza-container {
	display: block;
	max-width: 100%;
	padding: 0;
	margin: 0;
}

body.tamoza-front-page-body .tamoza-layout {
	display: block;
}

body.tamoza-front-page-body .tamoza-sidebar {
	display: none;
}

body.tamoza-front-page-body .tamoza-main {
	flex: none;
	max-width: 100%;
	width: 100%;
	padding: 0;
}

/* ============================================
   FRONT PAGE WRAPPER
   ============================================ */
.tamoza-front-page {
	width: 100%;
	overflow: hidden;
}

/* ============================================
   HERO SECTION
   ============================================ */
.fp-hero {
	position: relative;
	min-height: 90vh;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 96px 24px 80px;
	background: var(--bg-dark, #121212);
	overflow: hidden;
}

/* Hero content */
.fp-hero-content {
	position: relative;
	z-index: 1;
	max-width: 720px;
}

/* H1 — 56px desktop, 36px mobile, weight 600, letter-spacing -0.02em */
.fp-hero-title {
	font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
	font-size: clamp(36px, 6vw, 56px);
	font-weight: 600;
	color: #ffffff;
	line-height: 1.5;
	margin: 0 0 24px 0;
	letter-spacing: -0.02em;
}

.fp-hero-desc {
	font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
	font-size: 16px;
	color: rgba(255, 255, 255, 0.5);
	line-height: 1.5;
	margin: 0 0 40px 0;
	max-width: 560px;
	margin-left: auto;
	margin-right: auto;
}

.fp-hero-actions {
	display: flex;
	gap: 16px;
	justify-content: center;
	flex-wrap: wrap;
	margin-bottom: 64px;
}

/* Stats row */
.fp-hero-stats {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 32px;
}

.fp-stat {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}

.fp-stat-number {
	font-size: 32px;
	font-weight: 600;
	color: #ffffff;
	line-height: 1;
}

.fp-stat-label {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.35);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 500;
}

.fp-stat-divider {
	width: 1px;
	height: 40px;
	background: rgba(255, 255, 255, 0.10);
}

/* ============================================
   BUTTONS — Brand DNA Implementation
   ============================================ */

/* Primary CTA — Indigo→Cyan gradient, 16px radius, Accent Glow */
.fp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 16px 32px;
	border-radius: 16px;
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
	transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
	cursor: pointer;
	border: none;
	line-height: 1.5;
}

.fp-btn-primary {
	background: linear-gradient(135deg, #6366F1, #22D3EE);
	color: #FFFFFF;
	box-shadow: 0 4px 14px rgba(34, 211, 238, 0.25);
}

.fp-btn-primary:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(34, 211, 238, 0.35);
	color: #FFFFFF;
}

/* Secondary — transparent with Indigo border + subtle glow */
.fp-btn-ghost {
	background: transparent;
	color: #22D3EE;
	border: 1px solid rgba(34, 211, 238, 0.3);
	position: relative;
}
.fp-btn-ghost::before {
	content: '';
	position: absolute;
	inset: -4px;
	border-radius: inherit;
	background: radial-gradient(ellipse at center, rgba(34, 211, 238, 0.12), transparent 70%);
	pointer-events: none;
	z-index: -1;
	filter: blur(8px);
}

.fp-btn-ghost:hover {
	background: rgba(255, 255, 255, 0.05);
	border-color: rgba(34, 211, 238, 0.5);
	color: #FFFFFF;
	transform: translateY(-4px);
}

/* ============================================
   SECTION COMMON
   ============================================ */
.fp-section-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
}

/* H2 — 32px, weight 600, centered, letter-spacing -0.02em */
.fp-section-title {
	font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
	font-size: 32px;
	font-weight: 600;
	color: #ffffff;
	text-align: center;
	margin: 0 0 16px 0;
	letter-spacing: -0.02em;
	line-height: 1.5;
}

.fp-text-left {
	text-align: left;
}

/* ============================================
   CATEGORY SECTION
   ============================================ */
.fp-categories {
	position: relative;
	padding: 80px 0;
	background: var(--bg-dark, #121212);
}

/* Tabs — Glass material */
.fp-cat-tabs {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-bottom: 48px;
	flex-wrap: wrap;
}

.fp-cat-tab {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 16px 24px;
	background: var(--glass-bg, rgba(255, 255, 255, 0.05));
	border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.10));
	border-radius: 16px;
	color: rgba(255, 255, 255, 0.5);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
	font-family: inherit;
	backdrop-filter: var(--glass-blur, blur(12px));
	-webkit-backdrop-filter: var(--glass-blur, blur(12px));
}

.fp-cat-tab:hover {
	background: var(--glass-bg-hover, rgba(255, 255, 255, 0.08));
	color: rgba(255, 255, 255, 0.8);
	border-color: var(--glass-border-hover, rgba(255, 255, 255, 0.18));
}

.fp-cat-tab.active {
	background: rgba(99, 102, 241, 0.08);
	border-color: rgba(99, 102, 241, 0.25);
	color: #22D3EE;
	box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25);
}

.fp-cat-tab svg {
	opacity: 0.7;
}

.fp-cat-tab.active svg {
	opacity: 1;
}

/* Panel */
.fp-cat-panel {
	display: none;
}

.fp-cat-panel.active {
	display: block;
	animation: fp-fade-in 250ms ease;
}

@keyframes fp-fade-in {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: translateY(0); }
}

/* Category header */
.fp-cat-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
}

/* H2 — 24px for category title */
.fp-cat-title {
	font-size: 24px;
	font-weight: 600;
	color: #ffffff;
	margin: 0;
	letter-spacing: -0.02em;
}

/* View All link — Cyan accent */
.fp-cat-link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: #22D3EE;
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.fp-cat-link:hover {
	color: #FFFFFF;
	gap: 8px;
}

.fp-cat-desc {
	color: rgba(255, 255, 255, 0.4);
	font-size: 14px;
	margin: 0 0 32px 0;
	line-height: 1.5;
}

.fp-cat-empty {
	text-align: center;
	padding: 48px 24px;
	color: rgba(255, 255, 255, 0.3);
	font-size: 16px;
	background: var(--glass-bg, rgba(255, 255, 255, 0.05));
	border-radius: 16px;
	border: 1px dashed var(--glass-border, rgba(255, 255, 255, 0.10));
}

/* ============================================
   POSTS GRID
   ============================================ */
.fp-posts-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 24px;
}

/* ============================================
   POST CARD — Tamoza Card Blueprint
   Vertical Stack, centered content, Soft Shadow
   ============================================ */
.fp-post-card {
	display: flex;
	flex-direction: column;
	background: var(--glass-bg, rgba(255, 255, 255, 0.05));
	border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.10));
	border-radius: 16px;
	overflow: hidden;
	text-decoration: none;
	transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
	backdrop-filter: var(--glass-blur, blur(12px));
	-webkit-backdrop-filter: var(--glass-blur, blur(12px));
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.fp-post-card:hover {
	transform: translateY(-4px);
	border-color: var(--glass-border-hover, rgba(99, 102, 241, 0.25));
	background: var(--glass-bg-hover, rgba(255, 255, 255, 0.08));
	box-shadow: var(--shadow-glow-hover, 0 4px 14px rgba(99, 102, 241, 0.25));
}

.fp-post-thumb {
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: rgba(0, 0, 0, 0.3);
	display: flex;
	align-items: center;
	justify-content: center;
}

.fp-post-thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
	display: block;
	transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.fp-post-card:hover .fp-post-thumb img {
	transform: scale(1.03);
}

.fp-post-body {
	padding: 16px 24px 24px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
}

.fp-post-title {
	font-size: 16px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.88);
	line-height: 1.5;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.fp-post-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.3);
}

/* ============================================
   SCROLL ANIMATION CLASSES
   ============================================ */
.fp-animate {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1),
	            transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.fp-animate.fp-visible {
	opacity: 1;
	transform: translateY(0);
}

.fp-post-card.fp-animate:nth-child(1) { transition-delay: 0ms; }
.fp-post-card.fp-animate:nth-child(2) { transition-delay: 80ms; }
.fp-post-card.fp-animate:nth-child(3) { transition-delay: 160ms; }
.fp-post-card.fp-animate:nth-child(4) { transition-delay: 240ms; }
.fp-post-card.fp-animate:nth-child(5) { transition-delay: 320ms; }
.fp-post-card.fp-animate:nth-child(6) { transition-delay: 400ms; }

/* ============================================
   RESPONSIVE — 8pt Safe Areas
   ============================================ */
@media (max-width: 768px) {
	.fp-hero {
		min-height: 75vh;
		padding: 80px 16px 64px;
	}

	.fp-hero-content {
		padding: 0;
	}

	.fp-hero-actions {
		flex-direction: column;
		align-items: center;
	}

	.fp-btn {
		width: 100%;
		max-width: 280px;
	}

	.fp-hero-stats {
		gap: 24px;
	}

	.fp-stat-number {
		font-size: 24px;
	}

	.fp-categories {
		padding: 64px 0;
	}

	.fp-section-inner {
		padding: 0 16px;
	}

	.fp-cat-tabs {
		gap: 8px;
	}

	.fp-cat-tab {
		padding: 12px 16px;
		font-size: 13px;
	}

	.fp-cat-tab svg {
		display: none;
	}

	.fp-posts-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}
}

@media (max-width: 480px) {
	.fp-hero {
		min-height: 65vh;
		padding: 64px 16px 48px;
	}

	.fp-hero-stats {
		gap: 16px;
	}

	.fp-stat-divider {
		height: 32px;
	}
}
