/* Skyway Media - Services mega menu.
   Tokens come from the Modiv child theme core.css: Jost body, Baskervville
   headings, --primary #3c6cfc (brand files), navy var(--primaryDark, #060c30), amber var(--secondary, #f6a81e). Everything is
   scoped under #cs-navigation to out-rank the theme's own dropdown rules. */

#cs-navigation .sky-mega {
	--sky-css: 1; /* sentinel: menu.js hides the panel if this did not load */
	font-family: var(--bodyFont, 'Jost', sans-serif);
	color: var(--bodyTextColor, #161519);
	text-align: left;
}
#cs-navigation .sky-mega a { text-decoration: none; }
#cs-navigation .sky-mega ul { list-style: none; margin: 0; padding: 0; }
#cs-navigation .sky-mega p { margin: 0; }
#cs-navigation .sky-group { display: contents; }

/* ============ Mobile / tablet: lives inside the theme's navy drawer ============ */
@media only screen and (max-width: 63.9375rem) {
	#cs-navigation .cs-dropdown.cs-mega { position: static; }
	#cs-navigation .sky-mega {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: calc(100vh - var(--sky-hh, 4.75rem));
		box-sizing: border-box;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		background: var(--primaryDark, #060c30);
		padding: 0 0 4rem;
		z-index: 20;
		transform: translateX(-100%);
		visibility: hidden;
		opacity: 0;
		transition: transform .3s, opacity .3s, visibility 0s .3s;
	}
	#cs-navigation .cs-mega.cs-active .sky-mega {
		transform: translateX(0);
		visibility: visible;
		opacity: 1;
		transition: transform .3s, opacity .3s;
	}
	#cs-navigation .sky-back {
		display: flex;
		align-items: center;
		gap: 1rem;
		padding: 1rem 1.25rem;
		border-bottom: 1px solid rgba(255, 255, 255, .15);
		position: sticky;
		top: 0;
		background: var(--primaryDark, #060c30);
		z-index: 2;
	}
	#cs-navigation .sky-back-btn {
		background: none;
		border: 0;
		color: #fff;
		font-size: 2rem;
		line-height: 1;
		padding: .25rem .5rem;
		cursor: pointer;
	}
	#cs-navigation .sky-back-title {
		font-family: var(--headerFont, 'Baskervville', serif);
		font-size: 1.5rem;
		color: #fff;
	}
	#cs-navigation .sky-tab {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 1.1rem 1.5rem;
		font-size: 1.25rem;
		font-weight: 500;
		color: #fff !important;
		border-bottom: 1px solid rgba(255, 255, 255, .12);
	}
	#cs-navigation .sky-tab-caret {
		width: .6rem;
		height: .6rem;
		border-right: 2px solid var(--secondary, #f6a81e);
		border-bottom: 2px solid var(--secondary, #f6a81e);
		transform: rotate(45deg);
		transition: transform .2s;
		margin-right: .25rem;
	}
	#cs-navigation .sky-group.is-on .sky-tab-caret { transform: rotate(-135deg); }
	#cs-navigation .sky-group.is-on .sky-tab { color: var(--secondary, #f6a81e) !important; }
	#cs-navigation .sky-pane { display: none; padding: .5rem 1.5rem 1.25rem; background: rgba(255, 255, 255, .04); }
	#cs-navigation .sky-group.is-on .sky-pane { display: block; }
	#cs-navigation .sky-pane-title { display: inline-block; margin: .75rem 0 .25rem; color: #fff !important; font-family: var(--headerFont, 'Baskervville', serif); font-size: 1.25rem; }
	#cs-navigation .sky-coltitle {
		margin: 1.1rem 0 .35rem;
		font-size: .8rem;
		font-weight: 600;
		letter-spacing: .08em;
		text-transform: uppercase;
		color: var(--secondary, #f6a81e);
	}
	#cs-navigation .sky-list a {
		display: block;
		padding: .55rem 0;
		font-size: 1.1rem;
		color: #fff !important;
	}
}

/* ============ Desktop ============ */
@media only screen and (min-width: 64rem) {
	#cs-navigation .cs-dropdown.cs-mega { position: static; }
	#cs-navigation .sky-back { display: none; }
	/* The theme leaves the header at z-index 9, the same as the hero's absolutely
	   positioned "Under promise" toggle, which comes later in the DOM and so
	   painted over the open panel. */
	#cs-navigation { z-index: 100; }

	#cs-navigation .sky-mega {
		position: absolute;
		top: 100%;
		right: 1rem;
		width: min(1280px, calc(100vw - 2rem));
		box-sizing: border-box;
		display: grid;
		grid-template-columns: 236px minmax(0, 1fr);
		align-content: start;
		background: linear-gradient(to right, #f5f6fa 236px, #fff 236px);
		border-radius: 0 0 .5rem .5rem;
		box-shadow: rgba(0, 0, 0, .18) 0 18px 40px, rgba(0, 0, 0, .08) 0 2px 6px;
		border-top: 1px solid #e8eaf0;
		min-height: 22rem;
		max-height: calc(100vh - 6rem);
		overflow-y: auto;
		opacity: 0;
		visibility: hidden;
		transform: translateY(-6px);
		transition: opacity .18s, transform .18s, visibility 0s .18s;
		z-index: 30;
	}
	#cs-navigation .cs-mega:hover .sky-mega,
	#cs-navigation .cs-mega:focus-within .sky-mega,
	#cs-navigation .cs-mega.sky-open .sky-mega {
		opacity: 1;
		visibility: visible;
		transform: none;
		transition: opacity .18s, transform .18s;
	}
	#cs-navigation .cs-mega.sky-closed .sky-mega { opacity: 0 !important; visibility: hidden !important; }

	#cs-navigation .sky-tab {
		grid-column: 1;
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: .95rem 1.25rem .95rem 1.5rem;
		font-size: 1.05rem;
		font-weight: 500;
		line-height: 1.3;
		color: var(--bodyTextColor, #161519);
		border-left: 3px solid transparent;
		transition: background-color .15s, color .15s;
	}
	#cs-navigation .sky-tab-caret {
		width: .45rem;
		height: .45rem;
		border-right: 2px solid currentColor;
		border-top: 2px solid currentColor;
		transform: rotate(45deg);
		opacity: .45;
	}
	#cs-navigation .sky-group.is-on .sky-tab {
		background: #fff;
		color: var(--primary, #3c6cfc);
		border-left-color: var(--primary, #3c6cfc);
	}
	#cs-navigation .sky-group.is-on .sky-tab-caret { opacity: 1; }

	#cs-navigation .sky-pane {
		grid-column: 2;
		grid-row: 1 / span 8;
		display: none;
		padding: 1.5rem 2rem 2rem;
	}
	#cs-navigation .sky-group.is-on .sky-pane { display: block; }
	#cs-navigation .sky-pane-title {
		display: inline-block;
		margin-bottom: 1.1rem;
		font-family: var(--headerFont, 'Baskervville', serif);
		font-size: 1.625rem;
		line-height: 1.2;
		color: var(--primaryDark, #060c30);
	}
	#cs-navigation .sky-pane-title:hover { color: var(--primary, #3c6cfc); }
	#cs-navigation .sky-cols {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
		gap: 1.5rem 1.75rem;
		align-items: start;
	}
	#cs-navigation .sky-coltitle {
		margin-bottom: .6rem;
		padding-bottom: .5rem;
		border-bottom: 2px solid var(--secondary, #f6a81e);
		font-size: .8rem;
		font-weight: 600;
		letter-spacing: .08em;
		text-transform: uppercase;
		color: var(--primaryDark, #060c30);
	}
	#cs-navigation .sky-list a {
		display: block;
		padding: .32rem 0;
		font-size: .97rem;
		line-height: 1.35;
		color: var(--bodyTextColor, #161519);
		transition: color .12s, padding-left .12s;
	}
	#cs-navigation .sky-list a:hover,
	#cs-navigation .sky-list a:focus-visible { color: var(--primary, #3c6cfc); padding-left: .25rem; }
}

#cs-navigation .sky-mega a:focus-visible,
#cs-navigation .sky-back-btn:focus-visible { outline: 2px solid var(--secondary, #f6a81e); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
	#cs-navigation .sky-mega, #cs-navigation .sky-mega * { transition: none !important; }
}

/* 2. header CTA (desktop only): real action next to the gag button */
#cs-navigation .sw-nav-cta{display:none!important}
@media(min-width:64rem){
  #cs-navigation .sw-nav-cta{display:inline-flex!important;align-items:center;justify-content:center;white-space:nowrap;height:2.5rem;line-height:1!important;background:transparent;color:var(--primaryDark)!important;border:2px solid var(--primaryDark);box-sizing:border-box;width:auto!important;min-width:0!important;max-width:none!important;font-size:15px!important;margin:0 .6rem 0 2.25rem;padding:0 1.1rem;float:none;flex:0 0 auto;align-self:center}
  #cs-navigation .sw-nav-cta:hover{background:var(--primaryDark);color:#fff!important}
  #cs-navigation .sw-nav-cta:before{display:none}
}


#cs-navigation .cs-li-link{white-space:nowrap}

/* ===== v51: compact mobile header (below 64rem). Desktop untouched. ===== */
@media only screen and (max-width: 63.9375rem) {
	#cs-navigation { height: 3.75rem; padding: 0 1rem; }
	#cs-navigation .cs-logo { width: auto; height: 3.75rem; padding: 0 1rem; justify-content: flex-start; background: transparent; }
	#cs-navigation .cs-logo img.mobile-logo { width: auto; height: 2.5rem; max-width: none; }
	#cs-navigation .cs-toggle { margin: .5rem 0 0 auto; width: 3.5rem; height: 2.75rem; }
	/* the gag button is desktop-only */
	#cs-navigation .do-not-click-trigger { display: none !important; }
	#cs-navigation .cs-logo-m img { max-width: 9rem; margin-top: 1.25rem; }
}

/* ===== v53: Call Now + Schedule Now pinned to the bottom of the mobile drawer ===== */
.sw-drawer-ctas { display: none; }
@media only screen and (max-width: 63.9375rem) {
	#cs-navigation .cs-ul-wrapper { display: flex; flex-direction: column; height: calc(100vh - 3.75rem); height: calc(100dvh - 3.75rem); }
	#cs-navigation .cs-ul-wrapper .cs-ul { flex: 1 0 auto; height: auto; min-height: 0; }
	#cs-navigation .cs-ul-wrapper .sw-drawer-ctas { display: flex; flex: 0 0 auto; gap: .75rem; position: sticky; bottom: 0; z-index: 2; margin-top: auto; padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom)); background: #181a33; box-sizing: border-box; width: 100%; }
	.sw-drawer-ctas .sw-dc { flex: 1 1 0; display: flex; align-items: center; justify-content: center; min-height: 3.25rem; border-radius: .25rem; font-family: 'Jost', sans-serif; font-weight: 600; font-size: 1.0625rem; line-height: 1; text-decoration: none; box-sizing: border-box; }
	.sw-drawer-ctas .sw-dc-go { background: #2f5ae6; color: #fff; border: 2px solid #2f5ae6; }
	.sw-drawer-ctas .sw-dc-call { background: transparent; color: #fff; border: 2px solid #fff; }
}

/* ===== v54: intro CTA pair under the H1 section: tight row, centered "or" ===== */
#home-hero-content .sw-hero-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 1rem 1.25rem; width: auto; margin: 2rem 0 0; }
#home-hero-content .sw-hero-cta .cs-button-6 { margin: 0; min-width: 13.5rem; justify-content: center; }
#home-hero-content .sw-hero-cta .sw-or { margin: 0; line-height: 1; }
@media only screen and (max-width: 36rem) {
	#home-hero-content .sw-hero-cta { flex-direction: column; align-items: stretch; text-align: center; }
}

/* ===== v58: phones show the full logo (icon + "skyway media" wordmark), not the icon alone ===== */
@media only screen and (max-width: 63.9375rem) {
	#cs-navigation .cs-logo img.mobile-logo { display: none !important; }
	#cs-navigation .cs-logo img.desktop-logo { display: block !important; width: auto; height: 2.5rem; max-width: none; }
}
