/*
 * Static-site CSS overrides.
 * Forces visibility on Inspiro/Elementor elements that depend on JS,
 * and lays out the Elementor gallery widget without its JS dependency.
 */

/* === Inspiro theme: force ready state === */
.site-branding,
.has-header-image .site-branding,
.has-header-video .site-branding,
.inspiro-front-page .site-branding {
    opacity: 1 !important;
    top: 50% !important;
}

.has-header-image .site-branding,
.has-header-video .site-branding {
    transform: translate(-50%, -50%) !important;
}

/* === Elementor: force visibility on animated elements === */
.elementor-invisible {
    visibility: visible !important;
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
}

.elementor-element[data-settings*="_animation"] {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

.elementor-counter-number-wrapper {
    opacity: 1 !important;
    visibility: visible !important;
}

[data-aos]:not(.aos-animate) {
    opacity: 1 !important;
    transform: none !important;
}

/* === Footer: halve the band height + hide empty widget area === */

/* The footer-widgets aside contains an empty <section> on every page.
 * Hide it entirely so we don't get a tall empty band above the copyright. */
.site-footer .footer-widgets {
    display: none !important;
}

.site-footer.has-footer-widgets .inner-wrap {
    padding-bottom: 0 !important;
    padding-top: 0 !important;
}

.site-info {
    padding: 0.9em 0 !important;
}

/* Vertically center the copyright text and logo */
.site-info .copyright {
    align-items: center;
}

/* === Elementor Gallery widget — manual layout === */
/* Without e-gallery.min.js, items have no positioning. We replicate
 * the 3:2 grid with CSS grid (3 cols desktop, 2 tablet, 1 mobile). */

.elementor-widget-gallery .elementor-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    width: 100%;
}

@media (max-width: 1024px) {
    .elementor-widget-gallery .elementor-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

@media (max-width: 767px) {
    .elementor-widget-gallery .elementor-gallery {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* Each gallery item: positioned, with a 3:2 aspect ratio */
.elementor-widget-gallery .e-gallery-item {
    display: block !important;
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    text-decoration: none;
    background: #1a1a1a;
}

/* The thumbnail itself is rendered via background-image set by JS */
.elementor-widget-gallery .e-gallery-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.8s ease;
}

.elementor-widget-gallery .e-gallery-item:hover .e-gallery-image {
    transform: scale(0.96); /* matches the "shrink" hover effect */
}

/* Overlay on top of image */
.elementor-widget-gallery .elementor-gallery-item__overlay {
    position: absolute;
    inset: 0;
    background-color: #1B252F1F;
    transition: background-color 0.8s ease;
    z-index: 1;
}

.elementor-widget-gallery .e-gallery-item:hover .elementor-gallery-item__overlay {
    background-color: #1B252F6E;
}

/* Title content centered */
.elementor-widget-gallery .elementor-gallery-item__content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 2;
}

.elementor-widget-gallery .elementor-gallery-item__title {
    color: #F8F812;
    font-family: "Archivo", Sans-serif;
    font-size: 23px;
    font-weight: 800;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.2em;
}

@media (max-width: 1024px) {
    .elementor-widget-gallery .elementor-gallery-item__title {
        font-size: 22px;
    }
}

@media (max-width: 767px) {
    .elementor-widget-gallery .elementor-gallery-item__title {
        font-size: 18px;
    }
}

/* === Nav dropdown hover bridge ===
 * The Inspiro theme puts a 15px margin-top on submenus, creating a dead
 * zone where the mouse loses :hover on the parent <li> before reaching
 * the dropdown. The fix: add a transparent ::after pseudo-element on the
 * parent <li> that physically bridges the gap, so the hover region is
 * contiguous from parent to submenu.
 * Scoped to the desktop nav (>1024px) so the mobile/side-nav accordion
 * is untouched.
 */
@media (min-width: 1025px) {
    .navbar-nav > li.menu-item-has-children {
        position: relative;
    }

    .navbar-nav > li.menu-item-has-children::after {
        content: "";
        position: absolute;
        top: 100%;
        /* Span wider than the parent so the cursor can drift sideways
           toward the submenu (which is centered on the parent and may
           extend beyond its width). */
        left: -60px;
        right: -60px;
        height: 20px;
        background: transparent;
        /* Hidden until parent is hovered, so the buffer doesn't block
           pointer events on whatever sits below the nav when idle. */
        display: none;
        z-index: 1000;
    }

    .navbar-nav > li.menu-item-has-children:hover::after {
        display: block;
    }
}

/* === Non-clickable parent menu items ===
 * "What We Do" and "Experts & Pros" parent labels are not links — clicking
 * them does nothing. The <a> has no href, so we override the cursor to
 * default (otherwise browsers show a text I-beam, which looks broken).
 */
.navbar-nav > li.menu-item-has-children > a:not([href]) {
    cursor: default;
}

/* ========================================================================
 * OFFERINGS PAGE WIDGET FIXES
 * ====================================================================== */

/* Image-box widgets are used as the *labels* under counter numbers
 * (e.g. "All Time Views" under +2.5M). Without Elementor's CSS, the
 * h4 has default browser margins which spaces them poorly. */
.elementor-widget-image-box .elementor-image-box-content {
    text-align: center;
}
.elementor-widget-image-box .elementor-image-box-title {
    color: #fff;
    font-family: "Archivo", Sans-serif;
    margin: 8px 0;
    font-size: 18px;
    font-weight: 600;
}
.elementor-widget-image-box .elementor-image-box-description {
    color: #b0b0b0;
    font-size: 14px;
    line-height: 1.5;
    margin: 8px 0;
    text-align: center;
}

/* Counter widget styling — center, big, white */
.elementor-widget-counter .elementor-counter {
    text-align: center;
}
.elementor-widget-counter .elementor-counter-number-wrapper {
    display: flex;
    justify-content: center;
    align-items: baseline;
    color: #fff;
    font-family: "Archivo", Sans-serif;
    font-weight: 700;
    font-size: 56px;
    line-height: 1;
    gap: 0;
}
.elementor-widget-counter .elementor-counter-number-prefix,
.elementor-widget-counter .elementor-counter-number-suffix,
.elementor-widget-counter .elementor-counter-number {
    color: inherit;
    font: inherit;
}

/* Hosted video player — render at full container width with sane sizing */
.elementor-widget-video .e-hosted-video {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    display: block;
}
.elementor-widget-video video.elementor-video {
    width: 100%;
    height: auto;
    display: block;
}

/* Note on heights: the slides and media-carousel widgets have inline heights
 * (e.g. height:400px) baked in by Elementor. Rather than fighting those with
 * !important here (which would also override our JS-set heights), we let
 * static-fixes.js neutralize the inline heights by directly setting the
 * style.height property on the relevant elements. */

/* Image-box wrappers used in 4-column stat rows — make sure flex containers
 * lay out children evenly without weird gaps */
.elementor-widget-image-box .elementor-image-box-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* === /live/ Movement section ===
 * The middle column had a video (Vimeo 1058643918) flagged "Private Video"
 * by Vimeo's embed API — it can't be played in an iframe. Hide that
 * column and let the working left video (1185979073) grow into the freed
 * space so the section reads as "video on the left, text on the right".
 */
.elementor-element-ab3ce22 {
    display: none !important;
}
.elementor-element-db28059 {
    flex: 1 1 auto !important;
    max-width: 700px !important;
}

/* Several offerings-page image-box widgets use design-time negative margins
 * (margin: -29px on all sides) that Elementor's own layout system would
 * compensate for. Without that system, the negative margins collapse the
 * widget to 0px and the label text falls invisibly. Reset to 0. */
.elementor-widget-image-box > .elementor-widget-container {
    margin: 0 !important;
}

/* Icon SVGs (Elementor's "e-font-icon-svg" class) are inline glyph-style
 * icons: chevrons, play buttons, social icons, etc. Without Elementor's
 * frontend.css they render at the SVG's intrinsic size — often hundreds
 * of pixels — which blows up icon-list widgets and similar elements.
 * Constrain to 1em by default so they behave like the font glyphs they
 * stand in for. The e-eicon-play class is bigger by convention (used as
 * play overlays on video tiles), so keep that one larger. */
.e-font-icon-svg {
    height: 1em;
    width: 1em;
    display: inline-block;
    vertical-align: middle;
    fill: currentColor;
}
.e-font-icon-svg.e-eicon-play {
    height: 60px;
    width: 60px;
}

/* Icon-list widget: each <li> already has its own inline SVG icon, so the
 * browser-default disc bullet on the <ul> is a duplicate marker. Strip it. */
.elementor-widget-icon-list .elementor-icon-list-items {
    list-style: none;
    padding-left: 0;
    margin: 0;
}
.elementor-widget-icon-list .elementor-icon-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* === Non-clickable parent menu items ===
 * "What We Do" and "Experts & Pros" parent <a> tags have no href —
 * they exist only to host the dropdown trigger. Suppress the hover
 * underline (which would falsely suggest they're links) and force
 * the default cursor.
 */
.navbar-nav > li > a:not([href]),
.navbar-nav > li > a:not([href]):hover {
    cursor: default;
    border-bottom-color: transparent !important;
    opacity: 1 !important;
}

/* === Contact form (homepage and media-kit) ===
 * Shared styles — forms have class "bp-contact-form" and the wrapper
 * has class "bp-contact-form-wrapper". Identical structure on both
 * pages so they share styling.
 */
.bp-contact-form-wrapper { max-width: 600px; margin: 0 auto; padding: 20px; }
.bp-contact-form { display: flex; flex-direction: column; gap: 16px; }
.bp-contact-form .row { display: flex; gap: 12px; flex-wrap: wrap; }
.bp-contact-form .row > * { flex: 1; min-width: 200px; }
.bp-contact-form label {
    display: block;
    color: #EFC92C;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 14px;
}
.bp-contact-form .req { color: #E93323; }
.bp-contact-form input,
.bp-contact-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #000;
    border-radius: 15px;
    font-family: inherit;
    font-size: 16px;
    box-sizing: border-box;
}
.bp-contact-form textarea { min-height: 120px; resize: vertical; }
.bp-contact-form button {
    background-color: #E93323;
    color: #fff;
    border: 0;
    border-radius: 15px;
    padding: 12px 28px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    align-self: flex-start;
}
.bp-contact-form button:hover { background-color: #c92a1c; }
.bp-contact-form button[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}
.bp-contact-form input[aria-invalid="true"],
.bp-contact-form textarea[aria-invalid="true"] {
    border-color: #E93323;
}

/* Honeypot field — visually hidden but still focusable for accessibility */
.bp-honeypot {
    position: absolute;
    left: -9999px;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* Inline status / thank-you messages, shown by JS after submit */
.bp-form-message {
    display: none;
    padding: 16px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.5;
}
.bp-form-message.show { display: block; }
.bp-form-message.success {
    background: #1a3a1a;
    color: #fff;
}
.bp-form-message.error {
    background: #3a1a1a;
    color: #fff;
}

/* === Mobile menu submenu reveal ===
 * Inspiro theme hides nested ULs inside the side-nav by default
 * (.side-nav .navbar-nav ul { display: none }). Original theme JS
 * showed them when the parent got .open class, but never via CSS —
 * it animated via slide-down. Simplest restoration: just show
 * children when parent has .open.
 */
.side-nav .navbar-nav li.menu-item-has-children.open > ul.sub-menu {
    display: block;
}
