/*
Theme Name: LandTW GP Child
Theme URI: https://landtw.com
Description: GeneratePress child theme for landtw.com — 2019 layout replication.
Author: LandTW
Template: generatepress
Version: 0.1
Text Domain: landtw-gp
*/

/* === Localized header (Hugo-style signboard) ============================ */

.landtw-localized-header {
	background: #ffffff;
	color: #333333;
}

/* Row 1 — red signboard, white text */
.landtw-signboard {
	text-align: center;
	padding: 0 1rem;
}

.landtw-signboard__link,
.landtw-signboard__link:hover,
.landtw-signboard__link:focus,
.landtw-signboard__link:visited {
	color: inherit;
	text-decoration: none;
}

.landtw-signboard__title {
	margin: 0;
	font-size: clamp(24px, 6vw, 64px);
	line-height: 1.25;
	font-weight: 700;
	letter-spacing: -0.01em;
}

/*
 * Mobile: <br class="landtw-signboard__break"> renders, breaking the line
 * before the full-width space + brand name.
 * Desktop (>= 768px): hide the <br> so the title stays on one visual line;
 * the full-width space (　) in markup provides the inter-phrase gap.
 * Mirrors Hugo's <br class="md:hidden">.
 */
.landtw-signboard__break {
	display: inline;
}

@media (min-width: 768px) {
	.landtw-signboard__break {
		display: none;
	}
	.landtw-signboard__title {
		white-space: nowrap;
	}
}

/* Row 2 — tagline + CTA */
.landtw-gp-header-row {
	padding-block: 0 1rem;
}

.landtw-gp-header-row__inner {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.75rem;
	align-items: center;
}

@media (min-width: 768px) {
	.landtw-gp-header-row__inner {
		grid-template-columns: 7fr 3fr;
		gap: 1rem;
	}
}

.landtw-tagline__text {
	margin: 0;
	font-weight: 700;
	line-height: 1.3;
	text-align: justify;
}

/* Phone + LINE CTA */
.landtw-cta {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	text-align: right;
}

.landtw-cta__phone-number,
.landtw-cta__phone-number:hover,
.landtw-cta__phone-number:focus,
.landtw-cta__phone-number:visited {
	display: block;
	font-size: 30px;
	font-weight: 800;
	color: #d9534f;
	line-height: 1.05;
	letter-spacing: -0.02em;
	text-decoration: none;
}

.landtw-cta__phone-note {
	font-size: 14px;
	line-height: 1.2;
}

.landtw-cta__line,
.landtw-cta__line:hover,
.landtw-cta__line:focus,
.landtw-cta__line:visited {
	display: inline-block;
	margin-top: 0.25rem;
	color: #06c755;
	font-size: 14px;
	text-decoration: none;
}

.landtw-cta__line:hover,
.landtw-cta__line:focus {
	text-decoration: underline;
}

/* Row 3 — restored WordPress menu navigation */
.landtw-nav {
	background: transparent;
	margin-top: 10px;
}

.landtw-nav__toggle {
	display: inline-block;
	padding: 10px;
	border: 0;
	background: transparent;
	color: #333333;
	font: inherit;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
}

.landtw-nav__menu,
.landtw-nav__submenu {
	margin: 0;
	padding: 0;
	list-style: none;
}

.landtw-nav__menu {
	display: none;
}

.landtw-nav__menu.is-open {
	display: block;
}

.landtw-nav__item {
	position: relative;
}

.landtw-nav__link,
.landtw-nav__link:hover,
.landtw-nav__link:focus,
.landtw-nav__link:visited {
	display: block;
	padding: 10px;
	border: 1px solid transparent;
	color: #000000;
	font-size: 18px;
	font-weight: normal;
	line-height: 25.71428572px;
	text-decoration: none;
	text-transform: uppercase;
	transition: all 300ms;
}

.landtw-nav__link:hover,
.landtw-nav__link:focus {
	background: #cccccc;
	color: #555555;
	border-color: #dddddd;
	font-weight: bold;
}

.landtw-nav__chevron {
	margin-left: 0.25rem;
}

.landtw-nav__submenu {
	display: none;
	background: #ffffff;
	z-index: 1001;
}

.landtw-nav__item--has-children:hover > .landtw-nav__submenu,
.landtw-nav__item--has-children:focus-within > .landtw-nav__submenu {
	display: block;
}

@media (min-width: 768px) {
	.landtw-nav__toggle {
		display: none;
	}

	.landtw-nav__menu {
		display: flex;
		flex-wrap: wrap;
		align-items: flex-end;
		background-color: #ffffff;
		border-top: 1px solid #dddddd;
		border-bottom: 1px solid #dddddd;
		border-radius: 0;
		position: relative;
		overflow: visible;
	}

	.landtw-nav__menu > .landtw-nav__item + .landtw-nav__item {
		margin: 0;
	}

	.landtw-nav__menu > .landtw-nav__item > .landtw-nav__link {
		position: relative;
		display: block;
		padding: 10px 20px;
		margin-top: -1px;
		margin-bottom: -1px;
		margin-right: 4px;
		box-sizing: border-box;
		background: transparent;
		color: #000000;
		font-size: 18px;
		font-weight: normal;
		line-height: 25.71428572px;
		border-top: 1px solid #dddddd;
		border-right: 1px solid transparent;
		border-bottom: 1px solid transparent;
		border-left: 1px solid transparent;
		border-radius: 0;
		white-space: nowrap;
		transition: all 300ms;
	}

	.landtw-nav__menu > .landtw-nav__item > .landtw-nav__link:hover,
	.landtw-nav__menu > .landtw-nav__item > .landtw-nav__link:focus,
	.landtw-nav__menu > .landtw-nav__item--has-children:hover > .landtw-nav__link,
	.landtw-nav__menu > .landtw-nav__item--has-children:focus-within > .landtw-nav__link {
		background-color: #cccccc;
		color: #000000;
		font-weight: bold;
		margin-top: -8px;
		padding: 17px 20px 10px;
		border: 1px solid #dddddd;
		border-bottom-color: #ffffff;
		border-radius: 10px 10px 0 0;
		text-decoration: none;
		z-index: 5;
	}

	.landtw-nav__menu > .current-menu-item > .landtw-nav__link,
	.landtw-nav__menu > .current_page_item > .landtw-nav__link,
	.landtw-nav__menu > .current-menu-parent > .landtw-nav__link,
	.landtw-nav__menu > .current-menu-ancestor > .landtw-nav__link {
		background-color: #ffffff;
		color: #555555;
		font-weight: normal;
		margin-top: -8px;
		padding: 17px 20px 10px;
		border: 1px solid #dddddd;
		border-bottom-color: #ffffff;
		border-radius: 10px 10px 0 0;
		box-shadow: 0 -3px 3px 0 rgba(51, 51, 51, 0.28);
		z-index: 10;
	}

	.landtw-nav__menu > .current-menu-item > .landtw-nav__link:hover,
	.landtw-nav__menu > .current_page_item > .landtw-nav__link:hover,
	.landtw-nav__menu > .current-menu-parent > .landtw-nav__link:hover,
	.landtw-nav__menu > .current-menu-ancestor > .landtw-nav__link:hover {
		background-color: #ffffff;
		color: #555555;
		font-weight: normal;
	}

	.landtw-nav__submenu {
		position: absolute;
		top: 100%;
		left: 0;
		min-width: 160px;
		padding: 0 5px;
		margin: 1px;
		border: 0;
		background-color: #ffffff;
		border-radius: 0 0 15px 15px;
		box-shadow: 0 1px 5px 0 rgba(51, 51, 51, 0.25);
	}

	.landtw-nav__submenu .landtw-nav__link {
		display: block;
		padding: 10px;
		background-color: #ffffff;
		color: #000000;
		font-size: 18px;
		font-weight: normal;
		line-height: 25.71428572px;
		height: auto;
		margin: 0;
		border: 0;
		border-bottom: 1px solid #cccccc;
		border-radius: 0;
		box-shadow: none;
		text-align: left;
		text-transform: none;
		white-space: nowrap;
		transition: all 300ms ease 100ms;
	}

	.landtw-nav__submenu .landtw-nav__link:hover,
	.landtw-nav__submenu .landtw-nav__link:focus {
		background-color: #d8d87d;
		color: #555555;
		font-weight: bold;
		border-radius: 5px 5px 20px 20px;
		height: auto;
		margin: 0;
		text-decoration: none;
	}

	.landtw-nav__submenu li:last-child .landtw-nav__link {
		border-bottom: 0;
	}
}

@media (max-width: 1199px) {
	.landtw-nav {
		margin-top: 17px;
	}

	.landtw-nav__menu > .landtw-nav__item > .landtw-nav__link {
		line-height: 16px;
	}
}

@media (max-width: 991px) {
	.landtw-nav {
		margin-top: 7px;
	}

	.landtw-nav__menu > .landtw-nav__item > .landtw-nav__link {
		line-height: 16px;
	}
}

@media (max-width: 767px) {
	.landtw-nav__menu {
		padding: 5px;
	}

	.landtw-nav__menu.is-open {
		display: block;
	}

	.landtw-nav__item {
		display: block;
		width: auto;
	}

	.landtw-nav__submenu {
		position: static;
		box-shadow: none;
	}

	.landtw-nav__link,
	.landtw-nav__link:hover,
	.landtw-nav__link:focus,
	.landtw-nav__link:visited {
		margin: 0;
		padding: 10px;
		border: 1px solid transparent;
		line-height: 25.71428572px;
	}

	.landtw-nav__link:hover,
	.landtw-nav__link:focus {
		border-color: #dddddd;
	}
}

/* Right sidebar — Hugo legacy contact CTA */
.landtw-gp-sidebar-cta {
	width: 100%;
	max-width: 240px;
	margin: 12px auto 17px;
	border-radius: 10px;
	background-color: #000094;
	color: #ffffff;
	text-align: center;
	font-size: 18px;
	font-weight: 700;
	line-height: 25.71428572px;
	overflow: hidden;
}

.landtw-gp-sidebar-cta__headline {
	padding: 0.1rem 0.5rem 0;
}

.landtw-gp-sidebar-cta__headline p,
.landtw-gp-sidebar-cta__hours,
.landtw-footer p {
	margin: 0;
}

.landtw-gp-sidebar-cta__phone {
	margin: 0 0 6px;
	font-size: 24px;
	line-height: 1.2;
}

.landtw-gp-sidebar-cta__phone a,
.landtw-gp-sidebar-cta__phone a:hover,
.landtw-gp-sidebar-cta__phone a:focus,
.landtw-gp-sidebar-cta__phone a:visited {
	color: #ffffff;
	text-decoration: none;
}

.landtw-gp-sidebar-cta__icon {
	display: inline-block;
	margin-right: 0.1rem;
	font-size: 16px;
}

.landtw-gp-sidebar-cta__cols {
	display: grid;
	grid-template-columns: 7fr 5fr;
	column-gap: 0;
	align-items: end;
}

.landtw-gp-sidebar-cta__left,
.landtw-gp-sidebar-cta__right {
	display: flex;
	align-items: end;
	justify-content: flex-start;
	min-width: 0;
}

.landtw-gp-sidebar-cta__left {
	flex-direction: column;
	align-items: center;
	padding: 6px 0 6px 10px;
	text-align: center;
}

.landtw-gp-sidebar-cta__hours {
	font-size: 15px;
	font-weight: 400;
	line-height: 1.45;
}

.landtw-gp-sidebar-cta__btn,
.landtw-gp-sidebar-cta__btn:hover,
.landtw-gp-sidebar-cta__btn:focus,
.landtw-gp-sidebar-cta__btn:visited {
	display: inline-block;
	margin: 10px 0 6px;
	padding: 0.35rem 0.9rem;
	border: 1px solid #cccccc;
	border-radius: 4px;
	background: #ffffff;
	color: #000094;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.5;
	text-decoration: none;
}

.landtw-gp-sidebar-cta__right img {
	display: block;
	width: auto;
	height: 100%;
	max-height: 195px;
}

@media (max-width: 991px) {
	.landtw-gp-sidebar-cta {
		font-size: 16px;
		line-height: 1.4;
	}

	.landtw-gp-sidebar-cta__phone {
		font-size: 21px;
	}

	.landtw-gp-sidebar-cta__cols {
		grid-template-columns: minmax(0, 1.3fr) minmax(88px, 0.7fr);
	}

	.landtw-gp-sidebar-cta__hours,
	.landtw-gp-sidebar-cta__btn {
		font-size: 14px;
	}

	.landtw-gp-sidebar-cta__right img {
		max-height: 190px;
	}
}

@media (max-width: 767px) {
	.landtw-gp-sidebar-cta {
		font-size: 15px;
		line-height: 1.35;
	}

	.landtw-gp-sidebar-cta__phone {
		font-size: 19px;
	}
}

.landtw-sidebar-card {
	width: 100%;
	max-width: 240px;
	margin: 0 auto 17px;
	line-height: 1.6;
	text-align: center;
}

.landtw-sidebar-card__title {
	width: 100%;
	background: #c3c4c7;
	padding: 0.4rem 0.5rem;
	font-weight: 700;
	line-height: 1.35;
}

.landtw-sidebar-card__content {
	width: 100%;
	background: #ffffff;
	padding: 0.35rem 0.45rem;
	font-size: 18px;
	line-height: 1.42;
	text-align: left;
}

.landtw-sidebar-card__content--center {
	text-align: center;
}

.landtw-sidebar-card__content p {
	margin: 0 0 0.35rem;
}

.landtw-sidebar-card__content p:last-child {
	margin-bottom: 0;
}

.landtw-sidebar-card__image {
	width: 100%;
	padding: 0.5rem;
	text-align: center;
}

.landtw-sidebar-card__content:has(+ .landtw-sidebar-card__image) {
	padding-bottom: 0.25rem;
}

.landtw-sidebar-card__content + .landtw-sidebar-card__image {
	padding-top: 0;
	padding-bottom: 0.35rem;
}

.landtw-sidebar-card__image img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	margin: 0 auto;
}

.landtw-sidebar-card__line,
.landtw-sidebar-card__line:hover,
.landtw-sidebar-card__line:focus,
.landtw-sidebar-card__line:visited {
	display: inline-block;
	margin-top: 0.4rem;
	background: #06c755;
	color: #ffffff;
	padding: 0.4rem 0.75rem;
	font-weight: 700;
	text-decoration: none;
}

/* Footer — 原版 verbatim port (3-col grid + dark/light strip)
 * 色票：紅 #ff0000 / 深石板灰 #2f4f4f / 純藍 #0000ff /
 *       白字藍底 #fff on #0000ff / 兩格淺灰底 #efefef /
 *       底部 strip 淺灰 #dddddd 黑字 11px 圓底角
 */
.landtw-footer {
	background: #fff;
	color: #000;
}

.landtw-footer p {
	margin: 0;
}

.landtw-footer a,
.landtw-footer a:visited {
	color: inherit;
	text-decoration: none;
}

.landtw-footer a:hover,
.landtw-footer a:focus {
	text-decoration: underline;
}

.landtw-footer img.emoji {
	display: inline-block;
	width: 1em;
	height: 1em;
	vertical-align: -0.1em;
	margin: 0 0.05em 0 0.1em;
}

.landtw-footer__grid {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 1.5rem;
	align-items: start;
}

.landtw-footer__col {
	background: #efefef;
	padding: 0.9rem 1rem;
	font-size: 16px;
	line-height: 1.6;
	color: #000;
}

.landtw-footer__col--claims {
	text-align: center;
}

.landtw-footer__col--qr {
	text-align: center;
}

.landtw-footer__qr-title {
	margin: 0 0 0.6rem;
	font-weight: 700;
}

.landtw-footer__qr-link,
.landtw-footer__qr-link:visited {
	display: inline-block;
	color: inherit;
	text-decoration: none;
}

.landtw-footer__qr-img {
	display: block;
	width: 120px;
	height: 120px;
	max-width: 100%;
	margin: 0 auto;
	padding: 4px;
	background: #ffffff;
	border: 1px solid #d8d8d8;
	box-sizing: border-box;
}

.landtw-footer__qr-id {
	display: block;
	margin-top: 0.4rem;
	font-weight: 700;
	color: #06c755;
}

.landtw-footer__qr-note {
	margin: 0.3rem 0 0;
	font-size: 13px;
}

.landtw-footer__pill {
	color: #fff;
	background-color: #0000ff;
	padding: 0 0.2em;
}

.landtw-footer__strip {
	background: #dddddd;
	color: #000;
	font-family: "Noto Sans", Arial, "Microsoft JhengHei", "PingFang TC", sans-serif;
	font-size: 11px;
	line-height: 15.7px;
	text-align: center;
	border-bottom-left-radius: 15px;
	border-bottom-right-radius: 15px;
	padding-block: 8px 10px;
}

.landtw-footer__strip b {
	color: #000;
	font-weight: 700;
}

/* no-sidebar layout: Col 3 隱藏、grid 變 2 欄
 * GeneratePress body classes: .no-sidebar / .full-width-content
 */
body.no-sidebar .landtw-footer__grid,
body.full-width-content .landtw-footer__grid {
	grid-template-columns: 1fr 1fr;
}

body.no-sidebar .landtw-footer__col--qr,
body.full-width-content .landtw-footer__col--qr {
	display: none;
}

@media (max-width: 720px) {
	.landtw-footer__grid {
		grid-template-columns: 1fr;
		gap: 1rem;
	}
}

.landtw-district-grid {
	margin: 0 auto;
	padding: 0.75rem 0;
	border-top: 1px solid #e0e0e0;
	border-bottom: 1px solid #e0e0e0;
	font-size: 14px;
	line-height: 1.2;
	color: #444;
	text-align: center;
	max-width: 1000px;
}

.landtw-district-grid-inner {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.75rem 1rem;
}

.landtw-district-grid-col {
	margin: 0;
	padding: 0;
	list-style: none;
	column-width: 132px;
	column-gap: 1rem;
}

.landtw-district-grid-col li {
	margin: 0;
	padding: 0.15rem 0;
	list-style: none;
	break-inside: avoid;
}

.landtw-district-grid-col li.is-hub {
	font-weight: 700;
}

@media (max-width: 600px) {
	.landtw-district-grid {
		font-size: 13px;
	}
	.landtw-district-grid-col {
		column-width: 105px;
		column-gap: 0.5rem;
	}
}

.landtw-district-grid a,
.landtw-district-grid a:visited {
	color: #444;
	text-decoration: none;
}

.landtw-district-grid a:hover,
.landtw-district-grid a:focus {
	text-decoration: underline;
}

/* Sidebar card 2-column layout — fires when the sidebar container is
 * wide enough for two 240px-capped cards plus gap (~500px). Uses a
 * container query so it tracks the *sidebar* width, not the viewport.
 * container-type is scoped to <768px only: at >=768px the sticky-sidebar
 * library positions the sidebar with position:fixed, and a container-type
 * ancestor would become that fixed element's containing block — breaking
 * the positioning so the sidebar overlaps the footer. Sticky is disabled
 * below 768px, so container-type is safe there.
 */
@media (max-width: 767.98px) {
	.inside-right-sidebar {
		container-type: inline-size;
	}
}

@container (min-width: 500px) {
	.inside-right-sidebar .sticky-sidebar-root__inner,
	.inside-right-sidebar:has(> .landtw-sidebar-card) {
		column-count: 2;
		column-gap: 1rem;
		max-width: 540px;
		margin-left: auto;
		margin-right: auto;
	}

	.inside-right-sidebar .landtw-sidebar-card,
	.inside-right-sidebar .landtw-gp-sidebar-cta {
		break-inside: avoid;
	}
}

/* LandTW design tokens — link color is read by district-grid, sidebar
 * link list, and entry-content links. Tune here, propagates everywhere
 * that opts into the variable.
 */
:root {
	--landtw-container-sm: 750px;
	--landtw-container-md: 970px;
	--landtw-container-lg: 1170px;
	--landtw-gutter: 15px;
	--landtw-link-color: #3177bd;
	--landtw-uc-h3-size: 1.2rem;
	--landtw-uc-h3-weight: 700;
	--landtw-uc-h3-margin-top: 1rem;
	--landtw-uc-h3-margin-bottom: 0;
	--landtw-heading-color: #3b5897;
}

.landtw-nav__inner,
.landtw-gp-header-row,
.landtw-footer__grid,
.landtw-footer__strip,
.site-content {
	width: 100%;
	margin-inline: auto;
	padding-inline: var(--landtw-gutter);
}

@media (min-width: 768px) {
	.landtw-nav__inner,
	.landtw-gp-header-row,
	.landtw-footer__grid,
	.landtw-footer__strip,
	.site-content {
		max-width: var(--landtw-container-sm);
	}
}

@media (min-width: 992px) {
	.landtw-nav__inner,
	.landtw-gp-header-row,
	.landtw-footer__grid,
	.landtw-footer__strip,
	.site-content {
		max-width: var(--landtw-container-md);
	}
}

@media (min-width: 1200px) {
	.landtw-nav__inner,
	.landtw-gp-header-row,
	.landtw-footer__grid,
	.landtw-footer__strip,
	.site-content {
		max-width: var(--landtw-container-lg);
	}
}

.entry-content a,
.entry-content a:visited {
	color: var(--landtw-link-color);
}

.entry-content h2,
.under-content-normal h2,
.under-content-inheritance h2,
.under-content-gift h2,
.under-content-will h2,
.under-content-disclaimer h2,
h2.wp-block-heading {
	font-size: 22px;
	font-weight: 700;
	margin-top: 2rem;
	margin-bottom: 0.3rem;
	color: var(--landtw-heading-color);
	border-left: 4px solid var(--landtw-heading-color);
	padding-left: 0.6rem;
}

.entry-content h3,
.under-content-normal h3,
.under-content-inheritance h3,
.under-content-gift h3,
.under-content-will h3,
.under-content-disclaimer h3,
h3.wp-block-heading {
	font-size: var(--landtw-uc-h3-size);
	font-weight: var(--landtw-uc-h3-weight);
	color: var(--landtw-heading-color);
	margin-block-start: var(--landtw-uc-h3-margin-top);
	margin-block-end: var(--landtw-uc-h3-margin-bottom);
	margin-inline: 0;
	line-height: 1.5;
}

.wp-block-heading {
	font-size: 1.8rem;
	margin-top: 1.5rem;
	margin-bottom: 0.3rem;
}

.inside-right-sidebar,
.widget-area.sidebar {
	padding-left: 0;
}

.separate-containers .site-main {
	margin: 0;
}

.separate-containers .inside-article {
	padding: 10px;
}

.entry-title {
	margin-top: 0;
	margin-bottom: 0;
	padding-bottom: 0;
	color: #000000;
	border-top: 0;
	border-right: 0;
	border-bottom: 1px solid #cccccc;
	border-left: 0;
	font-size: 34px;
	font-weight: 700;
	line-height: 48.57142859px;
}

@media (max-width: 1199px) {
	.entry-title {
		font-size: 30px;
		line-height: 42.85714287px;
	}
}

@media (max-width: 991px) {
	.entry-title {
		font-size: 24px;
		line-height: 34.2857143px;
	}
}

@media (max-width: 767px) {
	h1.entry-title,
	h2.entry-title,
	.entry-title {
		margin-top: 0;
		padding-top: 0;
		padding-bottom: 0;
		color: #9b5f60;
		font-size: 26px;
		font-weight: normal;
		line-height: 27px;
	}
}
