/* ============================================
   NL THEME - Modern Solid Color Design
   Colors: Purple/Indigo/Emerald - Solid Colors Only
   ============================================ */

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

html { 
    scroll-behavior: smooth; 
    scroll-padding-top: 74px; 
}

@media(max-width:768px) { 
    html { 
        scroll-padding-top: 66px; 
    } 
}

@media(max-width:480px) { 
    html { 
        scroll-padding-top: 60px; 
    } 
}

body { 
    font-family: 'Inter', sans-serif; 
    background: #fafbff; 
    color: #1a1f3a;
    overflow-x: hidden;
}

/* Layout applies bg-white on body; override for NL theme */
body.bg-white { background: #fafbff !important; }

/* NL header drawer + overlay (JS toggles .open / .show) */
#mobileMenu {
    transform: translateX(100%) !important;
}

#mobileMenu.open {
    transform: translateX(0) !important;
}

#mobileMenuOverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 11999;
}

#mobileMenuOverlay.show {
    display: block;
}

/* Nav link hover - solid underline */
.nav-link {
    position: relative;
    padding-bottom: 4px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #8b5cf6;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    inset: 0;
    background: #fafbff;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
}

.mobile-menu.open { 
    transform: translateX(0); 
}

/* Dropdown */
.dropdown-menu { 
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.25s ease;
    z-index: 13000 !important;
}

.dropdown-menu.show { 
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    font-weight: 500;
    cursor: pointer;
    color: #1a1f3a;
    transition: all 0.2s;
}

.dropdown-item:hover { 
    background: #f3f4f6;
}

.dropdown-item img { 
    width: 22px; 
    height: 15px; 
    border-radius: 2px; 
    object-fit: cover; 
}

.language-details summary {
    list-style: none;
}

.language-details summary::-webkit-details-marker {
    display: none;
}

.language-details summary .language-arrow {
    display: inline-flex;
    transition: transform 0.3s ease;
}

.language-details[open] .language-arrow {
    transform: rotate(180deg);
}

/* FAQ - Modern Design */
.faq-item {
    transition: all 0.3s ease;
    overflow: visible; /* Ensure item doesn't clip button content */
}

/* FAQ Button - Always Visible */
.faq-trigger {
    transition: all 0.2s ease;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex !important; /* Force display */
    visibility: visible !important; /* Force visibility */
    opacity: 1 !important; /* Force opacity */
    width: 100%;
    position: relative;
    z-index: 1;
}

.faq-trigger:hover {
    background: rgba(139, 92, 246, 0.02);
}

.faq-trigger:focus {
    outline: none;
}

/* Ensure button content is always visible */
.faq-trigger > * {
    pointer-events: none;
    visibility: visible !important;
    opacity: 1 !important;
    display: flex !important;
}

.faq-trigger h3,
.faq-trigger .flex-1,
.faq-trigger .flex-shrink-0 {
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
}

.faq-trigger .flex-1 {
    display: flex !important;
    flex-direction: column;
}

/* FAQ Answer - Only this should toggle */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.3s ease,
                margin-top 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    opacity: 1;
    margin-top: 0;
}

.faq-item.active .faq-arrow {
    transform: rotate(180deg);
}

/* Ensure button remains visible when item is active */
.faq-item.active .faq-trigger {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.faq-item.active .faq-trigger > * {
    visibility: visible !important;
    opacity: 1 !important;
}

/* Custom Scrollbar for Language Dropdown */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #8b5cf6;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #7c3aed;
}

/* Form */
.iti { 
    width: 100%; 
    z-index: 11000 !important; 
}

.iti input { 
    padding-left: 98px !important; 
    height: 54px; 
    border: 2px solid #e0e7ff; 
    background: #ffffff; 
    border-radius: 14px; 
    width: 100%; 
    color: #1a1f3a;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.iti input:focus { 
    border-color: #8b5cf6; 
    outline: none;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

.iti input::placeholder { 
    color: #9ca3af; 
}

.iti--container { 
    z-index: 11000 !important; 
}

/* Gallery Modal */
.gallery-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(30, 27, 75, 0.95);
    z-index: 15000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.gallery-modal.open { 
    display: flex; 
}

/* Card styles */
.feature-card {
    background: #ffffff;
    border: 1px solid #e0e7ff;
    border-radius: 20px;
    padding: 28px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #8b5cf6;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    border-color: #8b5cf6;
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.15);
    transform: translateY(-5px);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

/* Horizontal scroll */
.scroll-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 20px;
}

.scroll-container::-webkit-scrollbar {
    height: 6px;
}

.scroll-container::-webkit-scrollbar-track {
    background: #e0e7ff;
    border-radius: 3px;
}

.scroll-container::-webkit-scrollbar-thumb {
    background: #8b5cf6;
    border-radius: 3px;
}

.scroll-item {
    flex: 0 0 300px;
    scroll-snap-align: start;
}

/* Pill badge */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #f3f4f6;
    color: #8b5cf6;
    font-weight: 600;
    font-size: 13px;
    border-radius: 50px;
    border: 1px solid #e0e7ff;
}

/* Decorative shapes */
.shape-dots {
    background-image: radial-gradient(#8b5cf6 1.5px, transparent 1.5px);
    background-size: 12px 12px;
}

/* Mobile Menu - Optimized Performance */
#mobileMenu {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 340px;
    max-width: 100vw;
    background: #ffffff;
    z-index: 12000;
    box-shadow: -2px 0 32px 0 rgba(139, 92, 246, 0.15);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(100%);
    display: block;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

#mobileMenu.open {
    transform: translateX(0);
}

body.menu-open {
    overflow: hidden;
}

/* Ensure mobile menu and hamburger are visible below xl breakpoint (1280px) */
@media (max-width: 1279px) {
    #mobileMenu {
        display: block !important;
    }
    
    #hamburger {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

@media (min-width: 1280px) {
    #mobileMenu {
        display: none !important;
    }
    
    #hamburger {
        display: none !important;
    }
}

@media (max-width: 400px) {
    #mobileMenu { 
        width: 100vw; 
    }
}

#mobileMenu nav a {
    font-size: 1rem;
    font-weight: 600;
    padding: 1rem 1.5rem;
    width: 100%;
    text-align: left;
    border-bottom: 1px solid #e0e7ff;
    color: #1a1f3a;
    transition: all 0.2s;
    background: transparent;
    position: relative;
    display: block;
}

/* Mobile Language Dropdown */
#langBtnMobile {
    width: 100%;
    border: none;
    background: transparent;
    cursor: pointer;
}

.dropdown-menu-mobile {
    margin-top: 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(139, 92, 246, 0.1);
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.dropdown-menu-mobile.hidden {
    display: none;
}

.dropdown-item-mobile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    font-weight: 500;
    cursor: pointer;
    color: #1a1f3a;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(139, 92, 246, 0.05);
}

.dropdown-item-mobile:last-child {
    border-bottom: none;
}

.dropdown-item-mobile:hover {
    background: rgba(139, 92, 246, 0.05);
    color: #8b5cf6;
}

#mobileMenu nav a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: #8b5cf6;
    transition: width 0.3s ease;
}

#mobileMenu nav a:hover {
    color: #8b5cf6;
}

#mobileMenu nav a:hover::before {
    width: 4px;
}

#closeMenu {
    background: none;
    border: none;
    cursor: pointer;
}

/* Font classes */
.font-inter {
    font-family: 'Inter', sans-serif;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in-down {
    animation: fadeInDown 0.6s ease-out;
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-pulse-slow {
    animation: pulse 3s ease-in-out infinite;
}

.animate-scale-in {
    animation: scaleIn 0.4s ease-out;
}

/* Trading-specific animations */
@keyframes chartLine {
    0% {
        stroke-dasharray: 0 1000;
    }
    100% {
        stroke-dasharray: 1000 0;
    }
}

@keyframes priceUp {
    0% {
        color: #10b981;
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
    100% {
        color: #10b981;
        transform: translateY(0);
    }
}

@keyframes priceDown {
    0% {
        color: #ef4444;
        transform: translateY(0);
    }
    50% {
        transform: translateY(5px);
    }
    100% {
        color: #ef4444;
        transform: translateY(0);
    }
}

/* Button hover effects */
.btn-primary {
    background: #8b5cf6;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #7c3aed;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
}

.btn-secondary {
    background: #10b981;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

/* Scroll reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Trading stats animation */
.trading-stat {
    transition: all 0.3s ease;
}

.trading-stat:hover {
    transform: scale(1.05);
}
