/**
 * Expertise Page - Growth OS Diagram Stylesheet
 * Contains the cyber circuit grid, node layout positioning, hub ripples, and responsive orbits.
 */

body {
    background-image: url('../images/vertical-line-bg-small-medium-gray.svg') !important;
    background-position: center top;
}
.text-box-icon {
    font-size: 56px;
    color: var(--accent-primary);
}
.service-icon {
    font-size: 48px;
    color: var(--accent-primary);
    line-height: 1;
}
.progress {
    overflow: visible !important;
}
.progress-bar {
    overflow: visible !important;
    position: relative;
}
.progress-bar-percent {
    position: absolute;
    right: 0;
    top: -38px;
}
html[data-theme="light"] .progress-bar-percent {
    background-color: #1c1d1f !important;
    color: #ffffff !important;
}

#growth-os-blueprint-section {
    background: transparent;
    padding: 20px 0 80px 0;
}
.text-gradient-indigo-cyan {
    background: linear-gradient(135deg, var(--accent-primary, #6366f1) 0%, var(--accent-secondary, #06b6d4) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 14px;
    letter-spacing: 2px;
}

/* Base Diagram Container */
.growth-os-diagram-container {
    position: relative;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hub styling */
.growth-os-hub {
    border-radius: 50%;
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.hub-inner {
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bg-secondary, #151d30) 0%, var(--bg-primary, #0b0f19) 100%);
    border: 3px solid var(--accent-primary);
    box-shadow: 0 0 35px rgba(99, 102, 241, 0.4);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 2;
    padding: 15px;
    transition: all 0.4s ease;
}
html[data-theme="light"] .hub-inner {
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.15);
}
.hub-title {
    font-size: 24px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #ffffff 30%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
    filter: drop-shadow(0 2px 8px rgba(99, 102, 241, 0.3));
    transition: all 0.3s ease;
}
html[data-theme="light"] .hub-title {
    background: linear-gradient(135deg, #1a1a1a 30%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hub-subtitle {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 3px;
    margin-top: -4px;
    text-transform: uppercase;
    opacity: 0.8;
    transition: all 0.3s ease;
}
html[data-theme="light"] .hub-subtitle {
    color: #475569;
    opacity: 1;
}
.hub-ripple, .hub-ripple-2 {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid var(--accent-primary);
    opacity: 0;
    animation: ripple 3s infinite linear;
    pointer-events: none;
}
.hub-ripple-2 {
    animation-delay: 1.5s;
}
@keyframes ripple {
    0% { transform: scale(0.9); opacity: 0.8; }
    100% { transform: scale(1.4); opacity: 0; }
}

.growth-os-hub.pulse-click {
    animation: hub-pulse-click-anim 0.5s ease-out;
}
@keyframes hub-pulse-click-anim {
    0% { transform: translate(-50%, -50%) scale(1.06); }
    50% { transform: translate(-50%, -50%) scale(0.92); }
    100% { transform: translate(-50%, -50%) scale(1.06); }
}

/* Nodes styling */
.growth-os-node {
    background: var(--bg-secondary, #151d30);
    border: 1px solid var(--border-color, rgba(255,255,255,0.08));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 5;
}
html[data-theme="light"] .growth-os-node {
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-color: rgba(0,0,0,0.08);
}
.node-icon {
    font-size: 24px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
html[data-theme="light"] .node-icon {
    color: #334155;
}
.node-label {
    position: absolute;
    bottom: -28px;
    white-space: nowrap;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    transition: all 0.3s ease;
}
html[data-theme="light"] .node-label {
    color: #334155;
}

.growth-os-node:hover, .growth-os-node.active {
    border-color: var(--accent-secondary);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%) !important;
}
.growth-os-node:hover .node-icon, .growth-os-node.active .node-icon {
    color: #ffffff !important;
    transform: scale(1.1);
}
.growth-os-node:hover .node-label, .growth-os-node.active .node-label {
    color: var(--accent-secondary);
    transform: translateY(2px);
}
html[data-theme="light"] .growth-os-node:hover .node-label, 
html[data-theme="light"] .growth-os-node.active .node-label {
    color: #4f46e5;
}

/* Desktop Cyber Circuit Grid Layout */
@media (min-width: 768px) {
    .growth-os-diagram-container {
        width: 100%;
        max-width: 1250px;
        aspect-ratio: 2.2 / 1;
        margin: 0 auto;
        background: transparent;
    }
    
    /* SVG absolute overlays */
    .growth-os-connections-desktop {
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        pointer-events: none;
        z-index: 1;
    }

    .circuit-path {
        fill: none;
        stroke: var(--circuit-stroke, rgba(255,255,255,0.06));
        stroke-width: 1.5;
        transition: d 0.5s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.3s ease;
    }
    html[data-theme="light"] .circuit-path {
        --circuit-stroke: rgba(0, 0, 0, 0.06);
    }

    .pulse-path {
        fill: none;
        stroke: url(#circuit-gradient-desktop);
        stroke-width: 2.5;
        opacity: 0;
        transition: d 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
        stroke-dasharray: 40 800;
        stroke-dashoffset: 0;
    }

    .pulse-path.active {
        opacity: 1;
        filter: url(#cyber-glow);
        animation: circuit-pulse-anim 3s infinite linear;
    }

    @keyframes circuit-pulse-anim {
        0% { stroke-dashoffset: 840; }
        100% { stroke-dashoffset: 0; }
    }

    /* Normal State coordinates */
    .path-email { d: path("M 550,250 L 370,250 L 220,100 L 200,100"); }
    .path-telegram { d: path("M 550,250 L 350,250 L 160,250 L 140,250"); }
    .path-ai { d: path("M 550,250 L 370,250 L 220,400 L 200,400"); }
    .path-website { d: path("M 550,250 L 730,250 L 880,100 L 900,100"); }
    .path-analytics { d: path("M 550,250 L 750,250 L 900,250 L 960,190"); }
    .path-crm { d: path("M 550,250 L 750,250 L 900,250 L 960,310"); }
    .path-seo { d: path("M 550,250 L 730,250 L 880,400 L 900,400"); }

    /* Expanded State coordinates */
    .expanded .path-email { d: path("M 550,250 L 310,250 L 120,60 L 120,60"); }
    .expanded .path-telegram { d: path("M 550,250 L 300,250 L 100,250 L 60,250"); }
    .expanded .path-ai { d: path("M 550,250 L 310,250 L 120,440 L 120,440"); }
    .expanded .path-website { d: path("M 550,250 L 790,250 L 980,60 L 980,60"); }
    .expanded .path-analytics { d: path("M 550,250 L 750,250 L 960,250 L 1040,170"); }
    .expanded .path-crm { d: path("M 550,250 L 750,250 L 960,250 L 1040,330"); }
    .expanded .path-seo { d: path("M 550,250 L 790,250 L 980,440 L 980,440"); }

    /* Hub positioning */
    .growth-os-hub {
        width: 180px;
        height: 180px;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }
    .hub-inner {
        width: 160px;
        height: 160px;
    }
    .expanded .growth-os-hub {
        transform: translate(-50%, -50%) scale(1.08);
    }

    /* Node Positioning & Transitions */
    .growth-os-node {
        position: absolute;
        width: 80px;
        height: 80px;
        border-radius: 50%;
        transform: translate(-50%, -50%);
        transition: left 0.5s cubic-bezier(0.16, 1, 0.3, 1), top 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    }

    /* Normal State Left/Top */
    .growth-os-node.email { left: 18.18%; top: 20%; }
    .growth-os-node.telegram { left: 12.73%; top: 50%; }
    .growth-os-node.ai { left: 18.18%; top: 80%; }
    .growth-os-node.website { left: 81.82%; top: 20%; }
    .growth-os-node.analytics { left: 87.27%; top: 38%; }
    .growth-os-node.crm { left: 87.27%; top: 62%; }
    .growth-os-node.seo { left: 81.82%; top: 80%; }

    /* Expanded State Left/Top */
    .expanded .growth-os-node.email { left: 10.91%; top: 12%; }
    .expanded .growth-os-node.telegram { left: 5.45%; top: 50%; }
    .expanded .growth-os-node.ai { left: 10.91%; top: 88%; }
    .expanded .growth-os-node.website { left: 89.09%; top: 12%; }
    .expanded .growth-os-node.analytics { left: 94.55%; top: 34%; }
    .expanded .growth-os-node.crm { left: 94.55%; top: 66%; }
    .expanded .growth-os-node.seo { left: 89.09%; top: 88%; }
}

/* Mobile & Tablet Circular Orbit Layout */
@media (max-width: 767px) {
    .growth-os-diagram-container {
        width: 420px;
        height: 420px;
        margin: 30px auto;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .growth-os-connections-mobile {
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        pointer-events: none;
        z-index: 1;
    }

    .orbit-path-line {
        transition: r 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .ray-line {
        transition: x2 0.5s cubic-bezier(0.16, 1, 0.3, 1), y2 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, stroke-width 0.3s ease;
    }

    .growth-os-hub {
        width: 140px;
        height: 140px;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }
    .hub-inner {
        width: 120px;
        height: 120px;
        padding: 10px;
    }
    .hub-title {
        font-size: 16px;
    }
    .hub-subtitle {
        font-size: 9px;
    }

    .growth-os-node {
        position: absolute;
        width: 55px;
        height: 55px;
        border-radius: 50%;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%) rotate(var(--angle)) translate(160px) rotate(calc(-1 * var(--angle)));
        transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .node-icon {
        font-size: 18px;
    }
    .node-label {
        display: none; /* Hide labels on mobile to avoid layout breaking */
    }

    /* Expanded State on Mobile */
    .expanded .growth-os-node {
        transform: translate(-50%, -50%) rotate(var(--angle)) translate(190px) rotate(calc(-1 * var(--angle)));
    }
    .expanded .orbit-path-line {
        r: 190px;
    }
    .expanded .ray-line.ray-website { x2: 540; y2: 350; }
    .expanded .ray-line.ray-crm { x2: 468; y2: 499; }
    .expanded .ray-line.ray-seo { x2: 308; y2: 535; }
    .expanded .ray-line.ray-ai { x2: 179; y2: 432; }
    .expanded .ray-line.ray-telegram { x2: 179; y2: 268; }
    .expanded .ray-line.ray-email { x2: 308; y2: 165; }
    .expanded .ray-line.ray-analytics { x2: 468; y2: 201; }
}

@media (max-width: 576px) {
    .growth-os-diagram-container {
        width: 320px;
        height: 320px;
        margin: 20px auto;
    }
    .growth-os-hub {
        width: 115px;
        height: 115px;
    }
    .hub-inner {
        width: 100px;
        height: 100px;
        padding: 5px;
    }
    .hub-title {
        font-size: 13px;
    }
    .hub-subtitle {
        font-size: 8px;
        letter-spacing: 1.5px;
    }
    .growth-os-node {
        width: 46px;
        height: 46px;
        transform: translate(-50%, -50%) rotate(var(--angle)) translate(120px) rotate(calc(-1 * var(--angle)));
    }
    
    /* Expanded State on Small Mobile */
    .expanded .growth-os-node {
        transform: translate(-50%, -50%) rotate(var(--angle)) translate(145px) rotate(calc(-1 * var(--angle)));
    }
    .expanded .orbit-path-line {
        r: 145px;
    }
    .expanded .ray-line.ray-website { x2: 495; y2: 350; }
    .expanded .ray-line.ray-crm { x2: 440; y2: 463; }
    .expanded .ray-line.ray-seo { x2: 318; y2: 491; }
    .expanded .ray-line.ray-ai { x2: 219; y2: 413; }
    .expanded .ray-line.ray-telegram { x2: 219; y2: 287; }
    .expanded .ray-line.ray-email { x2: 318; y2: 209; }
    .expanded .ray-line.ray-analytics { x2: 440; y2: 237; }
}

/* Bottom Grid & Details Panel Styling */
.growth-os-detail-panel {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 30px 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
html[data-theme="light"] .growth-os-detail-panel {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
}
.detail-icon-wrap {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}
.active-detail-icon {
    font-size: 28px;
    color: var(--accent-primary);
}
.active-detail-title {
    background: linear-gradient(135deg, var(--text-primary, #fff) 30%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
html[data-theme="light"] .active-detail-title {
    background: none;
    -webkit-text-fill-color: initial;
    color: #1a1a1a;
}

.growth-os-grid-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    height: 100%;
}
html[data-theme="light"] .growth-os-grid-item {
    background: rgba(0, 0, 0, 0.01);
    border-color: rgba(0, 0, 0, 0.05);
}
.growth-os-grid-item:hover, .growth-os-grid-item.active {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-5px);
}
html[data-theme="light"] .growth-os-grid-item:hover, html[data-theme="light"] .growth-os-grid-item.active {
    background: rgba(99, 102, 241, 0.05);
    border-color: rgba(99, 102, 241, 0.2);
}
.grid-icon {
    font-size: 20px;
    color: var(--text-muted);
    transition: color 0.3s ease;
}
html[data-theme="light"] .grid-icon {
    color: #64748b;
}
.growth-os-grid-item.active .grid-icon {
    color: var(--accent-primary) !important;
}
html[data-theme="light"] .growth-os-grid-item.active .grid-icon {
    color: #4f46e5 !important;
}
.grid-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.3s ease;
}
html[data-theme="light"] .grid-title {
    color: #64748b;
}
.growth-os-grid-item.active .grid-title {
    color: var(--text-primary, #fff) !important;
}
html[data-theme="light"] .growth-os-grid-item.active .grid-title {
    color: #1a1a1a !important;
}
