:root {
    --primary-navy: #0a192f;
    --secondary-navy: #112240;
    --accent-gold: #fbbf24;
    --text-light: #ccd6f6;
    --text-white: #ffffff;
    --bg-light: #f8f9fa;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-light);
    color: #333;
    padding-top: 72px;
}

.navbar.fixed-top {
    z-index: 1040 !important;
}

.bg-navy {
    background-color: var(--primary-navy) !important;
}

.text-gold {
    color: var(--accent-gold) !important;
}

.text-navy {
    color: var(--primary-navy) !important;
}

.btn-navy {
    background-color: var(--primary-navy) !important;
    color: #ffffff !important;
    border: 1px solid var(--primary-navy) !important;
    font-weight: 600;
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-navy:hover, .btn-navy:focus, .btn-navy:active {
    background-color: var(--secondary-navy) !important;
    color: var(--accent-gold) !important;
    border-color: var(--secondary-navy) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(10, 25, 47, 0.25);
}

/* Navigation Links, Hover, Focus, and Active States */
.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    padding: 0.5rem 0.9rem !important;
    position: relative;
    transition: color 0.25s ease, background-color 0.25s ease;
    border-radius: 6px;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background-color: var(--accent-gold);
    border-radius: 2px;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-nav .nav-link:hover {
    color: var(--accent-gold) !important;
}

.navbar-nav .nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.navbar-nav .nav-link:focus-visible {
    outline: 2px solid var(--accent-gold) !important;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.25);
}

.navbar-nav .nav-link.active {
    color: var(--accent-gold) !important;
    font-weight: 700;
}

.navbar-nav .nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
    background-color: var(--accent-gold);
}

.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0) scale(0.98);
}

.btn-gold {
    background-color: var(--accent-gold);
    color: var(--primary-navy);
    border: 2px solid var(--accent-gold);
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(251, 191, 36, 0.3);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-gold:hover {
    background-color: #f59e0b;
    border-color: #f59e0b;
    color: var(--primary-navy);
    box-shadow: 0 8px 24px rgba(251, 191, 36, 0.45);
    transform: translateY(-2px);
}

.btn-gold::after {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 80%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-25deg);
    transition: left 0.65s ease;
}

.btn-gold:hover::after {
    left: 140%;
}

.btn-outline-light {
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-outline-light:hover {
    background-color: var(--accent-gold);
    border-color: var(--accent-gold);
    color: var(--primary-navy);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.35);
    transform: translateY(-2px);
}

.card {
    border: 1px solid rgba(10, 25, 47, 0.06);
    border-radius: 16px;
    box-shadow: 0 6px 20px -4px rgba(10, 25, 47, 0.06);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.35s ease;
    will-change: transform;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 35px -8px rgba(10, 25, 47, 0.12), 0 0 0 1px rgba(251, 191, 36, 0.35);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background-color: rgba(251, 191, 36, 0.12);
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.6rem;
    margin-bottom: 1.2rem;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), 
                background-color 0.3s ease, 
                color 0.3s ease, 
                box-shadow 0.3s ease;
}

.card:hover .feature-icon,
.feature-icon:hover {
    transform: scale(1.12) rotate(6deg);
    background-color: var(--accent-gold);
    color: var(--primary-navy);
    box-shadow: 0 10px 22px rgba(251, 191, 36, 0.3);
}

.hero-section {
    /* Background handled in template to use static tag */
    background-color: var(--primary-navy);
    color: white;
    padding: 100px 0;
}

.section-padding {
    padding: 80px 0;
}

.accordion-button:not(.collapsed) {
    background-color: rgba(251, 191, 36, 0.1);
    color: var(--primary-navy);
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(251, 191, 36, 0.25);
}

.form-control:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 0.25rem rgba(251, 191, 36, 0.25);
}

/* Portal Styles */
.claim-card {
    border-top: 5px solid var(--accent-gold);
}

.timeline-horizontal {
    list-style: none;
    padding: 20px 0 20px;
    position: relative;
    display: flex;
    justify-content: space-between;
}

.timeline-horizontal:before {
    top: 40px;
    bottom: 0;
    position: absolute;
    content: " ";
    width: 100%;
    height: 2px;
    background-color: #eee;
    z-index: 0;
}

.timeline-horizontal .timeline-item {
    margin-bottom: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 20%;
}

.timeline-horizontal .timeline-badge {
    color: #fff;
    width: 40px;
    height: 40px;
    line-height: 40px;
    font-size: 1.2em;
    text-align: center;
    background-color: #999999;
    z-index: 100;
    border-radius: 50%;
    margin-bottom: 10px;
}

.timeline-horizontal .timeline-badge.primary {
    background-color: var(--primary-navy) !important;
}

.timeline-horizontal .timeline-badge.success {
    background-color: #198754 !important;
}

.timeline-horizontal .timeline-badge.completed {
    background-color: var(--primary-navy) !important;
}

.timeline-horizontal .timeline-badge.active {
    background-color: var(--accent-gold) !important;
}

.timeline-panel {
    text-align: center;
}

/* Swiper Custom Styling */
.swiper {
    width: 100%;
    padding-bottom: 48px !important;
}

.swiper-slide {
    height: auto !important;
    display: flex;
}

.swiper-slide .card,
.swiper-slide > div {
    width: 100%;
    height: 100%;
}

.swiper-button-next,
.swiper-button-prev {
    color: #0a192f !important;
    background: #ffffff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    transition: all 0.25s ease;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 1.1rem !important;
    font-weight: bold;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: #fbbf24;
    color: #0a192f !important;
    transform: scale(1.08);
}

.swiper-button-next.swiper-btn-light,
.swiper-button-prev.swiper-btn-light {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.swiper-button-next.swiper-btn-light:hover,
.swiper-button-prev.swiper-btn-light:hover {
    background: #fbbf24;
    color: #0a192f !important;
}

.swiper-pagination-bullet {
    background: #cbd5e1;
    opacity: 0.7;
    transition: all 0.25s ease;
}

.swiper-pagination-bullet-active {
    background: #fbbf24 !important;
    width: 22px;
    border-radius: 10px;
    opacity: 1;
}

.swiper-pagination-bullet-light {
    background: rgba(255, 255, 255, 0.4);
}

.swiper-pagination-bullet-light.swiper-pagination-bullet-active {
    background: #fbbf24 !important;
}

/* User Dashboard & Activity Feed Styles */
.kpi-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(10, 25, 47, 0.08) !important;
}

.stepper-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.border-pulse {
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.25);
    animation: pulseRing 2s infinite;
}

@keyframes pulseRing {
    0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(212, 175, 55, 0); }
    100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

#activityFilters .btn {
    color: #64748b;
    background: transparent;
    border: none;
    transition: all 0.2s ease;
}

#activityFilters .btn.active-filter {
    background: #0a192f !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(10, 25, 47, 0.2);
}

.list-group-item-action {
    transition: background-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), 
                color 0.22s ease, 
                padding-left 0.22s ease;
}

.list-group-item-action:hover:not(.active) {
    background-color: rgba(251, 191, 36, 0.07);
    color: var(--primary-navy) !important;
    padding-left: 1.35rem !important;
}

.activity-item {
    display: flex !important;
    transition: background-color 0.2s ease;
}
.activity-item.is-hidden {
    display: none !important;
}
.activity-item:hover {
    background-color: #f8fafc;
}

/* ==========================================================================
   PERFECT ANIMATION ENGINE & PERFORMANCE SPEED OPTIMIZATIONS
   ========================================================================== */

/* Smooth scrolling & compositor acceleration */
html {
    scroll-behavior: smooth;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scroll progress bar (thin luxury gold bar at top of window) */
#reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #d4af37, #fbbf24, #f59e0b);
    z-index: 99999;
    width: 0%;
    transition: width 0.08s ease-out;
    pointer-events: none;
    box-shadow: 0 1px 6px rgba(251, 191, 36, 0.5);
}

/* Scroll-triggered reveal system */
.reveal {
    opacity: 0;
    will-change: transform, opacity;
    transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up {
    transform: translate3d(0, 36px, 0);
}

.reveal-down {
    transform: translate3d(0, -36px, 0);
}

.reveal-left {
    transform: translate3d(-36px, 0, 0);
}

.reveal-right {
    transform: translate3d(36px, 0, 0);
}

.reveal-scale {
    transform: scale3d(0.92, 0.92, 1);
}

/* When visible in viewport */
.reveal.is-visible {
    opacity: 1 !important;
    transform: translate3d(0, 0, 0) scale(1) !important;
}

/* Stagger delays */
.delay-50 { transition-delay: 50ms; }
.delay-100 { transition-delay: 100ms; }
.delay-150 { transition-delay: 150ms; }
.delay-200 { transition-delay: 200ms; }
.delay-250 { transition-delay: 250ms; }
.delay-300 { transition-delay: 300ms; }
.delay-350 { transition-delay: 350ms; }
.delay-400 { transition-delay: 400ms; }
.delay-450 { transition-delay: 450ms; }
.delay-500 { transition-delay: 500ms; }
.delay-600 { transition-delay: 600ms; }

/* Immediate keyframe animations for above-the-fold content */
@keyframes fadeInUpKey {
    from {
        opacity: 0;
        transform: translate3d(0, 30px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeInDownKey {
    from {
        opacity: 0;
        transform: translate3d(0, -30px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeInLeftKey {
    from {
        opacity: 0;
        transform: translate3d(-30px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeInRightKey {
    from {
        opacity: 0;
        transform: translate3d(30px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes floatBadgeKey {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

@keyframes pulseGlowKey {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(251, 191, 36, 0);
    }
}

@keyframes goldShimmerKey {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* Hero entrance sequence classes */
.hero-badge-animate {
    animation: fadeInDownKey 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-title-animate {
    animation: fadeInUpKey 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.hero-text-animate {
    animation: fadeInUpKey 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

.hero-btn-animate {
    animation: fadeInUpKey 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.45s both;
}

/* Floating & Glow utility classes */
.animate-float {
    animation: floatBadgeKey 4s ease-in-out infinite;
    display: inline-block;
}

.animate-pulse-glow {
    animation: pulseGlowKey 2.4s infinite;
}

.gold-shimmer {
    background: linear-gradient(90deg, #d4af37 0%, #fffbeb 50%, #d4af37 100%);
    background-size: 200% auto;
    color: #0a192f !important;
    animation: goldShimmerKey 4s linear infinite;
}

/* Interactive form inputs */
.form-control, .form-select {
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.65rem 1rem;
    transition: border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.25s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent-gold) !important;
    box-shadow: 0 0 0 0.25rem rgba(251, 191, 36, 0.22) !important;
    transform: translateY(-1px);
}

/* Dropdown menu smooth animation */
.dropdown-menu {
    animation: fadeInDownKey 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    border: 1px solid rgba(10, 25, 47, 0.08);
    box-shadow: 0 12px 30px rgba(10, 25, 47, 0.12) !important;
}

/* Alerts smooth appearance */
.alert {
    animation: fadeInUpKey 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
    border-radius: 12px;
}

/* Table rows smooth hover */
.table tbody tr {
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.table tbody tr:hover {
    background-color: rgba(251, 191, 36, 0.04);
}

/* Badge micro-styles */
.badge {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.badge:hover {
    transform: scale(1.05);
}

/* Accordion smooth expansion */
.accordion-item {
    border-radius: 12px !important;
    overflow: hidden;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(10, 25, 47, 0.08);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.accordion-item:hover {
    border-color: rgba(251, 191, 36, 0.4);
    box-shadow: 0 4px 15px rgba(10, 25, 47, 0.05);
}

.accordion-button {
    transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

/* Fast Rendering & GPU Acceleration */
.hero-section, .section-padding, .kpi-card, .claim-card, .solutionsSwiper, .review-card {
    will-change: auto;
    contain: layout style;
}

/* ==========================================================================
   SLIDE IN & SLIDE OUT ANIMATION ENGINE
   ========================================================================== */

/* Keyframes for Slide In */
@keyframes slideInLeftKey {
    0% {
        opacity: 0;
        transform: translate3d(-50px, 0, 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes slideInRightKey {
    0% {
        opacity: 0;
        transform: translate3d(50px, 0, 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes slideInUpKey {
    0% {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes slideInDownKey {
    0% {
        opacity: 0;
        transform: translate3d(0, -40px, 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Keyframes for Slide Out */
@keyframes slideOutLeftKey {
    0% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
    100% {
        opacity: 0;
        transform: translate3d(-50px, 0, 0);
    }
}

@keyframes slideOutRightKey {
    0% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
    100% {
        opacity: 0;
        transform: translate3d(50px, 0, 0);
    }
}

@keyframes slideOutUpKey {
    0% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
    100% {
        opacity: 0;
        transform: translate3d(0, -40px, 0);
    }
}

@keyframes slideOutDownKey {
    0% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
    100% {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
}

/* Page entrance animation */
main {
    animation: slideInUpKey 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Utility classes for immediate or dynamic slide */
.slide-in-left {
    animation: slideInLeftKey 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.slide-in-right {
    animation: slideInRightKey 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.slide-in-up {
    animation: slideInUpKey 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.slide-in-down {
    animation: slideInDownKey 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.slide-out-left {
    animation: slideOutLeftKey 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

.slide-out-right {
    animation: slideOutRightKey 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

.slide-out-up {
    animation: slideOutUpKey 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

.slide-out-down {
    animation: slideOutDownKey 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

/* Smooth Slide for Bootstrap Collapses (e.g. mobile navbar & account navigation) */
.collapse.show {
    animation: slideInDownKey 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.collapsing {
    transition: height 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Global Mobile Viewport Locking & Horizontal Scroll Prevention */
html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
    position: relative;
}

.container, .container-fluid, .row {
    max-width: 100% !important;
}

/* Mobile responsive safeguards */
@media (max-width: 991.98px) {
    body {
        overflow-x: hidden !important;
        position: relative;
    }

    .container {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .card {
        max-width: 100% !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    .table-responsive {
        max-width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .btn-group {
        max-width: 100% !important;
    }
}

/* Reduced Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    #reading-progress {
        display: none !important;
    }
}


