/*==========================================================================
  APEX — animation & new-section styles
  Loaded after style.css. Adds scroll reveals, counters, hover motion and the
  section blocks used by the sector / management pages.
  Everything degrades to a plain static page if JS is off, and all motion is
  disabled under prefers-reduced-motion.
==========================================================================*/

/*** 1. Scroll reveal ***********************************************/
/* Elements start hidden ONLY once JS confirms it is running, so a
   no-JS visitor still sees all the content. */
.js-anim [data-reveal] {
    opacity: 0;
    transition: opacity .7s cubic-bezier(.22, .61, .36, 1),
                transform .7s cubic-bezier(.22, .61, .36, 1);
    transition-delay: var(--reveal-delay, 0s);
    will-change: opacity, transform;
}

.js-anim [data-reveal="up"]    { transform: translateY(40px); }
.js-anim [data-reveal="down"]  { transform: translateY(-40px); }
.js-anim [data-reveal="left"]  { transform: translateX(-50px); }
.js-anim [data-reveal="right"] { transform: translateX(50px); }
.js-anim [data-reveal="zoom"]  { transform: scale(.9); }
.js-anim [data-reveal="fade"]  { transform: none; }

.js-anim [data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

/*** 2. Navbar shrink on scroll *************************************/
.sticky-top.navbar-light {
    transition: padding .35s ease, box-shadow .35s ease, background-color .35s ease;
}

.sticky-top.navbar-light.nav-shrink {
    padding-top: .35rem !important;
    padding-bottom: .35rem !important;
    box-shadow: 0 6px 24px rgba(19, 53, 123, .18) !important;
}

.sticky-top.navbar-light .navbar-brand h1 {
    transition: font-size .35s ease;
}

.sticky-top.navbar-light.nav-shrink .navbar-brand h1 {
    font-size: 1.9rem;
}

/* animated underline that grows out from the active/hovered nav item */
.sticky-top.navbar-light .navbar-nav .nav-link {
    position: relative;
}

.sticky-top.navbar-light .navbar-nav .nav-link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 10px;
    width: 0;
    height: 2px;
    background: var(--bs-primary);
    transition: width .3s ease, left .3s ease;
}

.sticky-top.navbar-light .navbar-nav .nav-link:hover::after,
.sticky-top.navbar-light .navbar-nav .nav-link.active::after {
    width: 24px;
    left: calc(50% - 12px);
}

@media (max-width: 991.98px) {
    .sticky-top.navbar-light .navbar-nav .nav-link::after { display: none; }
}

/*** 3. Page hero (per-sector breadcrumb banner) ********************/
.bg-breadcrumb.page-hero {
    position: relative;
    overflow: hidden;
    background: none;
    padding: 170px 0 70px 0;
}

.bg-breadcrumb.page-hero .page-hero-bg {
    position: absolute;
    inset: -4%;
    background-position: center center;
    background-size: cover;
    z-index: 0;
    animation: heroDrift 26s ease-in-out infinite alternate;
}

.bg-breadcrumb.page-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(19, 53, 123, .78), rgba(9, 22, 52, .88));
    z-index: 1;
}

.bg-breadcrumb.page-hero > .container {
    position: relative;
    z-index: 2;
}

.bg-breadcrumb.page-hero .hero-kicker {
    display: inline-block;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-size: 13px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 50rem;
    padding: 6px 22px;
    margin-bottom: 22px;
    backdrop-filter: blur(2px);
}

@keyframes heroDrift {
    from { transform: scale(1) translate3d(0, 0, 0); }
    to   { transform: scale(1.12) translate3d(-1.5%, -1.5%, 0); }
}

/*** 4. Stat strip with count-up numbers ****************************/
.stat-strip {
    background: linear-gradient(135deg, #13357B 0%, #0a1c44 100%);
    position: relative;
    overflow: hidden;
}

.stat-strip::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, .10), transparent 42%),
        radial-gradient(circle at 85% 80%, rgba(255, 255, 255, .08), transparent 42%);
    animation: statGlow 14s ease-in-out infinite alternate;
}

@keyframes statGlow {
    from { transform: translate3d(-3%, -2%, 0); }
    to   { transform: translate3d(3%, 2%, 0); }
}

.stat-strip .container { position: relative; z-index: 1; }

.stat-item {
    text-align: center;
    padding: 18px 10px;
    border-right: 1px solid rgba(255, 255, 255, .14);
}

.stat-item:last-child { border-right: 0; }

@media (max-width: 767.98px) {
    .stat-item { border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .14); }
    .stat-item:last-child { border-bottom: 0; }
}

.stat-num {
    font-size: 2.9rem;
    font-weight: 700;
    line-height: 1.1;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

/* Short symbols (% and +) read well raised; word or unit suffixes such as
   "bn" and "°C" have to sit on the baseline or they look like footnotes. */
.stat-num .stat-affix { font-size: 1.6rem; vertical-align: super; opacity: .85; }

.stat-num .stat-affix.stat-affix-inline {
    font-size: 1.5rem;
    vertical-align: baseline;
}

.stat-label {
    color: rgba(255, 255, 255, .82);
    margin: 6px 0 0;
    font-size: .95rem;
}

.stat-source {
    color: rgba(255, 255, 255, .55);
    font-size: .78rem;
    margin-top: 4px;
}

/*** 5. Process / step cards ****************************************/
.step-card {
    position: relative;
    background: #fff;
    border: 1px solid rgba(19, 53, 123, .14);
    border-radius: 10px;
    padding: 34px 26px 26px;
    height: 100%;
    overflow: hidden;
    transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}

.step-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 3px;
    width: 0;
    background: var(--bs-primary);
    transition: width .45s ease;
}

.step-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 38px rgba(19, 53, 123, .16);
    border-color: rgba(19, 53, 123, .35);
}

.step-card:hover::before { width: 100%; }

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(19, 53, 123, .09);
    color: var(--bs-primary);
    font-weight: 700;
    margin-bottom: 16px;
    transition: background .35s ease, color .35s ease, transform .35s ease;
}

.step-card:hover .step-num {
    background: var(--bs-primary);
    color: #fff;
    transform: rotate(-8deg) scale(1.06);
}

.step-card h5 { color: var(--bs-primary); }

/*** 6. Feature / icon cards ****************************************/
.feature-card {
    background: #fff;
    border: 1px solid rgba(19, 53, 123, .12);
    border-radius: 10px;
    padding: 30px 26px;
    height: 100%;
    transition: transform .35s ease, box-shadow .35s ease, background .35s ease;
}

.feature-card i {
    color: var(--bs-primary);
    transition: transform .4s ease, color .35s ease;
    display: inline-block;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 34px rgba(19, 53, 123, .14);
}

.feature-card:hover i { transform: translateY(-4px) scale(1.12); }

/*** 7. Image treatments ********************************************/
.img-frame {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.img-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .8s cubic-bezier(.22, .61, .36, 1);
}

.img-frame:hover img { transform: scale(1.07); }

.img-frame .img-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 30px 18px 14px;
    color: #fff;
    font-size: .9rem;
    background: linear-gradient(transparent, rgba(9, 22, 52, .85));
    transform: translateY(100%);
    opacity: 0;
    transition: transform .4s ease, opacity .4s ease;
}

.img-frame:hover .img-caption { transform: translateY(0); opacity: 1; }

/* accent frame reused from the About block, without the inline styles */
.img-accent {
    border: 30px solid;
    border-color: transparent var(--bs-primary) transparent var(--bs-primary);
}

@media (max-width: 767.98px) {
    .img-accent { border-width: 14px; }
}

/*** 8. Fact accordion **********************************************/
.fact-accordion .accordion-button {
    font-weight: 500;
    color: var(--bs-primary);
    background: #fff;
}

.fact-accordion .accordion-button:not(.collapsed) {
    background: rgba(19, 53, 123, .06);
    color: var(--bs-primary);
    box-shadow: none;
}

.fact-accordion .accordion-button:focus {
    box-shadow: 0 0 0 .2rem rgba(19, 53, 123, .18);
}

.fact-accordion .accordion-item {
    border: 1px solid rgba(19, 53, 123, .16);
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
}

/*** 9. Role cards (management pages) *******************************/
.role-card {
    position: relative;
    background: #fff;
    border: 1px solid rgba(19, 53, 123, .14);
    border-left: 4px solid var(--bs-primary);
    border-radius: 8px;
    padding: 28px 26px;
    height: 100%;
    transition: transform .35s ease, box-shadow .35s ease;
}

.role-card:hover {
    transform: translateX(6px);
    box-shadow: 0 14px 30px rgba(19, 53, 123, .14);
}

.role-card .role-icon {
    width: 54px;
    height: 54px;
    border-radius: 8px;
    background: rgba(19, 53, 123, .08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bs-primary);
    font-size: 1.4rem;
    margin-bottom: 18px;
}

.role-card ul {
    padding-left: 18px;
    margin-bottom: 0;
}

.role-card ul li { margin-bottom: 6px; }

/*** 10. CTA band ***************************************************/
.cta-band {
    background: linear-gradient(135deg, #13357B 0%, #0a1c44 100%);
    color: #fff;
}

.cta-band .btn-light-outline {
    border: 1px solid rgba(255, 255, 255, .6);
    color: #fff;
    transition: background .3s ease, color .3s ease, transform .3s ease;
}

.cta-band .btn-light-outline:hover {
    background: #fff;
    color: var(--bs-primary);
    transform: translateY(-3px);
}

/*** 11. Back to top ************************************************/
.back-to-top {
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px);
    transition: opacity .3s ease, transform .3s ease, visibility .3s;
}

.back-to-top.btt-show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/*** 12. Scroll progress bar ****************************************/
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, var(--bs-primary), #4d7ad1);
    z-index: 2000;
    transition: width .1s linear;
}

/*** 13. Misc *******************************************************/
.lead-intro {
    font-size: 1.12rem;
    line-height: 1.85;
}

.source-note {
    font-size: .82rem;
    color: #6c757d;
    border-left: 3px solid rgba(19, 53, 123, .25);
    padding-left: 12px;
}

.credit-table td, .credit-table th { vertical-align: top; font-size: .9rem; }

/*** 14. Reduced motion — switch everything off *********************/
@media (prefers-reduced-motion: reduce) {
    .js-anim [data-reveal],
    .js-anim [data-reveal].is-visible {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .bg-breadcrumb.page-hero .page-hero-bg,
    .stat-strip::before {
        animation: none !important;
    }

    .step-card, .feature-card, .role-card, .img-frame img,
    .sticky-top.navbar-light, .back-to-top {
        transition: none !important;
    }

    .step-card:hover, .feature-card:hover, .role-card:hover {
        transform: none !important;
    }
}
