/**
 * Site-wide enhancements — flytupelo.com
 * Applies to all pages built with Divi + tupelo-airport child theme.
 */

:root {
	--tupelo-red: #c12336;
	--tupelo-red-dark: #a01e2c;
	--tupelo-red-light: #d4364a;
	--tupelo-heading: #2d2d2d;
	--tupelo-text: #444444;
	--tupelo-muted: #666666;
	--tupelo-border: #e5e5e5;
	--tupelo-bg-soft: #f7f7f7;
	--tupelo-radius: 6px;
	--tupelo-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
	--tupelo-shadow-hover: 0 10px 28px rgba(0, 0, 0, 0.12);
	--tupelo-font-body: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
	--tupelo-font-heading: "Scheherazade", Georgia, "Times New Roman", serif;
	--tupelo-content-width: 1200px;
	--tupelo-text-width: 72ch;
}

/* ---------------------------------------------------------------- Typography */
body,
.et_pb_text,
.et_pb_blurb_description,
#left-area,
.nf-form-content {
	font-size: 16px;
	line-height: 1.65;
	color: var(--tupelo-text);
}

h1, h2, h3, h4, h5, h6,
.et_pb_text h1,
.et_pb_text h2,
.et_pb_text h3,
.et_pb_text h4 {
	color: var(--tupelo-heading);
	overflow-wrap: break-word;
	word-wrap: break-word;
	line-height: 1.25;
}

.et_pb_text h2 {
	font-size: clamp(1.5rem, 2.5vw, 2rem);
	margin-bottom: 0.5em;
}

.et_pb_text h3 {
	font-size: clamp(1.15rem, 2vw, 1.45rem);
	margin-bottom: 0.45em;
}

.et_pb_text h4 {
	font-size: 1.1rem;
}

#main-content .et_pb_text p,
#main-content .entry-content p {
	margin-bottom: 1em;
	max-width: var(--tupelo-text-width);
}

#main-content .et_pb_column_4_4 .et_pb_text p {
	max-width: none;
}

/* ---------------------------------------------------------------- Skip link */
.tupelo-skip-link {
	position: absolute;
	top: -100px;
	left: 1rem;
	z-index: 999999;
	padding: 0.75rem 1.25rem;
	background: var(--tupelo-red);
	color: #fff !important;
	font-weight: 600;
	border-radius: var(--tupelo-radius);
	text-decoration: none;
	transition: top 0.2s ease;
}

.tupelo-skip-link:focus {
	top: 1rem;
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* ---------------------------------------------------------------- Header & nav */
#main-header {
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
	transition: box-shadow 0.25s ease, background-color 0.25s ease;
	background-color: rgba(255, 255, 255, 0.98);
}

body.tupelo-header-scrolled #main-header.et-fixed-header,
body.tupelo-header-scrolled #main-header {
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
	background-color: rgba(255, 255, 255, 0.97);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

#et-top-navigation {
	display: flex;
	align-items: center;
}

@media (min-width: 981px) {
	#top-menu {
		display: flex;
		flex-wrap: nowrap;
		align-items: center;
		justify-content: flex-end;
		gap: 0.15rem 0.1rem;
	}

	#top-menu > li {
		padding-right: 0 !important;
		margin: 0 0.15rem;
	}
}

#top-menu > li > a {
	position: relative;
	display: inline-block;
	font-size: 12.5px;
	font-weight: 650;
	letter-spacing: 0.035em;
	line-height: 1.2;
	/* Only touch horizontal padding — Divi header style needs the large bottom padding */
	padding-left: 0.4em !important;
	padding-right: 0.4em !important;
	color: var(--tupelo-heading) !important;
	transition: color 0.2s ease, box-shadow 0.2s ease;
	box-shadow: inset 0 -2px 0 transparent;
}

#top-menu > li > a:hover,
#top-menu > li > a:focus-visible {
	color: var(--tupelo-red) !important;
	box-shadow: inset 0 -2px 0 var(--tupelo-red);
}

#top-menu > li.current-menu-item > a,
#top-menu > li.current_page_item > a,
#top-menu > li.current-menu-ancestor > a {
	color: var(--tupelo-red) !important;
	box-shadow: inset 0 -2px 0 var(--tupelo-red);
}

/* Divi caret: keep glyph, park it beside the label (not on top of it) */
#top-menu .menu-item-has-children > a:first-child,
#et-secondary-nav .menu-item-has-children > a:first-child {
	padding-right: 1.55em !important;
}

#top-menu .menu-item-has-children > a:first-child:after,
#et-secondary-nav .menu-item-has-children > a:first-child:after {
	font-family: "ETmodules" !important;
	content: "3" !important;
	font-size: 10px !important;
	font-weight: 400 !important;
	line-height: 1 !important;
	position: absolute !important;
	right: 0.15em !important;
	left: auto !important;
	top: 50% !important;
	bottom: auto !important;
	margin-top: -0.35em !important;
	width: auto !important;
	height: auto !important;
	background: none !important;
	border: 0 !important;
	transform: none !important;
	-webkit-transform: none !important;
	opacity: 0.55;
	pointer-events: none;
}

#top-menu .menu-item-has-children > a:first-child:hover:after,
#top-menu .menu-item-has-children.current-menu-item > a:first-child:after,
#top-menu .menu-item-has-children.current-menu-ancestor > a:first-child:after {
	opacity: 1;
}

/* Soften secondary utility links */
#top-menu > li.tupelo-nav-utility > a {
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--tupelo-muted) !important;
	opacity: 0.88;
	box-shadow: none !important;
}

#top-menu > li.tupelo-nav-utility > a:hover,
#top-menu > li.tupelo-nav-utility > a:focus-visible {
	color: var(--tupelo-red) !important;
	opacity: 1;
}

/* Tower Cam primary CTA pill */
#top-menu > li.tupelo-nav-cta {
	margin-left: 0.5rem;
}

#top-menu > li.tupelo-nav-cta > a {
	background: var(--tupelo-red) !important;
	color: #fff !important;
	border-radius: 999px;
	padding: 0.5em 0.95em !important;
	box-shadow: 0 3px 12px rgba(193, 35, 54, 0.28) !important;
	letter-spacing: 0.05em;
	font-size: 12px;
}

#top-menu > li.tupelo-nav-cta > a:hover,
#top-menu > li.tupelo-nav-cta > a:focus-visible,
#top-menu > li.tupelo-nav-cta.current-menu-item > a {
	background: var(--tupelo-red-dark) !important;
	color: #fff !important;
	box-shadow: 0 5px 16px rgba(193, 35, 54, 0.38) !important;
}

#top-menu > li.tupelo-nav-cta > a:after {
	display: none !important;
}

/* Dropdowns */
#top-menu li li a {
	font-size: 13.5px;
	font-weight: 500;
	letter-spacing: 0.01em;
	text-transform: none;
	padding: 0.7em 1.15em !important;
	line-height: 1.35;
	transition: background-color 0.15s ease, color 0.15s ease;
}

#top-menu li li a:hover,
#top-menu li li a:focus-visible {
	background-color: rgba(193, 35, 54, 0.08);
	color: var(--tupelo-red) !important;
}

#top-menu ul.sub-menu {
	border: 1px solid var(--tupelo-border);
	border-top: 3px solid var(--tupelo-red);
	box-shadow: var(--tupelo-shadow-hover);
	border-radius: 0 0 var(--tupelo-radius) var(--tupelo-radius);
	padding: 0.35rem 0;
	min-width: 240px;
	background: #fff;
}

#top-menu li.mega-menu > ul.sub-menu,
#top-menu li > ul.sub-menu {
	padding-top: 0.4rem;
	padding-bottom: 0.4rem;
}

#logo {
	transition: opacity 0.2s ease;
}

#logo:hover {
	opacity: 0.88;
}

/* Mobile nav drawer */
#et_mobile_nav_menu .mobile_nav {
	border-radius: var(--tupelo-radius);
}

.et_mobile_menu {
	border-top: 3px solid var(--tupelo-red) !important;
	box-shadow: var(--tupelo-shadow-hover) !important;
	padding: 0.5rem 0 0.75rem !important;
	background: #fff !important;
}

.et_mobile_menu li a {
	font-size: 0.95rem !important;
	font-weight: 600 !important;
	letter-spacing: 0.03em;
	padding: 0.9rem 1.15rem !important;
	border-bottom: 1px solid var(--tupelo-border) !important;
	color: var(--tupelo-heading) !important;
}

.et_mobile_menu li a:hover,
.et_mobile_menu li a:focus-visible {
	background: rgba(193, 35, 54, 0.06) !important;
	color: var(--tupelo-red) !important;
}

.et_mobile_menu li.tupelo-nav-utility > a {
	font-size: 0.88rem !important;
	color: var(--tupelo-muted) !important;
}

.et_mobile_menu li.tupelo-nav-cta > a {
	margin: 0.65rem 1rem 0.35rem;
	display: block !important;
	text-align: center;
	background: var(--tupelo-red) !important;
	color: #fff !important;
	border-radius: 999px !important;
	border-bottom: none !important;
	padding: 0.85rem 1rem !important;
}

.et_mobile_menu .sub-menu li a {
	font-size: 0.88rem !important;
	font-weight: 500 !important;
	text-transform: none;
	padding-left: 1.75rem !important;
	color: var(--tupelo-text) !important;
}

.mobile_menu_bar:before {
	color: var(--tupelo-red) !important;
}

/* ---------------------------------------------------------------- Buttons (site-wide) */
.et_pb_button,
body .et_pb_button,
.nf-form-content input[type="button"],
.nf-form-content button,
.forminator-button-submit,
input[type="submit"].ninja-forms-field {
	background-color: var(--tupelo-red) !important;
	color: #ffffff !important;
	border-radius: var(--tupelo-radius) !important;
	font-weight: 600 !important;
	padding: 0.75em 1.75em !important;
	box-shadow: 0 3px 12px rgba(193, 35, 54, 0.28);
	transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease !important;
}

.et_pb_button:hover,
body .et_pb_button:hover,
.nf-form-content input[type="button"]:hover,
.nf-form-content button:hover,
.forminator-button-submit:hover {
	background-color: var(--tupelo-red-dark) !important;
	color: #ffffff !important;
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(193, 35, 54, 0.38) !important;
}

.et_pb_button:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
	outline: 2px solid var(--tupelo-red);
	outline-offset: 2px;
}

/* ---------------------------------------------------------------- Inner page hero banner */
body:not(.home) .et_pb_section_0.et_section_regular {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

body:not(.home) .et_pb_section_0 .et_pb_image_0 img {
	display: block;
	width: 100%;
	max-height: 420px;
	object-fit: cover;
	object-position: center;
}

body:not(.home) .et_pb_section_1 .et_pb_text h2 {
	line-height: 1.15 !important;
	overflow-wrap: break-word !important;
	word-break: normal;
	hyphens: auto;
	text-align: center;
}

body:not(.home):not(.page-id-232):not(.page-learn-to-fly) .et_pb_section_1 .et_pb_text h3 {
	color: #ffffff !important;
	text-align: center;
	font-size: clamp(1.1rem, 2.5vw, 1.5rem) !important;
}

body:not(.home):not(.page-id-232):not(.page-learn-to-fly) .et_pb_section_1 .et_pb_text {
	box-shadow: 0 4px 22px rgba(0, 0, 0, 0.18);
}

/* Readable hub text on light / cloud backgrounds */
.page-learn-to-fly .et_pb_section_1 .et_pb_text,
.page-learn-to-fly .et_pb_section_1 .et_pb_text h2,
.page-learn-to-fly .et_pb_section_1 .et_pb_text h3,
.page-learn-to-fly .et_pb_section_1 .et_pb_text p {
	color: #2d2d2d !important;
	box-shadow: none !important;
}

/* ---------------------------------------------------------------- Content cards (hub / landing pages) */
body:not(.home) .et_pb_section_2 .et_pb_row_2,
body:not(.home) .et_pb_section_2 .et_pb_row {
	border-radius: var(--tupelo-radius);
}

body:not(.home) .et_pb_section_2 .et_pb_column {
	background: rgba(255, 255, 255, 0.92);
	border-radius: var(--tupelo-radius);
	box-shadow: var(--tupelo-shadow);
	padding: 1.75rem 1.25rem 1.5rem !important;
	margin-bottom: 1rem;
	transition: transform 0.22s ease, box-shadow 0.22s ease;
	height: calc(100% - 1rem);
	display: flex;
	flex-direction: column;
}

body:not(.home) .et_pb_section_2 .et_pb_column:hover {
	transform: translateY(-4px);
	box-shadow: var(--tupelo-shadow-hover);
}

body:not(.home) .et_pb_section_2 .et_pb_text h3,
body:not(.home) .et_pb_section_2 .et_pb_text h4 {
	color: var(--tupelo-red) !important;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	font-size: 1.05rem !important;
	margin-bottom: 0.65rem !important;
}

body:not(.home) .et_pb_section_2 .et_pb_text p {
	font-size: 0.98rem;
	color: var(--tupelo-muted);
	flex-grow: 1;
	max-width: none;
	margin-bottom: 0.75rem;
}

body:not(.home) .et_pb_section_2 .et_pb_column.tupelo-card-link {
	cursor: pointer;
}

body:not(.home) .et_pb_section_2 .et_pb_column.tupelo-card-link:focus-within {
	outline: 2px solid var(--tupelo-red);
	outline-offset: 2px;
}

body:not(.home) .et_pb_section_2 .et_pb_button_module_wrapper {
	margin-top: auto !important;
	padding-top: 0.5rem;
}

/* ---------------------------------------------------------------- General content sections */
#main-content .et_pb_section {
	padding-top: 2.5rem;
	padding-bottom: 2.5rem;
}

#main-content .et_pb_section.et_pb_section_0,
#main-content .et_pb_section.et_pb_section_1 {
	padding-top: 0;
	padding-bottom: 0;
}

.et_pb_blurb .et_pb_module_header {
	color: var(--tupelo-heading);
	font-weight: 700;
}

.et_pb_blurb:hover .et_pb_main_blurb_image img {
	transform: scale(1.04);
	transition: transform 0.25s ease;
}

/* ---------------------------------------------------------------- Contact & forms */
.side_contact_info h4 {
	padding-bottom: 20px;
	color: var(--tupelo-red);
}

.side_contact_info p {
	padding-bottom: 15px !important;
}

.side_contact_info a:hover {
	color: var(--tupelo-red-dark);
}

.nf-form-content label,
.forminator-label {
	font-size: 1rem !important;
	font-weight: 600 !important;
	color: var(--tupelo-heading) !important;
	margin-bottom: 0.35em !important;
}

.nf-form-content .listselect-wrap .nf-field-element div,
.nf-form-content .ninja-forms-field,
.forminator-input,
.forminator-textarea,
.forminator-select select {
	font-size: 1rem !important;
	color: var(--tupelo-text) !important;
	border-radius: var(--tupelo-radius) !important;
	border: 1px solid var(--tupelo-border) !important;
	padding: 0.65em 0.85em !important;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nf-form-content input:not([type="button"]):focus,
.nf-form-content textarea:focus,
.forminator-input:focus,
.forminator-textarea:focus {
	border-color: var(--tupelo-red) !important;
	box-shadow: 0 0 0 3px rgba(193, 35, 54, 0.15) !important;
}

.nf-form-fields-required,
.forminator-description {
	font-size: 0.875rem;
	color: var(--tupelo-muted);
}

/* Demote h2 tags used as body copy after a section heading (e.g. contact address lines) */
#main-content .et_pb_text h3 ~ h2 {
	font-size: 1.05rem !important;
	font-weight: 500 !important;
	color: var(--tupelo-text) !important;
	line-height: 1.6 !important;
	margin-bottom: 0.35em !important;
}

/* ---------------------------------------------------------------- Tables */
.footable.table,
.ninja_table_wrapper table,
table.wp-block-table {
	border-collapse: collapse;
	width: 100%;
	font-size: 0.95rem;
}

.footable.table th,
.ninja_table_wrapper table th {
	background: var(--tupelo-red);
	color: #fff;
	font-weight: 600;
	padding: 0.75em 1em;
	text-align: left;
}

.footable.table td,
.ninja_table_wrapper table td {
	padding: 0.65em 1em;
	border-bottom: 1px solid var(--tupelo-border);
}

.footable.table tr:nth-child(even) td,
.ninja_table_wrapper table tr:nth-child(even) td {
	background: var(--tupelo-bg-soft);
}

.footable.table tr:hover td,
.ninja_table_wrapper table tr:hover td {
	background: rgba(193, 35, 54, 0.04);
}

/* ---------------------------------------------------------------- Footer */
#main-footer {
	background-color: #2a2a2a;
}

#main-footer .footer-widget h4,
#main-footer .widget_block h2 {
	color: #ffffff !important;
	font-size: 1.1rem;
	margin-bottom: 1rem;
}

#main-footer .footer-widget li,
#main-footer .footer-widget p,
#main-footer .footer-widget a {
	color: rgba(255, 255, 255, 0.82);
	line-height: 1.6;
}

#main-footer .footer-widget a:hover {
	color: #ffffff;
}

#main-footer .et-social-icon a {
	transition: transform 0.2s ease, opacity 0.2s ease;
}

#main-footer .et-social-icon a:hover {
	transform: translateY(-2px);
	opacity: 1;
}

#footer-bottom {
	background-color: #1f1f1f;
	padding: 1rem 0;
	font-size: 0.875rem;
}

#footer-bottom a {
	color: rgba(255, 255, 255, 0.75);
}

#footer-bottom a:hover {
	color: #ffffff;
}

/* ---------------------------------------------------------------- Links */
#main-content a:not(.et_pb_button):not(.wp-block-button__link) {
	color: var(--tupelo-red);
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
	transition: color 0.15s ease;
}

#main-content a:not(.et_pb_button):not(.wp-block-button__link):hover {
	color: var(--tupelo-red-dark);
}

.tupelo-contact-detail {
	font-size: 1.05rem;
	line-height: 1.65;
	margin-bottom: 0.35em;
	color: var(--tupelo-text);
}

/* Divi sidebar nav: prevent broken icon font from showing literal digits */
.et_pb_widget_nav_menu li a,
.et_pb_sidebar .menu li a {
	display: flex;
	align-items: center;
	gap: 0.35em;
}

.et_pb_widget_nav_menu li a::before,
.et_pb_sidebar .menu li a::before {
	font-family: ETmodules, sans-serif !important;
}

/* ---------------------------------------------------------------- Images & media */
#main-content .et_pb_image img,
#main-content .et_pb_post_image img {
	border-radius: 2px;
}

.et_pb_gallery_image img {
	transition: transform 0.3s ease;
}

.et_pb_gallery_image:hover img {
	transform: scale(1.02);
}

/* ---------------------------------------------------------------- Back to top */
.et_pb_scroll_top {
	background: var(--tupelo-red) !important;
	border-radius: 50%;
	box-shadow: var(--tupelo-shadow);
	transition: transform 0.2s ease, background-color 0.2s ease;
}

.et_pb_scroll_top:hover {
	background: var(--tupelo-red-dark) !important;
	transform: translateY(-2px);
}

/* ---------------------------------------------------------------- Responsive */
@media (max-width: 980px) {
	body:not(.home) .et_pb_section_0 .et_pb_image_0 img {
		max-height: 320px;
	}

	body:not(.home) .et_pb_section_2 .et_pb_column {
		margin-bottom: 1.25rem;
		height: auto;
	}

	#top-menu > li > a {
		font-size: 12px;
		padding-left: 0.35em !important;
		padding-right: 0.35em !important;
	}

	#top-menu .menu-item-has-children > a:first-child {
		padding-right: 1.5em !important;
	}

	#top-menu > li.tupelo-nav-cta > a {
		padding: 0.5em 0.85em !important;
	}
}

@media (max-width: 767px) {
	body,
	.et_pb_text {
		font-size: 15px;
	}

	body:not(.home) .et_pb_section_0 .et_pb_image_0 img {
		max-height: 240px;
	}

	body:not(.home) .et_pb_section_1 .et_pb_text {
		width: 92% !important;
		margin-left: auto !important;
		margin-right: auto !important;
	}

	body:not(.home) .et_pb_section_2 .et_pb_column {
		padding: 1.25rem 1rem !important;
	}

	#main-content .et_pb_section {
		padding-top: 2rem;
		padding-bottom: 2rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
