:root {
    --ayo-header-z: 9999;
    --ayo-contact-z: 2147483000;
}

/* ============================================================
   HEADER — finite, centered, shared geometry
   ============================================================ */

/* Remove any possible top gap caused by browser defaults or wrappers. */
html,
body {
    margin-top: 0;
    padding-top: 0;
}

#page,
#content,
.ast-container,
#primary,
#main,
.ast-article-single,
.entry-content {
    margin-top: 0;
    padding-top: 0;
}

.ayo-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--ayo-header-z);
    background: transparent;
    border-bottom: 1px solid transparent;
    margin-top: 0 !important;
    padding-top: 0 !important;
    transition: background-color 0.25s ease, border-color 0.25s ease, backdrop-filter 0.25s ease, -webkit-backdrop-filter 0.25s ease;
}

/* Inner container: finite, centered, identical for 1470 and 3196 */
.ayo-header > .elementor-container {
    min-height: 64px;
    display: flex;
    align-items: center;
    width: calc(100% - 96px);
    max-width: 1560px;
    margin-inline: auto;
    padding-left: 0;
    padding-right: 0;
}

@media (max-width: 767px) {
    .ayo-header > .elementor-container {
        width: 100%;
        min-height: 56px;
        padding-inline: 18px;
    }
}

.ayo-header .elementor-row,
.ayo-header .elementor-container {
    align-items: center;
}

.ayo-header .elementor-column {
    display: flex;
    align-items: center;
}

.ayo-header .elementor-widget-wrap {
    align-items: center;
    width: 100%;
}

/* Logo column: left edge */
.ayo-header .elementor-column:first-child {
    justify-content: flex-start;
    padding-left: 0;
}

/* Hamburger column: right edge */
.ayo-header .elementor-column:last-child {
    justify-content: flex-end;
    padding-right: 0;
}

/* Preserve Elementor's original logo sizing */
.ayo-header .elementor-widget-image img {
    display: block;
    height: auto;
    transition: filter 0.2s ease;
}

/* White logo turns black once glass treatment kicks in */
.ayo-header-white.ayo-header-scrolled .elementor-widget-image img {
    filter: brightness(0);
}

/* Hamburger icon colours */
.ayo-header-white .elementor-widget-button .elementor-button-icon svg,
.ayo-header-white .elementor-widget-button .elementor-button-icon svg * {
    fill: #ffffff;
}

.ayo-header-dark .elementor-widget-button .elementor-button-icon svg,
.ayo-header-dark .elementor-widget-button .elementor-button-icon svg * {
    fill: #000000;
}

.ayo-header-scrolled .elementor-widget-button .elementor-button-icon svg,
.ayo-header-scrolled .elementor-widget-button .elementor-button-icon svg * {
    fill: #000000;
}

/* Hamburger button reset */
.ayo-header .elementor-widget-button .elementor-button {
    background: transparent;
    border: none;
    box-shadow: none;
}

.ayo-header .elementor-widget-button .elementor-button-text {
    display: none;
}

/* ============================================================
   SCROLLED HEADER — premium glass
   ============================================================ */

.ayo-header.ayo-header-scrolled {
    background: rgba(255, 255, 255, 0.74);
    -webkit-backdrop-filter: blur(20px) saturate(170%);
    backdrop-filter: blur(20px) saturate(170%);
    border-bottom-color: rgba(0, 0, 0, 0.07);
}

@supports not ((backdrop-filter: blur(20px)) or (-webkit-backdrop-filter: blur(20px))) {
    .ayo-header.ayo-header-scrolled {
        background: rgba(255, 255, 255, 0.93);
    }
}

/* Hide any Elementor sticky spacer generated for header templates */
.ayo-header + .elementor-sticky-spacer,
.elementor-sticky-spacer:has(+ .ayo-header) {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
}

/* ============================================================
   SERVICE "MOST POPULAR STORIES" SPACING
   ============================================================ */

.elementor-element-473ff4f .elementor-post__thumbnail,
.elementor-element-e5f21f3 .elementor-post__thumbnail,
.elementor-element-8736c62 .elementor-post__thumbnail {
    margin-bottom: 16px;
}

.elementor-element-473ff4f .elementor-post__title,
.elementor-element-e5f21f3 .elementor-post__title,
.elementor-element-8736c62 .elementor-post__title {
    margin-bottom: 8px;
}

/* ============================================================
   LOTTIE — minimal visibility helper only
   ============================================================ */

.elementor-widget-lottie .e-lottie__animation {
    display: block;
    opacity: 1;
    visibility: visible;
}

.elementor-widget-lottie .e-lottie__container,
.elementor-widget-lottie .e-lottie__container__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================
   POPUP 1486 SCOPE — cosmetic spacing only
   ============================================================ */

.elementor-location-popup[data-elementor-id="1486"] .elementor-nav-menu--dropdown {
    padding: 8px 0;
}

.elementor-location-popup[data-elementor-id="1486"] .elementor-nav-menu--dropdown .menu-link {
    padding: 10px 24px;
    line-height: 1.4;
}

/* ============================================================
   CONTACT DRAWER / BOTTOM SHEET
   ============================================================ */

.ayo-contact-panel {
    position: fixed;
    inset: 0;
    z-index: var(--ayo-contact-z);
    display: flex;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.ayo-contact-panel.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.ayo-contact-panel__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    cursor: pointer;
}

.ayo-contact-panel__surface {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(400px, 90vw);
    background: #ffffff;
    color: #111111;
    transform: translateX(100%);
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.18);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.ayo-contact-panel.is-open .ayo-contact-panel__surface {
    transform: translateX(0);
}

.ayo-contact-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 24px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 2;
}

.ayo-contact-panel__title {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 4px;
    color: #111111;
}

.ayo-contact-panel__subtitle {
    font-size: 14px;
    line-height: 1.4;
    color: #555555;
    margin: 0;
}

.ayo-contact-panel__close {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.ayo-contact-panel__close svg {
    fill: #111111;
    width: 12px;
    height: 12px;
}

.ayo-contact-panel__actions {
    display: grid;
    gap: 10px;
    padding: 20px 24px;
}

.ayo-contact-panel__action {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    color: #ffffff;
    background: #000000;
    transition: transform 0.15s ease, background 0.2s ease;
}

.ayo-contact-panel__action:hover,
.ayo-contact-panel__action:focus {
    transform: translateY(-1px);
    background: #25E387;
    color: #000000;
}

/* Desktop vertical tab */
.ayo-desktop-contact-tab {
    display: none;
}

@media (min-width: 768px) {
    .ayo-desktop-contact-tab {
        display: flex;
        position: fixed;
        right: 0;
        top: 50%;
        transform: translateY(-50%) rotate(180deg);
        writing-mode: vertical-rl;
        z-index: calc(var(--ayo-contact-z) - 1);
        background: #000000;
        color: #ffffff;
        padding: 16px 10px;
        font-family: inherit;
        font-size: 13px;
        font-weight: 700;
        letter-spacing: 1px;
        text-transform: uppercase;
        text-decoration: none;
        border: none;
        border-radius: 8px 0 0 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        cursor: pointer;
        transition: background 0.2s ease, color 0.2s ease;
    }

    .ayo-desktop-contact-tab:hover,
    .ayo-desktop-contact-tab:focus {
        background: #25E387;
        color: #000000;
    }
}

/* Mobile bottom bar — hidden in hero, dark glass */
.ayo-mobile-contact-bar {
    display: flex;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: max(8px, env(safe-area-inset-bottom));
    height: 56px;
    align-items: center;
    justify-content: center;
    z-index: calc(var(--ayo-contact-z) - 1);
    background: rgba(10, 10, 10, 0.84);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 18px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.2px;
    cursor: pointer;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.32);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    backdrop-filter: blur(18px) saturate(150%);
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    transform: translateY(calc(100% + 24px));
    opacity: 0;
    visibility: hidden;
}

.ayo-mobile-contact-bar.is-visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.ayo-mobile-contact-bar:hover,
.ayo-mobile-contact-bar:focus {
    background: rgba(10, 10, 10, 0.9);
}

@media (min-width: 768px) {
    .ayo-mobile-contact-bar {
        display: none;
    }
}

/* CookieYes overlap: temporarily hide CTA when banner is actually visible */
body.ayo-cookieyes-active .ayo-mobile-contact-bar.is-visible {
    transform: translateY(calc(100% + 24px));
    opacity: 0;
    visibility: hidden;
}

/* Prevent horizontal overflow */
html, body {
    overflow-x: hidden;
}

/* ============================================================
   INSIGHTS PAGE (POST 2770) — main white feed images
   ============================================================ */

.elementor-2770 .elementor-element.elementor-element-4583ecb3 .elementor-posts-container .elementor-post__thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 50% !important;
    aspect-ratio: 2 / 1;
    overflow: hidden;
}

.elementor-2770 .elementor-element.elementor-element-4583ecb3 .elementor-posts-container.elementor-has-item-ratio .elementor-post__thumbnail img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    object-position: center;
    transform: none;
}

/* Mobile bottom sheet */
@media (max-width: 767px) {
    .ayo-contact-panel__surface {
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-height: 88vh;
        border-radius: 20px 20px 0 0;
        transform: translateY(100%);
    }

    .ayo-contact-panel.is-open .ayo-contact-panel__surface {
        transform: translateY(0);
    }
}
