/**
 * DinnerlyHub - Footer Layout
 * 4-column footer with brand, explore recipes, quick links, and newsletter.
 * Features SVG pattern background, floating icons, and back-to-top button.
 */

/* Scoped reset */
.dh-footer *,
.dh-footer *::before,
.dh-footer *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

.dh-footer {
	font-family: var(--dh-font);
	position: relative;
	overflow: hidden;
}

/* ==========================================================================
   MAIN FOOTER AREA
   ========================================================================== */

.dh-footer__main {
	position: relative;
	background: linear-gradient(135deg, #1a3228 0%, #0f1f18 100%);
	padding: 80px 24px 60px;
	overflow: hidden;
}

/* Background pattern */
.dh-footer__bg-pattern {
	position: absolute;
	inset: 0;
	background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
	pointer-events: none;
}

/* Decorative blurs */
.dh-footer__decor {
	position: absolute;
	border-radius: 50%;
	pointer-events: none;
	filter: blur(80px);
}

.dh-footer__decor--1 {
	width: 300px;
	height: 300px;
	background: var(--dh-green);
	opacity: 0.15;
	top: -100px;
	left: -80px;
}

.dh-footer__decor--2 {
	width: 250px;
	height: 250px;
	background: var(--dh-orange);
	opacity: 0.1;
	bottom: -60px;
	right: -60px;
}

/* Floating icons */
.dh-footer__float {
	position: absolute;
	width: 45px;
	height: 45px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 50%;
	color: rgba(255, 255, 255, 0.3);
	animation: footerFloat 6s ease-in-out infinite;
}

.dh-footer__float--1 {
	top: 15%;
	right: 10%;
	animation-delay: 0s;
}

.dh-footer__float--2 {
	bottom: 25%;
	left: 8%;
	animation-delay: -3s;
}

@keyframes footerFloat {
	0%, 100% { transform: translateY(0) rotate(0deg); }
	50% { transform: translateY(-10px) rotate(5deg); }
}

/* ==========================================================================
   FOOTER INNER GRID
   ========================================================================== */

.dh-footer__inner {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
	gap: 48px;
	max-width: var(--dh-max-width);
	margin: 0 auto;
	align-items: start;
}

/* ==========================================================================
   BRAND COLUMN
   ========================================================================== */

.dh-footer__brand {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.dh-footer__logo {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	width: fit-content;
	transition: transform 0.3s ease;
}

.dh-footer__logo:hover {
	transform: translateY(-2px);
}

.dh-footer__logo:focus-visible {
	outline: 2px solid var(--dh-orange);
	outline-offset: 4px;
	border-radius: 4px;
}

.dh-footer__logo-icon {
	width: 42px;
	height: 42px;
}

/* Custom uploaded logo */
.dh-footer__logo-custom {
	height: 50px;
	width: auto;
	max-width: 200px;
	object-fit: contain;
	display: block;
	filter: brightness(0) invert(1);
	transition: transform 0.3s ease, filter 0.3s ease;
}

.dh-footer__logo:hover .dh-footer__logo-custom {
	transform: scale(1.03);
}

.dh-footer__logo-img {
	height: 40px;
	width: auto;
	max-width: 160px;
	object-fit: contain;
	filter: brightness(0) invert(1);
}

.dh-footer__logo-text {
	display: flex;
	flex-direction: column;
}

.dh-footer__logo-name {
	font-size: 1.25rem;
	font-weight: 700;
	font-family: var(--dh-font-heading, 'Poppins', sans-serif);
	color: #fff;
	letter-spacing: -0.3px;
	line-height: 1.2;
}

.dh-footer__logo-sub {
	font-size: 0.7rem;
	color: rgba(255, 255, 255, 0.5);
	letter-spacing: 0.5px;
}

.dh-footer__tagline {
	font-size: 0.95rem;
	color: rgba(255, 255, 255, 0.7);
	line-height: 1.7;
	max-width: 280px;
}

/* ==========================================================================
   SOCIAL ICONS
   ========================================================================== */

.dh-footer__social {
	display: flex;
	gap: 10px;
	list-style: none;
}

.dh-footer__social-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: var(--dh-radius-md);
	color: rgba(255, 255, 255, 0.7);
	text-decoration: none;
	transition: all 0.3s ease;
}

.dh-footer__social-link:hover {
	background: var(--dh-orange);
	border-color: var(--dh-orange);
	color: #fff;
	transform: translateY(-3px);
	box-shadow: 0 6px 20px rgba(242, 101, 34, 0.3);
}

.dh-footer__social-link:focus-visible {
	outline: 2px solid var(--dh-orange);
	outline-offset: 3px;
}

/* ==========================================================================
   LINK COLUMNS
   ========================================================================== */

.dh-footer__col {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.dh-footer__heading {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.8rem;
	font-weight: 700;
	font-family: var(--dh-font-heading, 'Poppins', sans-serif);
	color: #fff;
	text-transform: uppercase;
	letter-spacing: 1.5px;
}

.dh-footer__heading-icon {
	width: 16px;
	height: 16px;
	color: var(--dh-orange);
	flex-shrink: 0;
}

.dh-footer__heading-line {
	flex: 1;
	height: 1px;
	background: linear-gradient(90deg, rgba(255,255,255,0.15) 0%, transparent 100%);
	margin-left: 8px;
}

.dh-footer__links {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.dh-footer__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 0.9rem;
	color: rgba(255, 255, 255, 0.65);
	text-decoration: none;
	transition: all 0.3s ease;
	padding: 4px 0;
}

.dh-footer__link-icon {
	width: 14px;
	height: 14px;
	opacity: 0;
	color: var(--dh-orange);
	transform: translateX(-8px);
	transition: all 0.3s ease;
	flex-shrink: 0;
}

.dh-footer__link:hover {
	color: #fff;
	transform: translateX(4px);
}

.dh-footer__link:hover .dh-footer__link-icon {
	opacity: 1;
	transform: translateX(0);
}

.dh-footer__link:focus-visible {
	outline: 2px solid var(--dh-orange);
	outline-offset: 3px;
	border-radius: 3px;
}

/* ==========================================================================
   NEWSLETTER COLUMN
   ========================================================================== */

.dh-footer__newsletter {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.dh-footer__newsletter-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	background: rgba(242, 101, 34, 0.15);
	border: 1px solid rgba(242, 101, 34, 0.25);
	border-radius: var(--dh-radius-pill);
	width: fit-content;
}

.dh-footer__newsletter-badge svg {
	width: 14px;
	height: 14px;
	color: var(--dh-orange);
}

.dh-footer__newsletter-badge span {
	font-size: 0.7rem;
	font-weight: 700;
	color: var(--dh-orange);
	letter-spacing: 0.5px;
	text-transform: uppercase;
}

.dh-footer__newsletter-text {
	font-size: 0.9rem;
	color: rgba(255, 255, 255, 0.65);
	line-height: 1.5;
}

.dh-footer__newsletter-form {
	display: flex;
	gap: 8px;
}

.dh-footer__newsletter-input {
	flex: 1;
	padding: 12px 16px;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: var(--dh-radius-pill);
	font-size: 0.9rem;
	font-family: var(--dh-font);
	color: #fff;
	transition: all 0.3s ease;
}

.dh-footer__newsletter-input::placeholder {
	color: rgba(255, 255, 255, 0.4);
}

.dh-footer__newsletter-input:focus {
	outline: none;
	border-color: var(--dh-orange);
	background: rgba(255, 255, 255, 0.12);
}

.dh-footer__newsletter-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	background: var(--dh-orange);
	border: none;
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	transition: all 0.3s ease;
	flex-shrink: 0;
}

.dh-footer__newsletter-btn:hover {
	background: var(--dh-orange-dark);
	transform: scale(1.05);
	box-shadow: 0 4px 16px rgba(242, 101, 34, 0.4);
}

.dh-footer__newsletter-btn:focus-visible {
	outline: 2px solid var(--dh-orange);
	outline-offset: 3px;
}

/* ==========================================================================
   BOTTOM BAR
   ========================================================================== */

.dh-footer__bottom {
	position: relative;
	background: linear-gradient(135deg, #0f1a15 0%, #0a100d 100%);
	padding: 20px 24px;
}

.dh-footer__bottom-inner {
	max-width: var(--dh-max-width);
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.dh-footer__copy {
	font-size: 0.85rem;
	color: rgba(255, 255, 255, 0.5);
}

.dh-footer__copy-link {
	color: rgba(255, 255, 255, 0.7);
	text-decoration: none;
	transition: color 0.3s ease;
}

.dh-footer__copy-link:hover {
	color: var(--dh-orange);
}

.dh-footer__bottom-links {
	display: flex;
	gap: 24px;
	list-style: none;
}

.dh-footer__bottom-link {
	font-size: 0.85rem;
	color: rgba(255, 255, 255, 0.5);
	text-decoration: none;
	transition: color 0.3s ease;
}

.dh-footer__bottom-link:hover {
	color: var(--dh-orange);
}

.dh-footer__bottom-link:focus-visible {
	outline: 2px solid var(--dh-orange);
	outline-offset: 3px;
	border-radius: 3px;
}

/* ==========================================================================
   BACK TO TOP BUTTON
   ========================================================================== */

.dh-footer__back-top {
	position: absolute;
	top: -24px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	background: var(--dh-green);
	border: 3px solid #0f1a15;
	border-radius: 50%;
	color: #fff;
	text-decoration: none;
	transition: all 0.3s ease;
	box-shadow: 0 4px 16px rgba(74, 124, 89, 0.3);
}

.dh-footer__back-top:hover {
	transform: translateX(-50%) translateY(-4px);
	box-shadow: 0 8px 24px rgba(74, 124, 89, 0.4);
}

.dh-footer__back-top:focus-visible {
	outline: 2px solid var(--dh-green);
	outline-offset: 3px;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
	.dh-footer__inner {
		grid-template-columns: 1fr 1fr;
		gap: 40px;
	}

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

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

	.dh-footer__float {
		display: none;
	}
}

@media (max-width: 768px) {
	.dh-footer__main {
		padding: 60px 20px 48px;
	}

	.dh-footer__inner {
		grid-template-columns: 1fr 1fr;
		gap: 32px;
	}

	.dh-footer__bottom-inner {
		flex-direction: column;
		text-align: center;
	}

	.dh-footer__bottom-links {
		flex-wrap: wrap;
		justify-content: center;
		gap: 16px;
	}
}

@media (max-width: 480px) {
	.dh-footer__main {
		padding: 48px 16px 40px;
	}

	.dh-footer__inner {
		grid-template-columns: 1fr;
		gap: 28px;
	}

	.dh-footer__brand {
		grid-column: auto;
	}

	.dh-footer__tagline {
		max-width: 100%;
	}

	.dh-footer__logo-custom {
		height: 42px;
		max-width: 160px;
	}

	.dh-footer__newsletter-form {
		flex-direction: column;
	}

	.dh-footer__newsletter-btn {
		width: 100%;
		border-radius: var(--dh-radius-pill);
	}

	.dh-footer__bottom {
		padding: 16px 20px;
	}
}
