/* =========================================================================
   FMarket Footer — twilight skyline edition
   ----------------------------------------------------------------------
   Curvy wave top + block-style apartment skyline + 3-column content.
   Đặt sau parent style.css để override (xem functions.php).
   ========================================================================= */

:root {
	--fm-sky-1: #0d1b3d;
	--fm-sky-2: #2a3766;
	--fm-sky-3: #3b4a85;
	--fm-building-1: #050c1f;
	--fm-building-2: #0a1635;
	--fm-window-on: #ffd166;
	--fm-window-glow: #ffa94d;
	--fm-text: #f5f7ff;
	--fm-text-dim: rgba(245, 247, 255, 0.7);
	--fm-accent: #4ecdc4;
	--fm-divider: rgba(255, 255, 255, 0.12);
}

/* ── Container ─────────────────────────────────────────────────────── */
.fmarket-footer {
	position: relative;
	overflow: hidden;
	background: linear-gradient(180deg, var(--fm-sky-1) 0%, var(--fm-sky-2) 55%, var(--fm-sky-3) 100%);
	color: var(--fm-text);
	margin-top: 0;
	padding-top: 0;
	isolation: isolate;
}

/* ── Wave top (curvy transition) ──────────────────────────────────── */
.fmarket-footer__wave {
	display: block;
	width: 100%;
	height: 100px;
	transform: translateY(1px);  /* sub-pixel gap fix */
}
.fmarket-footer__wave path { transition: fill 0.3s ease; }

/* ── Stars layer (pseudo, subtle) ─────────────────────────────────── */
.fmarket-footer::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		radial-gradient(1px 1px at 20% 15%, rgba(255,255,255,0.9), transparent),
		radial-gradient(1px 1px at 38% 8%, rgba(255,255,255,0.7), transparent),
		radial-gradient(1.5px 1.5px at 55% 22%, rgba(255,255,255,0.8), transparent),
		radial-gradient(1px 1px at 73% 12%, rgba(255,255,255,0.6), transparent),
		radial-gradient(1px 1px at 88% 18%, rgba(255,255,255,0.9), transparent),
		radial-gradient(2px 2px at 12% 28%, rgba(255,255,255,0.5), transparent),
		radial-gradient(1px 1px at 47% 32%, rgba(255,255,255,0.7), transparent),
		radial-gradient(1.5px 1.5px at 65% 6%, rgba(255,255,255,0.8), transparent),
		radial-gradient(1px 1px at 92% 31%, rgba(255,255,255,0.6), transparent);
	background-size: 100% 60%;
	background-repeat: no-repeat;
	pointer-events: none;
	z-index: 0;
	animation: fm-twinkle 6s ease-in-out infinite;
}
@keyframes fm-twinkle {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.55; }
}

/* ── Moon ──────────────────────────────────────────────────────────── */
.fmarket-footer__moon {
	position: absolute;
	top: 110px;
	right: 8%;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 35%, #fff8dc 0%, #ffe7a3 60%, #ffc987 100%);
	box-shadow:
		0 0 30px rgba(255, 209, 102, 0.4),
		0 0 60px rgba(255, 209, 102, 0.2),
		inset -8px -8px 0 0 rgba(0, 0, 0, 0.08);
	z-index: 1;
	pointer-events: none;
}
.fmarket-footer__moon::before {
	content: "";
	position: absolute;
	top: 18%;
	left: 22%;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.08);
}
.fmarket-footer__moon::after {
	content: "";
	position: absolute;
	top: 55%;
	left: 60%;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.06);
}

/* ── Content columns ──────────────────────────────────────────────── */
.fmarket-footer__inner {
	position: relative;
	z-index: 5;
	max-width: 1200px;
	margin: 0 auto;
	padding: 60px 24px 220px;  /* bottom pad reserved for skyline */
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
	gap: 48px;
}

.fmarket-footer__col h3 {
	color: var(--fm-text);
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	margin: 0 0 18px;
	position: relative;
	padding-bottom: 10px;
}
.fmarket-footer__col h3::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 32px;
	height: 2px;
	background: linear-gradient(90deg, var(--fm-window-on), var(--fm-window-glow));
	border-radius: 2px;
}

.fmarket-footer__col p,
.fmarket-footer__col li {
	color: var(--fm-text-dim);
	font-size: 14px;
	line-height: 1.7;
	margin: 0 0 8px;
}
.fmarket-footer__col ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.fmarket-footer__col a {
	color: var(--fm-text-dim);
	text-decoration: none;
	transition: color 0.2s ease, padding-left 0.2s ease;
	display: inline-block;
}
.fmarket-footer__col a:hover {
	color: var(--fm-window-on);
	padding-left: 4px;
}

/* Brand col */
.fmarket-footer__brand-logo {
	font-size: 24px;
	font-weight: 800;
	letter-spacing: 0.02em;
	color: var(--fm-text);
	margin: 0 0 12px;
	display: flex;
	align-items: center;
	gap: 8px;
}
.fmarket-footer__brand-logo span {
	background: linear-gradient(135deg, var(--fm-window-on), var(--fm-window-glow));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.fmarket-footer__brand-tagline {
	color: var(--fm-text-dim);
	font-size: 14px;
	line-height: 1.6;
	margin: 0 0 20px;
	max-width: 320px;
}
.fmarket-footer__social {
	display: flex;
	gap: 10px;
	margin-top: 16px;
}
.fmarket-footer__social a {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--fm-text);
	transition: background 0.2s ease, transform 0.2s ease;
	font-size: 16px;
}
.fmarket-footer__social a:hover {
	background: var(--fm-window-on);
	color: var(--fm-sky-1);
	transform: translateY(-2px);
	padding-left: 0;
}
.fmarket-footer__social svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
}

/* Contact list with icons */
.fmarket-footer__contact li {
	display: flex;
	gap: 10px;
	align-items: flex-start;
}
.fmarket-footer__contact .fm-ico {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	margin-top: 2px;
	color: var(--fm-window-on);
}

/* Search form trong brand column */
.fmarket-footer__search {
	display: flex;
	margin: 14px 0 4px;
	background: rgba(255, 255, 255, 0.07);
	border-radius: 999px;
	overflow: hidden;
	max-width: 320px;
	border: 1px solid rgba(255, 255, 255, 0.1);
}
.fmarket-footer__search input[type=search] {
	flex: 1;
	min-width: 0;
	background: transparent;
	border: 0;
	color: var(--fm-text);
	padding: 9px 14px;
	font-size: 13px;
	outline: none;
}
.fmarket-footer__search input::placeholder { color: rgba(255,255,255,0.45); }
.fmarket-footer__search input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; }
.fmarket-footer__search button {
	background: transparent;
	border: 0;
	color: var(--fm-text-dim);
	padding: 0 14px;
	cursor: pointer;
	transition: color 0.2s ease;
}
.fmarket-footer__search button:hover { color: var(--fm-window-on); }

/* Short blurb dưới heading (col "Đăng kí Bán hàng") */
.fmarket-footer__col-blurb {
	font-size: 13px;
	color: var(--fm-text-dim);
	line-height: 1.6;
	margin: 0 0 14px;
}

/* Location column — Khu vực FPT City */
.fmarket-footer__address {
	color: var(--fm-text-dim);
	font-size: 14px;
	line-height: 1.6;
	margin: 0 0 12px;
}
.fmarket-footer__address strong {
	color: var(--fm-text);
	font-weight: 700;
	display: block;
	margin-bottom: 2px;
}
.fmarket-footer__map-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	background: linear-gradient(135deg, var(--fm-window-on), var(--fm-window-glow));
	color: var(--fm-sky-1) !important;
	border-radius: 999px;
	font-weight: 600;
	font-size: 13px;
	text-decoration: none;
	transition: filter 0.2s ease, transform 0.2s ease;
	margin-bottom: 12px;
}
.fmarket-footer__map-btn:hover {
	filter: brightness(1.08);
	transform: translateY(-2px);
	padding-left: 14px !important;  /* override col a:hover rule */
}
.fmarket-footer__f2f {
	color: var(--fm-window-on);
	font-size: 13px;
	font-style: italic;
	margin: 0 0 16px;
	letter-spacing: 0.01em;
}

/* Newsletter */
.fmarket-footer__newsletter form {
	display: flex;
	margin-top: 4px;
	background: rgba(255, 255, 255, 0.08);
	border-radius: 999px;
	overflow: hidden;
	max-width: 100%;
	border: 1px solid rgba(255, 255, 255, 0.1);
}
.fmarket-footer__newsletter input[type=email] {
	flex: 1;
	min-width: 0;
	background: transparent;
	border: 0;
	color: var(--fm-text);
	padding: 10px 14px;
	font-size: 13px;
	outline: none;
}
.fmarket-footer__newsletter input::placeholder { color: rgba(255,255,255,0.45); }
.fmarket-footer__newsletter button {
	background: linear-gradient(135deg, var(--fm-window-on), var(--fm-window-glow));
	border: 0;
	color: var(--fm-sky-1);
	font-weight: 700;
	padding: 10px 18px;
	cursor: pointer;
	font-size: 13px;
	transition: filter 0.2s ease;
}
.fmarket-footer__newsletter button:hover { filter: brightness(1.1); }

/* ── Skyline (apartment buildings) ────────────────────────────────── */
.fmarket-footer__skyline {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 60px;  /* leaves room for copyright */
	width: 100%;
	height: 200px;
	display: block;
	pointer-events: none;
	z-index: 2;
}

/* Subtle window glow animation — random building lights */
@keyframes fm-flicker-1 { 0%, 92%, 100% { opacity: 1; } 95% { opacity: 0.35; } }
@keyframes fm-flicker-2 { 0%, 88%, 100% { opacity: 1; } 92% { opacity: 0.4; } }
.fmarket-footer__skyline .fm-win-flicker-a { animation: fm-flicker-1 8s ease-in-out infinite; }
.fmarket-footer__skyline .fm-win-flicker-b { animation: fm-flicker-2 11s ease-in-out infinite 1.5s; }

/* ── Copyright strip ──────────────────────────────────────────────── */
.fmarket-footer__copyright {
	position: relative;
	z-index: 6;
	background: rgba(5, 12, 31, 0.85);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border-top: 1px solid var(--fm-divider);
	padding: 18px 24px;
	text-align: center;
	color: var(--fm-text-dim);
	font-size: 13px;
}
.fmarket-footer__copyright strong { color: var(--fm-text); }
.fmarket-footer__copyright .fm-heart {
	display: inline-block;
	color: #ff6b6b;
	animation: fm-pulse 1.4s ease-in-out infinite;
}
@keyframes fm-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 960px) {
	.fmarket-footer__inner {
		grid-template-columns: 1fr 1fr;
		gap: 36px;
		padding: 50px 20px 200px;
	}
	.fmarket-footer__moon { width: 44px; height: 44px; top: 80px; right: 6%; }
}
@media (max-width: 600px) {
	.fmarket-footer__inner {
		grid-template-columns: 1fr;
		gap: 32px;
		padding: 40px 20px 180px;
	}
	.fmarket-footer__skyline { height: 150px; bottom: 50px; }
	.fmarket-footer__moon { width: 38px; height: 38px; top: 60px; right: 8%; }
	.fmarket-footer__wave { height: 70px; }
}

/* ── Override Dokani's old footer wrappers to hide gracefully ───── */
.site-footer { background: transparent !important; }
.site-footer .site-info { display: none; }  /* old copyright moved into fmarket-footer__copyright */
