/* =========================================================
   Visual fixes V10 — resolves late CSS conflicts on internal pages.
   Loaded after inner-redesign-v2.css and local-fonts.css.
   ========================================================= */

/* ---------------------------------------------------------
   1) Donation transaction pages: Checkout / Cart / Thank You
   Keep the navy intro readable and move the visual transition
   away from headings/cards. Remove legacy blue top bars.
   --------------------------------------------------------- */
.route-cart-index .cart-hero,
.route-checkout-index .checkout-hero,
.route-donations-thankyou .thanks-hero,
.route-subscriptions-thankyou .thanks-hero {
    background: linear-gradient(
        180deg,
        #0b2c55 0,
        #0b2c55 272px,
        #f4f8fc 272px,
        #ffffff 100%
    ) !important;
    padding: 48px 0 78px !important;
}

.route-cart-index .cart-hero > .container > .d-flex,
.route-checkout-index .checkout-hero > .container > .d-flex,
.route-donations-thankyou .thanks-hero > .container > .d-flex,
.route-subscriptions-thankyou .thanks-hero > .container > .d-flex {
    position: relative;
    z-index: 2;
}

.route-cart-index .cart-hero > .container > .d-flex h1,
.route-cart-index .cart-hero > .container > .d-flex h2,
.route-checkout-index .checkout-hero > .container > .d-flex h1,
.route-checkout-index .checkout-hero > .container > .d-flex h2,
.route-donations-thankyou .thanks-hero > .container > .d-flex h1,
.route-subscriptions-thankyou .thanks-hero > .container > .d-flex h1 {
    color: #ffffff !important;
}

.route-cart-index .cart-hero > .container > .d-flex .text-muted,
.route-checkout-index .checkout-hero > .container > .d-flex .text-muted,
.route-donations-thankyou .thanks-hero > .container > .d-flex .text-muted,
.route-subscriptions-thankyou .thanks-hero > .container > .d-flex .text-muted,
.route-cart-index .cart-hero .breadcrumb,
.route-checkout-index .checkout-hero .breadcrumb,
.route-cart-index .cart-hero .breadcrumb-item,
.route-checkout-index .checkout-hero .breadcrumb-item,
.route-cart-index .cart-hero .breadcrumb-item.active,
.route-checkout-index .checkout-hero .breadcrumb-item.active {
    color: rgba(255,255,255,.78) !important;
}

.route-cart-index .cart-hero .breadcrumb a,
.route-checkout-index .checkout-hero .breadcrumb a {
    color: #74c9f0 !important;
}

.route-cart-index .cart-hero .breadcrumb-item + .breadcrumb-item::before,
.route-checkout-index .checkout-hero .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255,255,255,.45) !important;
}

/* Keep the secure-checkout pill readable on the dark band. */
.route-checkout-index .checkout-hero > .container > .d-flex .glass {
    background: #ffffff !important;
    border-color: rgba(255,255,255,.25) !important;
    box-shadow: 0 10px 28px rgba(2,18,38,.14) !important;
}
.route-checkout-index .checkout-hero > .container > .d-flex .glass,
.route-checkout-index .checkout-hero > .container > .d-flex .glass * {
    color: #102f56 !important;
}

/* Cards must start cleanly on the light canvas. */
.route-cart-index .cart-hero > .container > .row,
.route-checkout-index .checkout-hero > .container > .row,
.route-donations-thankyou .thanks-hero > .container > .row,
.route-subscriptions-thankyou .thanks-hero > .container > .row {
    position: relative;
    z-index: 3;
    margin-top: 26px !important;
}

.site-inner-v2 .summary-sticky {
    border-top: 0 !important;
}
.route-donations-thankyou .thanks-hero .soft-card:first-child,
.route-subscriptions-thankyou .thanks-hero .soft-card:first-child {
    border-top: 1px solid #dfe8f3 !important;
}

.route-cart-index .cart-hero .soft-card,
.route-checkout-index .checkout-hero .soft-card,
.route-donations-thankyou .thanks-hero .soft-card,
.route-subscriptions-thankyou .thanks-hero .soft-card {
    border: 1px solid #dfe8f3 !important;
    box-shadow: 0 16px 42px rgba(15,45,84,.08) !important;
}

/* ---------------------------------------------------------
   2) Blog hub: fix white-on-white featured story and tidy tabs
   --------------------------------------------------------- */
.route-blogs-index .ym-blog-head,
.route-blogs-category .ym-blog-head {
    max-width: none !important;
    display: grid !important;
    grid-template-columns: minmax(0,1fr) !important;
    align-items: start !important;
    gap: 24px !important;
}

.route-blogs-index .content-hub-tabs.ym-blog-tabs,
.route-blogs-category .content-hub-tabs.ym-blog-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 2px 0 8px !important;
    overflow-x: auto !important;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(73,176,225,.65) rgba(255,255,255,.12);
}
.route-blogs-index .content-hub-tabs.ym-blog-tabs::-webkit-scrollbar,
.route-blogs-category .content-hub-tabs.ym-blog-tabs::-webkit-scrollbar {
    height: 5px;
}
.route-blogs-index .content-hub-tabs.ym-blog-tabs::-webkit-scrollbar-thumb,
.route-blogs-category .content-hub-tabs.ym-blog-tabs::-webkit-scrollbar-thumb {
    background: rgba(73,176,225,.65);
    border-radius: 999px;
}
.route-blogs-index .content-hub-tabs.ym-blog-tabs .hub-tab,
.route-blogs-category .content-hub-tabs.ym-blog-tabs .hub-tab {
    flex: 0 0 auto !important;
}

/* main.css forces this panel white while inner-redesign makes its text white. */
.route-blogs-index .ym-featured-blog .hub-featured-content,
.route-blogs-category .ym-featured-blog .hub-featured-content {
    background: #ffffff !important;
    color: #173b69 !important;
}
.route-blogs-index .ym-featured-blog h2,
.route-blogs-index .ym-featured-blog h3,
.route-blogs-index .ym-featured-blog h2 a,
.route-blogs-index .ym-featured-blog h3 a,
.route-blogs-category .ym-featured-blog h2,
.route-blogs-category .ym-featured-blog h3,
.route-blogs-category .ym-featured-blog h2 a,
.route-blogs-category .ym-featured-blog h3 a {
    color: #102f56 !important;
}
.route-blogs-index .ym-featured-blog p,
.route-blogs-index .ym-featured-blog .hub-date,
.route-blogs-category .ym-featured-blog p,
.route-blogs-category .ym-featured-blog .hub-date {
    color: #63758a !important;
}
.route-blogs-index .ym-featured-blog .ym-blog-badge,
.route-blogs-category .ym-featured-blog .ym-blog-badge {
    color: #087fc0 !important;
    background: #e7f6fd !important;
}
.route-blogs-index .ym-featured-blog .main-btn,
.route-blogs-category .ym-featured-blog .main-btn {
    align-self: flex-start;
    margin-top: 4px;
}

/* ---------------------------------------------------------
   3) FAQ: remove inherited 820px cap that creates a half-width hero
   --------------------------------------------------------- */
.route-faqs-index .faq-center {
    overflow: hidden;
}
.route-faqs-index .faq-hero {
    width: 100vw !important;
    max-width: none !important;
    margin: 0 calc(50% - 50vw) 34px !important;
    padding: 58px max(calc((100vw - 1180px)/2), 24px) !important;
    border-radius: 0 0 34px 34px !important;
    background: #0b2c55 !important;
    text-align: start !important;
    box-shadow: none !important;
}
.route-faqs-index .faq-hero h1 {
    max-width: 900px;
    margin: 0 !important;
    color: #ffffff !important;
}
.route-faqs-index .faq-hero p {
    max-width: 760px;
    margin: 14px 0 0 !important;
    color: rgba(255,255,255,.82) !important;
}
.route-faqs-index .faq-search {
    max-width: 760px !important;
    margin: 26px 0 0 !important;
    background: #ffffff !important;
    border-color: rgba(255,255,255,.2) !important;
    box-shadow: 0 14px 36px rgba(1,17,36,.18) !important;
}
html[dir="rtl"] .route-faqs-index .faq-hero {
    text-align: start !important;
}

/* ---------------------------------------------------------
   4) Static/policy pages: never use a 100vw hero inside a card
   --------------------------------------------------------- */
.route-static-pages-show .static-page-shell {
    padding: 42px 0 82px !important;
    background: #f5f8fc !important;
}
.route-static-pages-show .static-page-card {
    width: min(1080px, calc(100% - 24px)) !important;
    max-width: 1080px !important;
    margin: 0 auto !important;
    overflow: hidden !important;
    border-radius: 20px !important;
}
.route-static-pages-show .static-page-hero {
    width: auto !important;
    max-width: none !important;
    min-height: 260px !important;
    margin: 0 !important;
    padding: 48px 60px !important;
    border-radius: 0 !important;
    align-items: center !important;
    background: #0b2c55 !important;
}
.route-static-pages-show .static-page-heading {
    width: 100% !important;
    max-width: 820px !important;
    padding: 0 !important;
    position: relative !important;
    z-index: 2 !important;
}
.route-static-pages-show .static-page-heading h1 {
    margin: 0 0 12px !important;
    color: #ffffff !important;
    line-height: 1.08 !important;
    overflow-wrap: anywhere;
}
.route-static-pages-show .static-page-heading p {
    margin: 0 !important;
    max-width: 760px;
    color: rgba(255,255,255,.82) !important;
}
.route-static-pages-show .static-page-content {
    max-width: none !important;
    padding: 46px 60px !important;
}

/* ---------------------------------------------------------
   5) Desktop mega menu: keep it compact and prevent stale-looking panel
   --------------------------------------------------------- */
@media (min-width: 992px) {
    .nav-item-mega > .mega-menu {
        top: 100% !important;
        padding: 30px 36px 34px !important;
        max-height: min(68vh, 560px);
        overflow-y: auto;
    }
    .nav-item-mega > .mega-menu .mega-card {
        min-height: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
    .nav-item-mega > .mega-menu .mega-card h5 {
        margin-bottom: 14px !important;
        font-size: 1.22rem !important;
    }
    .nav-item-mega > .mega-menu .mega-card a {
        margin-bottom: 12px !important;
    }
}

/* ---------------------------------------------------------
   Responsive tuning
   --------------------------------------------------------- */
@media (max-width: 991.98px) {
    .route-cart-index .cart-hero,
    .route-checkout-index .checkout-hero,
    .route-donations-thankyou .thanks-hero,
    .route-subscriptions-thankyou .thanks-hero {
        background: linear-gradient(180deg,#0b2c55 0,#0b2c55 250px,#f4f8fc 250px,#fff 100%) !important;
        padding: 30px 0 62px !important;
    }

    .route-faqs-index .faq-hero {
        padding-top: 42px !important;
        padding-bottom: 42px !important;
        border-radius: 0 0 24px 24px !important;
    }

    .route-static-pages-show .static-page-hero {
        min-height: 220px !important;
        padding: 36px 28px !important;
    }
    .route-static-pages-show .static-page-content {
        padding: 34px 28px !important;
    }
}

@media (max-width: 575.98px) {
    .route-cart-index .cart-hero,
    .route-checkout-index .checkout-hero,
    .route-donations-thankyou .thanks-hero,
    .route-subscriptions-thankyou .thanks-hero {
        /* On phones use a continuous light canvas so content never crosses a hard color cut. */
        background: #f4f8fc !important;
        padding: 22px 0 52px !important;
    }
    .route-cart-index .cart-hero > .container > .d-flex h1,
    .route-checkout-index .checkout-hero > .container > .d-flex h1,
    .route-donations-thankyou .thanks-hero > .container > .d-flex h1,
    .route-subscriptions-thankyou .thanks-hero > .container > .d-flex h1 {
        color: #102f56 !important;
    }
    .route-cart-index .cart-hero > .container > .d-flex .text-muted,
    .route-checkout-index .checkout-hero > .container > .d-flex .text-muted,
    .route-donations-thankyou .thanks-hero > .container > .d-flex .text-muted,
    .route-subscriptions-thankyou .thanks-hero > .container > .d-flex .text-muted,
    .route-cart-index .cart-hero .breadcrumb,
    .route-checkout-index .checkout-hero .breadcrumb,
    .route-cart-index .cart-hero .breadcrumb-item,
    .route-checkout-index .checkout-hero .breadcrumb-item,
    .route-cart-index .cart-hero .breadcrumb-item.active,
    .route-checkout-index .checkout-hero .breadcrumb-item.active {
        color: #6c7f93 !important;
    }
    .route-cart-index .cart-hero .breadcrumb a,
    .route-checkout-index .checkout-hero .breadcrumb a {
        color: #0b56b8 !important;
    }

    .route-blogs-index .ym-blog-head,
    .route-blogs-category .ym-blog-head {
        padding-top: 42px !important;
        padding-bottom: 38px !important;
    }

    .route-faqs-index .faq-hero {
        padding: 34px 18px !important;
    }
    .route-faqs-index .faq-search {
        margin-top: 22px !important;
    }

    .route-static-pages-show .static-page-card {
        width: calc(100% - 20px) !important;
        border-radius: 16px !important;
    }
    .route-static-pages-show .static-page-hero {
        min-height: 190px !important;
        padding: 30px 22px !important;
    }
    .route-static-pages-show .static-page-content {
        padding: 28px 22px !important;
    }
}
