/* Edu Catalog Theme — global frontend styles. */

/* ---------- Base ---------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	overflow-x: hidden;
}

body {
	margin: 0;
	overflow-x: hidden;
	color: var(--wp--preset--color--contrast, #1a1a1a);
	background: var(--wp--preset--color--base, #fff);
}

img,
svg,
video {
	max-width: 100%;
	height: auto;
}

a {
	color: var(--wp--preset--color--primary, #1a4fa0);
}

/* ---------- Accessibility: visible focus ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
	outline: 3px solid var(--wp--preset--color--accent, #f6a609);
	outline-offset: 2px;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 1000;
	padding: 0.75rem 1rem;
	background: #fff;
}

.skip-link:focus {
	left: 0.5rem;
	top: 0.5rem;
}

/* ---------- Forms / buttons ---------- */
input,
select,
textarea {
	font: inherit;
	max-width: 100%;
}

button,
.wp-block-button__link {
	cursor: pointer;
}

/* ---------- Layout utilities ---------- */
.edu-container {
	width: 100%;
	max-width: 1280px;
	margin-inline: auto;
	padding-inline: var(--wp--preset--spacing--sm, 1rem);
}

.edu-section {
	margin-block: var(--wp--preset--spacing--lg, 2.5rem);
}

/* ---------- Product card ---------- */
.edu-product-card {
	display: flex;
	flex-direction: column;
	background: var(--wp--preset--color--base, #fff);
	border: 1px solid var(--wp--preset--color--border, #e2e6ec);
	border-radius: 10px;
	overflow: hidden;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.edu-product-card:hover,
.edu-product-card:focus-within {
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}

.edu-product-card__media {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	background: var(--wp--preset--color--surface, #f5f7fa);
}

.edu-product-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.edu-product-card__image--placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #eef1f5, #e2e6ec);
}

.edu-product-card__badges {
	position: absolute;
	top: 0.5rem;
	left: 0.5rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
}

.edu-badge {
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	padding: 0.15rem 0.5rem;
	border-radius: 999px;
	color: #fff;
	background: var(--wp--preset--color--primary, #1a4fa0);
}

.edu-badge--sale { background: var(--wp--preset--color--sale, #c0392b); }
.edu-badge--new { background: var(--wp--preset--color--accent, #f6a609); color: #1a1a1a; }
.edu-badge--bestseller { background: var(--wp--preset--color--primary-dark, #133b78); }

.edu-product-card__body {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	padding: 0.85rem 1rem 1rem;
	flex: 1;
}

.edu-product-card__meta {
	margin: 0;
	font-size: 0.75rem;
	color: var(--wp--preset--color--muted, #5b6470);
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.edu-product-card__title {
	margin: 0;
	font-size: 1rem;
	line-height: 1.35;
}

.edu-product-card__title a {
	text-decoration: none;
	color: inherit;
}

.edu-product-card__title a:hover {
	color: var(--wp--preset--color--primary, #1a4fa0);
}

.edu-product-card__price {
	margin-top: auto;
}

.edu-price__regular { font-weight: 700; }
.edu-price--sale .edu-price__regular { font-weight: 400; color: var(--wp--preset--color--muted, #888); font-size: 0.9em; }
.edu-price__sale { color: var(--wp--preset--color--sale, #c0392b); font-weight: 700; }
.edu-price--contact { color: var(--wp--preset--color--primary, #16b6e8); font-weight: 700; font-style: normal; }
a.edu-price--contact { text-decoration: none; }
a.edu-price--contact:hover { color: var(--wp--preset--color--primary-dark, #0e96c4); text-decoration: underline; }

.edu-product-card__cta {
	align-self: flex-start;
	margin-top: 0.5rem;
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
	color: var(--wp--preset--color--primary, #1a4fa0);
}

.edu-product-card__cta::after {
	content: " \2192";
}

/* ---------- Collection / specs / filter polish ---------- */
.edu-collection__list {
	margin: 0;
}

.edu-specs-block__table th {
	white-space: nowrap;
}

.edu-filter__form {
	background: var(--wp--preset--color--surface, #f5f7fa);
	padding: var(--wp--preset--spacing--md, 1.5rem);
	border: 1px solid var(--wp--preset--color--border, #e6e9ee);
	border-radius: 10px;
}
/* Filter heading with a teal underline accent. */
.edu-filter__heading {
	padding-bottom: 0.6rem;
	margin-bottom: 0.25rem;
	border-bottom: 2px solid var(--edu-teal, #16b6e8);
	font-size: 1.05rem;
}
.edu-filter__field label { color: var(--wp--preset--color--contrast, #222a32); }
.edu-filter__field select,
.edu-filter__field input {
	background: #fff;
	border: 1px solid var(--wp--preset--color--border, #e6e9ee);
	border-radius: 6px;
}
.edu-filter__field select:focus,
.edu-filter__field input:focus {
	outline: none;
	border-color: var(--edu-teal, #16b6e8);
}
/* Square teal apply button to match the theme's button style. */
.edu-filter__submit {
	border-radius: 0;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}
.edu-filter__submit:hover { background: var(--edu-teal-dark, #0e96c4); }

/* Keep the filter sidebar in view while browsing products (desktop only). */
@media (min-width: 782px) {
	.edu-archive__sidebar { position: sticky; top: 96px; align-self: flex-start; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
	.edu-product-card__title { font-size: 0.95rem; }
}

@media (max-width: 767px) {
	.edu-section { margin-block: var(--wp--preset--spacing--md, 1.5rem); }
}

/* ---------- Header ---------- */
/* Sticky header (stbmienbac.vn behaviour): fixed to the top, hides when
   scrolling down and slides back in when scrolling up. The body gets a
   matching padding-top from frontend.js so content never jumps. */
.edu-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 200;
	background: #fff;
	transition: transform 0.3s ease-in-out;
	/* NOTE: no `will-change: transform` here — it makes .edu-header a containing
	   block for fixed descendants, which traps the mobile nav overlay inside the
	   header box (drawer collapses to header height). */
}
.edu-header.is-stuck { box-shadow: 0 2px 12px rgba(34, 42, 50, 0.12); }
.edu-header.is-hidden { transform: translateY(-100%); }
/* Keep the fixed header below the WordPress admin bar when logged in. */
.admin-bar .edu-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .edu-header { top: 46px; } }

.edu-header__topbar {
	background: var(--wp--preset--color--primary-dark, #133b78);
	color: #fff;
	font-size: 0.8rem;
}
.edu-header__topbar > .wp-block-group { flex-wrap: nowrap; overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */ }
.edu-header__topbar > .wp-block-group::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}
.edu-header__topbar > .wp-block-group .wp-block-paragraph { 
  flex: 0 0 auto; /* Don't shrink */ }


.edu-header__topbar a { color: #fff; text-decoration: underline; }
.edu-header__topbar p { margin: 0.35rem 0; }
.edu-header__note { opacity: 0.85; }

.edu-header__main {
	border-bottom: 1px solid var(--wp--preset--color--border, #e2e6ec);
	padding-block: 0.75rem;
}

.edu-header__bar { gap: 1rem; align-items: center; }
.edu-header__brand { gap: 0.65rem; }
.edu-header__brand-logo { line-height: 0; }
.edu-header__brand-logo img { display: block; height: auto; max-height: 54px; width: auto; }
.edu-header__brand-title a,
.edu-header__logo a { text-decoration: none; font-weight: 800; font-size: 1.35rem; color: var(--wp--preset--color--primary, #1a4fa0); }
/* Customizer toggle (Site Identity → "Hiển thị tên website ở header"). */
body.edu-site-title-hidden .edu-header__brand-title { display: none; }
/* Customizer toggle (Site Identity → "Hiển thị nút Yêu cầu báo giá"). The block's
   flex layout sets its own display, so the hide needs !important. */
body.edu-header-cta-hidden .edu-header__cta { display: none !important; }
.edu-header__actions { gap: 1rem; align-items: center; }

.edu-search {
	display: flex;
	flex: 1 1 360px;
	min-width: 260px;
	max-width: 640px;
	border: 1px solid var(--wp--preset--color--border, #e2e6ec);
	border-radius: 4px;
	overflow: hidden;
	background: #fff;
}

.edu-search input[type="search"] {
	flex: 1;
	border: 0;
	padding: 0.55rem 1rem;
	min-width: 0;
}

.edu-search input:focus { outline: none; }

.edu-search__submit {
	border: 0;
	padding: 0.55rem 1.1rem;
	background: var(--wp--preset--color--primary, #1a4fa0);
	color: #fff;
	font-weight: 600;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* Mobile drawer */
.edu-mobile-header { display: none; }

@media (max-width: 767px) {
	.edu-header__bar { flex-wrap: wrap; }
	.edu-header__cta .wp-block-button__link { padding: 0.45rem 0.9rem; font-size: 0.85rem; }
	body.edu-mobile-open .edu-mobile-header {
		display: block;
		padding-block: 1rem;
		border-bottom: 1px solid var(--wp--preset--color--border, #e2e6ec);
	}
}

/* ---------- Footer (stbmienbac.vn layout: brand card + 4 columns) ---------- */
.edu-footer {
	margin-top: var(--wp--preset--spacing--xl, 4rem);
	padding-block: var(--wp--preset--spacing--lg, 2.5rem) 0;
	background: var(--edu-social-blue, #183883);
	color: #fff;
}
.edu-footer h3 { margin: 0 0 0.9rem; color: #fff; font-size: 1.02rem; }
.edu-footer p { color: rgba(255, 255, 255, 0.88); }
.edu-footer a { color: rgba(255, 255, 255, 0.82); text-decoration: none; }
.edu-footer a:hover { color: #fff; text-decoration: underline; }
.edu-footer ul.wp-block-list { list-style: none; margin: 0; padding: 0; }
.edu-footer ul.wp-block-list li { margin-bottom: 0.55rem; }

/* White brand card across the top. */
.edu-footer__card {
	gap: 1.5rem 2rem;
	margin-bottom: var(--wp--preset--spacing--lg, 2.5rem);
	padding: 1.4rem 1.75rem;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}
.edu-footer__card-brand { gap: 1rem; align-items: center; }
.edu-footer__card-logo { line-height: 0; }
.edu-footer__card-logo img { max-height: 56px; width: auto; height: auto; }

/* [edu_logo] shortcode wrapper. */
.edu-logo { display: inline-block; line-height: 0; text-decoration: none; }
.edu-logo__img { display: block; width: auto; height: auto; }
.edu-logo--text { line-height: 1.2; font-weight: 800; color: var(--edu-social-blue, #183883); }
.edu-footer__card .edu-footer__company {
	margin: 0;
	color: var(--edu-social-blue, #183883);
	font-weight: 800;
	font-size: 1.02rem;
	line-height: 1.3;
	text-transform: uppercase;
}
.edu-footer__card .edu-footer__tagline { margin: 0.3rem 0 0; color: var(--wp--preset--color--muted, #535353); font-size: 0.9rem; }
.edu-footer__card-connect { text-align: right; }
.edu-footer__card .edu-footer__connect-label { margin: 0 0 0.6rem; color: var(--edu-social-blue, #183883); font-weight: 700; }
.edu-footer__card-connect .edu-socials { justify-content: flex-end; margin-top: 0; }
/* Outlined social circles on the white card (stb style). */
.edu-footer__card-connect .edu-socials .edu-social {
	background: transparent;
	border: 1px solid var(--edu-social-blue, #183883);
	color: var(--edu-social-blue, #183883);
}
.edu-footer__card-connect .edu-socials .edu-social:hover { background: var(--edu-social-blue, #183883); color: #fff; }

/* Four columns. */
.edu-footer__list { gap: 2rem; align-items: flex-start; }
.edu-footer__col h3 { position: relative; padding-bottom: 0.5rem; }
.edu-footer__col h3::after { content: ""; position: absolute; left: 0; bottom: 0; width: 32px; height: 2px; background: rgba(255, 255, 255, 0.4); }

/* Contact info column: leading icons (address / phone / email). */
.edu-contact-list { list-style: none; margin: 0; padding: 0; }
.edu-contact-list li { display: flex; gap: 0.6rem; align-items: flex-start; margin-bottom: 0.7rem; line-height: 1.5; }
.edu-contact-list__ic { flex: 0 0 auto; display: inline-flex; margin-top: 2px; color: #fff; }
.edu-contact-list__ic svg { width: 18px; height: 18px; }
.edu-contact-list a { color: rgba(255, 255, 255, 0.9); }

/* Map box. */
.edu-footer__map { border-radius: 8px; overflow: hidden; }
.edu-footer__map iframe { display: block; width: 100%; height: 190px; border: 0; }

/* Copyright bar. */
.edu-footer__bottom {
	margin-top: var(--wp--preset--spacing--lg, 2.5rem);
	padding: 1rem 0;
	border-top: 1px solid rgba(255, 255, 255, 0.18);
}
.edu-footer__bottom p { margin: 0; color: rgba(255, 255, 255, 0.8); }

@media (max-width: 781px) {
	.edu-footer__card { flex-direction: column; align-items: flex-start; }
	.edu-footer__card-connect { text-align: left; }
	.edu-footer__card-connect .edu-socials { justify-content: flex-start; }
}

/* ---------- Archive / category ---------- */
.edu-breadcrumb { margin-block: 1rem 0.5rem; color: var(--wp--preset--color--muted, #5b6470); }
.edu-breadcrumb a { color: var(--wp--preset--color--muted, #5b6470); text-decoration: none; }
.edu-breadcrumb a:hover { text-decoration: underline; }

.edu-archive__title { margin-bottom: 1.25rem; }

.edu-archive__layout { align-items: flex-start; }

.edu-archive__toolbar {
	margin-bottom: 1rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--wp--preset--color--border, #e2e6ec);
}

.edu-archive__grid .edu-product-card { height: 100%; }
.edu-archive__grid .edu-product-card__media img { width: 100%; object-fit: cover; }

.edu-archive__pagination { margin-top: 2rem; gap: 0.5rem; }
.edu-archive__pagination .wp-block-query-pagination-numbers .page-numbers {
	padding: 0.35rem 0.7rem;
	border: 1px solid var(--wp--preset--color--border, #e2e6ec);
	border-radius: 6px;
	text-decoration: none;
}
.edu-archive__pagination .page-numbers.current {
	background: var(--wp--preset--color--primary, #1a4fa0);
	color: #fff;
	border-color: var(--wp--preset--color--primary, #1a4fa0);
}

.edu-archive__seo {
	background: var(--wp--preset--color--surface, #f5f7fa);
	padding: var(--wp--preset--spacing--md, 1.5rem);
	border-radius: 10px;
}

@media (max-width: 781px) {
	.edu-archive__layout { flex-direction: column; }
	.edu-archive__sidebar, .edu-archive__main { flex-basis: 100% !important; width: 100%; }
}

/* ---------- Category taxonomy ---------- */
.edu-tax__hero { background: var(--wp--preset--color--surface, #f5f7fa); padding: var(--wp--preset--spacing--md, 1.5rem); border-radius: 10px; }
.edu-tax__title { margin: 0 0 0.5rem; }
.edu-tax__desc { color: var(--wp--preset--color--muted, #5b6470); margin: 0; }
.edu-tax__related-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.75rem; padding: 0; margin: 0; }
.edu-tax__related-list a {
	display: inline-block; padding: 0.4rem 0.9rem;
	background: var(--wp--preset--color--surface, #f5f7fa);
	border: 1px solid var(--wp--preset--color--border, #e2e6ec);
	border-radius: 999px; text-decoration: none;
}

/* ---------- Single product ---------- */
.edu-detail__cols { margin-top: 1.5rem; gap: 2rem; }
.edu-detail__cat { color: var(--wp--preset--color--muted, #5b6470); text-transform: uppercase; letter-spacing: 0.03em; }
.edu-detail__title { margin: 0.25rem 0 1rem; }
.edu-detail__price { margin-bottom: 1.25rem; }
.edu-detail__actions { margin-top: 1.5rem; flex-wrap: wrap; gap: 0.75rem; }
.edu-detail__body { margin-top: 2.5rem; }

/* "Yêu cầu báo giá" buttons get a quote-request (clipboard) glyph before the
   label — kept catalog-appropriate (not a shopping cart). The icon is a CSS
   mask so it inherits the button's text colour. */
.edu-header__cta .wp-block-button__link,
.edu-sticky-cta .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
}
.edu-header__cta .wp-block-button__link::before,
.edu-sticky-cta .wp-block-button__link::before {
	content: "";
	flex: 0 0 auto;
	width: 1.1em;
	height: 1.1em;
	background-color: currentColor;
	-webkit-mask: var(--edu-quote-icon) center / contain no-repeat;
	        mask: var(--edu-quote-icon) center / contain no-repeat;
}
:root {
	--edu-quote-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20d='M9%202h6a1%201%200%200%201%201%201v1h2a2%202%200%200%201%202%202v13a2%202%200%200%201-2%202H6a2%202%200%200%201-2-2V6a2%202%200%200%201%202-2h2V3a1%201%200%200%201%201-1zm0%203h6V4H9v1zM8%209h8v2H8V9zm0%204h8v2H8v-2z'/%3E%3C/svg%3E");
}

/* Mobile sticky CTA — hidden on desktop (the block's flex layout sets its own
   display, so the override needs !important). Only shown on small screens. */
.edu-sticky-cta { display: none !important; }

@media (max-width: 767px) {
	.edu-detail__cols { flex-direction: column; }
	.edu-detail__media, .edu-detail__info { flex-basis: 100% !important; width: 100%; }

	.edu-sticky-cta {
		display: flex !important;
		position: fixed;
		bottom: 0; left: 0; right: 0;
		z-index: 100;
		align-items: center;
		gap: 0.75rem;
		padding: 0.6rem 1rem;
		background: #fff;
		border-top: 1px solid var(--wp--preset--color--border, #e2e6ec);
		box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
	}
	.edu-sticky-cta .edu-product-price { font-size: 1rem; }
	.edu-sticky-cta .edu-price__regular, .edu-sticky-cta .edu-price__sale { font-size: 1.1rem; }
	body { padding-bottom: 70px; }
}

/* ---------- Quote / contact page ---------- */
.edu-page__title { margin-block: 0.5rem 1rem; }
.edu-quote__cta { flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2rem; }
.edu-quote-form { max-width: 560px; }
.edu-quote-form__row { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 1rem; }
.edu-quote-form__row label { font-weight: 600; }
.edu-quote-form input, .edu-quote-form textarea {
	padding: 0.55rem 0.7rem;
	border: 1px solid var(--wp--preset--color--border, #e2e6ec);
	border-radius: 6px;
	width: 100%;
}
.edu-quote-form__hp { position: absolute; left: -9999px; }
.edu-quote-form__submit {
	padding: 0.65rem 1.5rem;
	border: 0;
	border-radius: 6px;
	background: var(--wp--preset--color--primary, #1a4fa0);
	color: #fff;
	font-weight: 600;
}

/* ---------- Phase 038: responsive refinements ---------- */

/* Touch targets >= 44px for interactive controls. (The filter toggle is left
   out on purpose: it must stay display:none on desktop — the plugin shows it
   only on mobile, where it gets its 44px target below.) */
.wp-block-button__link,
.edu-search__submit,
.edu-quote-form__submit,
.edu-filter__submit,
.edu-product-card__cta,
.edu-header__nav a {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
}
@media (max-width: 767px) {
	.edu-filter__toggle { min-height: 44px; }
}

/* Horizontal-scroll collections: smooth touch scrolling, no body overflow. */
.edu-collection--scroll .edu-collection__list {
	scrollbar-width: thin;
}

/* Gallery responsive thumbnails. */
@media (max-width: 767px) {
	.edu-gallery-block__thumb-btn img { width: 56px; height: 56px; }
	.edu-header__bar { row-gap: 0.75rem; }
	/* Keep the desktop search field from forcing a wide row on small screens. */
	.edu-search { flex: 1 1 100%; }
}

/* Tablet: two-column product grids. */
@media (min-width: 768px) and (max-width: 1023px) {
	.edu-archive__grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* Prevent any wide media/iframes from causing overflow. */
.wp-block-image img,
figure img { max-width: 100%; height: auto; }

/* Category page count + hub */
.edu-tax__count { margin: 0.25rem 0 0.75rem; color: var(--wp--preset--color--muted, #5b6470); font-weight: 600; }
.edu-page .edu-category-grid { margin-top: 1.5rem; }

/* =====================================================================
   env.com.vn-inspired skin (teal / blue lab-equipment catalog)
   ===================================================================== */

:root {
	--edu-teal: var(--wp--preset--color--primary, #16b6e8);
	--edu-teal-dark: var(--wp--preset--color--primary-dark, #0e96c4);
	--edu-blue: var(--wp--preset--color--accent, #007bff);
	/* Contact/social circles — matches stbmienbac.vn's .fixed-socials. */
	--edu-social-blue: #183883;
	--edu-social-blue-dark: #122b66;
}

/* Compact, fixed type scale (no fluid up-scaling on desktop). The high
   specificity overrides WordPress' generated preset vars regardless of
   stylesheet order or theme.json caching. */
body.wp-theme-edu-catalog-theme {
	--wp--preset--font-size--small: 0.8125rem;   /* 13px */
	--wp--preset--font-size--medium: 0.9375rem;  /* 15px */
	--wp--preset--font-size--large: 1.125rem;    /* 18px */
	--wp--preset--font-size--x-large: 1.5rem;    /* 24px */
	--wp--preset--font-size--xx-large: 2rem;     /* 32px */
	font-size: 0.9375rem;
}

/* ---------- Section headings: centered with teal underline ---------- */
.edu-section > h2:first-child,
.edu-featured-cats > h2:first-child,
.edu-news > h2:first-child {
	text-align: center;
	font-size: 1.5rem;
	margin-bottom: 1.75rem;
	color: var(--wp--preset--color--contrast, #222a32);
}

.edu-section > h2:first-child::after,
.edu-featured-cats > h2:first-child::after,
.edu-news > h2:first-child::after {
	content: "";
	display: block;
	width: 64px;
	height: 3px;
	margin: 0.6rem auto 0;
	background: var(--edu-teal);
	border-radius: 2px;
}

/* "See all" link under a centered section heading. */
.edu-section__more { text-align: center; margin-top: 1.5rem; }
.edu-section__more a {
	display: inline-block;
	padding: 0.55rem 1.6rem;
	background: var(--edu-teal);
	color: #fff;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	font-size: 0.8rem;
	text-decoration: none;
}
.edu-section__more a:hover { background: var(--edu-teal-dark); }

/* ---------- Hero (teal subject banner) ---------- */
.edu-hero { margin-top: 1.25rem; }
.edu-hero__cols { gap: 1.25rem; }

.edu-hero__sidebar {
	background: #fff;
	border: 1px solid var(--wp--preset--color--border, #e6e9ee);
	padding: 1rem 1.1rem;
}
.edu-hero__sidebar h2 {
	margin: 0 0 0.6rem;
	padding-bottom: 0.6rem;
	border-bottom: 2px solid var(--edu-teal);
	text-transform: uppercase;
	font-size: 0.95rem;
	color: var(--wp--preset--color--contrast, #222a32);
}
.edu-hero__sidebar ul.wp-block-list { list-style: none; margin: 0; padding: 0; }
.edu-hero__sidebar ul.wp-block-list li { margin: 0; }
.edu-hero__sidebar ul.wp-block-list li + li { border-top: 1px dashed var(--wp--preset--color--border, #e6e9ee); }
.edu-hero__sidebar ul.wp-block-list a {
	display: block;
	padding: 0.5rem 0.2rem;
	text-decoration: none;
	color: var(--wp--preset--color--contrast, #222a32);
	font-weight: 600;
	transition: color 0.15s ease, padding 0.15s ease;
}
.edu-hero__sidebar ul.wp-block-list a:hover { color: var(--edu-teal); padding-left: 0.5rem; }

.edu-hero__panel {
	position: relative;
	overflow: hidden;
	height: 100%;
	min-height: 300px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 1rem;
	padding: 2.5rem clamp(1.5rem, 4vw, 3.5rem);
	color: #fff;
	background:
		radial-gradient(120% 120% at 85% 15%, rgba(255,255,255,0.18), transparent 55%),
		linear-gradient(120deg, var(--edu-teal) 0%, var(--edu-teal-dark) 60%, #0b7ea8 100%);
}
.edu-hero__panel::after {
	content: "";
	position: absolute;
	right: -60px; bottom: -60px;
	width: 240px; height: 240px;
	border: 24px solid rgba(255,255,255,0.12);
	border-radius: 50%;
}
.edu-hero__panel h1 {
	margin: 0;
	color: #fff;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	line-height: 1.1;
	text-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.edu-hero__panel p { margin: 0; color: rgba(255,255,255,0.92); max-width: 38ch; }
.edu-hero__panel .wp-block-button__link { background: #fff; color: var(--edu-teal-dark); }
.edu-hero__panel .wp-block-button__link:hover { background: rgba(255,255,255,0.9); }
.edu-hero__panel .is-style-outline .wp-block-button__link {
	background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,0.8);
}

/* ---------- USP strip ---------- */
.edu-usp { margin-top: 1.5rem; }
.edu-usp__cols { gap: 1rem; }
.edu-usp .wp-block-column {
	background: var(--wp--preset--color--surface, #f6f8fa);
	border: 1px solid var(--wp--preset--color--border, #e6e9ee);
	padding: 1.1rem 1.2rem;
	text-align: center;
}
.edu-usp h3 { margin: 0 0 0.35rem; color: var(--edu-teal-dark); }
.edu-usp p { margin: 0; font-size: 0.9rem; color: var(--wp--preset--color--muted, #535353); }

/* ---------- Featured category cards ---------- */
.edu-featured-cats__cols { gap: 1.25rem; flex-wrap: wrap; }
.edu-cat-card {
	height: 100%;
	background: #fff;
	border: 1px solid var(--wp--preset--color--border, #e6e9ee);
	padding: 1.1rem 1.2rem 1.2rem;
	border-top: 3px solid var(--edu-teal);
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.edu-cat-card:hover { box-shadow: 0 8px 24px rgba(22,182,232,0.14); transform: translateY(-3px); }
.edu-cat-card h3 { margin: 0 0 0.6rem; text-transform: uppercase; }
.edu-cat-card h3 a { text-decoration: none; color: var(--wp--preset--color--contrast, #222a32); }
.edu-cat-card h3 a:hover { color: var(--edu-teal); }
.edu-cat-card ul.wp-block-list { list-style: none; margin: 0 0 0.75rem; padding: 0; }
.edu-cat-card ul.wp-block-list li { font-size: 0.88rem; padding: 0.18rem 0 0.18rem 1rem; position: relative; }
.edu-cat-card ul.wp-block-list li::before {
	content: ""; position: absolute; left: 0; top: 0.7em;
	width: 6px; height: 6px; border-radius: 50%; background: var(--edu-teal);
}
.edu-cat-card ul.wp-block-list a { text-decoration: none; color: var(--wp--preset--color--muted, #535353); }
.edu-cat-card ul.wp-block-list a:hover { color: var(--edu-teal); }
.edu-cat-card .edu-cat-card__more {
	display: inline-block; font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
	letter-spacing: 0.03em; color: var(--edu-blue); text-decoration: none;
}
.edu-cat-card .edu-cat-card__more::after { content: " \2192"; }

/* ---------- Product card: square, contact pill ---------- */
.edu-product-card { border-radius: 4px; }
.edu-product-card__cta { color: var(--edu-blue); }

/* ---------- News cards ---------- */
.edu-news .wp-block-post-template > li,
.edu-news .wp-block-post {
	background: #fff;
	border: 1px solid var(--wp--preset--color--border, #e6e9ee);
	overflow: hidden;
}
.edu-news .wp-block-post-title { margin: 0.75rem 0.9rem 0.25rem; }
.edu-news .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--contrast, #222a32); }
.edu-news .wp-block-post-title a:hover { color: var(--edu-teal); }
.edu-news .wp-block-post-date { margin: 0 0.9rem 0.9rem; font-size: 0.8rem; color: var(--wp--preset--color--muted, #535353); }

/* News listing (category archive) — card grid with excerpts. The card group
   uses a constrained layout whose auto margins zero out child horizontal
   margins, so the text gets horizontal padding instead (image stays full-bleed). */
.edu-news__grid { gap: 1.5rem; }
.edu-news .wp-block-post-template > li { border-radius: 10px; display: flex; flex-direction: column; }
.edu-news__card { gap: 0; height: 100%; padding-bottom: 0.35rem; }
.edu-news__card > .wp-block-post-title { padding-inline: 1rem; margin: 0.9rem 0 0.35rem; }
.edu-news__card > .wp-block-post-date { padding-inline: 1rem; margin: 0 0 0.6rem; }
.edu-news__card > .wp-block-post-excerpt { padding-inline: 1rem; margin: 0 0 0.9rem; font-size: 0.9rem; line-height: 1.55; color: var(--wp--preset--color--muted, #535353); }
.edu-news__card .wp-block-post-excerpt__more-link { color: var(--edu-teal); text-decoration: none; font-weight: 600; }
.edu-news-archive .edu-archive__title { margin: 0.5rem 0 1.5rem; }

/* ---------- Header: one bar, two visual rows on desktop ----------
   DOM order in .edu-header__bar: nav, logo, search, cta.
   Desktop: logo + search + cta on row 1, nav wraps to a centered row 2.
   Mobile (<= 600px): hamburger (left) + logo (center) + cta (right), search below. */
.edu-header__bar { gap: 1rem 1.5rem; align-items: center; flex-wrap: wrap; position: relative; }
.edu-search__submit { border-radius: 0; }

/* Desktop single row (stbmienbac.vn style): logo | inline nav | search-icon + CTA. */
.edu-header__logo  { order: 1; flex: 0 0 auto; }
.edu-header__nav   { order: 2; flex: 1 1 auto; }
.edu-header__tools { order: 3; flex: 0 0 auto; gap: 0.85rem; align-items: center; }

/* Desktop: the field opens as an absolutely-positioned dropdown anchored to the
   header bar, so toggling it never reflows the bar (the old full-width in-flow
   row caused the flicker). It fades/slides via opacity + visibility — never
   display:none, which cannot animate. */
.edu-search {
	order: 4;
	position: absolute;
	top: calc(100% + 0.5rem);
	right: 0;
	z-index: 60;
	flex: 0 0 auto;
	width: min(440px, 80vw);
	max-width: none;
	box-shadow: 0 14px 30px rgba(34, 42, 50, 0.18);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity 0.16s ease, transform 0.16s ease, visibility 0s linear 0.16s;
}

/* On desktop the search collapses to an icon; the field appears when toggled. */
.edu-search-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--edu-teal);
	color: #fff;
	cursor: pointer;
}
.edu-search-toggle:hover { background: var(--edu-teal-dark); }
.edu-search-toggle[aria-expanded="true"] { background: var(--edu-teal-dark); }
body.edu-search-open .edu-search {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	transition: opacity 0.16s ease, transform 0.16s ease;
}

/* ---------- Header nav: inline, teal active ---------- */
.edu-header__nav { text-transform: uppercase; font-weight: 700; font-size: 0.85rem; }
.edu-header__nav .wp-block-navigation__container { gap: clamp(0.6rem, 1.4vw, 1.5rem); }
.edu-header__nav .wp-block-navigation-item__content { padding: 0.2rem 0; display: inline-flex; }

/* Hide the hamburger toggle on desktop (overlayMenu="mobile" handles ≤600). */
.edu-header__nav .wp-block-navigation__responsive-container-open { display: none; }
.edu-header__nav a { letter-spacing: 0.02em; }
.edu-header__nav .current-menu-item > a,
.edu-header__nav .wp-block-navigation-item.current-menu-item a,
.edu-header__nav a:hover { color: var(--edu-teal); }
.edu-header__topbar { background: var(--edu-teal-dark); }

/* ---------- Mobile header + menu (stbmienbac.vn style) ---------- */
@media (max-width: 600px) {
	/* Row 1: [hamburger] [logo center] [cta] ; Row 2: full-width search. */
	.edu-header__bar { gap: 0.6rem 0.75rem; flex-wrap: wrap; align-items: center; }
	.edu-header__nav { order: 1; flex: 0 0 auto; margin: 0; padding: 0; border-top: 0; }
	/* Center the brand (logo + optional title) between the hamburger and tools. */
	.edu-header__logo { order: 2; flex: 1 1 auto; justify-content: center; text-align: center; min-width: 0; }
	.edu-header__brand-logo img { max-height: 44px; }
	.edu-header__tools { order: 3; flex: 0 0 auto; }
	/* Phones: keep the search as an in-flow full-width row (not the desktop dropdown). */
	.edu-search { order: 4; flex: 1 1 100%; width: 100%; max-width: none; display: flex !important; margin-top: 0;
		position: static; box-shadow: none; opacity: 1; visibility: visible; transform: none; }

	/* On phones the search bar is always visible, so hide the toggle icon. */
	.edu-search-toggle { display: none; }

	/* Phones: the quote CTA collapses to an icon-only button (text hidden, kept
	   for screen readers; native tooltip via the title attribute). */
	.edu-header__cta .wp-block-button__link {
		gap: 0;
		padding: 0.5rem;
		font-size: 0;
		line-height: 0;
	}
	.edu-header__cta .wp-block-button__link::before {
		width: 22px;
		height: 22px;
	}

	/* Hamburger toggle visible and left-aligned. */
	.edu-header__nav .wp-block-navigation__responsive-container-open {
		display: flex;
		padding: 0.35rem;
		color: var(--edu-teal-dark);
	}
	.edu-header__nav .wp-block-navigation__responsive-container-open svg { width: 28px; height: 28px; }

	/* Left-slide drawer (override WP's centered fullscreen overlay). Pin it to
	   the full viewport height and above the sticky header. */
	.edu-header__nav .wp-block-navigation__responsive-container.is-menu-open {
		position: fixed;
		top: 0; bottom: 0; left: 0; right: auto;
		height: 100vh;
		height: 100dvh;
		width: min(78vw, 320px);
		z-index: 300;
		padding: 1.25rem 0 2rem;
		background: #fff;
		color: var(--wp--preset--color--contrast, #222a32);
		box-shadow: 0 12px 40px rgba(0,0,0,0.25);
		overflow-y: auto;
	}
	.edu-header__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
		align-items: stretch;
	}
	.edu-header__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
		flex-direction: column;
		gap: 0;
		width: 100%;
		text-align: left;
	}
	.edu-header__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
		width: 100%;
		justify-content: flex-start;
		align-items: stretch;
		border-bottom: 1px solid var(--wp--preset--color--border, #e6e9ee);
	}
	.edu-header__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
		display: block;
		width: 100%;
		padding: 0.85rem 1.4rem;
		font-weight: 700;
		text-align: left;
		text-transform: uppercase;
		color: var(--wp--preset--color--contrast, #222a32);
	}
	.edu-header__nav .wp-block-navigation__responsive-container.is-menu-open .current-menu-item .wp-block-navigation-item__content,
	.edu-header__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:hover {
		color: var(--edu-teal);
	}
	.edu-header__nav .wp-block-navigation__responsive-container-close {
		color: var(--wp--preset--color--contrast, #222a32);
	}
}

/* ---------- Breadcrumb: teal current ---------- */
.edu-breadcrumb span { color: var(--edu-teal); font-weight: 600; }

/* ---------- Single product: info + tab-style sections ---------- */
.edu-detail__price .edu-price--contact { font-size: 1.3rem; }
.edu-detail__body .wp-block-heading {
	display: inline-block;
	margin: 1.75rem 0 0;
	padding: 0.6rem 1.2rem;
	background: var(--edu-teal);
	color: #fff;
	text-transform: uppercase;
	font-size: 0.85rem !important;
	letter-spacing: 0.03em;
}
.edu-detail__body > .wp-block-heading + * {
	border: 1px solid var(--wp--preset--color--border, #e6e9ee);
	border-top: 0;
	padding: 1.1rem 1.2rem;
	margin-top: 0;
}

/* ---------- Blog / news single post ---------- */
.edu-single-post { padding-top: 0.5rem; }
.edu-single-post__title { margin: 0.25rem 0 0.5rem; font-size: clamp(1.6rem, 3.5vw, 2.2rem); line-height: 1.2; }
.edu-single-post__meta { gap: 1rem; align-items: center; margin-bottom: 1.25rem; color: var(--wp--preset--color--muted, #5b6470); }
.edu-single-post__meta a { color: var(--edu-teal); text-decoration: none; }
.edu-single-post__meta a:hover { text-decoration: underline; }
.edu-single-post__media { margin: 0 0 1.5rem; }
.edu-single-post__media img { width: 100%; border-radius: 10px; }
.edu-single-post__content { line-height: 1.75; }
.edu-single-post__content h2 { margin: 1.9rem 0 0.6rem; font-size: 1.3rem; }
.edu-single-post__content p { margin: 0 0 1rem; }
.edu-single-post__content ul { padding-left: 1.25rem; margin: 0 0 1rem; }
.edu-single-post__content li { margin-bottom: 0.4rem; }
.edu-single-post__cta { margin-top: 2rem; padding: 1.1rem 1.3rem; background: var(--wp--preset--color--surface, #f6f8fa); border: 1px solid var(--wp--preset--color--border, #e6e9ee); border-radius: 10px; }
.edu-single-post__cta a { color: var(--edu-teal); font-weight: 600; text-decoration: none; }
.edu-single-post__cta a:hover { text-decoration: underline; }

/* ---------- B2B band uses teal already via primary; square button ---------- */
.edu-b2b { border-radius: 0; padding: clamp(1.5rem, 3vw, 2.5rem); }

@media (max-width: 781px) {
	.edu-hero__cols { flex-direction: column; }
	.edu-hero__sidebar, .edu-hero__main { flex-basis: 100% !important; width: 100%; }
}

/* ---------- Floating quick-contact column (.fixed-socials) ---------- */
.fixed-socials {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 95;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.fixed-socials__item {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 1px solid #fff;
	border-radius: 50%;
	background: var(--edu-social-blue);
	color: #fff;
	box-shadow: 0 4px 12px rgba(34, 42, 50, 0.22);
	cursor: pointer;
	transition: transform 0.15s ease, background 0.15s ease;
}
.fixed-socials__item:hover { background: var(--edu-social-blue-dark); transform: translateY(-2px); color: #fff; box-shadow: 0px 0px 5px #fff; }
.fixed-socials__icon { display: inline-flex; }
.fixed-socials__icon svg { width: 24px; height: 24px; }
.fixed-socials .edu-social--zalo .fixed-socials__icon svg { width: 32px; height: auto; }
/* Back-to-top stays hidden until the user scrolls down. */
.fixed-socials__top { opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.15s; }
.fixed-socials.is-scrolled .fixed-socials__top { opacity: 1; visibility: visible; transform: translateY(0); transition: opacity 0.15s ease, transform 0.15s ease; }

@media (max-width: 600px) {
	.fixed-socials { right: 10px; bottom: 10px; gap: 8px; }
	.fixed-socials__item { width: 42px; height: 42px; }
	.fixed-socials__icon svg { width: 22px; height: 22px; }
}

/* ---------- Inline social icon row (footer / [edu_socials]) ---------- */
.edu-socials { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.edu-socials .edu-social {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--edu-social-blue);
	color: #fff;
	transition: background 0.15s ease;
}
.edu-socials .edu-social:hover { background: var(--edu-social-blue-dark); color: #fff; }
.edu-socials .edu-social svg { width: 20px; height: 20px; }
.edu-socials .edu-social--zalo svg { width: 28px; height: auto; }
.edu-contact-lines { margin: 0 0 0.5rem; }
