/**
 * Theme Name: PG Core
 * Theme URI: https://github.com/PG-BYU/pg-core
 * Author: BYU Publications & Graphics
 * Text Domain: pg-core
 * Author URI: https://create.byu.edu
 * Description: A parent theme for BYU websites.
 * Version: 1.2
 * License: GNU General Public License v2 or later
 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
 */

/**
 * PG-Core: Standard Breakpoints
 * ssm		0-399px
 * sm		400-639px
 * med		640-799px
 * mlg		800-1023px
 * lg		1024-1439px
 * xlg		1440px+
 */

/* IBM Plex Sans Font Import
–––––––––––––––––––––––––––––––––––––––––––––––––– */
@font-face {
	font-family: "IBM Plex Sans";
	src: url('/wp-content/themes/pg-core/fonts/ringside-ssm/IBM-plex/IBMPlexSans-Regular.woff2') format('woff2'),
	     url('/wp-content/themes/pg-core/fonts/ringside-ssm/IBM-plex/IBMPlexSans-Regular.ttf') format('truetype');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "IBM Plex Sans";
	src: url('/wp-content/themes/pg-core/fonts/ringside-ssm/IBM-plex/IBMPlexSans-Medium.woff2') format('woff2'),
	     url('/wp-content/themes/pg-core/fonts/ringside-ssm/IBM-plex/IBMPlexSans-Medium.ttf') format('truetype');
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "IBM Plex Sans";
	src: url('/wp-content/themes/pg-core/fonts/ringside-ssm/IBM-plex/IBMPlexSans-SemiBold.woff2') format('woff2'),
	     url('/wp-content/themes/pg-core/fonts/ringside-ssm/IBM-plex/IBMPlexSans-SemiBold.ttf') format('truetype');
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "IBM Plex Sans";
	src: url('/wp-content/themes/pg-core/fonts/ringside-ssm/IBM-plex/IBMPlexSans-Bold.woff2') format('woff2'),
	     url('/wp-content/themes/pg-core/fonts/ringside-ssm/IBM-plex/IBMPlexSans-Bold.ttf') format('truetype');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

/* Global Site Styles
–––––––––––––––––––––––––––––––––––––––––––––––––– */
:root {

	/* Primary */
	--byu-navy: #002e5d;
	--byu-white: #fff;

	/* Secondary */
	--byu-royal: #0062b8;
	--byu-royal-medium: #5199e1;
	--byu-royal-light: #afd6fe;

	/* Greys */
	--byu-grey-darkest: #141414;
	--byu-grey-dark: #666;
	--byu-grey-medium-dark: #8f8f8f;
	--byu-grey-medium: #c5c5c5;
	--byu-grey-medium-light: #e6e6e6;
	--byu-grey-light: #f4f4f4;
	--byu-grey-lightest: #fafafa;

	/* Fonts */
	--ibm-plex-sans-ssm: "IBM Plex Sans";
	--public-sans: "Public Sans", "Arial", sans-serif;
	--open-sans: "Open Sans", "Arial", sans-serif;

	/* Dark Mode */
	--dark-mode-gray: #cac3b8;
	--dark-mode-navy: #2b51aa;
}

html {
	display: flex;
	flex-direction: column;
	background-color: var(--byu-grey-lightest);
}

.html-no-admin-bar {
	min-height: 100%;
}

body {
	flex: 1;
	display: flex;
	flex-direction: column;
}

.content {
	display: flex;
	flex-direction: column;
	flex: 1;
}

.content__wrapper {
	width: calc(100% - 30px);
	max-width: 974px;
	flex: 1;
	margin: 0 auto;
	padding: 0 15px;
}

.content__wrapper a {
	color: var(--byu-royal);
}

.content__wrapper a:hover {
	color: var(--byu-navy);
	text-decoration: underline;
}

.post__title {
	font-family: var(--ibm-plex-sans-ssm);
	color: var(--byu-navy);
}

.post__content {
	font-family: var(--public-sans);
	line-height: 2;
}

.pg-core__button {
	height: 37px;
	display: flex;
	justify-content: center;
	align-items: center;
	font-family: var(--ibm-plex-sans-ssm);
	font-size: 1em;
	color: var(--byu-white);
	text-decoration: none;
	padding: 0 1.5em;
	background-color: var(--byu-royal);
}

/* Header Styles (Default Theme)
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.byu-header {
	background-color: var(--byu-navy);
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.16);
	z-index: 3;
	position: relative;
}

.byu-header__banner {
	display: grid;
	grid-template-columns: 80px auto;
	padding: 10px 12px;
}

.byu-header__byu-link {
	display: flex;
	align-items: center;
	justify-self: flex-end;
	-webkit-tap-highlight-color: transparent;
	margin: 0 0.6em;
}

.byu-header__byu-link-logo {
	height: 1em;
}

.byu-header__content {
	display: grid;
	grid-template-columns: auto min-content;
	grid-column-gap: 0.75em;
	border-left: 1px solid rgba(255, 255, 255, 0.25);
	position: relative;
	margin: 0;
}

.byu-header__titles {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	padding: 5px 0 5px 1em;
}

.byu-header__site-title {
	font-family: var(--ibm-plex-sans-ssm);
	font-size: 1.25em;
	color: var(--byu-white);
	text-decoration: none;
	-webkit-tap-highlight-color: transparent;
	width: fit-content;
}

.byu-header__site-supertitle,
.byu-header__site-subtitle {
	font-family: var(--ibm-plex-sans-ssm);
	font-size: 0.8em;
	font-weight: 400;
	color: #c0cad6;
}

.byu-header__site-supertitle {
	transition: color 150ms;
	margin: 0 0 0.75em 0;
}

.byu-header__site-supertitle:hover {
	color: var(--byu-white);
}

.byu-header__site-supertitle-link {
	color: inherit;
	text-decoration: none;
}

.byu-header__site-subtitle {
	margin: 0.75em 0 0;
}

.byu-header__right-content {
	display: flex;
	align-items: center;
}

.byu-header__mobile-nav-button {
	height: 35px;
	width: 35px;
	padding: 0;
	-webkit-tap-highlight-color: transparent;
	cursor: pointer;
	border: none;
}

.byu-header__hamburger {
	position: relative;
	width: 35px;
	height: 35px;
}

.byu-header__hamburger:hover {
	cursor: pointer;
}

.byu-header__menu-close {
	position: relative;
	width: 30px;
	height: 35px;
	margin: 0 2.5px;
}

.byu-header__menu-close:hover {
	cursor: pointer;
}

.byu-header__mobile-nav {
	height: 0;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	background-color: var(--byu-white);
	transition: height 250ms ease;
}

.byu-header__search-form--mobile {
	position: relative;
	border-top: 1px solid var(--byu-grey-medium-light);
	border-bottom: 1px solid var(--byu-grey-medium-light);
	background-color: var(--byu-white);
}

.byu-header__search-form--always-visible {
	grid-column: 1 / 3;
	margin: 10px -12px -10px;
}

.byu-header__search-box {
	width: 100%;
	font-family: var(--ibm-plex-sans-ssm);
	line-height: 1.2;
	border: none;
	padding: 0.75em 3.5em 0.75em 0.75em;
	background-color: var(--byu-white);
}

.byu-header__search-submit {
	display: flex;
	align-items: center;
	position: absolute;
	top: 4px;
	right: 12px;
	padding: 0;
	background-color: var(--byu-white);
	border: none;
}

.byu-header__search-form--mobile .byu-header__search-submit {
	width: 2em;
}

.byu-header__search-icon {
	height: 2em;
	cursor: pointer;
}

.byu-header__mobile-nav-icon--inactive {
	display: none;
}

.byu-header__action-login-wrapper {
	display: grid;
	grid-template-columns: max-content auto max-content;
	padding: 0.5em;
	border-bottom: 1px solid var(--byu-grey-medium-light);
	-webkit-tap-highlight-color: transparent;
}

.byu-header__login-wrapper {
	display: grid;
	color: var(--byu-navy);
	text-decoration: none;
}

.byu-header__login-wrapper:hover {
	cursor: pointer;
	color: var(--byu-royal);
}

.byu-header__login-wrapper--mobile {
	grid-template-columns: 35px max-content;
	align-items: center;
	grid-area: 1 / 3;
	padding: 0 1em;
}

.byu-header__login-icon {
	height: 20px;
}

.byu-header__login-icon--logged-in {
	height: 25px;
	border-radius: 50%;
}

.byu-header__login-text {
	font-family: var(--ibm-plex-sans-ssm);
	margin: 0;
}

.byu-header__nav-item {
	font-family: var(--ibm-plex-sans-ssm);
	color: var(--byu-navy);
	padding: 0.75em;
	transition: background 250ms ease;
	text-decoration: none;
	-webkit-tap-highlight-color: transparent;
}

.byu-header__nav-item:hover {
	cursor: pointer;
	background-color: var(--byu-grey-medium-light);
}

.byu-header__nav-item--active {
	color: var(--byu-white);
	background-color: var(--byu-navy);
}

/* Action Button - Random Speech
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.byu-header__action-button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 16px;
	border-radius: 4px;
	white-space: nowrap;
	margin: 0;

	/* Typography */
	font-family: var(--ibm-plex-sans-ssm);
	font-size: 14px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.5px;

	/* Colors & Effects */
	background-color: #fff;
	color: var(--byu-royal);
	border: 1px solid var(--byu-royal);
	transition: all 0.2s ease;
	height: auto;
}

.byu-header__action-button:hover {
	background-color: var(--byu-royal);
	color: #fff;
	text-decoration: none;
}

.byu-header__action-button-icon {
	width: 16px;
	height: 16px;
	filter: brightness(0) saturate(100%) invert(23%) sepia(88%) saturate(1735%) hue-rotate(199deg) brightness(92%) contrast(101%);
}

.byu-header__action-button:hover .byu-header__action-button-icon {
	filter: brightness(0) saturate(100%) invert(100%);
}

.byu-header__action-button .short-text {
	display: none;
}

@media (max-width: 1235px) {
	.byu-header__action-button {
		font-size: 13px;
	}

	.byu-header__action-button .full-text {
		display: none;
	}

	.byu-header__action-button .short-text {
		display: inline;
	}
}

@media (max-width: 480px) {
	.byu-header__action-button {
		padding: 5px 10px;
		font-size: 12px;
	}
}

/* Improved Random Speech Button Positioning */
.byu-header__action-section {
	display: flex;
	align-items: center;
	position: relative;
	z-index: 10;
}

/* Desktop Layout (above 1194px) */
@media (min-width: 1239px) {
	.byu-header__desktop-nav {
		display: flex;
		justify-content: space-between;
	}

	.byu-header__action-button .full-text {
		display: inline;
	}

	.byu-header__action-button .short-text {
		display: none;
	}

	.byu-header__action-section {
		margin-right: 20px;
	}
}

/* Medium Layout (900px - 1194px) */
@media (min-width: 1142px) and (max-width: 1238px) {
	.byu-header__desktop-nav {
		display: flex;
	}

	.byu-header__action-section {
		position: absolute;
		right: 7px;
		top: 50%;
		transform: translateY(-50%);
	}

	.byu-header__action-button .full-text {
		display: none;
	}

	.byu-header__action-button .short-text {
		display: inline;
	}

	.byu-header__action-button {
		padding: 5px 12px;
		font-size: 12px;
		height: auto;
	}

	/* Override style-desktop.css for this range */
	.byu-header__action-button--desktop {
		display: flex !important;
	}
}

/* Small Desktop (800px - 899px) - Move to banner next to search */
@media (min-width: 900px) and (max-width: 1142px) {
	/* Position in the banner area instead of nav */
	.byu-header__action-section {
		position: absolute;
		top: 15px; /* Position vertically in the banner */
		right: 85px; /* Position to the left of search icon */
		z-index: 100;
	}

	.byu-header__action-button {
		padding: 4px 8px;
		font-size: 14px;
		height: 26px !important;
	}

	/* Override style-desktop.css for this range */
	.byu-header__action-button--desktop {
		display: flex !important;
	}

	.byu-header__action-button .short-text {
		display: inline;
	}

	.byu-header__action-button .full-text {
		display: none;
	}
}

/* Mobile Layout */
@media (max-width: 948px) {
	.byu-header__action-button--desktop {
		display: none;
	}

	.byu-header__action-button {
		width: 100%;
		justify-content: center;
		margin: 8px 0;
	}
}

/* Header Styles (Default Theme)
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.byu-header__desktop-nav {
	display: flex;
	align-items: center;
	width: 100%;
	justify-content: space-between; /* This pushes the action button to the right */
}

.byu-header__nav-section {
	display: flex;
	align-items: center;
	gap: 24px;
}

.byu-header__action-section {
	display: flex;
	align-items: center;
	margin-right: 20px;
}

.byu-header__action-button:hover .byu-header__action-button-icon {
	filter: brightness(0) saturate(100%) invert(100%); /* White on hover */
}

/* Mobile Layout
–––––––––––––––––––––––––––––––––––––––––––––––––– */
@media (max-width: 799px) {
	.byu-header__desktop-nav,
	.byu-header__nav-items-wrapper {
		flex-direction: column;
		align-items: stretch;
		gap: 16px;
	}

	.byu-header__action-button {
		width: 100%;
		justify-content: center;
		margin: 8px 0;
	}

	.byu-header__nav-translation--desktop {
		margin-right: 0;
	}
}
/*
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.byu-header__search-form--desktop,
.byu-header__search-box::-webkit-search-cancel-button,
/* .byu-header__action-button--desktop, */
.byu-header__login-wrapper--desktop,
.byu-header__desktop-nav {
	display: none;
}

.byu-header__search-box:focus {
	outline: none;
}

/* Light Header Theme
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.byu-header--light,
.byu-header--light .byu-header__mobile-nav-button {
	background-color: var(--byu-white);
}

.byu-header--light .byu-header__content {
	border-color: var(--byu-grey-medium-light);
}

.byu-header--light .byu-header__site-title {
	color: var(--byu-navy);
}

.byu-header--light .byu-header__site-supertitle,
.byu-header--light .byu-header__site-subtitle {
	color: var(--byu-grey-medium-dark);
}

.byu-header--light .byu-header__site-supertitle:hover {
	color: var(--byu-royal);
}

.byu-header--light .tcon-menu__lines,
.byu-header--light .tcon-menu__lines::before,
.byu-header--light .tcon-menu__lines::after {
	background-color: var(--byu-navy);
}

.byu-header--light .byu-header__nav-item:hover {
	background-color: var(--byu-grey-light);
}

.byu-header--light .byu-header__nav-item--active {
	color: var(--byu-navy);
	background-color: var(--byu-white);
	padding-left: calc(0.75em - 3px);
	border-left: 3px solid var(--byu-navy);
}

/* Footer Styles
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.byu-footer {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	background-color: var(--byu-white);
	position: relative;
}

.byu-footer__navigation {
	width: calc(100% - 3em);
	display: grid;
	grid-row-gap: 25px;
	padding: 2em 1.5em;
}

.byu-footer__nav-column {
	display: grid;
	justify-items: flex-start;
	align-content: flex-start;
	grid-row-gap: 20px;
	font-family: var(--open-sans);
}

.byu-footer__column-title {
	font-family: var(--ibm-plex-sans-ssm);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
	margin: 0;
}

.byu-footer__column-text {
	line-height: 1.75;
	margin: 0;
}

.byu-footer__column-link {
	color: var(--byu-royal);
	text-decoration: none;
}

.byu-footer__column-link.dark-mode:hover {
	color: var(--byu-royal-light);
}

.byu-footer__column-link:hover {
	color: var(--byu-navy);
	text-decoration: underline;
}

.byu-footer__column-social-links {
	display: flex;
	flex-wrap: wrap;
}

.byu-footer__social-icon {
	height: 1.5em;
	width: 1.5em;
	margin: 0.5em 1em;
}

.byu-footer__banner {
	width: calc(100% - 2em);
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 1.1em 1em 1.3em;
	background-color: var(--byu-navy);
}

.byu-footer__byu-link {
	font-family: var(--ibm-plex-sans-ssm);
	font-size: 1.15em;
	font-weight: 500;
	color: var(--byu-white);
	line-height: 1.5;
	text-align: center;
	text-transform: uppercase;
	text-decoration: none;
	letter-spacing: 5px;
}

.byu-footer__copyright {
	text-align: center;
	color: var(--byu-white);
	font-family: var(--public-sans);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.75;
	margin-top: 1em;
}

.byu-footer__copyright--desktop {
	display: none;
}

.byu-footer__copyright-phone {
	color: inherit;
	text-decoration: inherit;
}

.byu-footer__copyright-phone:hover {
	text-decoration: underline;
}

.byu-footer__privacy-link {
	font-family: var(--public-sans);
	font-size: 14px;
	color: var(--byu-white);
	text-decoration: none;
	margin-top: 1em;
}

.byu-footer__privacy-notice {
	display: flex;
	flex-direction: column;
	text-align: center;
	font-size: 14px;
	margin-top: 0.75em;
}

.byu-footer__privacy-link-separator {
	display: none;
}

.byu-footer__privacy-link:hover {
	text-decoration: underline;
}

@media (min-width: 640px) {

	.byu-footer__navigation {
		grid-template-columns: repeat(2, max-content);
		grid-column-gap: 25px;
		justify-content: space-around;
	}
}

/* Speeches Translation
–––––––––––––––––––––––––––––––––––––––––––––––––– */

.byu-header__nav-translation {
	flex-flow: column;
	justify-content: center;
}

.byu-header__nav-translation--mobile {
	display: flex;
	height: 2.75em;
	padding: 0 10px;
}

.byu-header__languages {
	grid-column: 1 / 3;
	display: flex;
	flex-flow: column;
	background: var(--byu-white);
	font-family: var(--ibm-plex-sans-ssm);
	color: var(--byu-royal);
	font-size: .95rem;
}

.nav-translation__button--desktop {
	display: inline-block;
	height: 1.65em;
	padding: 10px 12px 8px 12px;
}

.byu-header__languages a {
	padding: 0.75rem 0;
}

.byu-header__translation-icon {
	height: 1.3em;
	cursor: pointer;
}

.byu-header__nav-translation--desktop {
	display: none;
}

.nav-translation__button--mobile {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 10px 8px 0;
}

.byu-header__current-language--mobile {
	font-family: var(--ibm-plex-sans-ssm), sans-serif;
	color: var(--pgsp-theme-color);
	font-size: 65%;
	line-height: 0;
	min-width: 32px;
}

.byu-header__languages--mobile {
	top: 10px;
}

@media (min-width: 900px) {
	.byu-header__languages--mobile {
		display: none !important;
	}

	.byu-header__languages a {
		padding: 0.75rem;
	}
}

/* Translation Options Dropdown Positioning */
.byu-header__nav-translation--desktop {
	position: relative;
}

.byu-header__languages--desktop {
	position: absolute;
	top: 100%;
	left: 56%;
	transform: translateX(-50%); /* Center the dropdown under the button */
	z-index: 1000;
	min-width: 103px;
	background: var(--byu-white);
	border: 1px solid var(--byu-grey-medium-light);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	padding: 0.5rem 0;
	margin-top: 5px; /* Add some space between button and dropdown */
}

.byu-header__languages--desktop a {
	display: block;
	padding: 0.5rem 1rem;
	color: var(--byu-royal); /* Change to BYU blue color */
	text-decoration: none;
	white-space: nowrap;
	font-size: 14px; /* Adjust font size */
	font-family: var(--ibm-plex-sans-ssm);
}

.byu-header__languages--desktop a:hover {
	background-color: var(--byu-grey-light);
	color: var(--byu-navy); /* Darker blue on hover */
}

/* GeoIP Language Tooltip Styles */

/* Ensure main header provides positioning context */
.byu-header {
	position: relative;
}

.geoip-language-tooltip {
	display: none; /* JS sets display */
	background-color: var(--byu-royal-light);
	color: var(--byu-navy);
	border-radius: 4px;
	font-family: var(--ibm-plex-sans-ssm);
	box-sizing: border-box;
	/* Mobile/Default Styles (< 800px) */
	width: calc(100% - 30px);
	margin: 10px auto;
	padding: 10px 15px;
	text-align: center;
	font-size: 0.9em;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.geoip-language-tooltip span {
	margin-right: 8px;
}

.geoip-language-tooltip-button {
	padding: 2px 8px;
	background-color: var(--byu-royal);
	color: var(--byu-white);
	text-decoration: none;
	border-radius: 3px;
	font-size: 0.9em;
	font-weight: 500;
	transition: background-color 0.2s ease;
	display: inline-block;
}

.geoip-language-tooltip-button:hover {
	background-color: var(--byu-navy);
	color: var(--byu-white);
}

/* Medium Desktop Styles (800px - 1599px) */
@media (min-width: 800px) and (max-width: 1599px) {
	.geoip-language-tooltip {
		display: block;
		position: absolute;
		top: 100%;
		left: auto; /* Set by JS */
		transform: none;
		width: auto;
		white-space: nowrap;
		margin: 5px 0 0 0;
		padding: 8px 12px;
		border-radius: 4px;
		box-shadow: 0 2px 4px rgba(0,0,0,0.15);
		text-align: left;
		font-size: 0.9em;
		order: initial;
	}
}

/* Large Desktop Styles (>= 1600px) */
@media (min-width: 1600px) {
	.geoip-language-tooltip {
		display: inline-flex;
		position: static;
		top: auto;
		left: auto;
		transform: none;
		width: auto;
		padding: 5px 10px;
		margin-left: 10px;
		margin-top: 8px;
		text-align: left;
		font-size: 0.85em;
		white-space: nowrap;
		border-radius: 4px;
		box-shadow: 0 1px 3px rgba(0,0,0,0.1);
		order: initial;
	}
}

/* End GeoIP Language Tooltip Styles */
