/*
Theme Name: ForeFlight Blog
Theme URI:
Author: Kevin Grant
Author URI:
Description: Built on a solidly designed foundation, Twenty Twenty-Two embraces the idea that everyone deserves a truly unique website. The theme’s subtle styles are inspired by the diversity and versatility of birds: its typography is lightweight yet strong, its color palette is drawn from nature, and its layout elements sit gently on the page. The true richness of Twenty Twenty-Two lies in its opportunity for customization. The theme is built to take advantage of the Full Site Editing features introduced in WordPress 5.9, which means that colors, typography, and the layout of every single page on your site can be customized to suit your vision. It also includes dozens of block patterns, opening the door to a wide range of professionally designed layouts in just a few clicks. Whether you’re building a single-page website, a blog, a business website, or a portfolio, Twenty Twenty-Two will help you create a site that is uniquely yours.
Requires at least: 5.9
Tested up to: 6.0
Requires PHP: 5.6
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: twentytwentytwo
Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, sticky-post, threaded-comments

Twenty Twenty-Two WordPress Theme, (C) 2021 WordPress.org
Twenty Twenty-Two is distributed under the terms of the GNU GPL.
*/

/*
 * Font smoothing.
 * This is a niche setting that will not be available via Global Styles.
 * https://github.com/WordPress/gutenberg/issues/35934
 */

 body {
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
}

/*
 * Text and navigation link styles.
 * Necessary until the following issue is resolved in Gutenberg:
 * https://github.com/WordPress/gutenberg/issues/27075
 */

 h1 {
	font-size: 3.25rem !important;
 }

 h2 {
	font-size: 2.75rem !important;
 }

 h3 {
	font-size: 2rem !important;
 }

 h4 {
	/* font-size: 1.5rem !important;
	margin-bottom: 0; */
 }

a {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.25ch;
}

a:hover,
a:focus {
	text-decoration-style: dashed;
}

a:active {
	text-decoration: none;
}

h2 a {
	color: var(--wp--preset--color--primary);
	text-decoration: none;
}

.wp-block-navigation .wp-block-navigation-item a:hover,
.wp-block-navigation .wp-block-navigation-item a:focus {
	text-decoration: underline;
	text-decoration-style: solid;
}

/*
 * Search and File Block button styles.
 * Necessary until the following issues are resolved in Gutenberg:
 * https://github.com/WordPress/gutenberg/issues/36444
 * https://github.com/WordPress/gutenberg/issues/27760
 */

.wp-block-search__button,
.wp-block-file .wp-block-file__button {
	background-color: var(--wp--preset--color--primary);
	border-radius: 0;
	border: none;
	color: var(--wp--preset--color--background);
	font-size: var(--wp--preset--font-size--medium);
	padding: calc(.667em + 2px) calc(1.333em + 2px);
}

/*
 * Button hover styles.
 * Necessary until the following issue is resolved in Gutenberg:
 * https://github.com/WordPress/gutenberg/issues/27075
 */

.wp-block-search__button:hover,
.wp-block-file .wp-block-file__button:hover,
.wp-block-button__link:hover {
	opacity: 0.90;
}

/*
 * Alignment styles.
 * These rules are temporary, and should not be relied on or
 * modified too heavily by themes or plugins that build on
 * Twenty Twenty-Two. These are meant to be a precursor to
 * a global solution provided by the Block Editor.
 *
 * Relevant issues:
 * https://github.com/WordPress/gutenberg/issues/35607
 * https://github.com/WordPress/gutenberg/issues/35884
 */

.wp-site-blocks,
body > .is-root-container,
.edit-post-visual-editor__post-title-wrapper,
.wp-block-group.alignfull,
.wp-block-group.has-background,
.wp-block-cover.alignfull,
.is-root-container .wp-block[data-align="full"] > .wp-block-group,
.is-root-container .wp-block[data-align="full"] > .wp-block-cover {
	padding-left: var(--wp--custom--spacing--outer);
	padding-right: var(--wp--custom--spacing--outer);
}

.wp-site-blocks .alignfull,
.wp-site-blocks > .wp-block-group.has-background,
.wp-site-blocks > .wp-block-cover,
.wp-site-blocks > .wp-block-template-part > .wp-block-group.has-background,
.wp-site-blocks > .wp-block-template-part > .wp-block-cover,
body > .is-root-container > .wp-block-cover,
body > .is-root-container > .wp-block-template-part > .wp-block-group.has-background,
body > .is-root-container > .wp-block-template-part > .wp-block-cover,
.is-root-container .wp-block[data-align="full"] {
	margin-left: calc(-1 * var(--wp--custom--spacing--outer)) !important;
	margin-right: calc(-1 * var(--wp--custom--spacing--outer)) !important;
	width: unset;
}

/* Blocks inside columns don't have negative margins. */
.wp-site-blocks .wp-block-columns .wp-block-column .alignfull,
.is-root-container .wp-block-columns .wp-block-column .wp-block[data-align="full"],
/* We also want to avoid stacking negative margins. */
.wp-site-blocks .alignfull:not(.wp-block-group) .alignfull,
.is-root-container .wp-block[data-align="full"] > *:not(.wp-block-group) .wp-block[data-align="full"] {
	margin-left: auto !important;
	margin-right: auto !important;
	width: inherit;
}

/*
 * Responsive menu container padding.
 * This ensures the responsive container inherits the same
 * spacing defined above. This behavior may be built into
 * the Block Editor in the future.
 */

.wp-block-navigation__responsive-container.is-menu-open {
	padding-top: var(--wp--custom--spacing--outer);
	padding-bottom: var(--wp--custom--spacing--large);
	padding-right: var(--wp--custom--spacing--outer);
	padding-left: var(--wp--custom--spacing--outer);
}

/* CUSTOM STYLES */
/* Main Header */
.header-wrap {
	position: relative;
	z-index: 9999;
}

.hero h1 {
	font-size: 3.25rem !important;
}

.main-header {
	display: flex;
	align-items: center;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 9999;
}

.main-header.stuck {
	background-color: rgba(30,55,79,0.95);
}

.main-header > :first-child {
	flex-grow: 1;
}

/* Logo */
.wp-block-site-logo {
	 position: relative;
}

/* Main Nav */
.main-nav.wp-block-navigation:not(.has-background) .wp-block-navigation__submenu-container {
	background-color: rgba(30,55,79,0.95);
	border: none;
}

.main-nav .wp-block-navigation__container > .wp-block-navigation-item .wp-block-navigation-item__content {
	padding: 0 1rem;
	text-transform: uppercase;
	font-size: 0.9rem;
}

.main-header.stuck .main-nav .wp-block-navigation__container > .wp-block-navigation-item .wp-block-navigation-item__content {
	height: 70px;
	display: flex;
	align-items: center;
}

.main-nav li.wp-block-navigation-submenu {
	 padding-right: 1rem;
}

.main-nav .wp-block-navigation__submenu-container > .wp-block-navigation-item .wp-block-navigation-item__content {
	padding: .5rem 1rem;
	text-transform: none;
}

.main-header.stuck .main-nav .wp-block-navigation__submenu-container > .wp-block-navigation-item .wp-block-navigation-item__content {
	height: auto;
}

.wp-block-navigation .wp-block-navigation-item a:hover,
.wp-block-navigation .wp-block-navigation-item a:focus {
	text-decoration: none;
}

.main-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
	background: rgba(0,0,0,0.2);
	text-decoration: none !important;
}

/* MAIN NAV (Organized) */
.main-nav ul.wp-block-navigation__container {
	gap: 0 !important;
}

.wp-block-navigation-item.has-child {
	cursor: pointer;
}

.wp-block-navigation-item.has-child:hover > a,
.wp-block-navigation-item.has-child:focus > a {
	color: #009bda;
}

.main-header.stuck .wp-block-navigation-item.has-child:hover > a,
.main-header.stuck .wp-block-navigation-item.has-child:focus > a {
	color: white;
}

.main-header:not(.stuck) .wp-block-navigation-item.has-child:hover::after,
.main-header:not(.stuck) .wp-block-navigation-item.has-child:focus::after {
	color: #009bda;
}

/* SUB MENU */
.main-header.stuck li.wp-block-navigation-submenu:hover {
	background: #009bda;
}

/* HERO */
.hero {
	position: relative;
	overflow: hidden;
	background: #ffffff url("./assets/images/hero-bg.jpeg") no-repeat top center;
	background-attachment: fixed;
	background-size: cover;
	/* height: 500px; */
}

.hero > * {
	position: relative;
}

.hero:before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(13, 81, 116, 0.8);
}

/* Post Previews */
.post-preview-header {
	border-bottom: 2px dotted rgba(0,0,0,0.25);
}

.post-preview-header:not(.first-preview-header) {
	margin-top: 6rem !important;
}

.post-preview {
	align-items: flex-start !important;
	margin-bottom: 3rem;
}

.post-preview h3 a {
	text-decoration: none;
}

.wp-block-post-title a:hover {
	text-decoration: underline;
}


.post-preview .wp-block-columns {
	margin-top: 1rem !important;
}

.post-preview .wp-block-post-excerpt__excerpt {
	margin: 0;
}

.post-preview .wp-block-post-date {
	margin-top: 1rem;
}

/* Latest iOS Preview */
.latest-ios-preview {
	margin-top: 6rem !important;
	background: whitesmoke;
	border-radius: .5rem;
	padding: 1rem 2rem 1rem;
}

.latest-ios-preview .post-preview-header{
	margin-top: 0px !important;
}

.latest-ios-preview .post-preview {
	margin-bottom: 1rem;
}

/* Sidebar */
.sidebar .sidebar-section-header {
	font-size: 1.5rem;
	font-weight: 700;
	color: #0d5174;
}

/* Sidebar: Categories */
.sidebar-categories h4 {
	font-size: 1.5rem;
}

.sidebar-categories .wp-block-categories-list {
	margin-top: .5rem;
}

.sidebar .wp-block-categories-list {
	display: flex;
	align-items: flex-start;
	flex-flow: column;
	list-style: none;
	padding: 0;
}

.sidebar .wp-block-categories-list .cat-item {
	margin-bottom: .25rem;
	white-space: nowrap;
	color: gray;
}

.sidebar .wp-block-categories-list .cat-item a {
	background: #009bda;
    border-radius: 5rem;
    padding: 0.25rem 1rem;
    text-decoration: none;
    color: white;
    transition: all .3s ease;
    font-weight: 600;
    font-size: 1rem;
}

.sidebar .wp-block-categories-list .cat-item a:hover {
	background: #0d5174;
}

/* Sidebar: Archives */
.sidebar .wp-block-archives {
	font-family: 'proxima nova';
}

.sidebar .wp-block-archives label {
	font-size: 1.5rem;
	font-weight: 700;
	color: #0d5174;
}

.sidebar .wp-block-archives select {
	width: 100%;
	font-size: 1rem;
	font-weight: 600;
	padding: .25rem;
}

/* Sidebar: Links */
.sidebar-foreflight-links nav {
	margin-top: .25rem;
}
.sidebar-foreflight-links .wp-block-navigation__container {
	grid-gap: .25rem;
	padding: 0.75rem;
    background: whitesmoke;
    border-radius: 0.5rem;
}

.sidebar-foreflight-links .wp-block-navigation .wp-block-navigation-item__content {
	color: #009bda;
	font-weight: 600;
	transition: all .2s ease;
}

/* SINGLE POST: Normal Content */
.wp-block-group:not(.hero) h1 {
	font-size: 2.5rem !important;
}

.wp-block-post-content {
	display: flex;
	flex-flow: column;
}

.wp-block-post-content h2,
.wp-block-post-content h2 strong {
	font-size: 1.75rem;
	color: #002341;
}

.entry-content strong {
	font-size: 1.25rem;
}

/* Migration image fix for spacing issues from migration */
.entry-content figure {
	max-width: 100%;
}

.entry-content .wp-block-media-text__content p {
	line-height: 1.5rem;
}

.entry-content .wp-block-media-text__content p strong {
	display: inline-block;
	border: none;
	padding: 0;
	margin-bottom: 1rem;
}

/* SINGLE POST: Media Content */
.entry-content .wp-block-media-text__content h4 {
	margin-bottom: 0;
	line-height: 1.5rem;
}

.entry-content .wp-block-media-text__content .wp-block-button__link {
	padding: .5rem 1.5rem;
	border-radius: 3rem;
}

.entry-content figure figcaption {
	font-size: .8rem;
	font-style: italic;
	color: gray;
	font-weight: bold;
}

.entry-content iframe {
	max-width: 100%;
}

/* SINGLE POST: Share Buttons */
.social-share-div {
	border-top: 2px dotted rgba(0,0,0,0.25);
	padding-top: 2rem;
	margin-top: 4rem;
}

.social-share-div strong {
	margin-bottom: 1rem;
}

.share-buttons {
	margin-top: 1rem;
}

.share-buttons a {
	text-decoration: none;
	background: #009bda;
	color: white;
	transition: all .3s ease;
	line-height: 1;
	padding: .5rem 1rem;
	margin-right: 1rem;
	border-radius: 2rem;
}

.share-buttons a:hover {
	background: #1e374f;
}

/* FOOTER */
.footer ul {
	list-style: none;
	padding: 0;
}

.footer ul li a {
	text-decoration: none;
	color: rgba(255,255,255,0.8);
	transition: all .3s ease;
}

.footer ul li a:hover {
	color: rgba(255,255,255,1);
}

/* SEARCH */
/* Hide redundant search page search */
.search-page-search {
	display: none;
}

html.has-modal-open .wp-block-search {
	margin-top: 0 !important;
	opacity: 0;
	pointer-events: none;
}

.main-search input {
	border-radius: 2rem !important;
}

.main-search .wp-block-search__button {
	border-radius: 100%;
}

.wp-block-search__button.has-icon {
	background: #009bda;
	transition: all .2s ease;
}

.wp-block-search__button.has-icon:hover {
	background: #0d5174;
}

.wp-block-search__input {
	padding-left: 1rem;
}

.wp-block-search__button {
	cursor: pointer;
}

.wp-block-search__button.has-icon {
	padding: 0;
	width: 3rem;
	height: 3rem;
}

@media only screen and (min-width: 600px) {
	.main-header:not(.stuck) .main-nav .wp-block-navigation__submenu-container {
		transition: all .3s ease;
		margin-top: -1.25rem;
	}
	.main-header.stuck .main-nav .wp-block-navigation__container > .wp-block-navigation-item {
		height: 70px;
	}
	.main-nav .wp-block-navigation__container > .wp-block-navigation-item {
		height: 80px;
		transition: height .3s ease;
	}
	.main-header.stuck .main-nav .wp-block-navigation-item__content:hover,
	.main-header.stuck .main-nav .wp-block-navigation-item__content:focus {
		color: white;
		background: #009bda;
	}
	.main-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover,
	.main-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content:focus {
		color: white;
		background: #009bda;
	}
	.wp-block-navigation-item.has-child::after {
		content: '\2304';
		position: absolute;
		height: 100%;
		display: flex;
		align-items: center;
		right: .8rem;
		transform: translateY(-5%);
		color: white;
		font-size: 1rem;
	}
}

@media only screen and (max-width: 599px) {
	.wp-block-navigation-item__content strong {
		color: #009bda;
	}
	.main-nav .wp-block-navigation__submenu-container {
		padding-top: .5rem !important;
		padding-bottom: 2rem;
	}
}

@media only screen and (min-width: 992px) {
	.mobile-search {
		display: none;
	}
}

@media only screen and (max-width: 991px) {
	/* HEADER */
	.desktop-search {
		display: none;
	}

	/* HERO */
	.hero {
		background-attachment: initial;
		/* background-size: auto; */
	}

	.home-columns {
		display: flex;
		flex-flow: column-reverse;
	}
	.sidebar .wp-block-categories-list {
		flex-flow: row;
		flex-wrap: wrap;
	}
	.sidebar .wp-block-categories-list .cat-item {
		margin-right: .5rem;
	}
	.sidebar-foreflight-links,
	.sidebar .wp-block-archives {
		display: none;
	}

	/* ToDo: Change to common class above */
	.post-preview {
		flex-flow: column;
	}
}

@media only screen and (max-width: 991px) and (min-width: 600px) {
	.main-nav .wp-block-navigation-submenu:last-of-type .wp-block-navigation__submenu-container {
		transform: translateX(-10%);
	}
}

@media only screen and (max-width: 700px) {
	.main-header > .wp-block-group {
		padding: 0 1rem 1rem !important;
	}
}

@media only screen and (max-width: 599px) {
	/* HEADER */
	.main-header > .wp-block-group {
		padding: 1rem !important;
	}

	/* HERO */
	.hero {
		background: #ffffff url("./assets/images/hero-bg-mobile-new.jpg") no-repeat top center;
		background-attachment: initial;
		background-size: auto;
	}

	.wp-block-media-text {
		padding-top: 2rem;
		padding-bottom: 2rem;
		border-bottom: 2px dotted rgba(0,0,0,0.25);
	}
}