/* Global styles for Scrollable */
:root {
    --primary-color: #0D0B9D;
    --secondary-color: #4361EE;
    --tertiary-color: #3ABFF8;
    --accent-color: #7259FF;
    --light-bg: #F8F9FE;
    --light-surface: #FFFFFF;
    --dark-bg: #0A0A1E;
    --dark-surface: #151528;
    --text-primary: #0F1033;
    --text-secondary: #64748B;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
    background-color: var(--light-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5em;
}

p {
    margin-bottom: 1em;
}

/* Header */
header {
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    background-color: rgba(248, 249, 254, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

header.scrolled {
    padding: 12px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    position: relative;
    z-index: 2;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-link {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, var(--primary-color), var(--tertiary-color));
    border-radius: 2px;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    z-index: 1001;
    cursor: pointer;
    width: 28px;
    height: 28px;
    position: relative;
}

.menu-icon {
    display: inline-block;
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    position: relative;
    transition: background-color 0.3s ease;
}

.menu-icon:before,
.menu-icon:after {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    position: absolute;
    transition: transform 0.3s ease;
}

.menu-icon:before {
    top: -8px;
}

.menu-icon:after {
    bottom: -8px;
}

.mobile-menu-toggle.active .menu-icon {
    background-color: transparent;
}

.mobile-menu-toggle.active .menu-icon:before {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active .menu-icon:after {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile overlay for dark background when menu is open */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile Navigation */
@media (max-width: 991px) {
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--light-surface);
        flex-direction: column;
        justify-content: flex-start;
        padding: 90px 32px 40px;
        transition: right 0.3s cubic-bezier(0.77, 0, 0.175, 1);
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        overflow-y: auto;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-link {
        font-size: 18px;
        padding: 16px 0;
        display: block;
        width: 100%;
        text-align: left;
        border-bottom: 1px solid rgba(100, 116, 139, 0.1);
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .nav-link.active::after {
        display: none;
    }
}

/* Dark mode styles for mobile menu */
.dark-mode .mobile-menu-toggle .menu-icon,
.dark-mode .mobile-menu-toggle .menu-icon:before,
.dark-mode .mobile-menu-toggle .menu-icon:after {
    background-color: #FFFFFF;
}

.dark-mode .mobile-menu-toggle.active .menu-icon {
    background-color: transparent;
}

.dark-mode .nav-menu {
    background-color: var(--dark-surface);
}

.dark-mode .nav-link {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Footer */
footer {
    background-color: var(--light-surface);
    padding: 60px 0 40px;
    margin-top: 80px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.footer-link:hover {
    color: var(--primary-color);
}

/* Dark mode footer */
.dark-mode footer {
    background-color: var(--dark-surface);
}

.dark-mode .footer-logo {
    color: #818CF8;
}

.dark-mode .footer-link {
    color: #94A3B8;
}

.dark-mode .footer-link:hover {
    color: #818CF8;
}

/* Utilities */
.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 40px; }

/* Responsive Styles - More granular breakpoints */
@media (max-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

@media (max-width: 991px) {
    .container {
        max-width: 960px;
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 720px;
        padding: 0 20px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    h1 {
        font-size: calc(1.375rem + 1.5vw);
    }
    
    h2 {
        font-size: calc(1.325rem + 0.9vw);
    }
}

@media (max-width: 576px) {
    .container {
        max-width: 100%;
        padding: 0 16px;
    }
    
    footer {
        padding: 40px 0 32px;
        margin-top: 60px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }
}

@media (max-width: 390px) {
    .container {
        padding: 0 12px;
    }
    
    .logo {
        font-size: 20px;
    }
}

/* Animation utilities */
.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Page spacing adjustment for fixed header */
main {
    padding-top: 80px;
}

/* Fix for header on small screens */
@media (max-width: 576px) {
    main {
        padding-top: 68px;
    }
}

/* Improved focus states for accessibility */
a:focus, button:focus {
    outline: 2px solid var(--tertiary-color);
    outline-offset: 2px;
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Touch-friendly tap targets for mobile */
@media (max-width: 576px) {
    .nav-link, .footer-link, button, .cta-button {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}