/* SipNava v10.0 - Minimalist Telecom & VoIP Stylesheet */

:root {
    --bg-main: #F6F9FC;
    --bg-main-gradient: radial-gradient(circle at 50% 0%, rgba(219, 234, 254, 0.45) 0%, transparent 65%), #F6F9FC;
    --bg-surface: rgba(255, 255, 255, 0.94);
    --bg-elevated: #F1F5F9;
    --bg-sidebar: #FFFFFF;
    --text-primary: #0F2342;
    --text-secondary: #334E68;
    --text-muted: #627D98;
    --border-color: rgba(203, 213, 225, 0.65);
    --accent-blue: #0284C7;
    --accent-cyan: #00B4D8;
    --accent-orange: #F97316;
    --card-shadow: 0 4px 20px -4px rgba(15, 35, 66, 0.04);
    --hero-bg: linear-gradient(135deg, #FFFFFF 0%, #F0F7FF 100%);
    --hero-border: rgba(186, 230, 253, 0.8);
}

html.dark {
    /* Soft medium-navy dark theme */
    --bg-main: #112240;
    --bg-main-gradient: radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.10) 0%, transparent 65%), #112240;
    --bg-surface: rgba(23, 42, 74, 0.90);
    --bg-elevated: rgba(30, 55, 95, 0.75);
    --bg-sidebar: #0F1E38;
    --text-primary: #F0F6FC;
    --text-secondary: #CBD5E1;
    --text-muted: #8899AC;
    --border-color: rgba(56, 189, 248, 0.16);
    --accent-blue: #38BDF8;
    --accent-cyan: #00F0DF;
    --accent-orange: #FB923C;
    --card-shadow: 0 8px 28px -6px rgba(2, 12, 27, 0.35);
    --hero-bg: linear-gradient(135deg, #162C52 0%, #112240 100%);
    --hero-border: rgba(56, 189, 248, 0.22);
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    background-image: var(--bg-main-gradient);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: 'Vazirmatn', sans-serif;
    line-height: 1.75;
    transition: background-color 0.25s ease, color 0.25s ease;
    margin: 0;
    overflow-x: hidden;
}

/* BiDi isolation for technical terms */
bdi, .ltr-token {
    direction: ltr;
    unicode-bidi: isolate;
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.84em;
    padding: 0.05rem 0.38rem;
    border-radius: 0.375rem;
    background-color: var(--bg-elevated);
    color: var(--accent-blue);
    vertical-align: baseline;
}

html.dark bdi, html.dark .ltr-token {
    color: #7DD3FC;
}

.ltr-raw {
    direction: ltr;
    unicode-bidi: isolate;
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
}

/* Unified minimal card surfaces */
.theme-surface {
    background-color: var(--bg-surface);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.theme-sidebar {
    background-color: var(--bg-sidebar);
    border-color: var(--border-color);
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.theme-elevated {
    background-color: var(--bg-elevated);
    border: 1px solid transparent;
}

.theme-text-main { color: var(--text-primary); }
.theme-text-sub { color: var(--text-secondary); }
.theme-text-muted { color: var(--text-muted); }
.theme-border { border-color: var(--border-color); }

.theme-input {
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.theme-input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

/* Brand two-tone typography */
.brand-sip {
    color: #07255B;
    font-weight: 800;
}

html.dark .brand-sip {
    color: #FFFFFF;
}

/* Gradient text styling for Nava brand suffix */
.brand-nava {
    background: linear-gradient(90deg, #0095FF, #00F0DF);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-weight: 800;
}

/* Sidebar navigation items */
.cf-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.65rem 0.85rem;
    border-radius: 0.75rem;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.15s ease;
    cursor: pointer;
    text-decoration: none;
}

.cf-nav-item:hover {
    background-color: var(--bg-elevated);
    color: var(--accent-blue);
}

.cf-nav-item.active {
    background-color: rgba(2, 132, 199, 0.10);
    color: var(--accent-blue);
    font-weight: 800;
    border-right: 3px solid var(--accent-blue);
}

html.dark .cf-nav-item.active {
    background-color: rgba(56, 189, 248, 0.15);
    color: #38BDF8;
}

.cf-submenu {
    margin-right: 1.1rem;
    padding-right: 0.75rem;
    border-right: 1px solid var(--border-color);
    margin-top: 0.25rem;
    margin-bottom: 0.35rem;
}

/* Sidebar submenu link base style */
.cf-sub-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.65rem;
    border-radius: 0.5rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.15s ease;
    text-decoration: none;
}

.cf-sub-link:hover {
    color: var(--accent-blue);
    background-color: var(--bg-elevated);
}

/* Active submenu link highlight and bold state */
.cf-sub-link.active {
    color: var(--accent-blue);
    background-color: rgba(2, 132, 199, 0.10);
    font-weight: 800;
    border-right: 2px solid var(--accent-blue);
}

html.dark .cf-sub-link.active {
    color: #38BDF8;
    background-color: rgba(56, 189, 248, 0.15);
    border-right-color: #38BDF8;
}

.plus-badge {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 0.8rem;
    background-color: var(--bg-elevated);
    color: var(--text-muted);
    transition: all 0.15s ease;
}

/* Minimal hero banner box */
.sipnava-hero-box {
    background: var(--hero-bg);
    border: 1px solid var(--hero-border);
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
}

.parallax-layer {
    transition: transform 0.15s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform;
    pointer-events: none;
}

.hero-slide {
    display: none;
    animation: heroFadeIn 0.4s ease-out;
}

.hero-slide.active {
    display: grid;
}

@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-slide-title {
    font-size: clamp(1.2rem, 2.0vw, 1.65rem);
    line-height: 1.6;
    font-weight: 800;
    margin: 0;
}

.hero-slide-desc {
    font-size: clamp(0.82rem, 1.0vw, 0.92rem);
    line-height: 1.85;
    margin: 0;
}

/* 4-Dot pulse navigation indicator */
.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 9999px;
    background-color: var(--text-muted);
    opacity: 0.35;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-dot:hover {
    opacity: 0.7;
    transform: scale(1.15);
}

.hero-dot.active {
    width: 12px;
    height: 12px;
    opacity: 1;
    background-color: var(--accent-cyan);
    box-shadow: 0 0 0 0 rgba(0, 240, 223, 0.7);
    animation: dotHeartbeat 1.4s infinite cubic-bezier(0.25, 0.8, 0.25, 1);
}

html:not(.dark) .hero-dot.active {
    background-color: var(--accent-blue);
    box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.6);
}

@keyframes dotHeartbeat {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 180, 216, 0.65);
    }
    25% {
        transform: scale(1.32);
    }
    45% {
        transform: scale(1.08);
        box-shadow: 0 0 0 7px rgba(0, 180, 216, 0);
    }
    65% {
        transform: scale(1.26);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 180, 216, 0);
    }
}

@keyframes pulseWave {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 1; }
}

.wave-playing {
    animation: pulseWave 0.85s infinite ease-in-out;
    color: var(--accent-orange) !important;
}

@keyframes eqBounce {
    0%, 100% { height: 22%; }
    50% { height: 90%; }
}

.eq-bar {
    width: 7px;
    border-radius: 9999px;
    background: linear-gradient(to top, #0256D2, #00F0DF);
    animation: eqBounce 1.2s infinite ease-in-out;
}

@keyframes packetMove {
    0% { transform: translateX(0); opacity: 0.2; }
    50% { opacity: 1; }
    100% { transform: translateX(-95px); opacity: 0.2; }
}

.packet-dot {
    animation: packetMove 2.2s infinite linear;
}

/* Floating contact speed-dial widget */
.floating-widget-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(2, 132, 199, 0.32);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
}

.floating-widget-btn:hover {
    transform: scale(1.08);
}

.speed-dial-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.15s ease;
}

.speed-dial-item:hover {
    transform: translateY(-2px);
}
