/* ===== DESIGN SYSTEM ===== */
:root {
    --bg: #F6F7FB;
    --surface: #FFFFFF;
    --surface-2: #FAFBFD;
    --ink: #0A0E1A;
    --ink-2: #1A1F2E;
    --muted: #6B7280;
    --muted-2: #9CA3AF;
    --line: #ECEEF3;
    --primary: #5B5BF7;
    --primary-2: #7C3AED;
    --accent: #00D4A8;
    --danger: #F43F5E;
    --shadow-sm: 0 1px 2px rgba(10, 14, 26, 0.04);
    --shadow-md: 0 4px 16px -4px rgba(10, 14, 26, 0.08);
    --shadow-lg: 0 20px 40px -20px rgba(10, 14, 26, 0.18);
    --shadow-xl: 0 25px 50px -12px rgba(10, 14, 26, 0.25);
    --radius: 18px;
    --radius-sm: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

ul {
    list-style: none;
}

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

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    box-shadow: 0 8px 20px -6px rgba(91, 91, 247, 0.5);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -6px rgba(91, 91, 247, 0.6);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

.btn-dark {
    background: var(--ink);
    color: #fff;
}

.btn-dark:hover {
    background: var(--ink-2);
    transform: translateY(-2px);
}

.btn-white {
    background: #fff;
    color: var(--primary);
}

.btn-white:hover {
    background: var(--bg);
    transform: translateY(-2px);
}

.btn-text {
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-text:hover {
    gap: 10px;
}

/* ===== DESKTOP NAVBAR ===== */
.desktop-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: all 0.3s ease;
    background: transparent;
}

.desktop-navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
    padding: 12px 0;
}

.desktop-navbar.scrolled .nav-link {
    color: var(--ink);
}

.desktop-navbar.scrolled .nav-link:hover {
    color: var(--primary);
}

.desktop-navbar.scrolled .logo-text {
    color: var(--ink);
}

.desktop-navbar.scrolled .logo-mark {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
}

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

/* ===== LOGO IMAGE STYLING ===== */
.logo {
    display: flex;
    align-items: center;
    position: relative;
    height: 64px;
    width: auto;
    min-width: 220px;
    z-index: 1001;
}

.logo-img {
    height: 64px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    transition: opacity 0.35s ease;
}

.logo-default,
.logo-scrolled {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.logo-default { opacity: 1; }
.logo-scrolled { opacity: 0; }

.desktop-navbar.scrolled .logo-default { opacity: 0; }
.desktop-navbar.scrolled .logo-scrolled { opacity: 1; }

.mobile-navbar .logo-default { opacity: 0; }
.mobile-navbar .logo-scrolled { opacity: 1; }

.footer .logo-default { opacity: 1; }
.footer .logo-scrolled { opacity: 0; }

/* ===== NAVBAR LINKS ===== */
.nav-menu-wrapper {
    display: flex;
    align-items: center;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.desktop-navbar.scrolled .nav-link:hover {
    background: rgba(91, 91, 247, 0.08);
    color: var(--primary);
}

.submenu > ul {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-xl);
    padding: 8px;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
}

.submenu:hover > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu ul .nav-link {
    color: var(--ink-2);
    padding: 10px 14px;
    font-size: 13px;
}

.submenu ul .nav-link:hover {
    background: var(--surface-2);
    color: var(--primary);
}

.header-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 24px;
}

.btn-login {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 16px;
}

.desktop-navbar.scrolled .btn-login {
    color: var(--ink);
}

.btn-signup {
    background: #fff;
    color: var(--primary);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 14px;
}

.desktop-navbar.scrolled .btn-signup {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
}

/* ===== MOBILE NAVBAR ===== */
.mobile-navbar {
    display: none;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
    padding: 12px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 990;
}

.mobile-navbar .nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.mobile-navbar .logo {
    height: 40px;
    min-width: auto;
    width: auto;
    max-width: 50%;
    flex-shrink: 0;
}

.mobile-navbar .logo-img {
    height: 40px;
    width: auto;
    max-height: 40px;
}

.mobile-navbar .mobile-toggle {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--ink);
    font-size: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

/* ===== MOBILE LOGO FIX ===== */
/* On mobile, logo-2 should always be visible and properly positioned */
.mobile-navbar .logo-scrolled {
    opacity: 1;
    position: relative; /* ← Override absolute positioning */
    top: auto;
    left: auto;
    transform: none;
}

.mobile-offcanvas-header .logo-scrolled{
    opacity: 1;
}

.mobile-navbar .logo-default {
    opacity: 0;
    position: absolute; /* Keep hidden logo absolute */
}

/* Ensure mobile logo container has proper height */
.mobile-navbar .logo {
    height: 40px;
    display: flex;
    align-items: center;
}

/* ===== MOBILE OFFCANVAS ===== */
.mobile-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 26, 0.6);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.mobile-offcanvas {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 360px;
    height: 100vh;
    background: var(--surface);
    z-index: 999;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-offcanvas.active {
    right: 0;
}

.mobile-offcanvas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--line);
}

.mobile-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--ink);
    font-size: 18px;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all 0.2s;
}

.mobile-close-btn:hover {
    background: var(--line);
    color: var(--danger);
}

.mobile-offcanvas-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
}

.mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-nav-link {
    color: var(--ink-2);
    font-size: 16px;
    font-weight: 600;
    padding: 14px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.2s;
    text-decoration: none;
}

.mobile-nav-link i {
    width: 22px;
    text-align: center;
    color: var(--muted);
    font-size: 16px;
    transition: color 0.2s;
}

.mobile-nav-link:hover {
    background: var(--surface-2);
    color: var(--primary);
}

.mobile-nav-link:hover i {
    color: var(--primary);
}

.mobile-submenu .dropdown-toggle {
    justify-content: space-between;
    cursor: pointer;
}

.mobile-submenu .dropdown-toggle .dropdown-icon {
    transition: transform 0.3s ease;
    width: auto;
}

.mobile-submenu.active .dropdown-toggle .dropdown-icon {
    transform: rotate(180deg);
}

.mobile-submenu-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding-left: 52px;
}

.mobile-submenu.active .mobile-submenu-list {
    max-height: 500px;
}

.mobile-submenu-list .mobile-nav-link {
    font-size: 14px;
    font-weight: 500;
    padding: 10px 16px;
    color: var(--muted);
    gap: 0;
}

.mobile-submenu-list .mobile-nav-link:hover {
    color: var(--primary);
    background: transparent;
    padding-left: 20px;
}

.mobile-submenu-list .mobile-nav-link i {
    display: none;
}

.mobile-offcanvas-footer {
    padding: 24px;
    border-top: 1px solid var(--line);
    background: var(--surface-2);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-outline-mobile {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    color: var(--ink);
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    background: var(--surface);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-outline-mobile:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.mobile-offcanvas-footer .btn-primary {
    width: 100%;
    justify-content: center;
    padding: 14px;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--ink);
    color: rgba(255, 255, 255, 0.7);
    padding: 80px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .logo-text {
    color: #fff;
    margin-bottom: 16px;
    display: block;
}

.footer-brand p {
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 24px;
    max-width: 300px;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 14px;
    transition: all 0.2s;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-col h4 {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.2s;
}

.footer-col ul li a:hover {
    color: var(--accent);
    padding-left: 4px;
}

.newsletter-form {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.newsletter-form input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 12px 16px;
    color: #fff;
    font-size: 14px;
    outline: none;
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.newsletter-form button {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.newsletter-form button:hover {
    background: var(--primary-2);
}

.footer-bottom {
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

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

.footer-bottom-links a:hover {
    color: #fff;
}



/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {
    .desktop-navbar {
        display: none;
    }

    .mobile-navbar {
        display: block;
    }

    .mobile-backdrop {
        display: block;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .mobile-navbar .logo {
        height: 36px;
        max-width: 45%;
    }

    .mobile-navbar .logo-img {
        height: 36px;
        max-height: 36px;
    }
}