/*
 * Temple footer.
 * Brown background, cream text, vermilion-red hover.
 * Typography: 方正悠宋 (FZYouSong) with Song-style fallbacks.
 */

body.temple-site .temple-default-footer-hidden {
	display: none !important;
}

html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

/* Sticky-footer: push temple-footer to bottom of viewport on short pages */
body.temple-site {
	display: flex;
	flex-direction: column;
	min-height: 100dvh;
}

body.temple-site .site {
	flex: 1 0 auto;
}

body.temple-site .temple-footer {
	flex-shrink: 0;
}

body.temple-site .temple-footer {
	background: var(--temple-brown);
	color: #ffffff;
	font-family: var(--temple-serif-cn);
	font-size: 1.16rem;
	font-weight: 300;
	letter-spacing: 0.04em;
	line-height: 1.9;
	padding: 3.5rem 1.5rem 1.75rem;
	width: 100%;
}

body.temple-site .temple-footer-inner {
	max-width: 1280px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: 1fr 0.6fr 0.75fr;
	justify-content: center;
	gap: 2.5rem;
	align-items: start;
}

body.temple-site .temple-footer-col {
	min-width: 0;
}

body.temple-site .temple-footer a {
	color: #ffffff;
	text-decoration: none;
	transition: color 0.2s ease;
}

body.temple-site .temple-footer a:hover,
body.temple-site .temple-footer a:focus {
	color: var(--temple-red);
}

/* --- Column 1: brand / map --- */

body.temple-site .temple-footer-brand-row {
	display: flex;
	align-items: center;
	gap: 0.8rem;
	margin-bottom: 1.2rem;
}

body.temple-site .temple-footer-logo {
	height: 2.6rem;
	width: auto;
	display: block;
	background: transparent;
}

body.temple-site .temple-footer-divider {
	color: rgba(255, 255, 255, 0.45);
	font-weight: 300;
	font-size: 1.28rem;
	line-height: 1;
}

body.temple-site .temple-footer-name {
	font-size: 1.25rem;
	font-weight: 400;
	letter-spacing: 0.08em;
	color: #ffffff;
}

body.temple-site .temple-footer-address {
	margin: 0 0 0.6rem;
	font-size: 1rem;
	color: rgba(255, 255, 255, 0.82);
}

body.temple-site .temple-footer-map {
	display: flex;
	flex-direction: column;
	gap: 0.8rem;
	margin: 1.05rem 0 0;
	max-width: 16rem;
}

body.temple-site .temple-footer-map-frame {
	aspect-ratio: 1;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 8px;
	display: block;
	overflow: hidden;
	position: relative;
	width: 100%;
}

body.temple-site .temple-footer-map-frame iframe {
	border: 0;
	display: block;
	height: 100%;
	inset: 0;
	position: absolute;
	width: 100%;
}

body.temple-site .temple-footer-amap {
	height: 100%;
	inset: 0;
	position: absolute;
	width: 100%;
}

body.temple-site .temple-footer-map-info {
	color: var(--temple-black);
	display: grid;
	font-family: var(--temple-serif-cn);
	gap: 0.2rem;
	line-height: 1.5;
	max-width: 13rem;
	padding: 0.1rem;
}

body.temple-site .temple-footer-map-info strong {
	color: var(--temple-brown);
	font-size: 0.98rem;
	font-weight: 500;
}

body.temple-site .temple-footer-map-info span {
	color: rgba(29, 27, 26, 0.72);
	font-size: 0.86rem;
}

body.temple-site .temple-footer-map-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
}

body.temple-site .temple-footer-map-link {
	align-self: flex-start;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.38);
	border-radius: 0;
	color: rgba(255, 255, 255, 0.92) !important;
	display: inline-flex;
	font-size: 0.92rem;
	justify-content: center;
	letter-spacing: 0.02em;
	line-height: 1;
	padding: 0.62rem 0.9rem;
}

body.temple-site .temple-footer-map-link-primary {
	background: #ffffff;
	border-color: #ffffff;
	color: var(--temple-brown) !important;
}

body.temple-site .temple-footer-map-link:hover,
body.temple-site .temple-footer-map-link:focus {
	background: var(--temple-red);
	border-color: var(--temple-red);
	color: #ffffff !important;
}

/* --- Column 2: overview menu --- */

body.temple-site .temple-footer-menu-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
}

body.temple-site .temple-footer-menu-list li {
	margin: 0;
	padding: 0;
}

body.temple-site .temple-footer-menu-list a {
	display: inline-block;
	font-size: 1.04rem;
	color: rgba(255, 255, 255, 0.88);
}

/* --- Column 3: contact --- */

body.temple-site .temple-footer-heading {
	margin: 0 0 1.1rem;
	font-size: 1.2rem;
	font-weight: 400;
	color: #ffffff;
	letter-spacing: 0.12em;
}

body.temple-site .temple-footer-hours {
	margin: 0 0 0.9rem;
	font-size: 1.03rem;
	color: rgba(255, 255, 255, 0.85);
}

body.temple-site .temple-footer-line {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin: 0 0 0.55rem;
	font-size: 1.03rem;
	color: rgba(255, 255, 255, 0.9);
}

body.temple-site .temple-footer-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.4rem;
	height: 1.4rem;
	color: rgba(255, 255, 255, 0.75);
	flex: 0 0 auto;
}

body.temple-site .temple-footer-icon svg {
	display: block;
}

body.temple-site .temple-footer-icon img {
	display: block;
	height: 1.15rem;
	width: 1.15rem;
}

body.temple-site .temple-footer-social {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	margin-top: 1.2rem;
}

body.temple-site .temple-footer-social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.1rem;
	height: 2.1rem;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	transition: background 0.2s ease, transform 0.2s ease;
}

body.temple-site .temple-footer-social-link:hover,
body.temple-site .temple-footer-social-link:focus {
	background: var(--temple-red);
	transform: translateY(-1px);
}

body.temple-site .temple-footer-social-link img {
	width: 1.1rem;
	height: 1.1rem;
	display: block;
	filter: brightness(0) invert(1);
}

/* --- Responsive --- */

@media (max-width: 900px) {
	body.temple-site .temple-footer {
		padding: 2.6rem 1.4rem 2rem;
	}

	body.temple-site .temple-footer-inner {
		grid-template-columns: 1fr;
		gap: 2rem;
	}

	body.temple-site .temple-footer-map-frame {
		max-width: 18rem;
	}
}
