/* =============================================
   Modern Dark Navigation — Office Clock
   ============================================= */

/* ---- Nav bar ---- */
.oc-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: padding 0.3s ease, box-shadow 0.3s ease;
    padding: 14px 0;
}

.oc-nav.scrolled {
    padding: 8px 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.oc-nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    gap: 24px;
}

/* ---- Logo ---- */
.oc-nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.25rem;
    color: #f1f5f9;
    flex-shrink: 0;
}

.oc-nav-logo img {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.oc-nav-logo span {
    background: linear-gradient(135deg, #60a5fa, #93c5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---- Desktop Links ---- */
.oc-nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.oc-nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    background: none;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
    white-space: nowrap;
    font-family: inherit;
    line-height: 1.5;
}

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

.oc-chev {
    font-size: 0.55rem;
    transition: transform 0.25s ease;
    margin-left: 2px;
}

.oc-nav-dropdown.open .oc-chev {
    transform: rotate(180deg);
}

/* ---- Dropdown panel ---- */
.oc-nav-dropdown {
    position: relative;
}

/* Invisible bridge so mouse can travel from button to panel */
.oc-nav-dropdown-panel::before {
    content: '';
    position: absolute;
    top: -14px;
    left: 0;
    right: 0;
    height: 14px;
}

.oc-nav-dropdown-panel {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    min-width: 310px;
    background: #1e293b;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.06);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    z-index: 100;
}

.oc-nav-dropdown.open .oc-nav-dropdown-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

/* Desktop hover opens dropdown — with delay to prevent accidental close */
@media (hover: hover) and (min-width: 1025px) {
    .oc-nav-dropdown:hover .oc-nav-dropdown-panel {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0);
        transition-delay: 0s;
    }
    .oc-nav-dropdown .oc-nav-dropdown-panel {
        transition-delay: 0.15s;
    }
    .oc-nav-dropdown:hover .oc-chev {
        transform: rotate(180deg);
    }
}

/* ---- Dropdown items ---- */
.oc-dd-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: #cbd5e1;
    transition: background 0.15s ease, color 0.15s ease;
}

.oc-dd-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.oc-dd-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.oc-dd-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #f1f5f9;
    line-height: 1.3;
}

.oc-dd-item:hover .oc-dd-title {
    color: #fff;
}

.oc-dd-desc {
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.4;
    margin-top: 2px;
}

/* ---- CTA section (desktop) ---- */
.oc-nav-cta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.oc-nav-login {
    padding: 7px 18px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

.oc-nav-login:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.oc-nav-trial {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 22px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-radius: 10px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.oc-nav-trial:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.5);
    color: #fff;
}

/* ---- Hamburger ---- */
.oc-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
    z-index: 1060;
}

.oc-hamburger:hover {
    background: rgba(255, 255, 255, 0.08);
}

.oc-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #cbd5e1;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.2s ease;
}

.oc-hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.oc-hamburger.open span:nth-child(2) {
    opacity: 0;
}

.oc-hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile-only CTA hidden on desktop */
.oc-nav-mobile-cta {
    display: none;
}

/* =============================================
   Mobile / Tablet ( <= 1024px )
   ============================================= */
@media (max-width: 1024px) {
    .oc-hamburger {
        display: flex;
    }

    .oc-nav-cta {
        display: none;
    }

    .oc-nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 320px;
        max-width: 85vw;
        height: 100dvh;
        background: #0f172a;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 80px 24px 32px;
        box-shadow: -8px 0 40px rgba(0, 0, 0, 0.4);
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        z-index: 1055;
    }

    .oc-nav-links.open {
        transform: translateX(0);
    }

    /* Overlay */
    body.nav-open::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1049;
        animation: oc-fade-in 0.3s ease;
    }

    @keyframes oc-fade-in {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    /* Mobile link styles */
    .oc-nav-link {
        padding: 14px 0;
        font-size: 1rem;
        border-radius: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        width: 100%;
        color: #cbd5e1;
    }

    .oc-nav-link:hover,
    .oc-nav-link.active {
        background: none;
        color: #fff;
    }

    /* Dropdown on mobile */
    .oc-nav-dropdown {
        width: 100%;
    }

    .oc-nav-dropdown-btn {
        width: 100%;
        justify-content: space-between;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .oc-nav-dropdown-panel {
        position: static;
        transform: none;
        min-width: 0;
        width: 100%;
        box-shadow: none;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.04);
        padding: 4px 0;
        max-height: 0;
        overflow: hidden;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transition: max-height 0.35s ease, padding 0.35s ease;
    }

    .oc-nav-dropdown-panel::before {
        display: none;
    }

    .oc-nav-dropdown.open .oc-nav-dropdown-panel {
        max-height: 500px;
        padding: 8px 0;
        transform: none;
    }

    .oc-dd-item {
        padding: 10px 16px;
    }

    /* Show mobile CTA */
    .oc-nav-mobile-cta {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: auto;
        padding-top: 24px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .oc-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 12px 24px;
        font-size: 0.95rem;
        font-weight: 600;
        border-radius: 10px;
        text-decoration: none;
        transition: all 0.2s;
    }

    .oc-btn-outline {
        color: #cbd5e1;
        border: 1px solid rgba(255, 255, 255, 0.15);
        background: transparent;
    }

    .oc-btn-outline:hover {
        border-color: #60a5fa;
        color: #fff;
    }

    .oc-btn-primary {
        color: #fff;
        background: linear-gradient(135deg, #2563eb, #1d4ed8);
        border: none;
        box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    }

    .oc-btn-primary:hover {
        box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
    }

    .w-100 {
        width: 100%;
    }
}

/* ---- Small phones ---- */
@media (max-width: 480px) {
    .oc-nav-links {
        width: 100vw;
        max-width: 100vw;
    }
}
