/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Parallax Effects */
.parallax-bg {
    transform: translateZ(-1px) scale(1.5);
    will-change: transform;
    transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.parallax-bg-slow {
    will-change: transform;
    transition: transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Navbar Styles */
#navbar {
    background: linear-gradient(135deg, rgba(0, 45, 94, 0), rgba(0, 30, 69, 0));
    /* backdrop-filter: blur(10px);*/
}

#navbar.scrolled {
    background: linear-gradient(135deg, rgba(0, 45, 94, 0), rgba(0, 30, 69, 0.98));
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.nav-link {
    position: relative;
    font-weight: 500;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #60a5fa;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-fade-in-delay {
    animation: fadeIn 1s ease-out 0.3s both;
}

/* Feature Cards */
.feature-card {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 46, 94, 0.05), transparent);
    transition: left 0.5s;
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
}

/* Policy Cards */
.policy-card {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.policy-card:hover {
    transform: translateY(-8px) scale(1.03);
}

.policy-card .policy-description {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.policy-card.active .policy-description {
    max-height: 500px;
}

.policy-card.active .policy-preview {
    display: none;
}




/* Fund Items */
.fund-item {
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.fund-item:hover {
    border-left-color: #002e5e;
    transform: translateX(5px);
}

/* Counter Animation */
.counter {
    display: inline-block;
}

/* Scroll Indicator */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-bounce {
    animation: bounce 2s infinite;
}

/* Smooth Scroll Offset for Fixed Navbar */
section {
    scroll-margin-top: 80px;
}

/* Loading Animation for Images */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #002e5e;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #001e45;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #002e5e, #1a5490);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Backdrop Blur Support */
@supports (backdrop-filter: blur(10px)) {
    .backdrop-blur-sm {
        backdrop-filter: blur(10px);
    }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .parallax-bg {
        transform: none;
        background-attachment: scroll;
    }
    
    .feature-card:hover {
        transform: translateY(-5px) scale(1.01);
    }
}

/* Print Styles */
@media print {
    nav, footer {
        display: none;
    }
    
    section {
        page-break-inside: avoid;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Styles */
a:focus,
button:focus,
input:focus {
    outline: 2px solid #1a5490;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .feature-card,
    .policy-card,
    .fund-item {
        border: 2px solid currentColor;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .parallax-bg,
    .parallax-bg-slow {
        transform: none !important;
    }
}
