@import "carousel.css";
@import "components.css";
@import "modals-forms.css";
@import "layouts.css";

@import "carousel.css";

:root {
    --pico-font-family: 'Inter', sans-serif;
    --pico-font-size: 1.2rem;
}

@media (min-width: 1024px) {

    :host,
    :root {
        --pico-font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    :root {
        --pico-font-size: 1.1rem;
    }
}

html,
body {
    overflow-x: clip;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.page-background-section .pico h1,
.page-background-section .pico h2,
.page-background-section .pico h3,
.page-background-section .pico h4,
.page-background-section .pico h5,
.page-background-section .pico h6 {
    padding: 1.3rem 0 0.2rem 0;
    background: linear-gradient(90deg, #1C164E 0%, #4f46e5 60%, #818cf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    text-shadow: none !important;
}

.page-background-section .pico h1 { font-size: 2.25rem !important; line-height: 1.1 !important; }
.page-background-section .pico h2 { font-size: 1.85rem !important; line-height: 1.1 !important; }
.page-background-section .pico h3 { font-size: 1.5rem !important; line-height: 1.1 !important; }
.page-background-section .pico h4 { font-size: 1.25rem !important; line-height: 1.1 !important; }
.page-background-section .pico h5 { font-size: 1.1rem !important; line-height: 1.1 !important; }
.page-background-section .pico h6 { font-size: 1.0rem !important; line-height: 1.1 !important; }

@media (max-width: 766px) {

    .page-background-section .pico h1,
    .page-background-section .pico h2,
    .page-background-section .pico h3,
    .page-background-section .pico h4,
    .page-background-section .pico h5,
    .page-background-section .pico h6 {
        padding: 1rem 0 0.2rem 0;
    }
}

/* --- LOGO & BRAND SECTION --- */

header nav .logo-white,
header nav .logo-blue {
    height: 52px;
    width: auto;
    display: block;
    transition: height 0.3s ease;
}

.section-card-content ul {
    padding-right: 2rem;
}

.section-card-content ul li {
    margin-bottom: calc(var(--pico-typography-spacing-vertical) * .95);
}

/* --- HEADER & NAVIGATION --- */

header nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: transparent;
    padding: 0.65rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Only 'padding' changes between normal and scrolled states on the nav
       element itself — 'transition: all' was animating every CSS property
       for 300ms after mega menu close, causing a broad compositing repaint
       that produced the delayed white flash. */
    transition: padding 0.3s ease;
}

header nav ul,
header nav li,
header nav a,
header nav [role="button"],
header nav img,
header nav details,
header nav summary {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

header nav::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: scaleY(1);
    transform-origin: top;
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(2px);
    z-index: -1;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

@media screen and (min-width: 1024px) {

    header nav:not(.scrolled):hover::before,
    header nav:not(.scrolled):has(.search-container.active)::before {
        transform: scaleY(1);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    /* Suppress bottom shadow when mega menu is open — avoids a hard seam line
       between the nav bar and the mega menu panel below it. */
    header nav:not(.scrolled):has(details[open])::before {
        transform: scaleY(1);
        box-shadow: none;
    }
}

header nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1rem;
    align-items: center;
    z-index: 10;
}

header nav ul.search-icon {
    align-items: center;
    gap: 0.5rem;
}

header nav.responsive ul {
    gap: 0rem;
}

header nav li {
    list-style: none;
    margin: 0;
    padding: 0;
}

header nav .logo-white {
    display: none;
}

header nav .logo-blue {
    display: block;
}

@media screen and (min-width: 1024px) {

    header nav.scrolled .logo-white {
        display: none;
    }

    header nav.scrolled .logo-blue {
        display: block;
    }

    header nav:not(.scrolled):hover .logo-white,
    header nav:has(details[open]) .logo-white,
    header nav:has(.search-container.active) .logo-white {
        display: none;
    }

    header nav:not(.scrolled):hover .logo-blue,
    header nav:has(details[open]) .logo-blue,
    header nav:has(.search-container.active) .logo-blue {
        display: block;
    }
}

header nav a,
header nav details.dropdown>summary,
header nav details summary {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease, font-size 0.3s ease;
    position: relative;

}

#contact-modal footer button,
footer.site-footer button {
    color: #4f46e5;

}

@media screen and (min-width: 1024px) {

    header nav.scrolled a,
    header nav.scrolled details summary {
        color: #4f46e5;
    }

    header nav:not(.scrolled):hover a,
    header nav:not(.scrolled):hover details summary,
    header nav:has(details[open]) a,
    header nav:has(details[open]) details summary,
    header nav:has(.search-container.active) a,
    header nav:has(.search-container.active) details summary {
        color: #4f46e5;
    }
}

header nav li.pico a[role="button"],
header nav li.pico a[role="button"]:focus,
#contact-modal footer button,
#contact-modal footer button:focus,
#newsletter-modal footer button,
#newsletter-modal footer button:focus,
footer.site-footer button,
footer.site-footer button:focus {
    color: #ffffff !important;
    background-color: #4f46e5 !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0.75rem 1.5rem !important;

}

header nav li.pico a[role="button"]:hover,
header nav li.pico a[role="button"]:active,
#contact-modal footer button:hover,
#contact-modal footer button:active,
#newsletter-modal footer button:hover,
#newsletter-modal footer button:active,
footer.site-footer button:hover,
footer.site-footer button:active {
    color: #ffffff !important;
    background-color: #4338ca !important;
    border: none !important;
    box-shadow: none !important;
}

@media screen and (min-width: 1024px) {
    header nav.scrolled {
        position: fixed;

        top: 0;
        padding: 0.4rem 2rem;
    }

    header nav.scrolled .logo-white,
    header nav.scrolled .logo-blue {
        height: 44px;
    }

    header nav a,
    header nav details summary,
    header nav .icon {
        font-size: 0.875rem;
    }

    header nav.scrolled::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        transform: scaleY(1);
        background-color: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        z-index: -1;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    header nav ul.search-icon li.pico a#contact-button {
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
        transition: background-color 0.2s ease, transform 0.2s ease;
    }

    header nav ul.search-icon li.login-nav-item {
        margin-right: 0.5rem !important;
    }
}

@media screen and (min-width: 1024px) {

    header nav a:hover,
    header nav details.dropdown>summary,
    header nav details summary:hover,
    header nav a:focus-visible,
    header nav details.dropdown>summary,
    header nav details summary:focus-visible,
    header nav a:active,
    header nav details.dropdown>summary,
    header nav details summary:active {
        color: #4338ca;
        text-decoration: none;
    }

    /* Plain text nav links (Contact Us, Log In) lack the [role="link"]
       attribute that lets Pico add an underline on summary[role="link"]:hover.
       The general 'header nav a:hover { text-decoration: none }' above wipes
       their underline, so we restore it here with explicit !important.
       Applies on hover, focus-visible (keyboard), and active (desktop click
       AND mobile tap — :active fires on touchstart → touchend). */
    header nav a.contact-button:hover,
    header nav a.contact-button:focus-visible,
    header nav a.contact-button:active,
    header nav .login-nav-item a:hover,
    header nav .login-nav-item a:focus-visible,
    header nav .login-nav-item a:active {
        text-decoration: underline !important;
        text-decoration-color: #4338ca !important;
        text-underline-offset: 3px;
    }
}

header nav details.dropdown>summary,
header nav details summary {
    list-style: none;
}

header nav details.dropdown>summary::-webkit-details-marker,
header nav details summary::-webkit-details-marker {
    display: none;
}

header nav details.dropdown>summary::after {
    content: "";
    display: inline-block;
    width: 0.8rem;
    height: 0.8rem;
    margin-left: 0.4rem;
    background-image: var(--pico-icon-chevron);
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: middle;
    transition: transform 0.2s ease;
    filter: invert(24%) sepia(85%) saturate(3025%) hue-rotate(231deg) brightness(97%) contrast(93%);
}

header nav:not(.scrolled):hover details.dropdown>summary::after,
header nav:has(details[open]) details.dropdown>summary::after,
header nav:has(.search-container.active) details.dropdown>summary::after,
header nav.responsive details.dropdown>summary::after,
header nav.scrolled details.dropdown>summary::after {
    filter: none;
    filter: invert(24%) sepia(85%) saturate(3025%) hue-rotate(231deg) brightness(97%) contrast(93%);
}

header nav details[open]>summary::after {
    transform: rotate(180deg);
}

/* === SUPPRESS PICO'S FULL-SCREEN CLICK-AWAY BACKDROP ===
   Pico injects a fixed 100vw×100vh pseudo-element on
   'details.dropdown[open] > summary::before' to detect outside clicks.
   For our hover mega menus this is redundant (mobile_nav.js handles it)
   and is the source of the residual white flash: when details[open] is
   removed the fixed overlay disappears, triggering a full-viewport
   compositing repaint that briefly exposes the white panel background. */
header nav details.dropdown.mega-menu[open] > summary::before {
    display: none !important;
    content: none !important;
}

/* --- MEGA MENUS (Absolute Positioning - Desktop Only) --- */

@media screen and (min-width: 1024px) {

    header nav ul li:has(.mega-menu),
    header nav details.dropdown.mega-menu,
    header nav ul.search-icon,
    header nav ul.search-icon li {
        position: static !important;
    }

    html body header nav .mega-menu-content {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        width: 100vw !important;
        background-color: rgba(255, 255, 255, 0.85) !important;
        backdrop-filter: blur(4px) !important;
        -webkit-backdrop-filter: blur(4px) !important;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
        padding: 0.2rem 0rem 1rem 5% !important;
        margin-top: 0 !important;
        z-index: 2000 !important;
        border-radius: 0 !important;
        border: none !important;
        /* CLOSED STATE: display:none removes the panel from the render tree
           entirely. There is no white panel painted, nothing to flash.
           (Previously: display:flex + opacity:0 left a fully-painted white
           panel in the DOM, which produced a white flash on any repaint.) */
        display: none !important;
        flex-direction: row !important;
        justify-content: flex-start !important;
        align-items: flex-start !important;
        gap: 1rem !important;
        box-sizing: border-box !important;
    }

    /* OPEN STATE: panel re-enters the render tree and fades in via animation.
       CSS animation (not transition) is used so Pico's own 'transition: opacity'
       on 'details.dropdown[open] > summary + ul' cannot interfere. */
    html body header nav details.dropdown.mega-menu[open] .mega-menu-content {
        display: flex !important;
        animation: megaMenuOpen 0.18s ease forwards;
    }

    @keyframes megaMenuOpen {
        from { opacity: 0; }
        to   { opacity: 1; }
    }

    /* === SCROLLED STATE === */
    header nav.scrolled .mega-menu-content {
        background-color: rgba(255, 255, 255, 0.85) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        box-shadow: 0 10px 20px -4px rgba(0, 0, 0, 0.12) !important;
    }

    .mega-menu-column {
        min-width: 250px !important;
        flex: 0 1 auto !important;
        position: static !important;
    }
}

header nav details.dropdown:not(.mega-menu) {
    position: relative !important;
}

.mega-menu-column ul {
    position: static !important;
    display: flex !important;
    flex-direction: column !important;
    list-style: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

.mega-menu-column h6 {
    font-size: 0.75rem;
    letter-spacing: 0.05rem;
    margin: 1.25rem 0;
    font-weight: 700;
    border-bottom: 1px solid #eee;
    padding: 0.5rem;
    text-transform: uppercase;
}

.mega-menu-column ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mega-menu-column ul li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

/* === MEGA MENU LINK STATES ===
   The hover pill is rendered on the ::before pseudo-element, NOT on the
   <a> background-color. This sidesteps all Pico cascade conflicts entirely:
   - Pico targets 'li a:hover/active/focus { background-color: #eff1f4 }'
   - Our <a> is always background-color: transparent !important — nothing to flash
   - The ::before is untouched by any Pico rule
   - Transition stays within blue alpha channel (0 → 0.22), never passes through
     white, so a white flash is physically impossible regardless of browser
     compositing behaviour. */

header nav .mega-menu-column ul li a {
    position: relative;
    /* z-index: 0 creates a stacking context so the ::before with z-index: -1
       is painted behind the text content but above the panel background. */
    z-index: 0;
    display: block;
    padding: 0.35rem 0.65rem;
    margin-left: -0.65rem;
    border-radius: 6px;
    color: #4f46e5 !important;
    font-size: 1rem;
    text-decoration: none;
    background-color: transparent !important;
    transition: color 0.2s ease;
}

/* Prevent browser/Pico from applying purple or grey to visited links */
header nav .mega-menu-column ul li a:visited {
    color: #4f46e5 !important;
    background-color: transparent !important;
}

/* Blue pill lives entirely on ::before — Pico has no rules for this
   pseudo-element, so it can never be overridden or cause a flash.
   NO transition here: CSS uses the DESTINATION state's transition, so
   hover-OUT (destination = this base rule) will be instant — the blue
   snaps away cleanly with no window for white to bleed through. */
header nav .mega-menu-column ul li a::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 6px;
    background-color: rgba(99, 102, 241, 0);
    pointer-events: none;
    z-index: -1;
}

/* Hover/active/focus — raise alpha to show the blue pill.
   Transition here (destination for hover-IN) gives a smooth 0.15s fade-in. */
header nav .mega-menu-column ul li a:hover::before,
header nav .mega-menu-column ul li a:active::before,
header nav .mega-menu-column ul li a:focus::before,
header nav .mega-menu-column ul li a:focus-visible::before {
    background-color: rgba(99, 102, 241, 0.22);
    transition: background-color 0.15s ease;
}


/* Text colour shifts on hover/active/focus */
header nav .mega-menu-column ul li a:hover,
header nav .mega-menu-column ul li a:active,
header nav .mega-menu-column ul li a:focus {
    color: #4338ca !important;
    background-color: transparent !important;
    outline: none;
}

header nav .mega-menu-column ul li a:focus-visible {
    outline: 2px solid rgba(99, 102, 241, 0.5);
    outline-offset: 2px;
}


/* Standard (non-mega) dropdown panel — glass treatment to match nav */
header nav details.dropdown>ul:not(.mega-menu-content ul) {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    /* Glass panel: same recipe as nav::before and mega menu */
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    padding: 0.5rem;
    margin-top: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    z-index: 1001;
}

header nav details.dropdown>ul li a {
    display: block;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    color: #4f46e5;
    font-size: 0.95rem;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease, backdrop-filter 0.2s ease;
}

header nav details.dropdown>ul li a:hover {
    /* Glass pill hover — consistent with mega menu link hover */
    background-color: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #4338ca;
}

/* --- BODY STYLING --- */

.pico.container,
.logo-heading-container {
    width: 100%;
    max-width: 100%;
}

@media (min-width: 576px) {
    .pico.container,
    .logo-heading-container {
        max-width: 92%;
    }
}

@media (min-width: 1280px) {
    .pico.container,
    .logo-heading-container {
        max-width: 1200px;
    }
}

@media (min-width: 1536px) {
    .pico.container,
    .logo-heading-container {
        max-width: 1450px;
    }
}

.glass-card,
.section-card {
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 2rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.pico.breadcrumbs-container,
.pico .breadcrumbs-container {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
    /* Horizontal padding intentionally omitted — inherited from .pico.container
       cascade in layouts.css to keep breadcrumb flush with main content gutter */
    margin-bottom: 0;
    z-index: 10;
    position: relative;
}

.pico.breadcrumbs-container ul,
.pico .breadcrumbs-container ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    font-size: 0.85rem;
}

.pico.breadcrumbs-container ul li,
.pico .breadcrumbs-container ul li {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    margin: 0.25rem 0 !important;
    padding: 0 !important;
    line-height: 1.4 !important;
}

.pico.breadcrumbs-container ul li:not(:last-child)::after,
.pico .breadcrumbs-container ul li:not(:last-child)::after {
    display: inline-flex !important;
    align-items: center !important;
    position: static !important;
    content: "\f105" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    margin: 0 0.75rem !important;
    color: var(--pico-muted-color) !important;
    font-size: 0.75rem !important;
    width: auto !important;
    text-align: left !important;
    line-height: 1.4 !important;
}

.pico.breadcrumbs-container a,
.pico .breadcrumbs-container a {
    text-decoration: none;
    color: var(--pico-primary);
    text-decoration-color: var(--pico-underline);
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1.4 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.pico.breadcrumbs-container a:hover,
.pico .breadcrumbs-container a:hover {
    text-decoration: underline;
}

article.insight-page {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.glass-card.section-card,
.insights .glass-card {
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 2rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flow-root;
}

.author-card {
    position: relative !important;
    overflow: hidden !important;
    background: rgba(28, 22, 78, 0.05) !important;
    backdrop-filter: blur(0px) !important;
    -webkit-backdrop-filter: blur(0px) !important;
    border-radius: 8px;
    padding: 2rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    border: none;
    display: flow-root;
}

.author-card > *:not(.cta-pattern-overlay) {
    position: relative !important;
    z-index: 2 !important;
}

.insight-card {
    background-color: rgba(255, 255, 255, 0.10) !important;
    backdrop-filter: blur(0px) !important;
    -webkit-backdrop-filter: blur(0px) !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.insight-image-container .cta-pattern-overlay {
    z-index: 2 !important;
}

.insight-image-container .cta-pattern-overlay::before {
    opacity: 0.15 !important;
}

@media (max-width: 766px) {
    .glass-card.section-card {
        padding: 1.5rem;
    }

    .section-card-content {
        padding: 0.2rem;
    }
}

article.insight-page {
    padding-left: 0;
    padding-right: 0;
}

.home-background-section {

    background-image: none !important;
    width: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* --- MOBILE NAVIGATION --- */

.icon {
    display: none;
    color: #4f46e5 !important;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 100;
}

@media screen and (max-width: 1023px) {

    header nav {
        flex-wrap: wrap;
        padding: 8px 1.5rem !important;
    }

    header nav .logo-blue,
    header nav .logo-white {
        height: 62px !important;
    }

    header nav ul:first-child,
    header nav ul:first-child li,
    header nav ul:first-child li a {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    header nav ul:not(:first-child) {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        padding-top: 1rem;
    }

    header nav ul li {
        width: 100%;
        padding: 0.5rem 0;
    }

    header nav ul li a {
        display: block;
        width: 100%;
    }

    .icon {
        display: block;
        position: absolute;
        right: 1.5rem;
        top: 50%;
        transform: translateY(-50%);
    }

    header nav.responsive {

        height: auto;
        padding-bottom: 2rem;
    }

    header nav.responsive::before {
        height: 100%;
        transform: scaleY(1);
        background-color: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        transition: none !important;
    }

    header nav.responsive a,
    header nav.responsive summary,
    header nav.responsive .icon {
        color: #4f46e5;
    }

    header nav.responsive .icon {
        top: 39px !important;
    }

    header nav.responsive .logo-white {
        display: none !important;
    }

    header nav.responsive .logo-blue {
        display: block !important;
    }

    header nav.responsive ul:not(:first-child) {
        display: flex;
    }

    header nav.responsive details.dropdown.mega-menu .mega-menu-content {
        position: static !important;
        display: none !important;
        width: 100% !important;
        opacity: 1 !important;
        visibility: visible !important;
        background-color: transparent !important;
        box-shadow: none !important;
        padding: 0.5rem 0 0.5rem 1.5rem !important;
        margin: 0 !important;
        transition: none !important;
        flex-direction: column !important;
    }

    header nav.responsive details.dropdown.mega-menu[open] .mega-menu-content {
        display: flex !important;
    }

    header nav.responsive .mega-menu-column {
        min-width: unset !important;
        margin-bottom: 0.25rem !important;
    }

    header nav.responsive .mega-menu-column h6 {
        margin: 0 0 0.25rem 0;
        border: none;
        padding: 0;
        font-size: 0.75rem;
    }

    header nav.responsive .mega-menu-column ul li a {
        transition: none !important;
        background-color: transparent !important;
        transform: none !important;
        outline: none !important;
        -webkit-tap-highlight-color: transparent;
    }

    header nav.responsive .mega-menu-column ul li a:active,
    header nav.responsive .mega-menu-column ul li a:focus {
        background-color: rgba(197, 47, 33, 0.08) !important;
        border-radius: 4px;
    }

    header nav.responsive details.dropdown ul,
    header nav.responsive details.dropdown .mega-menu-content {
        background-color: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding-left: 0 !important;
    }

    header nav a,
    header nav details.dropdown>summary,
    header nav details summary {
        text-shadow: none !important;
    }
}

/* --- FOOTER --- */

footer.site-footer {
    background-color: #f9f9f9;
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.footer-cta {
    margin-bottom: 3rem;
    padding: 3rem 2rem;
    background-color: #4f46e5;
    color: #fff;
    border-radius: var(--pico-border-radius);
}

.footer-cta h2 {
    color: #fff;
    margin-bottom: 1rem;
}

.footer-cta p {
    margin-bottom: 2rem;
    font-size: 1.2rem;
}

.footer-cta a[role="button"] {
    background-color: #fff;
    color: #4f46e5;
    border: none;
    font-weight: 700;
}

.footer-cta a[role="button"]:hover {
    background-color: #f0f0f0;
    color: #4338ca;
}

.site-footer ul {
    margin-bottom: 2rem;
}

.site-footer h5 {
    margin-bottom: 1rem;
    font-size: 0.85rem;
    letter-spacing: 0.05rem;
    text-transform: uppercase;
    color: var(--pico-contrast);
}

.qc-admin small {
    font-size: 0.7rem;
}

.qc-hiring {
    color: #00EBA4;
    text-transform: uppercase;
}

/* --- ACCESSIBILITY & UTILITIES --- */

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.card-link {
    text-decoration: none !important;
    color: inherit !important;
    display: block;
    height: 100%;
}

.card-link:hover,
.card-link:focus,
.card-link:active {
    text-decoration: none !important;
    color: inherit !important;
    outline: none !important;
}

.site-footer ul {
    padding: 0;
}

.site-footer ul li {
    margin-bottom: 0.5rem;
    list-style: none;
}

.footer-social-icons {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    align-items: center;
}

.footer-social-icons a {
    text-decoration: none;
}

.footer-social-icons a i {
    font-size: 1.25rem;
}

@media screen and (max-width: 1023px) {
    .footer-social-icons {
        justify-content: flex-start;
        margin-top: 1rem;
    }
}

/* --- SEARCH FUNCTIONALITY --- */

.search-toggle {
    color: #4f46e5 !important;
    font-size: 1.1rem;
    padding: 0.5rem;
}

.search-toggle:hover,
a.search-toggle:visited {
    color: var(--pico-primary);
}

.search-container {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    padding: 1rem 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 999;
}

header nav.scrolled .search-container {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.search-container.active {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-container form {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon-input {
    position: absolute;
    right: 1rem;
    color: #888;
    pointer-events: none;
}

.search-container input[type="text"] {
    width: 100%;
    padding: 1rem 0;
    font-size: 1.5rem;
    color: rgb(51, 71, 91);
    border: none;
    border-bottom: 2px solid #4f46e5;
    border-radius: 0;
    background: transparent;
    outline: none;
    box-shadow: none;
}

.search-container input[type="text"]::placeholder {
    color: #b0b0b0;
    font-weight: 300;
}

@media screen and (max-width: 1023px) {

    .search-toggle {
        display: none !important;
    }

    .search-form-item {
        width: 100%;
    }

    .search-container {
        display: block !important;
        position: static;
        padding: 0.5rem 0;
        background-color: transparent !important;
        box-shadow: none !important;
        width: 100%;
        animation: none;
        margin-bottom: 1rem;
        top: auto;
    }

    .search-container input[type="text"] {
        font-size: 1rem;
        background-color: #f0f0f0 !important;
        padding-left: 1rem;
        border-radius: 4px;
        border: 1px solid #ddd;
        color: #333 !important;
    }

    .search-container input[type="text"]::placeholder {
        color: #888;
    }

    .search-icon-input {
        color: #4f46e5 !important;
        right: 0.5rem;
    }
}

/* --- WAGTAIL ADMIN FRONT END DISPLAY STYLING --- */

.home-content-body,
.service-content-body,
.after-content-body {
    padding-top: 0;
}

.after-content-body {
    margin-top: 3rem;
}

figure.content-image,
figure.standalone-image {
    background: var(--pico-card-background-color);
    border-radius: var(--pico-border-radius);
    overflow: hidden;
    box-shadow: var(--pico-card-box-shadow);
    padding: 0;
    margin: 2rem 0;
    max-width: 1000px;
    position: relative;
    z-index: 101;
}

/* Transparent-background variant — editor-toggled via the ImageBlock checkbox.
   Removes all card styling so PNG/WebP images with alpha channels render
   directly against the page without a white surround. */
figure.standalone-image.transparent-bg {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
}

/* Also strip the inner padding so the image sits flush */
figure.standalone-image.transparent-bg img {
    padding: 0;
}


figure.content-image img,
figure.standalone-image img {
    border-radius: 0;
    display: block;
    width: 100%;
    height: auto;
    padding: 1rem 1rem 0 1rem;
}

.image-caption {
    padding: 1.5rem 2rem !important;
    font-size: 0.85rem;
    text-align: center;
    font-style: italic;
    line-height: 1.4;
    background: var(--pico-card-background-color);
}

.credentials-breakout {
    position: relative;
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--pico-muted-border-color);
    border-top: 1px solid var(--pico-secondary-underline);
    border-bottom: 1px solid var(--pico-secondary-underline);
    padding: 2.5rem 0;
    margin-bottom: 0;
}

.grid.credentials {
    margin-bottom: 0;
    align-items: center;
}

.grid.credentials>div {
    display: flex;
    justify-content: center;
    align-items: center;
}

figure.standalone-video {
    background: var(--pico-card-background-color);
    border-radius: var(--pico-border-radius);
    overflow: hidden;
    box-shadow: var(--pico-card-box-shadow);
    padding: 0;
    margin: 2rem 0;
    max-width: 1000px;
    position: relative;
    z-index: 101;
}

.section-card-content>figure.standalone-video,
.section-card-content>figure.standalone-image {
    margin: 2rem auto;
}

.responsive-video-container {
    position: relative;
    padding-bottom: 56.25%;

    height: 0;
    overflow: hidden;
}

.responsive-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.standalone-image-section {
    padding: 0;
    margin: 0;
}

/* --- FOOTER CREDENTIALS SECTION --- */

.pico.qc-creds-section {
    padding: 2rem 0 1rem 0;
    background-color: rgba(245, 245, 245, 0.6);
    backdrop-filter: blur(10px);
    text-align: center;
    border-top: 1px solid var(--pico-muted-border-color);
    border-bottom: none;
    width: 100%;
    margin-left: 0;
    left: 0;
    position: relative;
    margin-bottom: 0 !important;
}

.pico.qc-creds-section h6 {
    margin: 0 0 1rem 0;
    text-align: left;
    color: var(--pico-contrast);
    font-weight: 700;
    letter-spacing: 0.05rem;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.pico .creds-carousel-wrapper {
    position: relative;
    width: 100%;
    padding: 0;
    overflow: hidden;
}

.pico .creds-carousel {
    overflow: hidden;
    padding: 1rem 0;
}

.pico .creds-track {
    display: flex;
    width: max-content;
    animation: logoMarquee 80s linear infinite;
    transform: translate3d(0, 0, 0);
}

.pico .creds-carousel:hover .creds-track {
    animation-play-state: paused;
}

.pico .creds-group {
    display: flex;
    flex-direction: row;
    gap: 3rem;
    align-items: center;
    padding-right: 3rem;
}

.pico .qc-svg-item {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    height: 120px;
    flex-shrink: 0;
}

.pico .qc-svg-item svg,
.pico .qc-svg-item img {
    width: auto !important;
    height: auto !important;
    max-height: 100% !important;
    max-width: 100% !important;
    filter: grayscale(100%) opacity(0.8);
    transition: all 0.4s ease-in-out;
}

.pico .qc-svg-item svg:hover,
.pico .qc-svg-item img:hover {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.05);
}

.pico #google-partner-premier {
    width: 92px !important;
}

.pico #google-cert,
.pico #google-sales {
    width: 210px !important;
    max-height: 66px !important;
}

@media (max-width: 768px) {
    .pico .creds-track {
        animation-duration: 40s;
    }

    .pico .creds-group {
        gap: 1.5rem;
        padding-right: 1.5rem;
    }

    .pico .qc-svg-item {
        height: 72px;
        padding: 0.5rem;
    }

    .pico #google-partner-premier {
        width: 58px !important;
    }

    .pico #google-cert,
    .pico #google-sales {
        width: 128px !important;
        max-height: 40px !important;
    }
}

/* --- EXTERNAL LINKS --- */

.external-link::after {
    content: "\f08e";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.6em;
    vertical-align: super;
    margin-left: 0.3rem;
    display: inline-block;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.external-link:hover::after {
    opacity: 1;
}

.gartner-logo {
    max-width: 70%;
    height: auto;
    display: block;
    margin: 2rem 0;
}

