/*
 * Front page: hero, stats bar, "Nə axtarırsız?" card grid.
 * Only enqueued on the front page (see inc/enqueue.php).
 */

/* ---------------------------------------------------------------------
 * Transparent header over the hero.
 *
 * The header is normally `position: sticky` and occupies space in the
 * document flow. On the front page it's pulled out of flow entirely
 * (`position: fixed`) so the hero section starts flush at the very top of
 * the viewport and the header floats transparently on top of it. main.js
 * adds/removes `.scrolled` once scrollY passes the hero's height, at which
 * point this same fixed header switches to the normal solid style.
 * ------------------------------------------------------------------- */

.front-page-transparent-header .site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	background: transparent;
	border-bottom-color: transparent;
	box-shadow: none;
}

.front-page-transparent-header .site-header .site-title-link,
.front-page-transparent-header .site-header .primary-menu > li > a {
	color: var(--azpma-white);
}

.front-page-transparent-header .site-header .menu-toggle-bar {
	background: var(--azpma-white);
}

/* No separate white logo asset exists yet — force the uploaded logo image
   to render as white via filter while the header is transparent. */
.front-page-transparent-header .site-header .site-branding img {
	filter: brightness(0) invert(1);
}

/* Astra's own "Content Top/Bottom Spacing" Customizer setting adds a
   margin-top to #primary (via .ast-plain-container.ast-no-sidebar #primary
   in its dynamic inline CSS) to clear a normal in-flow header. Since the
   header is pulled out of flow entirely above, that margin would otherwise
   push the hero down and leave a gap of #page's white background showing
   through the transparent header. Matches Astra's selector plus the extra
   body class for higher specificity, so no !important is needed. */
.front-page-transparent-header.ast-plain-container.ast-no-sidebar #primary {
	margin-top: 0;
}

.front-page-transparent-header .site-header.scrolled {
	background: var(--azpma-white);
	border-bottom-color: var(--ast-global-color-6);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.front-page-transparent-header .site-header.scrolled .site-title-link,
.front-page-transparent-header .site-header.scrolled .primary-menu > li > a {
	color: var(--azpma-text);
}

.front-page-transparent-header .site-header.scrolled .menu-toggle-bar {
	background: var(--azpma-text);
}

.front-page-transparent-header .site-header.scrolled .site-branding img {
	filter: none;
}

/* ---------------------------------------------------------------------
 * Hero
 * ------------------------------------------------------------------- */

.front-hero {
	position: relative;
	min-height: 80vh;
	display: flex;
	align-items: flex-end;
	background-color: var(--azpma-primary-dark);
	background-image: linear-gradient(135deg, var(--azpma-primary) 0%, var(--azpma-primary-dark) 100%);
	background-size: cover;
	background-position: center;
	overflow: hidden;
}

.front-hero-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.45) 40%, rgba(0, 0, 0, 0.75) 100%);
	pointer-events: none;
}

.front-hero-inner {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: var(--ast-normal-container-width, 1200px);
	margin: 0 auto;
	padding: 0 1.5em 4em;
	color: var(--azpma-white);
}

.front-hero-heading {
	margin: 0 0 0.5em;
	max-width: 32ch;
	font-size: clamp(1.9rem, 4.2vw, 3.1rem);
	font-weight: 700;
	line-height: 1.25;
	color: var(--azpma-white);
}

.front-hero-paragraph {
	margin: 0;
	max-width: 46ch;
	font-size: clamp(1rem, 1.4vw, 1.15rem);
	line-height: 1.6;
	opacity: 0.92;
}

@media (max-width: 768px) {
	.front-hero {
		min-height: 60vh;
	}
}

@media (max-width: 600px) {
	.front-hero {
		align-items: center;
	}

	.front-hero-heading {
		max-width: 26ch;
		font-size: clamp(1.6rem, 6.5vw, 2.2rem);
	}

	.front-hero-inner {
		padding-bottom: 0;
	}
}

/* ---------------------------------------------------------------------
 * Stats bar
 * ------------------------------------------------------------------- */

.front-stats {
	background: var(--azpma-bg-light);
	padding: 2.5em 1.5em;
}

.front-stats-inner {
	max-width: var(--ast-normal-container-width, 1200px);
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1.5em;
	text-align: center;
}

.front-stat-item {
	padding: 0 1em;
	border-left: 1px solid var(--ast-global-color-6);
}

.front-stat-item:first-child {
	border-left: none;
}

.front-stat-text {
	margin: 0;
	font-weight: 600;
	font-size: 1rem;
	line-height: 1.4;
	color: var(--azpma-text);
}

@media (max-width: 700px) {
	.front-stats-inner {
		grid-template-columns: 1fr;
		gap: 1em;
	}

	.front-stat-item {
		border-left: none;
		border-top: 1px solid var(--ast-global-color-6);
		padding: 1em 0 0;
	}

	.front-stat-item:first-child {
		border-top: none;
		padding-top: 0;
	}
}

/* ---------------------------------------------------------------------
 * "Nə axtarırsız?" card grid
 * ------------------------------------------------------------------- */

.front-cards {
	padding: 4.5em 1.5em;
}

.front-cards-inner {
	max-width: var(--ast-normal-container-width, 1200px);
	margin: 0 auto;
}

.front-cards-heading {
	margin: 0 0 1.5em;
	text-align: center;
	font-size: clamp(1.5rem, 2.6vw, 2rem);
	font-weight: 700;
	color: var(--azpma-text);
}

.front-cards-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5em;
}

.front-card {
	padding: 2.25em 1.75em;
	background: var(--azpma-white);
	border: 1px solid var(--ast-global-color-6);
	border-radius: var(--azpma-radius);
}

.front-card-icon {
	display: inline-flex;
	width: 38px;
	height: 38px;
	margin-bottom: 1.1em;
	color: var(--azpma-primary);
}

.front-card-icon svg {
	width: 100%;
	height: 100%;
}

.front-card-title {
	margin: 0 0 0.5em;
	font-size: 1.1rem;
	font-weight: 600;
	color: var(--azpma-text);
}

.front-card-desc {
	margin: 0 0 1em;
	font-size: 0.95rem;
	line-height: 1.6;
	color: var(--azpma-text);
	opacity: 0.85;
}

.front-card-link {
	display: inline-block;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--azpma-primary);
	text-decoration: none;
}

.front-card-link:hover {
	color: var(--azpma-primary-dark);
	text-decoration: underline;
}

@media (max-width: 1024px) {
	.front-cards-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.front-cards-grid {
		grid-template-columns: 1fr;
	}
}
