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

header {
	position: fixed;
	z-index: 100;
	top: 0;
	left: 0;
	width: 100%;
}

header::before {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;

	background: var(--primary_blue);
	background: linear-gradient(180deg, #001A61 0%, #1C3492 100%);
	content: "";
	opacity: 1;
}

header .mobile,
header .menu-toggle {
	display: none;
}

header .mobile {
	display: none;
	justify-content: space-between;
	align-items: center;
	padding-block: 1rem;
	/* background: var(--primary_blue); */
}

header .mobile #block-outsmart-logo-3 {
	width: 7rem;
}

@media (max-width: 1100px) {
	header .desktop {
		display: none;
	}
	header .mobile,
	header .menu-toggle {
		display: flex;
		align-items: center;
	}
}

.region-navigation,
.region-mobile-navigation {
	max-width: var(--max_width);
	width: 100%;
	height: var(--header_height);
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	color: var(--white);
}

header .content-wrapper {
	position: relative;
	grid-template-columns: 1fr;
}

#block-outsmart-mainnavigation ul {
	display: flex;
	align-items: center;
	gap: 1.875rem;
	margin: 0;
	padding: 0;
	font-size: 1.375rem;
	list-style-type: none;
	color: var(--white);
}

#block-outsmart-mainnavigation ul a {
	display: inline-block;
	padding-bottom: .25em;
	text-decoration: none;
	border-bottom: 2px solid var(--light_red);
	transition: all .15s ease;
	will-change: color, border-bottom-width;
}

#block-outsmart-mainnavigation ul a.active {
    color: var(--light_red);
    border-bottom-width: 5px;
}

@media (hover: hover) {
	#block-outsmart-mainnavigation ul a:hover {
		color: var(--light_red);
		border-bottom-width: 5px;
	}
}

/* For Healthcare Professionals
--------------------------------------------- */

.menu--for-healthcare-professionals {
    position: relative;
}

.menu--for-healthcare-professionals .nav {
    margin: 0;
    padding: 0;
	list-style: none;
}

.menu--for-healthcare-professionals .nav ul {
    position: absolute;
	z-index: 1000;
    top: 100%;
    left: 0;
	width: 100%;
	padding: 1rem 1.5rem 2rem;

	font-size: 1.125rem;
	line-height: 2;
	list-style: none;
	border-bottom-left-radius: var(--border_radius);
	border-bottom-right-radius: var(--border_radius);
	background: var(--bright_blue);

	opacity: 0;
	pointer-events: none;
	translate: 0 -.85rem;
	transition: opacity 0.3s ease;
}

.menu--for-healthcare-professionals a[aria-expanded="true"] + ul {
    opacity: 1;
	pointer-events: all;
}

/* Slide Out Menu
--------------------------------------------- */

.mobile-menu {
    position: fixed;
    z-index: 5;
    top: 0;
    left: 0;
	display: none;
	flex-direction: column;
    width: 100%;
    height: 100%;
	padding-block-start: 1.25rem;
	padding-inline: 2rem;
    background: var(--middle_blue) url("../images/mobile-menu-bg.svg") no-repeat;
    background-size: 220% auto;
	background-position: 25% 3rem;
}

.mobile-menu[aria-expanded="true"] {
	display: flex;
}

.mobile-menu .block-menu {
	display: flex;
	flex-direction: column;
}

.mobile-menu .menu-list {
	display: flex;
	flex-direction: column;
	padding: 0;
	margin: 0 0 1.25rem 0;
	list-style-type: none;
	color: var(--white);
	font-size: 1.4rem;
	line-height: 1.2;
	font-weight: 600;
}

.mobile-menu .menu-list li {
	padding-block: .75rem;
	border-bottom: 2px solid var(--light_red);
}

.mobile-menu .menu-list li a {
	text-decoration: none;
}

.mobile-menu .dropdown-toggle {
	width: 100%;
}

.mobile-menu .menu-close {
	align-self: flex-end;
	margin-block-end: 2rem;
}

.mobile-menu .dropdown-toggle::after {
	position: absolute;
	top: 50%;
	right: 1rem;
	translate: 0 -50%;
}

.mobile-menu .nav-item {
	color: var(--white);
}

.menu-toggle:not(.tabs .button)::after {
    background: url('../images/menu-icon.svg') no-repeat center center;
	background-size: contain;
}

.menu-close:not(.tabs .button)::after {
	background: url('../images/icon-close.svg') no-repeat center center;
	background-size: contain;
}

/* Search
--------------------------------------------- */

.header-search-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;

    .header-search-input {
        transition: width 0.3s ease, opacity 0.3s ease;
        width: 0;
        opacity: 0;
        padding: 0;
        border: 1px solid #ccc;
        background: white;
        font-size: 1rem;

        &:not([hidden]) {
            width: 200px;
            opacity: 1;
            padding: 0.5rem;
        }
    }

    .header-search-button {
        background: red;
        color: white;
        border: none;
        padding: 0.5rem;
        cursor: pointer;
        font-size: 1.25rem;
        border-radius: 0.25rem;

        &:focus {
            outline: 2px solid black;
        }
    }
}

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

footer {
	overflow: hidden;
	background: var(--primary_blue) url('../images/blue-splat.svg?1') no-repeat 95% 45%;
	background-size: auto 85%;
}
.region-footer {
    display: grid;
    grid-template-areas:
        "logo signup"
        "links signup"
        "copyright copyright";
    grid-template-columns: auto 42%;
	grid-template-rows: auto 1fr 1fr;

	max-width: var(--max_width);
	margin: 0 auto;
	padding: 2rem var(--spacing_x) 7rem;

    color: var(--white);
    align-items: start;
}

.region-footer #block-outsmart-logo {
    grid-area: logo;
	padding-block-end: 2rem;
}

.region-footer #block-outsmart-footercontactlinks {
    grid-area: links;
}

.region-footer #block-outsmart-knowledgeispower {
    grid-area: signup;
	padding-inline-end: 3rem;
    text-align: center;
}
.region-footer #block-outsmart-knowledgeispower .text-formatted h3 {
	margin-block-end: 2rem;
	font-size: 2.75rem;
	color: var(--white);
}
.region-footer #block-outsmart-knowledgeispower .text-formatted p:last-child {
	margin-block: 3.5rem 0;
}

.region-footer #block-outsmart-footercopyright {
	margin-block-start: 4rem;

    grid-area: copyright;
    font-size: 1rem;
}

.region-footer #block-outsmart-footercopyright .text-formatted p {
	display: flex;
	flex-wrap: wrap;
	gap: 2rem;
}

.region-footer #block-outsmart-logo {
	filter: brightness(0) invert(1);
}

#block-outsmart-footercontactlinks ul {
	display: flex;
	align-items: center;
	gap: .35rem;
	padding: 0;
	margin: 0;
	list-style: none;
}
#block-outsmart-footercontactlinks [class*='icon-'] {
	position: relative;
	z-index: 1;
	display: inline-block;
	width: 3.25rem;
	aspect-ratio: 1;
	text-indent: -9999px;
	background-color: var(--bright_blue);
	border-radius: 50%;
	background-size: 33% auto;
	background-position: center;
	background-repeat: no-repeat;
}
#block-outsmart-footercontactlinks li:has(.ribbon) {
	width: 5rem;
	flex: 0 0 5rem;
}
#block-outsmart-footercontactlinks .ribbon {
	width: 100%;
	height: auto;
}
#block-outsmart-footercontactlinks a:not([class*='icon-']) {
	font-weight: normal;
	border-radius: 2rem;
	white-space: nowrap;
}
.icon-facebook {
	background-image: url('../images/icon-facebook.svg');
}
.icon-x {
	background-image: url('../images/icon-x.svg');
}
.icon-instagram {
	background-image: url('../images/icon-instagram.svg');
}
.icon-youtube {
	background-image: url('../images/icon-youtube.svg');
}
#block-outsmart-footercontactlinks a {
	position: relative;
	transition: all .25s ease;
}
#block-outsmart-footercontactlinks a span {
	position: relative;
	z-index: 1;
}

@media (max-width: 1200px) {
	.region-footer {
		grid-template-columns: auto 50%;
		gap: 2rem 0;
	}
}

@media (max-width: 1000px) {
	.region-footer {
		grid-template-areas:
			"logo links"
			"signup signup"
			"copyright copyright";
	}
	.region-footer {
		padding-block-end: 2rem;
		grid-template-columns: auto 80%;
	}
	.region-footer #block-outsmart-knowledgeispower {
		padding-inline-end: 0;
	}
	.region-footer #block-outsmart-footercontactlinks {
		justify-self: end;
	}
	.region-footer #block-outsmart-knowledgeispower .text-formatted p:last-child {
		margin-block: 2rem;
	}
}

@media (max-width: 650px) {
	.region-footer {
		grid-template-areas:
			"logo"
			"links"
			"signup"
			"copyright";
		grid-template-columns: 1fr;
		grid-template-rows: repeat(4, auto);
		gap: .5rem;
	}
	.region-footer #block-outsmart-logo {
		justify-self: center;
	}
	.region-footer #block-outsmart-footercopyright .text-formatted p {
		flex-direction: column;
		text-align: center;
		gap: .75rem;
	}
	.region-footer #block-outsmart-footercontactlinks {
		justify-self: center;
	}
	#block-outsmart-footercontactlinks ul {
		flex-wrap: wrap;
		justify-content: center;
	}
}

@media (hover: hover) {
	#block-outsmart-footercontactlinks a:hover {
		scale: 1.075;
	}
}