/**
 * Site footer — platform99-style layout, container gutters (no alignfull).
 */

.athar-site-footer {
	--site-footer-gutter: 1.25rem;
	--site-footer-max: 920px;
	--site-footer-badge-h: 2.25rem;
	--site-footer-pay-h: 1.125rem;
	--site-footer-dev-size: 20px;
	margin-top: 2rem;
	background: var(--athar-bg);
	color: var(--athar-navy);
	border-top: 1px solid var(--athar-border);
}

.athar-site-footer__container {
	box-sizing: border-box;
	width: min(calc(100% - 2 * var(--site-footer-gutter)), var(--site-footer-max));
	max-width: var(--site-footer-max);
	margin-inline: auto;
	padding-block: 3rem var(--site-footer-gutter);
}

.athar-site-footer p {
	margin: 0;
}

.athar-site-footer a {
	color: var(--athar-muted);
	text-decoration: none;
	transition: color 0.15s ease;
}

.athar-site-footer a:hover {
	color: var(--athar-teal);
}

/* Main grid */
.athar-site-footer__grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	gap: 2rem;
	margin-bottom: 2rem;
}

.athar-site-footer__brand {
	min-width: 0;
}

.athar-site-footer__logo-link {
	display: inline-block;
	line-height: 0;
}

.athar-site-footer__logo {
	display: block;
	width: auto;
	max-width: 220px;
	height: auto;
	max-height: 56px;
	margin-bottom: 1rem;
}

.athar-site-footer__tagline {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.65;
	color: var(--athar-muted);
	max-width: 28rem;
}

.athar-site-footer__columns {
	display: contents;
}

.athar-site-footer__grid.has-ms-store {
	grid-template-columns: 1.35fr 1fr 1fr minmax(150px, 0.95fr);
}

.athar-site-footer__ms-store {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-start;
	gap: 0.65rem;
	min-width: 0;
}

.athar-site-footer__ms-store-link {
	display: block;
	width: 5.5rem;
	max-width: 100%;
	line-height: 0;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.athar-site-footer__ms-store-link:hover {
	opacity: 0.92;
	transform: translateY(-1px);
}

.athar-site-footer__ms-store-badge {
	display: block;
	width: 5.5rem;
	max-width: 100%;
	height: auto;
	max-height: 5.5rem;
	object-fit: contain;
	object-position: center left;
}

.athar-site-footer__ms-store-caption {
	margin: 0;
	font-size: 0.8125rem;
	line-height: 1.45;
	color: var(--athar-muted);
	max-width: 8rem;
}

.athar-site-footer__heading {
	margin: 0 0 0.75rem;
	font-size: 0.95rem;
	font-weight: 800;
	color: var(--athar-navy);
}

.athar-site-footer__menu {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	gap: 0.5rem;
}

.athar-site-footer__menu a,
.athar-site-footer__menu span {
	font-size: 0.875rem;
	line-height: 1.4;
	color: var(--athar-muted);
}

.athar-site-footer__menu a:hover {
	color: var(--athar-teal);
}

/* Icon rows (badges + payments) */
.athar-site-footer__icons {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 0.65rem 0.85rem;
}

.athar-site-footer__icons--badges {
	margin-top: 0.85rem;
}

.athar-site-footer__icons-item {
	display: flex;
	align-items: center;
	margin: 0;
	line-height: 0;
}

.athar-site-footer__icons-link {
	display: inline-flex;
	line-height: 0;
	opacity: 0.88;
	transition: opacity 0.15s ease;
}

.athar-site-footer__icons-link:hover {
	opacity: 1;
	color: inherit;
}

.athar-site-footer__icons--badges .athar-site-footer__icons-img {
	display: block;
	width: auto;
	height: var(--site-footer-badge-h);
	max-width: 5.5rem;
	object-fit: contain;
}

.athar-site-footer__icons--pay .athar-site-footer__icons-img {
	display: block;
	width: auto;
	height: var(--site-footer-pay-h);
	max-width: 2.5rem;
	object-fit: contain;
}

/* Bottom bar */
.athar-site-footer__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.25rem;
	flex-wrap: wrap;
	padding-block: 1.125rem;
	border-top: 1px solid var(--athar-border);
	font-size: 0.9rem;
}

.athar-site-footer__copy {
	margin: 0;
	color: var(--athar-muted);
	font-size: 0.875rem;
	line-height: 1.35;
}

.athar-site-footer__meta {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	flex-shrink: 0;
}

.athar-site-footer__divider {
	width: 1px;
	height: 1.45rem;
	background: var(--athar-border);
	flex-shrink: 0;
}

.athar-site-footer__social {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	flex-wrap: wrap;
}

.athar-site-footer__social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.15rem;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.athar-site-footer__social-link:hover {
	opacity: 1;
	transform: translateY(-1px);
	color: inherit;
}

.athar-site-footer__social-link img {
	width: 1.25rem;
	height: 1.25rem;
	object-fit: contain;
	opacity: 0.88;
}

.athar-site-footer__social-link:hover img {
	opacity: 1;
}

.athar-site-footer__dev {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	direction: rtl;
	white-space: nowrap;
	font-size: 0.85rem;
	color: var(--athar-muted);
	flex-shrink: 0;
}

.athar-site-footer__dev-label {
	color: var(--athar-muted);
}

.athar-site-footer__dev-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--site-footer-dev-size);
	height: var(--site-footer-dev-size);
	overflow: hidden;
	flex-shrink: 0;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.athar-site-footer__dev-link:hover {
	opacity: 1;
	transform: translateY(-1px);
}

.athar-site-footer__dev-icon {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}

/* Sticky footer shell */
.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: 100dvh;
	gap: 0;
}

.wp-site-blocks > main,
.wp-site-blocks > .wp-block-group:is(main),
main.wp-block-group {
	flex: 1 0 auto;
}

.wp-site-blocks > footer,
.wp-site-blocks > .wp-block-template-part:last-child,
footer.wp-block-template-part {
	margin-block: 0;
	margin-top: auto;
	margin-bottom: 0;
	padding: 0;
	flex-shrink: 0;
}

footer.wp-block-template-part .athar-site-footer {
	width: 100%;
}

@media (max-width: 767px) {
	.athar-site-footer {
		margin-top: 1.5rem;
	}

	.athar-site-footer__container {
		padding-top: 2.5rem;
	}

	.athar-site-footer__grid {
		grid-template-columns: 1fr;
		gap: 1.5rem;
		margin-bottom: 1.5rem;
	}

	.athar-site-footer__brand {
		text-align: center;
	}

	.athar-site-footer__logo {
		margin-inline: auto;
		margin-bottom: 0;
		max-width: 180px;
		max-height: 48px;
	}

	.athar-site-footer__tagline {
		font-size: 0.9rem;
		margin-inline: auto;
	}

	.athar-site-footer__icons--badges {
		justify-content: center;
	}

	.athar-site-footer__grid.has-ms-store {
		grid-template-columns: 1fr;
	}

	.athar-site-footer__ms-store {
		align-items: center;
		text-align: center;
		margin-inline: auto;
	}

	.athar-site-footer__ms-store-badge {
		max-width: 5rem;
		max-height: 5rem;
		margin-inline: auto;
		object-position: center;
	}

	.athar-site-footer__ms-store-caption {
		margin-inline: auto;
	}

	.athar-site-footer__columns {
		position: relative;
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 1rem;
	}

	.athar-site-footer__columns::after {
		content: "";
		position: absolute;
		top: 0.15rem;
		bottom: 0.15rem;
		left: 50%;
		width: 1px;
		transform: translateX(-50%);
		background: var(--athar-border);
		pointer-events: none;
	}

	.athar-site-footer__col {
		text-align: center;
	}

	.athar-site-footer__menu {
		gap: 0.55rem;
		justify-items: center;
	}

	.athar-site-footer__bar {
		justify-content: center;
		text-align: center;
		font-size: 0.85rem;
	}

	.athar-site-footer__copy {
		width: 100%;
	}

	.athar-site-footer__meta {
		width: 100%;
		justify-content: center;
		flex-wrap: wrap;
	}

	.athar-site-footer__social {
		justify-content: center;
	}
}
