/*
Theme Name: E-PLEX Irvine
Description: Child theme of Twenty Twenty-Five for the E-PLEX Irvine site.
Author: E-PLEX Jeffrey
Template: twentytwentyfive
Version: 0.2.0
Requires at least: 6.7
Requires PHP: 7.4
Text Domain: eplex-irvine
*/

:root {
	--eplex-navy: var(--wp--preset--color--contrast);
	--eplex-orange: var(--wp--preset--color--accent-1);
	--eplex-peach: var(--wp--preset--color--accent-2);
	--eplex-teal: var(--wp--preset--color--accent-3);
	--eplex-muted: var(--wp--preset--color--accent-4);
	--eplex-cream: var(--wp--preset--color--accent-5);
	--eplex-line: rgba(22, 38, 76, 0.14);
	--eplex-radius: 14px;
	--eplex-gutter: clamp(16px, 4vw, 40px);
	--eplex-max: 1200px;
}

body {
	-webkit-font-smoothing: antialiased;
	word-break: keep-all;
	overflow-wrap: anywhere;
}

:lang(zh) body,
body:lang(zh) {
	word-break: normal;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.eplex-header *,
.eplex-locations,
.eplex-locations *,
.eplex-branch-links *,
.eplex-map *,
.eplex-card,
.eplex-band,
.eplex-footer * {
	box-sizing: border-box;
}

/* Sections sit flush against each other; each one brings its own padding. */
.wp-site-blocks > footer,
.wp-site-blocks > main,
.eplex-main > .wp-block-post-content,
.eplex-main .entry-content > .alignfull {
	margin-block-start: 0;
}

/* ---------- Header ---------- */

.eplex-header {
	background: var(--wp--preset--color--base);
	border-bottom: 1px solid var(--eplex-line);
	position: sticky;
	top: 0;
	z-index: 50;
}

.admin-bar .eplex-header {
	top: var(--wp-admin--admin-bar--height, 0px);
}

.eplex-header__inner {
	align-items: center;
	display: flex;
	gap: 16px 28px;
	justify-content: space-between;
	margin: 0 auto;
	max-width: var(--eplex-max);
	padding: 12px var(--eplex-gutter);
}

.eplex-brand {
	align-items: baseline;
	color: var(--eplex-navy);
	display: inline-flex;
	gap: 8px;
	text-decoration: none;
	white-space: nowrap;
}

.eplex-brand__mark {
	font-size: 1.45rem;
	font-weight: 800;
	letter-spacing: 0.01em;
}

.eplex-brand__sub {
	border-left: 3px solid var(--eplex-orange);
	color: var(--eplex-teal);
	font-size: 1.05rem;
	font-weight: 700;
	padding-left: 8px;
}

.eplex-nav {
	align-items: center;
	display: flex;
	flex: 1;
	gap: 12px 28px;
	justify-content: flex-end;
}

.eplex-nav__list,
.eplex-lang__list,
.eplex-footer__links {
	list-style: none;
	margin: 0;
	padding: 0;
}

.eplex-nav__list {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.eplex-nav__list a {
	border-radius: 999px;
	color: var(--eplex-navy);
	display: block;
	font-size: 1rem;
	font-weight: 600;
	padding: 8px 14px;
	text-decoration: none;
}

.eplex-nav__list a:hover,
.eplex-nav__list a:focus-visible {
	background: var(--eplex-cream);
}

.eplex-nav__list a[aria-current="page"] {
	background: var(--eplex-peach);
}

.eplex-ext {
	font-size: 0.85em;
	opacity: 0.7;
}

.eplex-lang__list {
	border: 1px solid var(--eplex-line);
	border-radius: 999px;
	display: flex;
	overflow: hidden;
}

.eplex-lang__list a {
	color: var(--eplex-muted);
	display: block;
	font-size: 0.85rem;
	font-weight: 600;
	padding: 6px 12px;
	text-decoration: none;
	white-space: nowrap;
}

.eplex-lang__list a:hover,
.eplex-lang__list a:focus-visible {
	color: var(--eplex-navy);
}

.eplex-lang__list a[aria-current="true"] {
	background: var(--eplex-navy);
	color: var(--wp--preset--color--base);
}

.eplex-nav-toggle {
	background: none;
	border: 1px solid var(--eplex-line);
	border-radius: 10px;
	cursor: pointer;
	display: none;
	height: 44px;
	padding: 0;
	position: relative;
	width: 44px;
}

.eplex-nav-toggle__bars,
.eplex-nav-toggle__bars::before,
.eplex-nav-toggle__bars::after {
	background: var(--eplex-navy);
	border-radius: 2px;
	content: "";
	height: 2px;
	left: 11px;
	position: absolute;
	width: 20px;
}

.eplex-nav-toggle__bars {
	top: 20px;
}

.eplex-nav-toggle__bars::before {
	left: 0;
	top: -7px;
}

.eplex-nav-toggle__bars::after {
	left: 0;
	top: 7px;
}

@media (max-width: 900px) {
	.eplex-header__inner {
		flex-wrap: wrap;
	}

	.eplex-nav-toggle {
		display: block;
	}

	.eplex-nav {
		align-items: stretch;
		display: none;
		flex: 0 0 100%;
		flex-direction: column;
		padding-bottom: 8px;
	}

	.eplex-nav.is-open {
		display: flex;
	}

	.eplex-nav__list {
		flex-direction: column;
	}

	.eplex-nav__list a {
		border-radius: 10px;
		padding: 12px 14px;
	}

	.eplex-lang {
		align-self: flex-start;
		margin-top: 6px;
	}

	.eplex-lang__list a {
		padding: 10px 14px;
	}
}

/* ---------- Page body ---------- */

.eplex-main {
	margin-top: 0;
}

.eplex-main > .wp-block-post-title {
	margin-bottom: 16px;
	margin-top: clamp(28px, 5vw, 56px);
}

.eplex-main .wp-block-post-content > h2 {
	margin-top: 44px;
}

.eplex-main .wp-block-post-content > .eplex-band {
	margin-top: 36px;
}

.eplex-hero {
	background: linear-gradient(160deg, var(--eplex-cream) 0%, var(--eplex-peach) 100%);
	margin-top: 0;
	padding: clamp(40px, 8vw, 96px) var(--eplex-gutter);
}

.eplex-hero h1 {
	font-size: clamp(2rem, 5vw, 3.25rem);
	font-weight: 800;
	line-height: 1.15;
	margin: 0 0 16px;
}

.eplex-lead {
	color: var(--eplex-navy);
	font-size: clamp(1.05rem, 2vw, 1.3rem);
	margin-bottom: 28px;
	margin-top: 0;
}

.eplex-section {
	padding: clamp(36px, 6vw, 72px) var(--eplex-gutter);
}

.eplex-section--tint {
	background: var(--eplex-cream);
}

.eplex-section h2 {
	font-size: clamp(1.5rem, 3vw, 2.1rem);
	font-weight: 800;
	margin-top: 0;
}

.eplex-cards {
	gap: 18px;
	margin-top: 24px;
}

.eplex-card {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--eplex-line);
	border-radius: var(--eplex-radius);
	border-top: 4px solid var(--eplex-orange);
	padding: 22px;
}

.eplex-card h3 {
	font-size: 1.2rem;
	font-weight: 700;
	margin: 0 0 8px;
}

.eplex-card p {
	color: var(--eplex-muted);
	font-size: 1rem;
	margin: 0;
}

.eplex-band {
	background: var(--eplex-navy);
	border-radius: var(--eplex-radius);
	color: var(--wp--preset--color--base);
	padding: clamp(24px, 4vw, 40px);
}

.eplex-band h2,
.eplex-band p {
	color: inherit;
}

.eplex-band .wp-block-button__link {
	background: var(--eplex-orange);
	color: var(--eplex-navy);
}

/* ---------- Locations ---------- */

.eplex-locations {
	display: grid;
	gap: 20px;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
}

.eplex-location {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--eplex-line);
	border-radius: var(--eplex-radius);
	border-top: 4px solid var(--eplex-teal);
	display: flex;
	flex-direction: column;
	padding: clamp(20px, 3vw, 28px);
}

.eplex-location__name {
	font-size: 1.4rem;
	font-weight: 800;
	margin: 0 0 16px;
}

.eplex-location__list {
	display: grid;
	gap: 14px 24px;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	margin: 0 0 20px;
}

.eplex-location__list dt {
	color: var(--eplex-muted);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.eplex-location__list dd {
	font-size: 1.05rem;
	font-weight: 600;
	margin: 4px 0 0;
}

.eplex-location__list a {
	color: inherit;
}

.eplex-location__actions,
.eplex-branch-links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
}

.eplex-location__actions {
	margin-bottom: 20px;
}

.eplex-branch-links {
	margin-top: 18px;
}

.eplex-location .eplex-map {
	margin-top: auto;
}

.eplex-btn {
	background: var(--eplex-orange);
	border: 2px solid var(--eplex-orange);
	border-radius: 999px;
	color: var(--eplex-navy);
	display: inline-block;
	font-weight: 700;
	padding: 10px 22px;
	text-decoration: none;
}

.eplex-btn--outline {
	background: transparent;
	border-color: var(--eplex-navy);
}

.eplex-btn:hover,
.eplex-btn:focus-visible {
	filter: brightness(0.95);
}

.eplex-map__frame {
	border: 1px solid var(--eplex-line);
	border-radius: var(--eplex-radius);
	display: block;
	width: 100%;
}

/* ---------- Footer ---------- */

.eplex-footer {
	background: var(--eplex-navy);
	color: var(--wp--preset--color--base);
	margin-top: 0;
	padding: clamp(36px, 6vw, 64px) var(--eplex-gutter) 24px;
}

.eplex-footer a {
	color: inherit;
}

.eplex-footer__inner {
	display: grid;
	gap: 28px 40px;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	margin: 0 auto;
	max-width: var(--eplex-max);
}

.eplex-footer p {
	font-size: 0.98rem;
	margin: 0 0 12px;
}

.eplex-footer__brand {
	font-size: 1.3rem !important;
	font-weight: 800;
}

.eplex-footer__heading {
	color: var(--eplex-orange);
	font-size: 0.8rem !important;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.eplex-footer__links li {
	margin-bottom: 8px;
}

.eplex-footer__legal {
	border-top: 1px solid rgba(255, 255, 255, 0.18);
	font-size: 0.85rem !important;
	margin: 28px auto 0 !important;
	max-width: var(--eplex-max);
	opacity: 0.8;
	padding-top: 18px;
}
