/* ============================================================
   FIXES-ALL.CSS — 8 fixes for homepage & services
   ============================================================ */

/* FIX 1: MEDIA PROMOTIONS — ensure visibility */
.media-promo-gallery {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1 !important;
    background: #F7F6F3 !important;
    width: 100% !important;
    overflow: hidden !important;
}
.mpg-carousel .swiper-wrapper { display: flex !important; }
.mpg-carousel .swiper-slide { opacity: 1 !important; visibility: visible !important; flex-shrink: 0 !important; }

/* FIX 2: PV TESTIMONIALS */
.pv-testimonials__track {
    display: flex !important;
    gap: 24px !important;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
    will-change: transform !important;
}

/* FIX 3: HORIZONTAL OVERFLOW — prevent scroll */
/* Use clip instead of hidden — clip prevents overflow without creating a scroll container */
/* scroll container breaks position:sticky */
/* Moved to perf-scroll-fixes.css (single source of truth) */

/* Services marquee: clip overflow */
.services-marquee {
    overflow: hidden !important;
    max-width: 100vw !important;
}

/* pg-section: box-sizing so padding doesn't add to width */
.pg-section,
.pg-section * {
    box-sizing: border-box !important;
}
.pg-section {
    max-width: 100vw !important;
    overflow: hidden !important;
}

/* Header: box-sizing + overflow visible for dropdowns */
header.clearheader,
header.darkHeader,
header.clearheader *,
header.darkHeader * {
    box-sizing: border-box !important;
}
header.clearheader,
header.darkHeader {
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    z-index: 1100 !important;
}

/* Hamburger nav: hidden by default, block when opened */
.hamburger-navigation {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    width: min(460px, 90vw) !important;
    height: 100svh !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateX(100%) !important;
    z-index: 1103 !important;
}
.hamburger-navigation.is-opened {
    transform: translateX(0) !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* FIX 5: SSC SPLIT CARD — restore sticky behavior */
/* overflow-x:clip prevents horizontal bleed while preserving sticky */
.content.home-studio-flow,
.home-refresh .content.home-studio-flow {
    overflow-x: clip !important;
    overflow-y: visible !important;
}
.ssc-sticky {
    position: sticky !important;
    top: 0 !important;
    z-index: 2 !important;
    overflow: clip !important;
}

/* FIX 6: CLIENT LOGOS — center the grid */
.logo-marquee-section .client-logo-grid {
    margin: 0 auto !important;
    justify-items: center !important;
    justify-content: center !important;
}
.logo-marquee-section {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 100px 0 80px !important;
}

/* FIX 7: SERVICES DROPDOWN — extend outside header */
.services-subnav {
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
}
.services-subnav .dropdown { position: relative !important; }
.services-subnav .dropdown-menu {
    display: none !important; position: absolute !important; top: 100% !important; left: 0 !important;
    z-index: 1102 !important; min-width: 12rem !important; padding: 0.5rem 0 !important; margin: 0 !important;
    list-style: none !important; background-color: #131314 !important;
    border: 1px solid rgba(255,255,255,0.08) !important; border-radius: 0 !important;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.3) !important;
}
/* Right-align dropdowns on last two items to prevent viewport overflow */
.services-subnav .services-subnav__list > li:last-child .dropdown-menu,
.services-subnav .services-subnav__list > li:nth-last-child(2) .dropdown-menu {
    left: auto !important;
    right: 0 !important;
}
.services-subnav .dropdown.open > .dropdown-menu { display: block !important; }
.services-subnav .dropdown-toggle::after {
    display: inline-block !important; margin-left: 0.255em !important; vertical-align: 0.255em !important;
    content: "" !important; border-top: 0.3em solid !important;
    border-right: 0.3em solid transparent !important; border-bottom: 0 !important;
    border-left: 0.3em solid transparent !important; color: rgba(255,255,255,0.7) !important;
    transition: transform 0.2s ease !important;
}
.services-subnav .dropdown.open > .dropdown-toggle::after { transform: rotate(180deg) !important; }


/* FIX 8: VIDEO TESTIMONIALS — prevent horizontal overflow on mobile */
.vt-section {
    overflow-x: clip !important;
}
@media (max-width: 767px) {
    .vt-track {
        overflow-x: clip !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    .vt-card {
        flex: 0 0 80vw !important;
        max-width: 300px !important;
    }
}
