/* ==========================================================================
   AANAHCA – decorative helpers.
   Colours, fonts, buttons and spacing are set in Elementor > Site Settings.
   These classes are added to widgets via Advanced > CSS Classes.
   ========================================================================== */

/* Wavy line under section headings ------------------------------------------
   Add "an-wave" to a Heading widget. Variants: an-wave--center, an-wave--white */
.an-wave .elementor-heading-title {
	position: relative;
	padding-bottom: 6px;
}
.an-wave .elementor-heading-title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -10px;
	width: 83px;
	height: 10px;
	background: url("../img/red-line.svg") no-repeat center / contain;
}
.an-wave--center .elementor-heading-title::after {
	left: 50%;
	transform: translateX(-50%);
}
.an-wave--white .elementor-heading-title::after {
	background-image: url("../img/white-line.svg");
}

/* Red dot after a heading ("ABOUT US.") – wrap the dot in <span class="an-dot">. */
.an-dot {
	color: var(--e-global-color-secondary, #d4001b);
}

/* Main menu: red dots between top-level items ------------------------------- */
.an-nav .elementor-nav-menu--main > .elementor-nav-menu > li {
	position: relative;
}
.an-nav .elementor-nav-menu--main > .elementor-nav-menu > li:not(:last-child)::after {
	content: "";
	position: absolute;
	top: 50%;
	right: -2px;
	width: 5px;
	height: 5px;
	margin-top: -2px;
	border-radius: 50%;
	background: var(--e-global-color-secondary, #d4001b);
	pointer-events: none;
}
.an-nav .elementor-nav-menu--main .sub-menu {
	min-width: 220px !important;
}

/* Buttons: soft coloured glow like the original design ---------------------- */
.elementor-button {
	transition: background-color .3s, border-color .3s, box-shadow .3s, color .3s;
}
.elementor-button:hover,
.elementor-button:focus {
	box-shadow: 0 10px 40px rgba(50, 83, 162, .3);
}

/* Desktop sub-menus: red panel, blue on hover (the mobile/tablet menu panel is styled in the widget) */
.elementor .an-nav.elementor-widget-nav-menu .elementor-nav-menu--main .elementor-nav-menu--dropdown {
	background: var(--e-global-color-secondary, #d4001b);
	border-radius: 0;
	min-width: 220px !important;
}
.elementor .an-nav.elementor-widget-nav-menu .elementor-nav-menu--main .elementor-nav-menu--dropdown a,
.elementor .an-nav.elementor-widget-nav-menu .elementor-nav-menu--main .elementor-nav-menu--dropdown a.elementor-item-active {
	color: #fff;
	background: transparent;
	font-size: 14px;
	line-height: 25px;
	padding: 12px 15px !important;
}
.elementor .an-nav.elementor-widget-nav-menu .elementor-nav-menu--main .elementor-nav-menu--dropdown a:hover,
.elementor .an-nav.elementor-widget-nav-menu .elementor-nav-menu--main .elementor-nav-menu--dropdown a:focus {
	color: #fff;
	background: var(--e-global-color-primary, #042167);
}

/* Arrow icons in buttons keep their original 26×15 size */
.elementor-button .elementor-button-icon svg {
	width: 26px;
	height: auto;
}

/* Mobile/tablet menu panel: show sub-pages expanded (as on the original site) */
.an-nav .elementor-nav-menu--dropdown.elementor-nav-menu__container .sub-menu {
	display: block !important;
	position: static !important;
	width: 100% !important;
	box-shadow: none;
}
.an-nav .elementor-nav-menu--dropdown.elementor-nav-menu__container .sub-menu a {
	font-size: 14px;
	border: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	justify-content: center;
}

/* ==========================================================================
   Page sections
   ========================================================================== */

/* Big decorative shapes may stick out of the page edges */
body {
	overflow-x: clip;
}

/* Sections with decorative shapes: add "an-rel" to the section container,
   and "an-deco" to each decorative image (Advanced > Position: Absolute). */
.an-rel,
.an-rel > .e-con-inner {
	position: relative;
}
.an-rel > .e-con-inner > :not(.an-deco),
.an-rel.e-con-full > :not(.an-deco) {
	position: relative;
	z-index: 1;
}
.an-deco {
	z-index: 0 !important;
	pointer-events: none;
}
.an-deco img {
	display: block;
	max-width: none !important;
	width: 100%;
	height: auto;
}

/* Resource lists (Text Editor with a bulleted list): stethoscope bullets, link under the name */
.an-resources ul {
	list-style: none;
	margin: 0;
	padding: 0 0 0 40px;
}
.an-resources li {
	position: relative;
	margin-bottom: 20px;
	font-size: 15px;
	font-weight: 500;
	line-height: 29px;
}
.an-resources li::before {
	content: "";
	position: absolute;
	left: -30px;
	top: 2px;
	width: 17px;
	height: 21px;
	background: url("../img/scop.png") no-repeat center / contain;
}
.an-resources li a {
	display: block;
	color: var(--e-global-color-secondary, #d4001b);
	font-weight: 600;
	word-break: break-word;
}
.an-resources li a:hover {
	color: var(--e-global-color-primary, #042167);
}

/* Image with the cream block behind it (Events page) */
.an-cream-box {
	position: relative;
}
.an-cream-box::before {
	content: "";
	position: absolute;
	z-index: 0;
	right: 0;
	top: -55px;
	width: 80%;
	height: 457px;
	background: var(--e-global-color-an_cream, #fff2e8);
}
.an-cream-box img {
	position: relative;
	z-index: 1;
}
@media (max-width: 767px) {
	.an-cream-box::before {
		display: none;
	}
}

/* "Become a member" cards */
.an-card {
	transition: transform .3s, box-shadow .3s;
}
.an-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 20px 40px rgba(4, 33, 103, .15);
}

/* Gallery filter: pill buttons like the original page */
.an-gallery .elementor-gallery__titles-container {
	gap: 15px;
	margin-bottom: 60px;
}
.an-gallery .elementor-gallery-title {
	margin: 0 !important;
	padding: 15px 20px !important;
	min-width: 175px;
	border: 2px solid #bdbdbd;
	border-radius: 50px;
	box-shadow: 0 10px 40px rgba(185, 185, 185, .3);
	font-size: 12px;
	font-weight: 700;
	line-height: 20px;
	letter-spacing: .84px;
	text-transform: uppercase;
	text-align: center;
	transition: background-color .3s, border-color .3s, color .3s;
}
.an-gallery .elementor-gallery-title::before,
.an-gallery .elementor-gallery-title::after {
	display: none !important;
}
.an-gallery .elementor-gallery-title:hover,
.an-gallery .elementor-gallery-title.elementor-item-active {
	background: var(--e-global-color-secondary, #d4001b);
	border-color: #ff485f;
	box-shadow: 0 10px 40px rgba(212, 0, 27, .3);
	color: #fff !important;
}

/* Section headings inside forms ("For Students", "Review and Submit") */
.elementor-form .an-form-heading {
	margin: 20px 0 0;
	font-size: 18px;
	line-height: 36px;
	font-weight: 600;
	text-transform: uppercase;
	color: var(--e-global-color-primary, #042167);
}
/* Radio options (Application type) */
.elementor-form .elementor-field-type-radio .elementor-field-option {
	margin-right: 28px;
}
.elementor-form .elementor-field-type-radio .elementor-field-option label {
	font-size: 14px !important;
	line-height: 22px;
	color: #6b6b6b;
}
.elementor-form .elementor-field-type-radio input {
	accent-color: var(--e-global-color-secondary, #d4001b);
}
.elementor-form .elementor-field-textual {
	min-height: 54px;
}

/* Image allowed to be wider than its column (home hero photo) */
@media (min-width: 768px) {
	.an-img-overflow img {
		max-width: none;
	}
}

/* Image that runs to the left edge of the screen (home hero photo).
   Add "an-bleed-left" to the Image widget; only applies on desktop. */
@media (min-width: 1200px) {
	.an-bleed-left {
		margin-left: min(-15px, calc((1240px - 100vw) / 2)) !important;
	}
}
@media (max-width: 767px) {
	.an-bleed-left {
		margin-left: -15px !important;
	}
}

/* Mirror of an-bleed-left: image runs to the right edge of the screen. */
@media (min-width: 1200px) {
	.an-bleed-right {
		margin-right: min(-15px, calc((1240px - 100vw) / 2)) !important;
	}
	.an-bleed-right img {
		margin-left: auto;
		display: block;
	}
}
@media (max-width: 767px) {
	.an-bleed-right {
		margin-right: -15px !important;
	}
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

/* Clearly visible keyboard focus everywhere (orange ring works on white, pink and blue) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
.elementor-button:focus-visible {
	outline: 3px solid var(--e-global-color-accent, #fe821e) !important;
	outline-offset: 3px;
	box-shadow: none;
}
main#content:focus {
	outline: none;
}

/* Skip link: visible when focused */
.skip-link.screen-reader-text:focus {
	position: fixed !important;
	top: 10px;
	left: 10px;
	z-index: 100000;
	clip: auto !important;
	clip-path: none;
	width: auto;
	height: auto;
	padding: 12px 20px;
	background: #fff;
	color: var(--e-global-color-primary, #042167);
	font-weight: 700;
	text-decoration: underline;
	box-shadow: 0 4px 20px rgba(0, 0, 0, .2);
}

/* Required-field asterisk in the brand red */
.elementor-field-group.elementor-field-required.elementor-mark-required .elementor-field-label::after {
	color: var(--e-global-color-secondary, #d4001b);
}

/* Respect "reduce motion" */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: .01ms !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}
}

/* Links inside running text are underlined so they aren't identified by colour alone (WCAG 1.4.1) */
.elementor-widget-text-editor a {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Small sub-headings inside a Text Editor (e.g. Board Members "Past Presidents of…").
   Add "an-small-headings" to the widget; uses H3 for correct heading order, sized like the original H5. */
.an-small-headings h3 {
	font-size: 20px;
	line-height: 30px;
	font-weight: 700;
	margin: 0 0 8px;
}

/* Accessibility Statement page: compact section headings inside the Text Editor */
.an-statement h2 {
	font-size: 20px;
	line-height: 30px;
	font-weight: 700;
	text-transform: none;
	margin: 30px 0 10px;
	color: var(--e-global-color-primary, #042167);
}
.an-statement h2:first-child {
	margin-top: 0;
}
