/**
 * Footer Styles
 *
 * @package EpicMarks
 */

/* ==========================================================================
   Footer Base
   ========================================================================== */

.em-footer {
	background-color: var(--em-neutral-900);
	color: var(--em-neutral-300);
	margin-top: auto;
}

/* ==========================================================================
   Footer Main Section
   ========================================================================== */

.em-footer__main {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--em-space-8);
	max-width: var(--em-container-wide);
	margin: 0 auto;
	padding: var(--em-space-12) var(--em-space-4);
}

@media (min-width: 640px) {
	.em-footer__main {
		grid-template-columns: repeat(2, 1fr);
		gap: var(--em-space-6);
		padding: var(--em-space-12) var(--em-space-6);
	}
}

@media (min-width: 1024px) {
	.em-footer__main {
		grid-template-columns: 1.5fr repeat(2, 1fr) 1.5fr;
		gap: var(--em-space-8);
	}
}

/* ==========================================================================
   Footer Brand
   ========================================================================== */

.em-footer__brand {
	grid-column: 1 / -1;
}

@media (min-width: 1024px) {
	.em-footer__brand {
		grid-column: 1 / 2;
	}
}

.em-footer__logo {
	margin-bottom: var(--em-space-4);
}

.em-footer__logo-link {
	display: inline-flex;
	align-items: center;
	gap: var(--em-space-4);
	text-decoration: none;
}

.em-footer__logo-img {
	max-height: 50px;
	width: auto;
	height: auto;
	filter: brightness(0) invert(1);
}

.em-footer__site-name {
	font-family: var(--em-font-headline);
	font-size: 32px;
	line-height: 1;
	font-weight: 400;
	text-transform: uppercase;
	color: var(--em-text-inverse);
	letter-spacing: 0.02em;
}

/* Legacy support */
.em-footer__logo img {
	max-height: 50px;
	width: auto;
	height: auto;
	filter: brightness(0) invert(1);
}

.em-footer__logo a {
	display: inline-flex;
	text-decoration: none;
}

.em-footer__site-title {
	font-size: var(--em-text-xl);
	font-weight: var(--em-font-bold);
	color: var(--em-text-inverse);
	margin: 0;
}

.em-footer__tagline {
	font-size: var(--em-text-sm);
	color: var(--em-neutral-400);
	margin: 0 0 var(--em-space-4);
	max-width: 280px;
	line-height: var(--em-leading-relaxed);
}

/* ==========================================================================
   Footer Columns (Navigation)
   ========================================================================== */

.em-footer__column {
	min-width: 0;
}

.em-footer__column-title {
	font-size: var(--em-text-base);
	font-weight: var(--em-font-semibold);
	color: var(--em-text-inverse);
	margin: 0 0 var(--em-space-4);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.em-footer__menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.em-footer__menu li {
	margin-bottom: var(--em-space-2);
}

.em-footer__menu a {
	color: var(--em-neutral-400);
	text-decoration: none;
	font-size: var(--em-text-sm);
	transition: color var(--em-duration-fast) var(--em-ease);
}

.em-footer__menu a:hover,
.em-footer__menu a:focus {
	color: var(--em-text-inverse);
}

/* Contact info column */
.em-footer__contact {
	font-size: var(--em-text-sm);
	color: var(--em-neutral-400);
}

.em-footer__contact-item {
	display: flex;
	align-items: flex-start;
	gap: var(--em-space-2);
	margin-bottom: var(--em-space-3);
}

.em-footer__contact-item svg {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	color: var(--em-neutral-500);
	margin-top: 2px;
}

.em-footer__contact-link {
	color: var(--em-neutral-400);
	text-decoration: none;
	transition: color var(--em-duration-fast) var(--em-ease);
}

.em-footer__contact-link:hover,
.em-footer__contact-link:focus {
	color: var(--em-text-inverse);
}

/* ==========================================================================
   Newsletter Section
   ========================================================================== */

.em-footer__newsletter {
	grid-column: 1 / -1;
}

@media (min-width: 1024px) {
	.em-footer__newsletter {
		grid-column: 4 / 5;
	}
}

.em-footer__newsletter-title {
	font-size: var(--em-text-base);
	font-weight: var(--em-font-semibold);
	color: var(--em-text-inverse);
	margin: 0 0 var(--em-space-2);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.em-footer__newsletter-text {
	font-size: var(--em-text-sm);
	color: var(--em-neutral-400);
	margin: 0 0 var(--em-space-4);
	line-height: var(--em-leading-relaxed);
}

/* HubSpot form overrides */
.em-footer__newsletter .hs-form {
	display: flex;
	gap: var(--em-space-2);
}

.em-footer__newsletter .hs-form-field {
	flex: 1;
}

.em-footer__newsletter .hs-input {
	width: 100%;
	padding: var(--em-space-2) var(--em-space-3);
	background-color: var(--em-neutral-800);
	border: var(--em-border) solid var(--em-neutral-700);
	border-radius: var(--em-radius);
	color: var(--em-text-inverse);
	font-size: var(--em-text-sm);
}

.em-footer__newsletter .hs-input::placeholder {
	color: var(--em-neutral-500);
}

.em-footer__newsletter .hs-input:focus {
	outline: none;
	border-color: var(--em-color-accent);
}

.em-footer__newsletter .hs-submit {
	flex-shrink: 0;
}

.em-footer__newsletter .hs-button {
	padding: var(--em-space-2) var(--em-space-4);
	background-color: var(--em-color-accent);
	color: var(--em-text-inverse);
	border: none;
	border-radius: var(--em-radius);
	font-size: var(--em-text-sm);
	font-weight: var(--em-font-medium);
	cursor: pointer;
	transition: background-color var(--em-duration-fast) var(--em-ease);
}

.em-footer__newsletter .hs-button:hover,
.em-footer__newsletter .hs-button:focus {
	background-color: var(--em-color-primary);
}

/* Fallback newsletter form */
.em-footer__newsletter-form {
	display: flex;
	gap: var(--em-space-2);
}

.em-footer__newsletter-input {
	flex: 1;
	padding: var(--em-space-2) var(--em-space-3);
	background-color: var(--em-neutral-800);
	border: var(--em-border) solid var(--em-neutral-700);
	border-radius: var(--em-radius);
	color: var(--em-text-inverse);
	font-size: var(--em-text-sm);
}

.em-footer__newsletter-input::placeholder {
	color: var(--em-neutral-500);
}

.em-footer__newsletter-input:focus {
	outline: none;
	border-color: var(--em-color-accent);
}

.em-footer__newsletter-btn {
	flex-shrink: 0;
	padding: var(--em-space-2) var(--em-space-4);
	background-color: var(--em-color-accent);
	color: var(--em-text-inverse);
	border: none;
	border-radius: var(--em-radius);
	font-size: var(--em-text-sm);
	font-weight: var(--em-font-medium);
	cursor: pointer;
	transition: background-color var(--em-duration-fast) var(--em-ease);
}

.em-footer__newsletter-btn:hover,
.em-footer__newsletter-btn:focus {
	background-color: var(--em-color-primary);
}

/* ==========================================================================
   Social Links
   ========================================================================== */

.em-footer__social {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--em-space-4);
	padding: var(--em-space-6) var(--em-space-4);
	border-top: var(--em-border) solid var(--em-neutral-800);
	border-bottom: var(--em-border) solid var(--em-neutral-800);
}

.em-footer__social-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	color: var(--em-neutral-400);
	border-radius: var(--em-radius-full);
	transition: color var(--em-duration-fast) var(--em-ease),
	            background-color var(--em-duration-fast) var(--em-ease);
}

.em-footer__social-link:hover,
.em-footer__social-link:focus {
	color: var(--em-text-inverse);
	background-color: var(--em-neutral-800);
}

.em-footer__social-link svg {
	width: 22px;
	height: 22px;
}

/* ==========================================================================
   Footer Bottom
   ========================================================================== */

.em-footer__bottom {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--em-space-4);
	max-width: var(--em-container-wide);
	margin: 0 auto;
	padding: var(--em-space-6) var(--em-space-4);
}

@media (min-width: 768px) {
	.em-footer__bottom {
		flex-direction: row;
		justify-content: space-between;
		flex-wrap: wrap;
	}
}

/* Payment icons */
.em-footer__payments {
	display: flex;
	align-items: center;
	gap: var(--em-space-2);
	order: 1;
}

@media (min-width: 768px) {
	.em-footer__payments {
		order: 2;
	}
}

.em-footer__payment-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 28px;
	background-color: var(--em-bg-primary);
	border-radius: var(--em-radius);
	padding: var(--em-space-1);
}

.em-footer__payment-icon svg {
	max-width: 100%;
	max-height: 100%;
}

/* Copyright */
.em-footer__copyright {
	font-size: var(--em-text-sm);
	color: var(--em-neutral-500);
	text-align: center;
	order: 3;
}

@media (min-width: 768px) {
	.em-footer__copyright {
		order: 1;
		text-align: left;
	}
}

/* Legal links */
.em-footer__legal {
	display: flex;
	align-items: center;
	gap: var(--em-space-4);
	order: 2;
}

@media (min-width: 768px) {
	.em-footer__legal {
		order: 3;
	}
}

.em-footer__legal-link {
	font-size: var(--em-text-sm);
	color: var(--em-neutral-500);
	text-decoration: none;
	transition: color var(--em-duration-fast) var(--em-ease);
}

.em-footer__legal-link:hover,
.em-footer__legal-link:focus {
	color: var(--em-text-inverse);
}

/* ==========================================================================
   Footer Widget Areas
   ========================================================================== */

.em-footer-widget {
	margin-bottom: var(--em-space-4);
}

.em-footer-widget__title {
	font-size: var(--em-text-base);
	font-weight: var(--em-font-semibold);
	color: var(--em-text-inverse);
	margin: 0 0 var(--em-space-4);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/* Footer Map */
.em-footer__map {
	margin-top: var(--em-space-4, 1rem);
}

.em-footer__map a {
	display: block;
	border-radius: 8px;
	overflow: hidden;
	transition: opacity 0.2s ease;
}

.em-footer__map a:hover {
	opacity: 0.9;
}

.em-footer__map iframe {
	display: block;
}
