/* Common shared styles for thenextgencrm.com */
/* CSS variables — must come first */
:root {
    --bg-primary: #ffffff;
    --text-primary: #121317;
    --text-secondary: #5f6368;
    --accent-blue: #1a73e8;
    --border-color: rgba(33,34,38,0.08);
    --font-family: 'Google Sans Flex', sans-serif;
    --card-bg: rgba(255,255,255,0.75);
    --card-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

/* Base */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { margin: 0; padding: 0; }
html { overflow-x: hidden; width: 100%; }
body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    width: 100%;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(18,19,23,0.1); color: var(--text-primary); }
.page-wrapper { overflow: hidden; width: 100%; max-width: 100vw; }
body.drawer-open .page-wrapper { overflow: visible; }

/* Navbar */
.navbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 32px; max-width: 1280px; margin: 0 auto;
    position: relative; z-index: 50;
}
.nav-logo-text {
    font-family: var(--font-family); font-size: 1.5rem; font-weight: 500;
    color: var(--text-primary); text-decoration: none; letter-spacing: -0.01em;
}
.nav-logo-text:hover { opacity: 0.7; }

.nav-center { display: flex; align-items: center; }
.navbar > div:first-child,
.navbar > div:last-child { flex-shrink: 0; }
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--font-family); border-radius: 100px; font-size: 14px;
    font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn-primary {
    background-color: #121317; color: #fff; border: 1px solid #121317; padding: 10px 24px;
    transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover { background: #2c2d30; border-color: #2c2d30; }
.btn-primary:active { transform: scale(0.98); }

/* Mega Menu */
.mega-nav-wrap { position: relative; display: flex; align-items: center; gap: 32px; }
.mega-nav-item { position: relative; }
.mega-nav-item::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -12px; height: 12px; z-index: 10000;
}
.mega-nav-trigger {
    font-size: 14px; font-weight: 500; color: var(--text-secondary); cursor: pointer;
    padding: 8px 0; border: none; background: none; font-family: var(--font-family);
    transition: color 0.2s;
}
.mega-nav-trigger:hover { color: var(--text-primary); }
.mega-nav-item:hover .mega-menu { opacity: 1; pointer-events: auto; transform: translateY(0); }
.mega-menu {
    position: fixed; top: 56px; left: 0; right: 0;
    background: rgba(255,255,255,0.97);
    -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 20px 60px rgba(0,0,0,0.06);
    opacity: 0; pointer-events: none; transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 9999; padding: 36px 0;
}
.mega-menu-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 32px;
    display: grid; grid-template-columns: 240px 1fr; gap: 40px;
}
.mega-menu-left { padding-right: 32px; border-right: 1px solid var(--border-color); }
.mega-menu-headline {
    font-size: 20px; font-weight: 400; color: var(--text-primary);
    letter-spacing: -0.02em; line-height: 1.3; margin-bottom: 8px;
}
.mega-menu-sub { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 20px; }
.mega-menu-cta {
    display: inline-flex; align-items: center; gap: 6px; font-size: 13px;
    font-weight: 600; color: var(--accent-blue); text-decoration: none; transition: gap 0.2s;
}
.mega-menu-cta:hover { gap: 10px; }
.mega-menu-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; align-items: start; }
.mega-menu-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; align-items: start; }
.mega-menu-item {
    display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px;
    border-radius: 10px; text-decoration: none; transition: background 0.15s; cursor: pointer;
}
.mega-menu-item:hover { background: rgba(18,19,23,0.03); }
.mega-menu-item-icon {
    width: 32px; height: 32px; border-radius: 8px; background: rgba(18,19,23,0.04);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--text-primary);
}
.mega-menu-item-icon svg { width: 16px; height: 16px; }
.mega-menu-item-title {
    font-size: 13px; font-weight: 600; color: var(--text-primary);
    margin-bottom: 1px; line-height: 1.3;
}
.mega-menu-item-desc { font-size: 11px; color: var(--text-secondary); line-height: 1.3; }

/* Footer */
.footer {
    border-top: 1px solid var(--border-color); padding: 48px 32px;
    background: rgba(248,249,250,0.5);
}
.footer-container {
    max-width: 1200px; margin: 0 auto; display: flex;
    justify-content: space-between; align-items: center; gap: 32px;
}
.footer-logo-text {
    font-size: 1.5rem; font-weight: 500; color: #88888b;
    letter-spacing: -0.01em; opacity: 0.6;
}
.footer-copyright { font-size: 12px; color: #88888b; }
.footer-links { display: flex; gap: 24px; font-size: 12px; }
.footer-link {
    color: var(--text-secondary); text-decoration: none; transition: color 0.2s;
}
.footer-link:hover { color: var(--text-primary); }

/* Hamburger & Mobile Drawer */
.hamburger { display: none; }
.nav-cta { display: flex; }
.mobile-drawer-overlay { display: none; }
.mobile-drawer { display: none; }
.drawer-open { overflow: hidden; }

@media (max-width: 960px) {
    .navbar { padding: 10px 20px; }
    .nav-center { display: none; }
    .nav-cta { display: none; }
    .mega-menu { display: none !important; }
    .footer-container { flex-direction: column; text-align: center; gap: 20px; }

    /* Hamburger */
    .hamburger {
        display: flex; flex-direction: column; gap: 5px;
        background: none; border: none; cursor: pointer; padding: 8px;
        z-index: 10001; position: relative;
    }
    .hamburger span {
        display: block; width: 24px; height: 2px;
        background: var(--text-primary); border-radius: 2px;
        transition: transform 0.3s, opacity 0.3s;
    }
    .hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    /* Overlay */
    .mobile-drawer-overlay {
        display: none;
        position: fixed; inset: 0; background: rgba(0,0,0,0.4);
        z-index: 10000; opacity: 0; transition: opacity 0.3s;
    }
    .drawer-open .mobile-drawer-overlay {
        display: block; opacity: 1;
    }

    /* Drawer */
    .mobile-drawer {
        display: flex; flex-direction: column;
        position: fixed; top: 0; right: 0;
        width: 70vw; height: 100vh;
        background: var(--bg-primary);
        z-index: 10001;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
        box-shadow: -8px 0 30px rgba(0,0,0,0.08);
    }
    .drawer-open .mobile-drawer { transform: translateX(0); }

    .mobile-drawer-header {
        display: flex; align-items: center; justify-content: space-between;
        padding: 20px 24px; border-bottom: 1px solid var(--border-color);
    }
    .mobile-drawer-title { font-size: 18px; font-weight: 500; color: var(--text-primary); }
    .mobile-drawer-close {
        background: none; border: none; font-size: 28px; color: var(--text-primary);
        cursor: pointer; padding: 0; line-height: 1;
    }

    .mobile-drawer-links {
        display: flex; flex-direction: column; padding: 16px 0;
        flex: 1; overflow-y: auto;
    }
    .mobile-link {
        display: block; padding: 14px 24px; font-size: 16px; font-weight: 500;
        color: var(--text-primary); text-decoration: none;
        border-bottom: 1px solid var(--border-color);
        transition: background 0.15s;
    }
    .mobile-link:hover { background: rgba(18,19,23,0.03); }

    .mobile-drawer-cta {
        padding: 20px 24px; border-top: 1px solid var(--border-color);
    }
}
