/**
 * Footer component — Electro-style 3-section structure.
 *
 * Section 1: Contact info rail — 4 equal dark blocks with icon circles
 * Section 2: Main footer — 4 columns, orange headings, dark background
 * Section 3: Bottom bar — orange background, copyright
 *
 * No brand-specific color values hard-coded. All values from --brand-* tokens.
 * No Almutaheda classes or identifiers.
 *
 * @package PackagingCommerce
 */

/* ── Site footer wrapper ─────────────────────────────────────────── */

.pkgc-site-footer {
	color: rgba(255, 255, 255, 0.85);
}

/* ═══════════════════════════════════════════════════════════════════
   SECTION 1 — Contact info rail
══════════════════════════════════════════════════════════════════════ */

.pkgc-footer-contact-rail {
	background-color: #3a3a3a;
	border-block-end: 1px solid rgba(255, 255, 255, 0.08);
}

.pkgc-footer-contact-rail__inner {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	min-height: 0;
}

@media (max-width: 991.98px) {
	.pkgc-footer-contact-rail__inner {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 575.98px) {
	.pkgc-footer-contact-rail__inner {
		grid-template-columns: 1fr;
	}
}

.pkgc-footer-contact-item {
	display: flex;
	align-items: center;
	gap: var(--brand-space-4);
	padding: var(--brand-space-6) var(--brand-space-6);
	border-inline-end: 1px solid rgba(255, 255, 255, 0.1);
}

.pkgc-footer-contact-item:last-child {
	border-inline-end: none;
}

@media (max-width: 991.98px) {
	.pkgc-footer-contact-item:nth-child(2n) {
		border-inline-end: none;
	}

	.pkgc-footer-contact-item {
		border-block-end: 1px solid rgba(255, 255, 255, 0.1);
	}
}

@media (max-width: 575.98px) {
	.pkgc-footer-contact-item {
		border-inline-end: none;
	}
}

.pkgc-footer-contact-item__icon {
	flex-shrink: 0;
	width: 50px;
	height: 50px;
	border-radius: var(--brand-radius-full);
	background-color: var(--brand-color-primary);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
}

.pkgc-footer-contact-item__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.pkgc-footer-contact-item__heading {
	font-size: 14px;
	font-weight: var(--brand-weight-bold);
	color: #fff;
	margin: 0;
	white-space: nowrap;
}

.pkgc-footer-contact-item__line {
	font-size: 13px;
	color: rgba(255, 255, 255, 0.65);
	margin: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ═══════════════════════════════════════════════════════════════════
   SECTION 2 — Main footer columns
══════════════════════════════════════════════════════════════════════ */

.pkgc-footer-main {
	background-color: var(--brand-color-footer, #444444);
	padding-block: 56px;
}

@media (max-width: 767.98px) {
	.pkgc-footer-main {
		padding-block: var(--brand-space-10);
	}
}

@media (max-width: 575.98px) {
	.pkgc-footer-main {
		padding-block: var(--brand-space-8);
	}
}

/* ── Brand column ────────────────────────────────────────────────── */

.pkgc-footer-brand {
	display: flex;
	flex-direction: column;
	gap: var(--brand-space-4);
}

.pkgc-footer-brand .custom-logo {
	max-height: 50px;
	width: auto;
}

/* Optional modifier: apply only when the logo is confirmed monochrome */
.pkgc-footer-brand--light-logo .custom-logo {
	filter: brightness(0) invert(1);
	opacity: 0.9;
}

.pkgc-footer-brand__site-name {
	font-family: var(--brand-font-heading);
	font-size: var(--brand-text-xl);
	font-weight: var(--brand-weight-bold);
	color: var(--brand-color-primary);
	text-decoration: none;
}

.pkgc-footer-brand__tagline {
	font-size: 13px;
	color: rgba(255, 255, 255, 0.6);
	line-height: var(--brand-leading-relaxed);
	margin: 0;
}

/* Social icons */
.pkgc-footer-social {
	display: flex;
	gap: var(--brand-space-2);
}

.pkgc-footer-social__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: var(--brand-radius-full);
	color: rgba(255, 255, 255, 0.7);
	background-color: rgba(255, 255, 255, 0.08);
	text-decoration: none;
	border: 1px solid rgba(255, 255, 255, 0.12);
	transition: color var(--brand-transition-fast),
	            background-color var(--brand-transition-fast),
	            border-color var(--brand-transition-fast);
}

.pkgc-footer-social__link:hover,
.pkgc-footer-social__link:focus-visible {
	color: #fff;
	background-color: var(--brand-color-primary);
	border-color: var(--brand-color-primary);
}

/* ── Footer group (links columns) ────────────────────────────────── */

.pkgc-footer-group {
	/* Reset details styles */
}

.pkgc-footer-group__heading {
	list-style: none;
	cursor: default;
	font-family: var(--brand-font-heading);
	font-size: 15px;
	font-weight: var(--brand-weight-bold);
	color: var(--brand-color-primary);
	margin-block-end: var(--brand-space-5);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.pkgc-footer-group__heading::-webkit-details-marker,
.pkgc-footer-group__heading::marker {
	display: none;
}

.pkgc-footer-group__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--brand-space-2);
}

.pkgc-footer-group__link {
	color: rgba(255, 255, 255, 0.72);
	text-decoration: none;
	font-size: 14px;
	transition: color var(--brand-transition-fast);
	line-height: var(--brand-leading-normal);
	min-height: 32px;
	display: inline-flex;
	align-items: center;
}

.pkgc-footer-group__link:hover,
.pkgc-footer-group__link:focus-visible {
	color: var(--brand-color-primary);
}

.pkgc-footer-group__list li > a {
	color: rgba(255, 255, 255, 0.72);
	text-decoration: none;
	font-size: 14px;
	transition: color var(--brand-transition-fast);
	min-height: 32px;
	display: inline-flex;
	align-items: center;
}

.pkgc-footer-group__list li > a:hover,
.pkgc-footer-group__list li > a:focus-visible {
	color: var(--brand-color-primary);
}

/* Contact column */
.pkgc-footer-group__link--contact {
	display: inline-flex;
	align-items: center;
	gap: var(--brand-space-2);
}

.pkgc-footer-group__link--whatsapp {
	display: inline-flex;
	align-items: center;
	gap: var(--brand-space-2);
	color: var(--brand-color-whatsapp);
}

.pkgc-footer-group__link--whatsapp:hover {
	color: #fff;
}

.pkgc-footer-group__areas {
	font-size: 13px;
	color: rgba(255, 255, 255, 0.55);
	line-height: var(--brand-leading-relaxed);
}

.pkgc-footer-group__areas-label {
	display: block;
	font-weight: var(--brand-weight-medium);
	color: rgba(255, 255, 255, 0.7);
	margin-block-end: var(--brand-space-1);
}

/* Mobile: details accordion */
@media (max-width: 575.98px) {
	.pkgc-footer-group__heading {
		cursor: pointer;
		display: flex;
		align-items: center;
		justify-content: space-between;
		border-block-end: 1px solid rgba(255, 255, 255, 0.1);
		padding-block-end: var(--brand-space-3);
		margin-block-end: 0;
	}

	.pkgc-footer-group__heading::after {
		content: "+";
		font-size: var(--brand-text-lg);
		font-weight: var(--brand-weight-regular);
		color: rgba(255, 255, 255, 0.5);
	}

	details[open] .pkgc-footer-group__heading::after {
		content: "−";
	}

	.pkgc-footer-group__list {
		padding-block: var(--brand-space-3) var(--brand-space-2);
	}
}

/* ═══════════════════════════════════════════════════════════════════
   SECTION 3 — Bottom bar (orange)
══════════════════════════════════════════════════════════════════════ */

.pkgc-footer-bottom {
	background-color: var(--brand-color-primary);
}

.pkgc-footer-bottom__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: var(--brand-space-3);
	min-height: 48px;
	padding-block: var(--brand-space-3);
}

.pkgc-footer-bottom__copy {
	font-size: 13px;
	color: rgba(255, 255, 255, 0.9);
	margin: 0;
}

.pkgc-footer-bottom__menu {
	display: flex;
	flex-wrap: wrap;
	gap: var(--brand-space-4);
	list-style: none;
	margin: 0;
	padding: 0;
}

.pkgc-footer-bottom__menu li > a {
	font-size: 13px;
	color: rgba(255, 255, 255, 0.85);
	text-decoration: none;
	transition: color var(--brand-transition-fast);
}

.pkgc-footer-bottom__menu li > a:hover {
	color: #fff;
}

@media (max-width: 575.98px) {
	.pkgc-footer-bottom__inner {
		justify-content: center;
		text-align: center;
	}
}
