/**
 * Footer Styles
 * استایل‌های فوتر سفارشی - ریسپانسیو
 * پیروی از استایل‌های کلی افزونه و قالب Storefront
 */

/* Scoped under site-footer for theme inheritance */
.site-footer .asc-footer-main {
	width: 100%;
	padding: 2.5em 0 0;
	background: transparent;
}

/* Grid layout - 4 columns on desktop */
.site-footer .asc-footer-grid {
	display: grid;
	grid-template-columns: 1fr 1.5fr 1fr 1.5fr;
	gap: 2em 2.5em;
	margin-bottom: 2em;
	padding-bottom: 2em;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Section titles - following typography h3 */
.site-footer .asc-footer-title {
	font-size: 1.1em;
	font-weight: 600;
	margin: 0 0 1em;
	padding-bottom: 0.5em;
	border-bottom: 1px solid rgba(0, 0, 0, 0.12);
	display: flex;
	align-items: center;
	gap: 0.5em;
}

/* Footer icons - رنگ مشکی */
.site-footer .asc-footer-icon {
	display: inline-block;
	flex-shrink: 0;
	vertical-align: middle;
}

.site-footer .asc-footer-icon-title {
	font-size: 1.2em;
	width: 1.2em;
	height: 1.2em;
	opacity: 0.9;
}

.site-footer .asc-footer-icon-title.asc-ms-icon {
	color: currentColor;
	filter: none;
}

.site-footer .asc-footer-icon-item {
	font-size: 1em;
	width: 1em;
	height: 1em;
	opacity: 0.9;
}

.site-footer .asc-footer-icon-item.asc-ms-icon {
	color: currentColor;
	filter: none;
}

.site-footer .asc-footer-icon-title:not(.asc-ms-icon) {
	width: 1.2em;
	height: 1.2em;
	filter: brightness(0);
}

.site-footer .asc-footer-icon-item:not(.asc-ms-icon) {
	width: 1em;
	height: 1em;
	filter: brightness(0);
}

.site-footer img.asc-footer-icon {
	object-fit: contain;
}

/* Address/contact blocks with icon */
.site-footer .asc-address-block,
.site-footer .asc-contact-block {
	display: flex;
	align-items: flex-start;
	gap: 0.5em;
}

.site-footer .asc-address-content,
.site-footer .asc-contact-content {
	flex: 1;
	min-width: 0;
}

/* Links section - Primary menu */
.site-footer .asc-footer-nav ul.asc-footer-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-footer .asc-footer-nav ul.asc-footer-menu li {
	margin: 0;
	padding: 0.35em 0;
}

.site-footer .asc-footer-nav ul.asc-footer-menu li a {
	text-decoration: none;
	transition: opacity 0.2s ease;
	color: var(--asc-color-primary);
}

.site-footer .asc-footer-nav ul.asc-footer-menu li a:hover {
	opacity: 0.85;
}

/* Submenus in footer */
.site-footer .asc-footer-nav ul.asc-footer-menu .sub-menu {
	list-style: none;
	margin: 0.25em 0 0 1em;
	padding: 0;
}

.site-footer .asc-footer-no-menu {
	font-size: 0.95em;
	opacity: 0.8;
	margin: 0;
}

/* Address blocks */
.site-footer .asc-address-block {
	margin-bottom: 1.25em;
}

.site-footer .asc-address-block:last-child {
	margin-bottom: 0;
}

.site-footer .asc-address-block strong {
	display: block;
	font-size: 0.95em;
	margin-bottom: 0.35em;
}

.site-footer .asc-address-block p {
	margin: 0;
	font-size: 0.95em;
	line-height: 1.6;
}

/* Contact blocks */
.site-footer .asc-contact-block {
	margin-bottom: 1em;
}

.site-footer .asc-contact-block:last-child {
	margin-bottom: 0;
}

.site-footer .asc-contact-block strong {
	display: block;
	font-size: 0.95em;
	margin-bottom: 0.35em;
}

.site-footer .asc-contact-block a,
.site-footer .asc-contact-block p {
	margin: 0;
	font-size: 0.95em;
	line-height: 1.5;
}

.site-footer .asc-contact-block a,
.site-footer .asc-footer-contact a {
	text-decoration: none;
	transition: opacity 0.2s ease;
	color: var(--asc-color-primary) !important;
}

.site-footer .asc-contact-block a:hover,
.site-footer .asc-footer-contact a:hover {
	opacity: 0.85;
	color: var(--asc-color-primary) !important;
}

/* About section */
.site-footer .asc-footer-about-text {
	margin: 0;
	font-size: 0.95em;
	line-height: 1.8;
	text-align: justify;
}

/* Social links - داخل گرید، دسکتاپ: ردیف کامل زیر sections، موبایل: بلافاصله زیر contact */
.site-footer .asc-footer-socials.asc-footer-grid-socials {
	grid-column: 1 / -1;
	margin-bottom: 0;
	padding-bottom: 0;
	padding-top: 1.5em;
	border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* ترتیب موبایل: links, addresses, contact, socials, about */
.site-footer .asc-footer-links { order: 1; }
.site-footer .asc-footer-addresses { order: 2; }
.site-footer .asc-footer-contact { order: 3; }
.site-footer .asc-footer-socials.asc-footer-grid-socials { order: 4; }
.site-footer .asc-footer-about { order: 5; }

.site-footer .asc-footer-socials .contact-us__socials ul,
.site-footer .asc-footer-socials ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 0.5em 1em;
}

.site-footer .asc-footer-socials .contact-us__socials li,
.site-footer .asc-footer-socials li {
	margin: 0;
	padding: 0;
}

.site-footer .asc-footer-socials .contact-us__socials a,
.site-footer .asc-footer-socials a {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 0.4em;
	padding: 0.35em 0.6em;
	text-decoration: none;
	color: var(--asc-color-primary);
	transition: opacity 0.2s ease;
	border-radius: 4px;
}

.site-footer .asc-footer-socials .contact-us__socials a:hover,
.site-footer .asc-footer-socials a:hover {
	opacity: 0.85;
}

.site-footer .asc-footer-socials .contact-us__socials i,
.site-footer .asc-footer-socials i {
	font-style: normal;
}

.site-footer .asc-footer-socials .contact-us__socials svg,
.site-footer .asc-footer-socials svg {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

/* Placeholder when no SVG icon provided */
.site-footer .asc-footer-socials .asc-social-icon-placeholder {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	font-size: 10px;
	font-weight: 600;
	background: rgba(0, 0, 0, 0.08);
	border-radius: 50%;
}

@media (max-width: 768px) {
	.site-footer .asc-footer-socials .contact-us__socials ul,
	.site-footer .asc-footer-socials ul {
		gap: 0.4em 0.75em;
	}
}

/* Trust badges - اینماد، زرین‌پال و ضمانت ترب */
.site-footer .asc-footer-badges {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 1em 1.5em;
	padding: 1.5em 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.site-footer .asc-footer-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.site-footer .asc-footer-badge:hover {
	opacity: 0.85;
}

.site-footer .asc-footer-badge a:hover {
	opacity: inherit;
}

/* ZarinPal script injects content - style the inner img */
.site-footer #zarinpal img {
	display: block;
	width: 75px;
	height: 75px;
	object-fit: contain;
}

.site-footer .asc-footer-badge img {
	display: block;
	width: 75px !important;
	height: 75px !important;
	object-fit: contain;
}

/* Copyright bar */
.site-footer .asc-footer-bottom {
	padding: 1em 0;
	text-align: center;
}

.site-footer .asc-copyright {
	margin: 0;
	font-size: 0.9em;
	opacity: 0.9;
}

/* Desktop - socials بعد از همه sections */
@media (min-width: 768px) {
	.site-footer .asc-footer-about { order: 4; }
	.site-footer .asc-footer-socials.asc-footer-grid-socials { order: 10; }
}

/* Tablet - 2 columns */
@media (max-width: 1024px) {
	.site-footer .asc-footer-grid {
		grid-template-columns: 1fr 1fr;
		gap: 2em 1.5em;
	}

	.site-footer .asc-footer-about {
		grid-column: 1 / -1;
	}

	.site-footer .asc-footer-about-text {
		text-align: right;
	}
}

/* Mobile - links in 2 columns, contact in grid */
@media (max-width: 768px) {
	.site-footer .asc-footer-main {
		padding-top: 2em;
	}

	.site-footer .asc-footer-grid {
		grid-template-columns: 1fr;
		gap: 2em;
		margin-bottom: 1.5em;
		padding-bottom: 1.5em;
	}

	.site-footer .asc-footer-section {
		border-bottom: unset;
		padding-bottom: 1.5em;
	}

	.site-footer .asc-footer-about {
		grid-column: 1;
	}

	.site-footer .asc-footer-title {
		font-size: 1.05em;
		margin-bottom: 0.75em;
	}

	/* لینک‌های پرکاربرد - دو ستون در موبایل (۶ مورد) */
	.site-footer .asc-footer-links .asc-footer-nav ul.asc-footer-menu {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 0 1.5em;
	}

	.site-footer .asc-footer-links .asc-footer-nav ul.asc-footer-menu li {
		padding: 0.3em 0;
	}

	/* اطلاعات تماس - گرید ۲ ستونی در موبایل */
	.site-footer .asc-footer-contact {
		display: grid;
		grid-template-columns: 1fr 1fr;
		grid-auto-flow: dense;
		gap: 0.75em 1.5em;
	}

	.site-footer .asc-footer-contact .asc-footer-title {
		grid-column: 1 / -1;
	}

	.site-footer .asc-footer-contact .asc-contact-block {
		margin-bottom: 0;
	}

	.site-footer .asc-footer-bottom {
		padding: 0.75em 0;
	}

	.site-footer .asc-copyright {
		font-size: 0.85em;
	}

	.site-footer .asc-footer-badges {
		padding: 1.25em 0;
		gap: 0.75em 1em;
	}

	.site-footer .asc-footer-badge img,
	.site-footer #zarinpal img {
		width: 65px;
		height: 65px;
	}
}

/* Mobile portrait - contact grid, links 2 columns */
@media (max-width: 480px) {
	.site-footer .asc-footer-main {
		padding-top: 1.5em;
	}

	.site-footer .asc-footer-grid {
		gap: 1.5em;
		margin-bottom: 1.25em;
		padding-bottom: 1.25em;
	}

	.site-footer .asc-footer-title {
		margin-bottom: 0.75em;
		font-size: 1em;
	}

	/* اطلاعات تماس - فاصله کمتر در موبایل کوچک */
	.site-footer .asc-footer-contact {
		gap: 0.6em 1em;
	}

	/* لینک‌های پرکاربرد - دو ستون */
	.site-footer .asc-footer-links .asc-footer-nav ul.asc-footer-menu {
		grid-template-columns: 1fr 1fr;
		gap: 0 1em;
	}

	.site-footer .asc-address-block {
		margin-bottom: 0.75em;
	}

	.site-footer .asc-footer-about-text {
		font-size: 0.9em;
		line-height: 1.75;
	}

	.site-footer .asc-footer-badges {
		padding: 1em 0;
		gap: 0.5em 0.75em;
	}

	.site-footer .asc-footer-badge img,
	.site-footer #zarinpal img {
		width: 60px;
		height: 60px;
	}
}

/* -------------------------------------------------------------------------
 * صفحه/شورتکد تماس — همان زبان بصری فوتر (خارج از .site-footer)
 * ------------------------------------------------------------------------- */
.asc-contact-prose .asc-footer-icon {
	display: inline-block;
	flex-shrink: 0;
	vertical-align: middle;
}

.asc-contact-prose .asc-footer-icon-title {
	width: 1.2em;
	height: 1.2em;
	opacity: 0.9;
	filter: brightness(0);
}

.asc-contact-prose .asc-footer-icon-item {
	width: 1em;
	height: 1em;
	opacity: 0.9;
	filter: brightness(0);
}

.asc-contact-prose img.asc-footer-icon {
	object-fit: contain;
}

.asc-contact-prose .asc-address-block,
.asc-contact-prose .asc-contact-block {
	display: flex;
	align-items: flex-start;
	gap: 0.5em;
}

.asc-contact-prose .asc-address-content,
.asc-contact-prose .asc-contact-content {
	flex: 1;
	min-width: 0;
}

.asc-contact-prose .asc-address-block {
	margin-bottom: 1.25em;
}

.asc-contact-prose .asc-address-block:last-child {
	margin-bottom: 0;
}

.asc-contact-prose .asc-address-block strong {
	display: block;
	font-size: 0.95em;
	margin-bottom: 0.35em;
}

.asc-contact-prose .asc-address-block p {
	margin: 0;
	font-size: 0.95em;
	line-height: 1.6;
}

.asc-contact-prose .asc-contact-block {
	margin-bottom: 1em;
}

.asc-contact-prose .asc-contact-block:last-child {
	margin-bottom: 0;
}

.asc-contact-prose .asc-contact-block strong {
	display: block;
	font-size: 0.95em;
	margin-bottom: 0.35em;
}

.asc-contact-prose .asc-contact-block a,
.asc-contact-prose .asc-contact-block p {
	margin: 0;
	font-size: 0.95em;
	line-height: 1.5;
}

.asc-contact-prose .asc-contact-block a {
	text-decoration: none;
	transition: opacity 0.2s ease;
	color: var(--asc-color-primary) !important;
}

.asc-contact-prose .asc-contact-block a:hover {
	opacity: 0.85;
	color: var(--asc-color-primary) !important;
}

.asc-contact-prose .asc-footer-section {
	margin-bottom: 0;
}

.asc-contact-prose .asc-footer-title {
	font-size: 1.1em;
	font-weight: 600;
	margin: 0 0 1em;
	padding-bottom: 0.5em;
	border-bottom: 1px solid rgba(0, 0, 0, 0.12);
	display: flex;
	align-items: center;
	gap: 0.5em;
}

.asc-contact-page--grid .asc-contact-page__inner {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
	gap: 2em 2.5em;
	align-items: start;
	margin-top: var(--wp--preset--spacing--40, 1rem);
	margin-bottom: var(--wp--preset--spacing--40, 1rem);
}

/* Contact page details should stack vertically (not grid) */
.asc-contact-page .asc-footer-contact {
	display: flex;
	flex-direction: column;
	min-width: 100%;
	gap: 0.75em;
}

.asc-contact-page .asc-footer-contact .asc-contact-block {
	margin-bottom: 0;
}

/* Keep phone numbers readable/aligned in RTL layouts */
.asc-contact-page .asc-footer-contact .asc-contact-content a[href^="tel:"] {
	display: inline-block;
	direction: ltr;
	text-align: left;
	align-self: flex-end;
}

/* Override possible inline styles from block editor content */
.asc-contact-page .asc-footer-section.asc-footer-contact[style] {
	min-width: 100% !important;
}

.asc-contact-page .asc-footer-section.asc-footer-contact a[href^="tel:"][style*="float"] {
	float: none !important;
}

@media (max-width: 782px) {
	.asc-contact-page--grid .asc-contact-page__inner {
		grid-template-columns: 1fr;
		gap: 2em;
	}
}

@media (max-width: 768px) {
	.asc-contact-page .asc-footer-contact {
		gap: 0.75em;
	}
}

@media (max-width: 480px) {
	.asc-contact-page .asc-footer-contact {
		gap: 0.6em 1em;
	}

	.asc-contact-prose .asc-address-block {
		margin-bottom: 0.75em;
	}
}
