/*
Theme Name:	Mercury Theme UFR Child
Theme URI:	http://example.com/ufl-main-uni-child/
Description:	Mercury Theme UFR Child Theme
Author:		UF Research Webmaster
Author URI:	http://research.ufl.edu
Template:		ufl-main-uni
Version:		1.0.12
License:		GNU General Public License v2 or later
License URI:	http://www.gnu.org/licenses/gpl-2.0.html
Tags:		featured-images, threaded-comments, translation-ready
Text Domain:	ufl
*/


/*   Fix Masthead hiding WP dropdown  */

:root {
	--bs-link-color: #0021A5;
}

/* Recent Posts Widget - Date First Layout */
.recent-articles-widget ul li {
	margin-bottom: 1rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid #eee;
	display: flex;
	flex-direction: column-reverse;
	align-items: flex-start;
}

.recent-articles-widget ul li:last-child {
	border-bottom: none;
	margin-bottom: 0;
}

.recent-articles-widget .post-date {
	font-size: 0.85em;
	color: #666;
	margin-bottom: 0.25rem;
	font-weight: 500;
	width: fit-content;
	max-width: fit-content;
}

.recent-articles-widget a {
	color: #0021A5;
	text-decoration: none;
	font-weight: 600;
	line-height: 1.3;
	width: fit-content;
	max-width: fit-content;
	flex: none;
}

.recent-articles-widget a:hover {
	color: #001875;
	text-decoration: underline;
}

/* Sidebar Left Template - Thumbnail Toggle */
.sidebar-left-thumbnail.hidden-by-default {
	display: none !important;
}

.sidebar-left-thumbnail {
	margin-bottom: 1.5rem;
}

#masthead {
	z-index: 9999 !important;
}

/* Fix accordion overlapping masthead*/
.accordion .accordion-item {
	z-index: 999;
}

form.searchform.masthead {
	width: 70%;
	margin: 0px auto;
}


input.form-control.masthead {
	font-weight: bold;
}

button.masthead-search-btn {
	background-color: #0025a1;
}

button.close-search {
	right: 210px !important;
	top: 53px !important;
}

.search-modal .close-search {
	font-size: inherit;
	line-height: inherit;
	height: 45px;
	width: 45px;
	position: static;
}

img.search-icon-close {
	height: 55 !important;
	width: 55 !important;
}

.desk-only-search {
	border-right: none !important;
}



ul.dropdown-menu.depth_0 {
	min-width: 800px !important;
	max-width: 800px !important;
}


/* Post templates CSS */
.featured-three-quarter-width-img {
	background-size: 75% !important;
	background-position: center;
	background-repeat: no-repeat;
}


.post-thumbnail-bio-wrapper {
	width: 25% !important;
	margin-left: auto;
	margin-right: auto;
}

.post-thumbnail-bio-wrapper .post-thumbnail .wp-post-image {
	height: 100% !important;
	width: 100% !important;
}


div.see-more-news {
	display: none;
}

#facultyLoadmore {
	display: none;
}


/*	Plugin/block override: ufl-block/faculty-listing-carousel
	Removes orange swipe from carousel picture hover */
.faculty-listing-carousel-wrapper .faculty-listing-carousel .faculty-listing-img::after,
.faculty-page .faculty-listing-item .faculty-listing-img::after {
	background-color: rgba(0, 0, 0, 0) !important;
}

/* Fixes double bullet */
#content ul>li::before,
#content ul ul ul ul>li::before,
#content ul ul ul ul ul ul ul>li::before,
#content ul ul ul ul ul ul ul ul ul ul>li::before,
#content ul ul ul ul ul ul ul ul ul ul ul ul ul>li::before,
#content ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul>li::before,
#content ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul>li::before,
#content ul ul>li::before,
#content ul ul ul ul ul>li::before,
#content ul ul ul ul ul ul ul ul>li::before,
#content ul ul ul ul ul ul ul ul ul ul ul>li::before,
#content ul ul ul ul ul ul ul ul ul ul ul ul ul ul>li::before,
#content ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul>li::before,
#content ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul>li::before {
	content: "";
}

#content ul ul ul>li::before,
#content ul ul ul ul ul ul>li::before,
#content ul ul ul ul ul ul ul ul ul>li::before,
#content ul ul ul ul ul ul ul ul ul ul ul ul>li::before,
#content ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul>li::before,
#content ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul>li::before {
	content: "";
}

.home .wp-block-latest-posts__list li {
	list-style: none;
}

.home ul.wp-block-latest-posts__list {
	padding-left: 0px !important;
}

/* Styling for latest post widget */
.home a.wp-block-latest-posts__post-title {
	font-size: 1.25em;
	text-decoration: none;
	color: #FA4616;
	text-transform: uppercase;
	font-weight: 600;
	line-height: 1.5em;
	font-family: "IBM Plex Sans";
}

/* remove bullets from search pagination buttons */
nav ul.pagination li.page-item::before,
nav ul.pagination li.page-item::marker {
	content: none !important;
}

nav ul.pagination li.page-item {
	padding-left: 0 !important;
}

.pagination {
	--bs-pagination-active-bg: #0021A5;
}

/* Override pagination text-dark class */
.pagination .page-link.text-dark.current {
	color: white !important;
}

#content ol li.breadcrumb-item {
	font-size: 16px;
}

#content ol li.breadcrumb-item.active {
	font-style: italic;
}

#content ol li.breadcrumb-item.active::before {
	margin: 0;
	font-style: normal;
}

.editor-styles-wrapper :where(:not(.is-layout-flex, .is-layout-grid))>.wp-block {
	max-width: 100%;
	width: 100%;
}

/** Florida Univeristy Space Research Consortium Branding */

:root {
	--fusrc-brand-primary: #1F2E45;
	--fusrc-brand-secondary: #F2A900;
}

body.branding--fusrc {

	/* Primary background elements */
	.header .header-container,
	.footer-wrapper .footer,
	.hero-split-container .hero-split-wrapper .split-hero-content,
	button.masthead-search-btn,
	.header .navbar {
		background: var(--fusrc-brand-primary);
		border-bottom: 0;
		/* only applies where relevant */
	}

	@media (max-width: 1409px) {
		.header #main-navbar #main-nav-ul a {
			color: var(--fusrc-brand-primary);
		}

		.header #main-navbar #main-nav-ul>.nav-item>.nav-link:hover {
			color: var(--fusrc-brand-secondary);
		}
	}

	/* Primary text / icon color */
	.header .mobile-offsite-toggle-wrapper .navbar-toggler {
		color: var(--fusrc-brand-primary);
	}

	/* Accordion */
	.accordion .accordion-item {
		.accordion-button:before {
			border-top: 1px solid var(--fusrc-brand-secondary) !important;
		}

		.accordion-button,
		.accordion-button:not(.collapsed) {
			color: var(--fusrc-brand-primary);
		}

		.accordion-collapse:before {
			border-bottom: 1px solid var(--fusrc-brand-secondary) !important;
		}
	}

	/* Toggler icons */
	.header .mobile-offsite-toggle-wrapper .navbar-toggler-icon,
	.header .mobile-offsite-toggle-wrapper .navbar-toggler-icon::before,
	.header .mobile-offsite-toggle-wrapper .navbar-toggler-icon::after {
		color: var(--fusrc-brand-primary);
		background-color: var(--fusrc-brand-primary);
	}

	/* Tab styles */
	.tab-block .tab-block-wrapper {

		.desktop-tab-link-col {
			border-right: 2px solid var(--fusrc-brand-secondary);
			color: var(--fusrc-brand-secondary);

			.tab-link.active,
			.tab-link:not(.collapsed) {
				color: var(--fusrc-brand-primary);
				border-right: 12px solid var(--fusrc-brand-secondary);
			}
		}

		.tab-content-col .tab-link:not(.collapsed) {
			border-bottom: 3px solid var(--fusrc-brand-secondary);
			color: var(--fusrc-brand-primary);
		}

		.tab-link:hover {
			color: var(--fusrc-brand-secondary);
		}
	}

	/* Secondary color usage */
	#content ul li::marker,
	.hero-split-container .banner_subtitle p {
		color: var(--fusrc-brand-secondary);
	}

	/* Secondary border highlights */
	.header #main-nav-ul>.nav-item:hover>.nav-link,
	.header #main-nav-ul>.nav-item:focus>.nav-link,
	.header #main-nav-ul>.nav-item:focus-within>.nav-link {
		border-bottom: 2px solid var(--fusrc-brand-secondary);
	}

	/* Footer */
	.footer-wrapper {
		#footerTopBorder {
			background: var(--fusrc-brand-secondary);
		}

		.footer .footer-section .widget-title {
			border-bottom: 4px solid var(--fusrc-brand-secondary);
		}
	}

	/* Factoids */
	.factoids .factoid-col {
		.factoid-number {
			border-bottom: 2px dotted var(--fusrc-brand-secondary);
			color: var(--fusrc-brand-primary);
		}

		.factoid-subhead {
			color: var(--fusrc-brand-primary);
		}
	}
}

/** End FUSRC Branding */

/** Nav bar scroll up animation */
.scrolling_up {
	opacity: 1;
	visibility: visible;
	transition: all .2s ease-in-out;
}

/* Consistent footerTopBorder width */
#footerTopBorder {
	width: 100% !important;
}

.single-sidebar {
	padding-bottom: 1rem;

	h2.widget-title {
		font-size: 1.75em;
		font-weight: 600;
		line-height: 1.5em;
	}

	ul,
	li {
		padding-left: 0 !important;

		&::before {
			display: inline !important;
			width: 0 !important;
			margin-left: 0 !important;
		}
	}
}

.post-template-single-sidebar-left {
	.entry-meta {margin-bottom: 0;}

    .ellipsis-no-hover {
	    cursor: default !important;
        pointer-events: none !important;
    }
    .ellipsis-no-hover:hover {
        background-color: transparent !important;
        color: inherit !important;
        text-decoration: none !important;
    }
}

@media (max-width: 767.98px) {
    .offcanvas-md.offcanvas-end {
		top: 160px;
	}
	.offcanvas-header { justify-content: flex-end;}
}

.btn-outline-primary {
	--bs-btn-color: #0021A5;
	    --bs-btn-border-color: #0021A5;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #0021A5;
    --bs-btn-hover-border-color: #0021A5;
    --bs-btn-focus-shadow-rgb: 13, 110, 253;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #0021A5;
    --bs-btn-active-border-color: #0021A5;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #0021A5;
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: #0021A5;
    --bs-gradient: none;
}

.pagination { 
	padding-left: 0 !important;
	margin-top: 4rem;
}

.popover {
	max-width: calc(100vw - 40px) !important;
}
.popover-body {
	width: auto;
	max-width: none;
	white-space: nowrap;
}

/* Featured Image Overflow Prevention */
.entry-header .post-thumbnail img,
.entry-header .wp-post-image {
	max-width: 100%;
	height: auto;
	width: 100%;
	object-fit: cover;
	display: block;
	margin: 0 auto 1rem;
}

/* Responsive featured image sizing */
@media (max-width: 768px) {
	.entry-header .post-thumbnail img,
	.entry-header .wp-post-image {
		margin-bottom: 1.5rem;
	}
}

/* Ensure featured image container doesn't overflow */
.entry-header .post-thumbnail {
	max-width: 100%;
	overflow: hidden;
	margin-bottom: 1rem;
}

/* Additional safety for very large images */
.entry-header img {
	max-width: 100% !important;
	height: auto !important;
}

/* Fix long titles in header nav */
@media (min-width: 1410px) {
    .header #main-nav-ul .dropdown-menu li a {
        border-bottom: none;
        font-family: "IBM Plex regular";
        font-size: 17px;
        text-wrap: auto;
        line-height: normal;
		break-inside: avoid;
	}

	.header #main-nav-ul .dropdown-menu {
		padding-top: 2em;
		padding-bottom: 2em;
	}

}

/* Page Hierarchy Navigation - Bootstrap List Group Styling */
.page-hierarchy-nav .list-group {
    border-radius: 0;
    box-shadow: none;
}

.page-hierarchy-nav .list-group-item {
    border: none;
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
    background-color: transparent;
    color: #495057;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
}

.page-hierarchy-nav .list-group-item:hover {
    background-color: #f8f9fa;
    color: #0021a5;
}

.page-hierarchy-nav .list-group-item.active {
    background-color: #0021a5;
    border-color: #0021a5;
    color: #fff;
    font-weight: 500;
}

.page-hierarchy-nav .list-group-item:first-child {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.page-hierarchy-nav .list-group-item:last-child {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: 1px solid #dee2e6;
}

/* Parent page styling - make them bold */
.page-hierarchy-nav .list-group-item.parent-page {
    font-weight: 600;
}

/* Nested level styling */
.page-hierarchy-nav .nested-level-1 .list-group-item {
    background-color: #f8f9fa;
    border-left: 3px solid #0021a5;
    font-size: 0.95em;
}

.page-hierarchy-nav .nested-level-1 .list-group-item:hover {
    background-color: #e9ecef;
    color: #0021a5;
}

.page-hierarchy-nav .nested-level-1 .list-group-item.active {
    background-color: #0021a5;
    border-left-color: #0021a5;
    color: #fff;
}

.page-hierarchy-nav .nested-level-2 .list-group-item {
    background-color: #e9ecef;
    border-left: 2px solid #0021a5;
    font-size: 0.9em;
    color: #495057;
}

.page-hierarchy-nav .nested-level-2 .list-group-item:hover {
    background-color: #dee2e6;
    color: #0021a5;
}

.page-hierarchy-nav .nested-level-2 .list-group-item.active {
    background-color: #0021a5;
    border-left-color: #0021a5;
    color: #fff;
}

.page-hierarchy-nav .nested-level-3 .list-group-item {
    background-color: #dee2e6;
    border-left: 1px solid #0021a5;
    font-size: 0.85em;
    color: #495057;
}

.page-hierarchy-nav .nested-level-3 .list-group-item:hover {
    background-color: #ced4da;
    color: #0021a5;
}

.page-hierarchy-nav .nested-level-3 .list-group-item.active {
    background-color: #0021a5;
    border-left-color: #0021a5;
    color: #fff;
}


@media (min-width: 800px) {
  h2, .h2 {
    font-size: 36px;
    line-height: 42px;
  }
}