/* ===== FOOTER ===== */
.footer {
	background-color: var(--color-dark);
	color: white;
	padding: var(--spacing-xl) 0 var(--spacing-lg);
}

/* Show full labels by default, hide short labels */
.footer .full {
	display: inline;
}
.footer .short {
	display: none;
}

/* Ultra-compact on small phones */
@media (max-width: 640px) {
	.footer {
		padding: var(--spacing-sm) 0;
	}

	/* Hide large link blocks to keep footer slim */
	.footer-links {
		display: none !important;
	}

	/* Hide entire top block (logo + headings) for maximum compactness */
	.footer-content {
		display: none !important;
	}

	.footer-content {
		padding-bottom: var(--spacing-sm);
		margin-bottom: var(--spacing-sm);
		gap: var(--spacing-sm);
	}

	.footer-logo-img {
		width: 28px;
		height: 28px;
	}

	.footer-logo-text {
		font-size: 1.1rem;
	}

	.footer-bottom {
		gap: 0;
		margin-top: 0;
	}

	/* Hide long slogan line on phones */
	.footer-slogan {
		display: none !important;
	}

	.footer-bottom p {
		font-size: 0.8rem;
		line-height: 1.2;
		margin: 0;
	}

	/* Hide social icons to keep footer height minimal */
	.footer-social {
		display: none !important;
	}
}

.footer-legal {
	text-align: center;
	margin-bottom: var(--spacing-md);
	color: #444;
	font-size: 0.9rem;
	line-height: 1.5;
}

.footer-legal p {
	margin-bottom: var(--spacing-md);
}

.footer-content {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: var(--spacing-xl);
	padding-bottom: var(--spacing-lg);
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	margin-bottom: var(--spacing-lg);
}

.footer-logo {
	display: flex;
	align-items: center;
}

.footer-logo-img {
	width: 40px;
	height: 40px;
	margin-right: var(--spacing-sm);
}

.footer-logo-text {
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: -0.5px;
}

.footer-links {
	display: flex;
	flex-wrap: wrap;
	gap: var(--spacing-xl);
}

.footer-links-column h3 {
	margin-bottom: var(--spacing-md);
	position: relative;
	display: inline-block;
	padding-bottom: var(--spacing-xs);
}

.footer-links-column h3::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	width: 30px;
	height: 2px;
	background: var(--color-secondary);
}

.footer-links-column ul {
	display: flex;
	flex-direction: column;
	gap: var(--spacing-sm);
}

.footer-links-column a {
	color: rgba(255, 255, 255, 0.85);
	transition: color var(--transition-fast);
}

.footer-links-column a:hover {
	color: var(--color-secondary);
}

.footer-bottom {
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.footer-bottom p {
	color: rgba(255, 255, 255, 0.6);
}

.footer-social {
	display: flex;
	gap: var(--spacing-sm);
}

.footer-social a {
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.1);
	color: white;
	transition: all var(--transition-normal);
}

.footer-social a:hover {
	background: var(--gradient-primary);
}

/* ===== Responsive (footer) ===== */
@media (max-width: 768px) {
	.footer {
		padding: var(--spacing-lg) 0 var(--spacing-md);
	}

	.footer-content {
		justify-content: center;
		text-align: center;
		gap: var(--spacing-md);
		padding-bottom: var(--spacing-md);
		margin-bottom: var(--spacing-md);
	}

	.footer-logo-img {
		width: 32px;
		height: 32px;
	}

	.footer-logo-text {
		font-size: 1.25rem;
	}

	.footer-links {
		display: grid;
		/* Auto-fit avoids horizontal overflow on very narrow screens */
		grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
		gap: var(--spacing-md);
		justify-content: center;
	}

	.footer-links-column {
		width: auto;
		max-width: none;
		margin: 0 auto;
	}

	.footer-links-column h3::after {
		left: 50%;
		transform: translateX(-50%);
		width: 20px;
	}

	.footer-links-column h3 {
		margin-bottom: var(--spacing-sm);
		font-size: 1rem;
	}

	.footer-links-column ul {
		gap: var(--spacing-xs);
	}

	.footer-bottom {
		display: flex;
		flex-direction: column;
		align-items: center;
		text-align: center;
		gap: var(--spacing-sm);
		margin-top: var(--spacing-md);
	}

	.footer-bottom p {
		margin: 0.25rem 0;
		font-size: 0.9rem;
	}

	.footer-social {
		margin-top: var(--spacing-sm);
	}

	.footer-social a {
		width: 32px;
		height: 32px;
	}

	.footer-legal {
		font-size: 0.85rem;
	}
}

/* Ensure minimal footer wins on phones when multiple queries match */
@media (max-width: 640px) {
	.footer {
		padding: var(--spacing-xs) 0 !important;
	}
	.footer-bottom {
		gap: 0 !important;
		margin-top: 0 !important;
	}
	.footer-bottom p {
		font-size: 0.8rem !important;
		line-height: 1.2 !important;
		margin: 0 !important;
	}
	/* Make essential links visible + compact */
	.footer-content {
		display: block !important;
		border-bottom: none;
		padding-bottom: var(--spacing-xs);
		margin-bottom: var(--spacing-xs);
	}
	/* Show links area again, but compressed */
	.footer-links {
		display: flex !important;
		flex-direction: column;
		gap: var(--spacing-xs);
		justify-content: center;
		align-items: center;
	}
	/* Hide headings to save space */
	.footer-links-column h3 {
		display: none;
	}
	/* Hide the Unternehmen column */
	.footer-links .footer-links-column:nth-child(2) {
		display: none !important;
	}
	/* Keep Subdomains (1) and Legal (3) visible */
	.footer-links .footer-links-column:nth-child(1),
	.footer-links .footer-links-column:nth-child(3) {
		display: block !important;
		max-width: none;
		width: 100%;
	}
	/* Render list items inline with separators */
	.footer-links-column ul {
		display: flex;
		flex-direction: row !important;
		flex-wrap: wrap;
		gap: var(--spacing-xs);
		justify-content: center;
	}
	.footer-links-column ul li {
		display: inline;
		white-space: nowrap;
	}
	.footer-links-column ul li:not(:last-child)::after {
		content: " -";
		margin-left: 0.25rem;
	}
	.footer-links-column a {
		font-size: 0.9rem;
		color: rgba(255, 255, 255, 0.9);
	}
	/* Center footer logo on phones */
	.footer-logo {
		justify-content: center;
		margin: 0 auto;
	}
	/* Force rows to be horizontal */
	.footer-links .footer-links-column:nth-child(1) ul,
	.footer-links .footer-links-column:nth-child(3) ul {
		display: inline-flex !important;
		flex-direction: row !important;
		flex-wrap: wrap;
		align-items: center;
	}
	/* Subdomains row: keep on a single line with exactly 3 items */
	.footer-links .footer-links-column:nth-child(1) ul {
		flex-wrap: nowrap !important;
	}
	.footer-links .footer-links-column:nth-child(1) ul li:nth-child(4) {
		display: none !important;
	}
	.footer-links-column ul li {
		display: inline-flex !important;
	}
	/* Mobile: show short labels, hide full */
	.footer .full {
		display: none !important;
	}
	.footer .short {
		display: inline !important;
	}
	/* Slightly smaller legal row to prevent wrapping */
	.footer-links .footer-links-column:nth-child(3) a {
		font-size: 0.85rem;
	}
}
