/* flypeak.com hand-written overrides.
   theme.css is generated (purged Salient/WPBakery CSS) - never edit it directly.
   Put every site-specific tweak here so it survives a re-extract. */

/* ---- runtime states driven by main.js (replaces jQuery-set inline styles) ---- */
#slide-out-widget-area.slide-out-from-right { transition: transform .5s cubic-bezier(.2, .9, .2, 1); }
#slide-out-widget-area.slide-out-from-right.open { transform: translate3d(0, 0, 0); overflow-y: auto; }
#slide-out-widget-area-bg { position: fixed; top: 0; left: 0; width: 1px; height: 1px; z-index: 9996; display: block; opacity: 0; pointer-events: none; transition: opacity .45s ease; background: rgba(0, 0, 0, .6); }
#slide-out-widget-area-bg.open { pointer-events: auto; width: 100%; height: 100%; opacity: 1; }
#header-outer { transition: transform .5s cubic-bezier(.2, .9, .2, 1), background-color .3s ease, padding .3s ease; }
body.ocm-open { overflow: hidden; }
#slide-out-widget-area .off-canvas-menu-container li.menu-item-has-children { position: relative; }
#slide-out-widget-area .off-canvas-menu-container li.menu-item-has-children > ul.sub-menu { display: block; max-height: 0; overflow: hidden; transition: max-height .4s ease; }
#slide-out-widget-area .ocm-dropdown-arrow { color: inherit; text-align: center; }
#slide-out-widget-area .ocm-dropdown-arrow:focus-visible { outline: 2px solid #f9c36b; outline-offset: 2px; }

.toggle[data-inner-wrap="true"] > div { max-height: 0; overflow: hidden; transition: max-height .45s cubic-bezier(.2, .8, .2, 1); }
.toggle[data-inner-wrap="true"].open > div { max-height: none; }

.testimonial_slider .slides { position: relative; overflow: hidden; }
.testimonial_slider .slides blockquote { position: absolute; top: 0; left: 0; width: 100%; }
.testimonial_slider .slides blockquote.no-trans { transition: none !important; }

.wpb_row .nectar-video-wrap { transition: opacity .6s ease; }
.wpb_row .nectar-video-wrap video.loaded { opacity: 1; }

#to-top { display: block; }
#to-top.mobile-enabled { display: block; }

.nectar-split-heading.animated-in, .nectar-split-heading.animated-in span, .nectar-split-heading.animated-in span .inner { opacity: 1 !important; transform: none !important; }
.nectar-animated-title.completed .nectar-animated-title-inner .wrap { opacity: 1; transform: none; }
.nectar_cascading_images .cascading-image .inner-wrap { opacity: 0; transform: scale(.85); }
body.using-mobile-browser .nectar_cascading_images .cascading-image .inner-wrap { opacity: 1; transform: none; }

/* ---- insights carousel (replaces Flickity; item styling stays with the theme CSS) ---- */
.nectar-post-grid.nectar-flickity { position: relative; }
.nectar-post-grid.nectar-flickity .flickity-viewport { overflow: visible; height: auto !important; }
.nectar-post-grid.nectar-flickity .flickity-slider { position: static; display: flex; gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: none; cursor: grab; }
.nectar-post-grid.nectar-flickity .flickity-slider::-webkit-scrollbar { display: none; }
.nectar-post-grid.nectar-flickity .flickity-slider.is-dragging { cursor: grabbing; scroll-behavior: auto; scroll-snap-type: none; }
.nectar-post-grid.nectar-flickity .nectar-post-grid-item { position: relative !important; left: auto !important; flex: 0 0 calc(100% / 3 - 20px); width: calc(100% / 3 - 20px) !important; margin: 15px !important; scroll-snap-align: start; }
.nectar-post-grid.nectar-flickity .nectar-post-grid-item:first-child { margin-left: 0 !important; }
.nectar-post-grid.nectar-flickity[data-grid-spacing="0px"] .nectar-post-grid-item { margin: 0 !important; }
.nectar-post-grid.nectar-flickity .nectar-post-grid-item[hidden] { display: none; }
@media (max-width: 999px) { .nectar-post-grid.nectar-flickity .nectar-post-grid-item { flex-basis: calc(100% / 2 - 15px); width: calc(100% / 2 - 15px) !important; } }
@media (max-width: 690px) { .nectar-post-grid.nectar-flickity .nectar-post-grid-item { flex-basis: 100%; width: 100% !important; } }
.nectar-post-grid.nectar-flickity .flickity-page-dots { position: absolute; left: 0; bottom: 0; width: 100%; margin: 0; padding: 0; list-style: none; text-align: center; line-height: 1; }
.nectar-post-grid.nectar-flickity .flickity-page-dots .dot { cursor: pointer; }

/* ---- search page ---- */
.peak-search-form { display: flex; gap: 8px; justify-content: center; margin-top: 20px; }
.peak-search-form input[type="search"] { flex: 1 1 320px; max-width: 420px; padding: 10px 14px; border: 1px solid #ccc; border-radius: 6px; font-size: 16px; }
#search-results { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; padding: 40px 0; align-items: start; }
@media (max-width: 999px) { #search-results { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 690px) { #search-results { grid-template-columns: 1fr; } }
#search-results article.result { position: static; width: auto !important; margin: 0 !important; }
#search-results article.result img { width: 100%; height: auto; display: block; margin-bottom: 15px; }
#search-results article.result h2.title { font-size: 16px; line-height: 1.4; margin-bottom: 8px; }
#search-results article.result h2.title span { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; opacity: .6; margin-top: 4px; }
#search-results .no-results { padding: 40px 0; }

/* ---- video lightbox + team bio overlay ---- */
.peak-lightbox { position: fixed; inset: 0; z-index: 100000; opacity: 0; transition: opacity .3s ease; }
.peak-lightbox.open { opacity: 1; }
.peak-lightbox-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .85); }
.peak-lightbox-content { position: absolute; top: 50%; left: 50%; width: min(92vw, 1100px); aspect-ratio: 16 / 9; transform: translate(-50%, -50%); background: #000; }
.peak-lightbox-content video, .peak-lightbox-content iframe { width: 100%; height: 100%; display: block; border: 0; }
.peak-lightbox-close, .peak-bio-close { position: absolute; top: -44px; right: 0; width: 40px; height: 40px; border: 0; background: transparent; color: #fff; font-size: 22px; cursor: pointer; }
body.nectar-video-lightbox-open, body.nectar-team-bio-open { overflow: hidden; }
.peak-bio-overlay { position: fixed; inset: 0; z-index: 100000; background: rgba(0, 0, 0, .92); color: #fff; opacity: 0; transition: opacity .4s ease; overflow-y: auto; }
.peak-bio-overlay.open { opacity: 1; }
.peak-bio-inner { position: relative; max-width: 1100px; margin: 8vh auto; padding: 60px 40px; display: grid; grid-template-columns: minmax(200px, 340px) 1fr; gap: 50px; align-items: start; }
.peak-bio-inner .peak-bio-close { top: 10px; right: 10px; }
.peak-bio-img img { width: 100%; height: auto; display: block; border-radius: 6px; }
.peak-bio-overlay h3, .peak-bio-overlay h5 { color: #fff; }
.peak-bio-overlay .team-bio-content p { color: rgba(255, 255, 255, .9); }
@media (max-width: 800px) { .peak-bio-inner { grid-template-columns: 1fr; padding: 60px 20px; } }

/* ---- accessibility & polish ---- */
.nectar-skip-to-content { position: absolute; left: -9999px; top: 0; z-index: 100001; background: #000; color: #fff; padding: 12px 18px; }
.nectar-skip-to-content:focus { left: 10px; top: 10px; }
.screen-reader-text { position: absolute !important; clip: rect(1px, 1px, 1px, 1px); width: 1px; height: 1px; overflow: hidden; }

/* search page title: inherit the black h1 colour (base theme sets #page-header-bg to white text) */
body.search #page-header-bg h1 span { color: inherit; }
