/* ==========================================================================
   SaeSpartner — Global Styles (Vakilsearch-Inspired Design System)
   ========================================================================== */

/* --- Design Tokens --- */
:root {
    --royal-blue: #10367D;
    --light-grey: #EBEBEB;
    --sky-blue: #74B4D9;
    --primary: #10367D;
    --primary-dark: #0B285E;
    --primary-light: #74B4D9;
    --accent: #74B4D9;
    --accent-hover: #5FA7D2;
    --accent-light: #EAF5FB;
    --bg-white: #FFFFFF;
    --bg-light: #EBEBEB;
    --bg-section: #F7F9FC;
    --bg-dark: #10367D;
    --text-primary: #10367D;
    --text-secondary: #334155;
    --text-muted: #6B7280;
    --text-white: #FFFFFF;
    --border-color: #D7DEE8;
    --border-light: #E4E9F1;
    --shadow-sm: 0 1px 3px rgba(16, 54, 125, 0.06);
    --shadow-md: 0 4px 14px rgba(16, 54, 125, 0.08);
    --shadow-lg: 0 10px 40px rgba(16, 54, 125, 0.10);
    --shadow-xl: 0 20px 60px rgba(16, 54, 125, 0.12);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-pill: 999px;
    --font-display: 'Urbanist', 'Inter', sans-serif;
    --font-body: 'Inter', 'Urbanist', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

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

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

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

/* --- Global Background Video (hidden by default) --- */
.global-bg-video {
    display: none;
}

#canvas-container {
    display: none;
}

/* ==========================================================================
   NAVBAR
   ========================================================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    box-shadow: none;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.pill-navbar {
    width: 100%;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-image {
    height: 52px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    margin-left: 2rem;
}

.nav-links-left {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-links-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: var(--transition);
    position: relative;
    text-decoration: none;
    white-space: nowrap;
}

.nav-link::after {
    display: none;
}

.nav-link:hover {
    color: var(--primary-light);
    background: var(--accent-light);
}

.nav-link.active {
    color: var(--primary);
    background: var(--accent-light);
    font-weight: 700;
}

/* --- Dropdown --- */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-icon {
    font-size: 0.7rem;
    margin-left: 3px;
    transition: transform 0.2s ease;
}

.nav-dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: min(920px, calc(100vw - 2rem));
    background: var(--bg-white);
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.12);
    border-radius: 18px;
    padding: 1rem;
    z-index: 1000;
    border: 1px solid var(--border-color);
    animation: dropdownFade 0.2s ease;
}

/* Invisible bridge to prevent dropdown from closing when hovering the gap */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: 15px;
}

@keyframes dropdownFade {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.nav-dropdown:hover .dropdown-menu,
.dropdown-menu:hover {
    display: block;
}

/* Simple dropdown link style (used when dropdown has plain <a> children) */
.dropdown-menu > a {
    display: block;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.dropdown-menu > a:hover {
    background: var(--accent-light);
    color: var(--primary);
}

/* Panel-style dropdown (4 columns) */
.dropdown-panel {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 1rem;
    align-items: start;
}

.dropdown-column h4 {
    margin: 0 0 0.85rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.dropdown-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    background: rgba(248, 249, 251, 0.92);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.dropdown-link-icon {
    width: 2.4rem;
    height: 2.4rem;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--accent-light);
    color: var(--primary);
    font-size: 1rem;
}

.dropdown-link:hover {
    background: rgba(116, 180, 217, 0.14);
    color: var(--primary);
}

.dropdown-link:hover .dropdown-link-icon {
    background: var(--accent);
    color: #fff;
}

.dropdown-column p {
    margin: 0 0 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

.dropdown-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    border-radius: 999px;
    border: none;
    background: var(--accent);
    color: var(--text-white);
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
}

.dropdown-cta-btn:hover {
    background: var(--accent-hover);
}

/* CTA Button in Nav */
.btn-nav-cta {
    background: var(--accent);
    color: var(--primary-dark);
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition);
    border: 2px solid var(--accent);
    white-space: nowrap;
}

.btn-nav-cta:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(116, 180, 217, 0.34);
}

/* --- Buttons --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.8rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    background: var(--primary);
    color: var(--text-white);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-accent {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.8rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    background: var(--accent);
    color: var(--primary-dark);
}

.btn-accent:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(116, 180, 217, 0.34);
}

/* --- Hamburger Menu --- */
.hamburger {
    cursor: pointer;
    display: none;
    z-index: 1001;
}

.hamburger input {
    display: none;
}

.hamburger svg {
    height: 2.2em;
    width: 2.2em;
    transition: transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger .line {
    fill: none;
    stroke: var(--primary);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 3;
    transition: stroke-dasharray 600ms cubic-bezier(0.4, 0, 0.2, 1),
        stroke-dashoffset 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger .line-top-bottom {
    stroke-dasharray: 12 63;
}

.hamburger input:checked + svg {
    transform: rotate(-45deg);
}

.hamburger input:checked + svg .line-top-bottom {
    stroke-dasharray: 20 300;
    stroke-dashoffset: -32.42;
}

/* --- Scroll Reveal Animation --- */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-reveal.reveal-active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive Navbar --- */
@media (max-width: 1024px) {
    .pill-navbar {
        width: 100%;
        border-radius: 0;
        top: 0;
    }

    .nav-container {
        padding: 0 1rem;
        height: 64px;
        justify-content: space-between;
    }

    .hamburger {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 400px;
        height: 100vh;
        background: var(--bg-white);
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 5rem;
        gap: 0.5rem;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
        z-index: 1000;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links-left,
    .nav-links-right {
        flex-direction: column;
        width: 100%;
        padding: 0 1.5rem;
        margin-left: 0;
    }

    .nav-link {
        width: 100%;
        padding: 1rem;
        font-size: 1.05rem;
    }

    .btn-nav-cta {
        width: 100%;
        justify-content: center;
        margin-top: 1rem;
    }

    /* Mobile Dropdown Styling */
    .dropdown-menu {
        position: static;
        width: 100%;
        margin-top: 0.5rem;
        border-radius: 12px;
        box-shadow: none;
        border: 1px solid rgba(15, 23, 42, 0.08);
        padding: 0.5rem;
        display: block;
    }

    .dropdown-panel {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .dropdown-column h4 {
        margin-top: 1rem;
        padding-left: 0.5rem;
    }

    .dropdown-link {
        padding: 0.6rem;
    }
}

/* --- Utility Classes --- */
.text-center { text-align: center; }
.text-primary { color: var(--text-primary); }
.text-accent { color: var(--accent); }

/* --- Section Spacing --- */
.section-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}
