/* Global Styles */
:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --primary-color: #B834A0;
    /* Rose Rahmat */
    --accent-color: #00AEEF;
    /* Blue Cyan */
    --accent-hover: #22B2EE;
    /* Blue Hover */
    --header-height: 80px;
    --font-primary: 'Fira Sans Condensed', sans-serif;
    --font-secondary: 'Lato', sans-serif;
    --font-arabic: 'Scheherazade New', serif;
    --border-radius-btn: 8px;
}

.font-arabic {
    font-family: var(--font-arabic);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-secondary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-primary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

/* Scroll Animations */
section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

.homepage-section,
.homepage-section .animate-item {
    transition: opacity 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform;
}

section.is-visible,
.animate-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Ensure the hero section is visible immediately to avoid flash */
section:first-of-type {
    opacity: 1;
    transform: translateY(0);
}

/* Header */
header {
    background-color: #000000;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 40px;
    gap: 60px;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease-in-out;
}

header.header-hidden {
    transform: translateY(-100%);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 40px;
}

.logo {
    display: flex;
    align-items: center;
    border-bottom: none !important;
    text-decoration: none !important;
}

.logo img {
    height: 50px;
    /* Adjust based on actual image */
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

/* Main Menu & Dropdowns */
.main-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu-item {
    position: relative;
}

.nav-item {
    color: #ffffff;
    font-weight: 600;
    font-size: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    transition: color 0.3s ease;
}

.nav-item i {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.menu-item:hover>.nav-item {
    color: var(--primary-color);
}

.menu-item:hover>.nav-item i {
    transform: rotate(180deg);
}

/* Sub-menus */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #0c0006;
    min-width: 320px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    border: 1px solid rgba(184, 52, 160, 0.2);
    border-radius: 8px;
    padding: 10px 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.sub-menu li {
    position: relative;
}

.sub-menu a {
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    font-family: var(--font-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
}

.sub-menu a:hover {
    background-color: rgba(184, 52, 160, 0.1);
    color: var(--primary-color);
    padding-left: 30px;
}

.sub-menu li:last-child>a {
    border-bottom: none;
}

/* Nested Sub-menus (Side opening) */
.sub-menu.nested {
    top: 0;
    left: 100%;
    margin-top: -10px;
    margin-left: 1px;
}

.side-arrow {
    float: right;
    margin-top: 4px;
    font-size: 9px !important;
    transform: rotate(0) !important;
}

/* Show Sub-menus on Hover */
.menu-item:hover>.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu li:hover>.sub-menu.nested {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.investment-link {
    display: flex;
    align-items: center;
    gap: 8px;
}

.investment-icon {
    color: var(--accent-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-icon {
    cursor: pointer;
    font-size: 20px;
}

.login-btn {
    border: 1px solid #ffffff;
    padding: 8px 24px;
    border-radius: var(--border-radius-btn);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.login-btn:hover {
    background-color: #ffffff;
    color: #000000;
}

/* Main Content */
main {
    flex: 1;
}

/* Footer */
footer {
    background-color: #000000;
    padding: 40px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #ffffff;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-left .logo img {
    height: 40px;
    /* Adjust as needed */
    width: auto;
    object-fit: contain;
    /* Prevents squashing */
    max-width: 150px;
    /* Optional cap */
}

.copyright {
    color: #aaaaaa;
}

.footer-right {
    display: flex;
    gap: 30px;
}

.footer-link {
    text-decoration: underline;
    color: #ffffff;
}

.footer-link:hover {
    color: var(--accent-hover);
}

/* Responsiveness */
@media (max-width: 768px) {
    footer {
        flex-direction: column;
        gap: 40px;
        padding: 60px 20px;
        text-align: center;
    }

    .footer-left {
        flex-direction: column;
        gap: 20px;
    }

    .footer-right {
        flex-direction: column;
        gap: 15px;
    }

    .footer-left img {
        margin-right: 0 !important;
    }

    /* Mobile Menu */
    .mobile-menu-btn {
        display: block;
        /* Visible on mobile */
        color: white;
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        z-index: 1100;
    }

    .header-right {
        gap: 15px;
        /* Adjust gap for mobile */
    }

    .login-btn {
        padding: 6px 16px;
        /* Slightly smaller on mobile */
        font-size: 13px;
        white-space: nowrap;
    }
}

/* Mobile Menu Overlay Styles */
.mobile-menu-overlay {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}