/* AllCancer header, footer, and Astra/Elementor integration */
:root {
	--ac-ink: #06111f;
	--ac-green: #106efd;
	--ac-green-dark: #0b4fc4;
	--ac-mint: #8fc2ff;
	--ac-gold: #8fc2ff;
	--ac-line: #dfe8f4;
}

body.ac-elementor-page,
body.elementor-page {
	background: #fff;
}

body.ac-elementor-page .site-content > .ast-container,
body.ac-elementor-page #content .ast-container,
body.elementor-page .site-content > .ast-container,
body.elementor-page #content .ast-container {
	max-width: none;
	padding-left: 0;
	padding-right: 0;
}

body.ac-elementor-page .ast-article-single,
body.elementor-page .ast-article-single {
	padding: 0;
}

body.ac-elementor-page .entry-header,
body.elementor-page .entry-header,
body.ac-elementor-page .ast-breadcrumbs-wrapper,
body.elementor-page .ast-breadcrumbs-wrapper {
	display: none;
}

/* Header */
.ac-header-shell {
	position: relative;
	z-index: 50;
	background: rgba(255, 255, 255, 0.97);
	border-bottom: 1px solid rgba(6, 17, 31, 0.08);
	box-shadow: 0 6px 30px rgba(6, 17, 31, 0.05);
	backdrop-filter: blur(10px);
}

.ac-header-main > .e-con-inner {
	max-width: 1400px;
	margin: 0 auto;
	min-height: 82px;
	width: 100%;
	display: flex !important;
	flex-wrap: nowrap !important;
	padding-top: 3px !important;
	padding-bottom: 3px !important;
}

.ac-header-brand {
	flex: 0 0 236px !important;
	width: 236px !important;
	min-width: 0;
}

.ac-header-brand img {
	display: block;
	width: 218px !important;
	height: auto !important;
}

.ac-header-nav {
	flex: 1 1 0% !important;
	width: auto !important;
	min-width: 0;
	justify-content: center !important;
}

.ac-header-actions {
	flex: 0 0 auto !important;
	width: auto !important;
	max-width: max-content;
	min-width: 0;
	justify-content: flex-end !important;
}

.ac-nav,
.ac-nav .elementor-widget-container,
.ac-header-nav .hfe-nav-menu {
	width: auto !important;
	max-width: 100%;
	min-width: 0;
}

.ac-nav {
	flex: 1 1 auto !important;
}

.ac-header-nav .hfe-nav-menu {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: nowrap;
	gap: 0;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ac-header-nav .hfe-nav-menu ul.hfe-nav-menu {
	display: flex !important;
	flex-wrap: nowrap !important;
	align-items: center;
	justify-content: center;
	width: max-content !important;
	max-width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ac-header-nav .hfe-nav-menu ul.hfe-nav-menu > li {
	display: inline-block !important;
	flex: 0 0 auto;
}

.ac-nav .hfe-nav-menu > li.menu-item > a.hfe-menu-item {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 10px 13px !important;
	color: var(--ac-ink) !important;
	font-family: "DM Sans", "Noto Sans HK", sans-serif;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-decoration: none;
	position: relative;
	transition: color 0.2s ease;
}

.ac-nav .hfe-nav-menu > li.menu-item > a.hfe-menu-item::after {
	content: "";
	position: absolute;
	left: 13px;
	right: 13px;
	bottom: 5px;
	height: 2px;
	background: var(--ac-green);
	transform: scaleX(0);
	transform-origin: center;
	transition: transform 0.25s ease;
}

.ac-nav .hfe-nav-menu > li.menu-item:hover > a.hfe-menu-item,
.ac-nav .hfe-nav-menu > li.current-menu-item > a.hfe-menu-item,
.ac-nav .hfe-nav-menu > li.current-menu-ancestor > a.hfe-menu-item {
	color: var(--ac-green) !important;
}

.ac-nav .hfe-nav-menu > li.menu-item:hover > a.hfe-menu-item::after,
.ac-nav .hfe-nav-menu > li.current-menu-item > a.hfe-menu-item::after,
.ac-nav .hfe-nav-menu > li.current-menu-ancestor > a.hfe-menu-item::after {
	transform: scaleX(1);
}

.ac-nav .hfe-nav-menu li ul.sub-menu {
	top: calc(100% - 2px);
	min-width: 190px;
	padding: 8px;
	margin: 0;
	background: #fff;
	border: 1px solid var(--ac-line);
	border-radius: 10px;
	box-shadow: 0 18px 45px rgba(6, 17, 31, 0.14);
	list-style: none;
}

.ac-nav .hfe-nav-menu li ul.sub-menu li a {
	display: block;
	padding: 10px 14px;
	border-radius: 6px;
	color: var(--ac-ink);
	font-size: 14px;
	line-height: 1.45;
	white-space: nowrap;
}

.ac-nav .hfe-nav-menu li ul.sub-menu li a:hover {
	background: #f3f8ff;
	color: var(--ac-green);
}

.ac-nav .hfe-nav-menu__toggle {
	color: var(--ac-ink);
	font-size: 26px;
	padding: 4px 8px;
}

body .ac-header-cta .elementor-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	padding: 13px 23px;
	border-radius: 999px;
	background: var(--ac-green);
	color: #fff;
	font-family: "DM Sans", "Noto Sans HK", sans-serif;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1;
	box-shadow: 0 8px 22px rgba(16, 110, 253, 0.22);
	transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

body .ac-header-cta .elementor-button:hover {
	background: var(--ac-green-dark);
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 11px 26px rgba(16, 110, 253, 0.28);
}

body .ac-header-cta .elementor-button::after {
	content: "↗";
	font-size: 15px;
	line-height: 1;
}

.ac-search-wrap {
	position: relative;
	display: flex;
	align-items: center;
}

.ac-search-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 1px solid var(--ac-line);
	border-radius: 50%;
	background: #fff;
	color: var(--ac-ink);
	font-size: 17px;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.ac-search-toggle:hover {
	background: #f3f8ff;
	border-color: #cfe0ff;
	color: var(--ac-green);
}

.ac-search-panel {
	position: absolute;
	top: calc(100% + 13px);
	right: 0;
	z-index: 99;
	width: min(360px, calc(100vw - 32px));
	padding: 14px;
	background: #fff;
	border: 1px solid var(--ac-line);
	border-radius: 12px;
	box-shadow: 0 20px 50px rgba(6, 17, 31, 0.18);
}

.ac-search-panel[hidden] {
	display: none !important;
}

.ac-search-panel form {
	display: flex;
	gap: 8px;
	margin: 0;
}

.ac-search-panel input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
	height: 42px;
	padding: 0 12px;
	border: 1px solid #dfe8f4;
	border-radius: 7px;
	color: var(--ac-ink);
	background: #fff;
}

.ac-search-panel button {
	height: 42px;
	padding: 0 16px;
	border: 0;
	border-radius: 7px;
	background: var(--ac-green);
	color: #fff;
	cursor: pointer;
}

/* Footer */
.ac-footer {
	background: #06111f;
	color: #c9d8ea;
	overflow: hidden;
}

.ac-footer > .e-con-inner {
	max-width: 1400px;
	margin: 0 auto;
}

.ac-footer .elementor-heading-title {
	color: #fff;
	font-family: "DM Sans", "Noto Sans HK", sans-serif;
	font-size: 17px;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1.4;
}

.ac-footer .elementor-widget-text-editor,
.ac-footer .elementor-widget-text-editor p,
.ac-footer .elementor-widget-text-editor a {
	color: #9fb3c9;
	font-family: "DM Sans", "Noto Sans HK", sans-serif;
	font-size: 13px;
	line-height: 1.8;
}

.ac-footer .elementor-widget-text-editor p:last-child {
	margin-bottom: 0;
}

.ac-footer .elementor-icon-list-items {
	margin: 0;
	padding: 0;
}

.ac-footer .elementor-icon-list-item {
	padding: 3px 0;
}

.ac-footer .elementor-icon-list-text,
.ac-footer .elementor-icon-list-text a {
	color: #a9bfd9;
	font-family: "DM Sans", "Noto Sans HK", sans-serif;
	font-size: 13px;
	line-height: 1.7;
	overflow-wrap: anywhere;
}

body .ac-footer .elementor-icon-list-text a,
body .ac-footer .elementor-icon-list-item > a,
body .ac-footer .elementor-widget-text-editor a {
	color: #a9bfd9 !important;
}

body .ac-footer .elementor-icon-list-text a:hover,
body .ac-footer .elementor-icon-list-item > a:hover,
body .ac-footer .elementor-widget-text-editor a:hover {
	color: #8fc2ff !important;
}

.ac-footer .elementor-icon-list-item:hover .elementor-icon-list-text,
.ac-footer .elementor-icon-list-item:hover .elementor-icon-list-text a {
	color: var(--ac-mint);
}

.ac-footer .elementor-icon-list-icon {
	color: #78b0ff;
	font-size: 12px;
}

.ac-footer .elementor-icon-list-icon i {
	color: #78b0ff;
}

.ac-footer-logo img {
	width: 218px !important;
	max-width: 100%;
	height: auto !important;
	filter: brightness(0) invert(1);
	opacity: 0.96;
}

.ac-footer-brand .elementor-widget-text-editor {
	max-width: 440px;
}

body .ac-footer-cta .elementor-button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 18px;
	border-radius: 999px;
	background: #106efd;
	color: #fff;
	font-family: "DM Sans", "Noto Sans HK", sans-serif;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	transition: background 0.2s ease, transform 0.2s ease;
}

body .ac-footer-cta .elementor-button:hover {
	background: #0b5bd8;
	color: #fff;
	transform: translateY(-1px);
}

.ac-newsletter h4 {
	margin: 0 0 10px;
	color: #fff;
	font-family: "DM Sans", "Noto Sans HK", sans-serif;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.04em;
}

.ac-newsletter-form {
	display: flex;
	gap: 0;
	max-width: 390px;
	margin: 0;
	border: 1px solid rgba(169, 191, 217, 0.3);
	border-radius: 999px;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.05);
}

.ac-newsletter-form input[type="email"] {
	flex: 1 1 auto;
	min-width: 0;
	height: 45px;
	padding: 0 16px;
	border: 0;
	outline: 0;
	background: transparent;
	color: #fff;
	font-family: "DM Sans", "Noto Sans HK", sans-serif;
	font-size: 13px;
}

.ac-newsletter-form input[type="email"]::placeholder {
	color: #8299b0;
}

.ac-newsletter-form button {
	flex: 0 0 auto;
	height: 45px;
	padding: 0 20px;
	border: 0;
	background: var(--ac-green);
	color: #fff;
	font-family: "DM Sans", "Noto Sans HK", sans-serif;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.2s ease;
}

.ac-newsletter-form button:hover {
	background: #106efd;
}

.ac-newsletter-msg {
	min-height: 18px;
	margin: 8px 0 0;
	color: var(--ac-mint) !important;
	font-size: 12px !important;
}

.ac-footer-bottom {
	border-top: 1px solid rgba(169, 191, 217, 0.16);
}

.ac-footer-bottom .elementor-widget-text-editor,
.ac-footer-bottom .elementor-widget-text-editor p,
.ac-footer-bottom .elementor-widget-text-editor a {
	color: #7f94aa;
	font-size: 12px;
	line-height: 1.7;
}

.ac-footer-bottom a:hover {
	color: var(--ac-mint);
}

/* Responsive header */
@media (max-width: 1200px) {
	.ac-header-brand {
		flex-basis: 210px !important;
		width: 210px !important;
	}

	.ac-header-brand img {
		width: 192px !important;
	}

	.ac-nav .hfe-nav-menu > li.menu-item > a.hfe-menu-item {
		padding-left: 9px !important;
		padding-right: 9px !important;
		font-size: 14px;
	}

	.ac-header-cta .elementor-button {
		padding: 12px 18px;
		font-size: 13px;
	}
}

@media (max-width: 1024px) {
	.ac-header-main > .e-con-inner {
		min-height: 72px;
		flex-wrap: nowrap;
	}

	.ac-header-main,
	.ac-header-nav,
	.ac-nav {
		position: static !important;
	}

	.ac-header-brand {
		flex: 1 1 auto !important;
		width: auto !important;
	}

	.ac-header-nav {
		flex: 0 0 auto !important;
		width: auto !important;
	}

	.ac-header-actions {
		flex: 0 0 auto !important;
		width: auto !important;
		max-width: max-content;
	}

	.ac-nav {
		flex: 0 0 auto !important;
		width: auto !important;
	}

	.ac-header-cta {
		display: none !important;
	}

	.ac-header-nav .hfe-nav-menu ul.hfe-nav-menu {
		display: none !important;
	}

	.ac-nav .hfe-nav-menu__toggle {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 40px;
		height: 40px;
		padding: 0;
	}

	.ac-nav .hfe-nav-menu__layout-horizontal {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		width: 100%;
		display: block;
		max-height: 0;
		overflow: hidden;
		background: #fff;
		box-shadow: 0 18px 35px rgba(20, 48, 39, 0.13);
		transition: max-height 0.25s ease;
	}

	.ac-nav .hfe-nav-menu__layout-horizontal.hfe-nav-menu__open {
		max-height: 75vh;
		overflow-y: auto;
	}

	.ac-nav .hfe-nav-menu__layout-horizontal.ac-menu-open {
		max-height: 75vh;
		overflow-y: auto;
	}

	.ac-nav .hfe-nav-menu__toggle.hfe-active-menu + .hfe-nav-menu__layout-horizontal {
		height: auto !important;
		max-height: 75vh !important;
		opacity: 1 !important;
		overflow-y: auto !important;
		visibility: visible !important;
	}

	.ac-nav .hfe-nav-menu__layout-horizontal.ac-menu-open ul.hfe-nav-menu,
	.ac-nav .hfe-nav-menu__layout-horizontal.hfe-nav-menu__open ul.hfe-nav-menu {
		display: block !important;
		opacity: 1 !important;
		visibility: visible !important;
	}

	.ac-nav .hfe-nav-menu__layout-horizontal .hfe-nav-menu {
		display: block;
		padding: 10px 20px 18px;
	}

	.ac-nav .hfe-nav-menu__layout-horizontal .hfe-nav-menu > li > a.hfe-menu-item {
		display: flex;
		justify-content: space-between;
		width: 100%;
		padding: 12px 4px !important;
		border-bottom: 1px solid var(--ac-line);
	}

	.ac-nav .hfe-nav-menu__layout-horizontal .hfe-nav-menu li ul.sub-menu {
		position: static;
		width: 100%;
		min-width: 0;
		padding: 0 0 0 16px;
		border: 0;
		box-shadow: none;
	}

	.ac-footer .e-con-inner {
		flex-wrap: wrap;
	}
}

@media (max-width: 767px) {
	.ac-header-main > .e-con-inner {
		min-height: 64px;
		padding-left: 16px !important;
		padding-right: 16px !important;
	}

	.ac-header-brand img {
		width: 172px !important;
	}

	.ac-header-brand {
		flex-basis: 178px !important;
	}

	.ac-search-toggle {
		width: 38px;
		height: 38px;
		font-size: 16px;
	}

	.ac-footer > .e-con-inner {
		gap: 34px !important;
	}

	.ac-footer-brand,
	.ac-footer-col {
		flex: 1 1 100% !important;
		width: 100% !important;
	}

	.ac-footer-bottom > .e-con-inner {
		align-items: flex-start !important;
	}
}

/* Keep page widgets flush inside the Elementor canvas. */
.elementor-widget-html > .elementor-widget-container {
	width: 100%;
}

.elementor-widget-html .ac-legacy {
	width: 100%;
}

/* Imported legacy widgets must stay full-width on narrow screens. */
.ac-elementor-page .elementor-element-330e574 {
	flex-direction: column;
	align-items: stretch;
}

.ac-elementor-page .elementor-widget-html,
.ac-elementor-page .elementor-widget-text-editor {
	min-width: 0;
	max-width: 100%;
}

.ac-elementor-page .ac-legacy {
	min-width: 0;
	max-width: 100%;
	overflow-wrap: anywhere;
	word-break: normal;
}

.ac-elementor-page .ac-legacy li,
.ac-elementor-page .ac-legacy p,
.ac-elementor-page .ac-legacy td,
.ac-elementor-page .ac-legacy th {
	min-width: 0;
	overflow-wrap: anywhere;
}

.ac-elementor-page .elementor-widget-text-editor,
.ac-elementor-page .elementor-widget-text-editor * {
	min-width: 0;
	max-width: 100%;
	overflow-wrap: anywhere;
	word-break: normal;
}

@media (max-width: 767px) {
	.ac-elementor-page .ac-legacy table {
		display: block;
		width: 100%;
		max-width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
}

/* Mobile drawer: lock background scroll while open (QA-01) */
html.ac-nav-open,
html.ac-nav-open body {
	overflow: hidden !important;
	touch-action: none;
}

html.ac-nav-open .ac-nav .hfe-nav-menu__layout-horizontal.ac-menu-open {
	touch-action: pan-y;
}

/* Mobile search panel: keep inside viewport (QA-02) */
@media (max-width: 767px) {
	.ac-search-panel {
		position: fixed;
		top: 74px;
		left: 12px;
		right: 12px;
		width: auto;
	}
}

/* Mobile tap-target polish */
@media (max-width: 767px) {
	.ac-search-toggle {
		height: 44px;
		width: 44px;
	}

	.ac-footer .elementor-widget-text-editor a,
	.ac-footer .elementor-icon-list-item a {
		display: inline-block;
		padding: 9px 0;
	}

	.ac-footer .elementor-button {
		min-height: 44px;
	}
}
