/* 
 * ORGANOGRAMA JUNIK - CLEAN WHITE PREMIUM v7 (RESTORED)
 * Top-down tree, full-bleed photo cards
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ===================== CONTAINER ===================== */
.jo-organogram-container {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
    background: #f8fafc;
    padding: 60px 0 100px;
    min-height: 700px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ===================== WRAPPER ===================== */
.jo-tree-wrapper {
    width: 100%;
    overflow: auto;
    cursor: grab;
    padding: 40px;
    display: flex;
    transition: transform 0.2s ease-out;
    transform-origin: top center;
    position: relative;
    z-index: 1;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.jo-tree-wrapper::-webkit-scrollbar { height: 5px; width: 5px; }
.jo-tree-wrapper::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
.jo-tree-wrapper:active { cursor: grabbing; }

/* ===================== TREE BASE ===================== */
.jo-tree {
    display: inline-block;
    white-space: nowrap;
    margin: 0 auto;
    padding-bottom: 30px;
}

.jo-tree ul {
    padding-top: 44px;
    position: relative;
    display: flex;
    justify-content: center;
    padding-left: 0;
    margin: 0;
    list-style: none;
}

.jo-tree li {
    float: left;
    text-align: center;
    list-style-type: none;
    position: relative;
    padding: 44px 12px 0 12px;
    transition: all 0.4s ease;
}

/* ===================== CONNECTOR LINES ===================== */
.jo-tree li::before,
.jo-tree li::after {
    content: '';
    position: absolute;
    top: 0;
    right: 50%;
    border-top: 1.5px solid #cbd5e1;
    width: 50%;
    height: 44px;
}

.jo-tree li::after {
    right: auto;
    left: 50%;
    border-left: 1.5px solid #cbd5e1;
}

.jo-tree li:only-child::after,
.jo-tree li:only-child::before { display: none; }
.jo-tree li:only-child { padding-top: 0; }

.jo-tree li:first-child::before,
.jo-tree li:last-child::after { border: 0 none; }

.jo-tree li:last-child::before {
    border-right: 1.5px solid #cbd5e1;
    border-radius: 0 8px 0 0;
}

.jo-tree li:first-child::after {
    border-radius: 8px 0 0 0;
}

.jo-tree ul ul::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    border-left: 1.5px solid #cbd5e1;
    width: 0;
    height: 44px;
}

/* ===================== VERTICAL LIST ===================== */
.jo-tree ul.jo-vertical-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 44px;
    gap: 12px;
}

.jo-tree ul.jo-vertical-list > li {
    padding: 0 !important;
    display: block;
    float: none;
}

.jo-tree ul.jo-vertical-list > li::before,
.jo-tree ul.jo-vertical-list > li::after { display: none !important; }

.jo-tree ul.jo-vertical-list > li:not(:first-child)::before {
    display: block !important;
    content: '';
    position: absolute;
    top: -12px; left: 50%;
    border-left: 1.5px solid #cbd5e1;
    border-top: none !important;
    width: 0;
    height: 12px;
}

/* ===================== NODE BASE ===================== */
.jo-node {
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 130px;
    max-width: 165px;
    position: relative;
    z-index: 2;
    text-align: center;
    white-space: normal;
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    padding: 0;
    transition:
        transform 0.35s cubic-bezier(0.34,1.56,0.64,1),
        box-shadow 0.35s ease,
        border-color 0.35s ease;
    box-shadow:
        0 2px 8px rgba(0,0,0,0.05),
        0 1px 3px rgba(0,0,0,0.04);
}

.jo-node:hover {
    transform: translateY(-7px) scale(1.025);
    box-shadow:
        0 16px 40px rgba(0,0,0,0.1),
        0 4px 12px rgba(99,102,241,0.08);
    border-color: #c7d2fe;
    z-index: 10;
}

/* ===================== IMAGE WRAPPER ===================== */
.jo-node-image-wrapper {
    display: block;
    width: 100%;
    position: relative;
    margin-bottom: 0;
    flex-shrink: 0;
}

.jo-node-image-wrapper.has-modal { cursor: pointer; }

.jo-node-photo {
    width: 100% !important;
    height: 120px !important;
    border-radius: 0 !important;
    object-fit: cover !important;
    object-position: top center !important;
    display: block;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
}

/* Thin bottom gradient Ã¢â‚¬â€ does NOT cover face */
.jo-node-image-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 22px;
    background: linear-gradient(to top, rgba(255,255,255,1) 0%, transparent 100%);
    pointer-events: none;
}

/* Department placeholder */
.jo-node-photo-placeholder {
    width: 100% !important;
    height: 82px !important;
    border-radius: 0 !important;
    background: linear-gradient(135deg, #f1f5f9 0%, #e8edf5 100%) !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
    border: none !important;
    margin: 0 !important;
}

.jo-node-photo-placeholder svg {
    width: 34px; height: 34px;
    fill: #94a3b8;
}

.jo-node-photo-placeholder.jo-department-icon {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%) !important;
}

.jo-node-photo-placeholder.jo-department-icon svg {
    fill: #818cf8;
}

/* Hover overlay */
.jo-hover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(79,70,229,0.55), rgba(139,92,246,0.55));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.jo-node-image-wrapper.has-modal:hover .jo-hover-overlay { opacity: 1; }

.jo-plus-icon {
    color: white;
    font-size: 28px;
    font-weight: 200;
    line-height: 1;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* ===================== TEXT AREA ===================== */
.jo-node-name {
    font-size: 12.5px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.1px;
    line-height: 1.2;
    padding: 9px 12px 2px;
    width: 100%;
    box-sizing: border-box;
}

.jo-node-title {
    font-size: 9.5px;
    font-weight: 600;
    color: var(--jo-primary-color, #6366f1);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    line-height: 1.35;
    padding: 0 12px 12px;
    width: 100%;
    box-sizing: border-box;
}

/* ===================== INLINE ADDITIONAL POSITIONS ===================== */
.jo-node-inline-additional-positions {
    width: 100%;
    padding: 4px 10px 8px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-top: 1px solid #f1f5f9;
}

.jo-node-inline-ap-title {
    font-size: 9px;
    color: #94a3b8;
    font-weight: 500;
    line-height: 1.3;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 1px 0;
}

/* ===================== EXTRA INFO ===================== */
.jo-node-extra-info { display: none; }

/* ===================== ZOOM CONTROLS ===================== */
.jo-controls {
    position: absolute;
    bottom: 32px; right: 32px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(8px);
    padding: 8px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
    z-index: 10;
}

.jo-controls button {
    background: transparent;
    border: none;
    color: #64748b;
    width: 40px; height: 40px;
    border-radius: 12px;
    font-size: 18px;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 130px;
    max-width: 165px;
    position: relative;
    z-index: 2;
    text-align: center;
    white-space: normal;
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    padding: 0;
    transition:
        transform 0.35s cubic-bezier(0.34,1.56,0.64,1),
        box-shadow 0.35s ease,
        border-color 0.35s ease;
    box-shadow:
        0 2px 8px rgba(0,0,0,0.05),
        0 1px 3px rgba(0,0,0,0.04);
}

.jo-node:hover {
    transform: translateY(-7px) scale(1.025);
    box-shadow:
        0 16px 40px rgba(0,0,0,0.1),
        0 4px 12px rgba(99,102,241,0.08);
    border-color: #c7d2fe;
    z-index: 10;
}

/* ===================== IMAGE WRAPPER ===================== */
.jo-node-image-wrapper {
    display: block;
    width: 100%;
    position: relative;
    margin-bottom: 0;
    flex-shrink: 0;
}

.jo-node-image-wrapper.has-modal { cursor: pointer; }

.jo-node-photo {
    width: 100% !important;
    height: 120px !important;
    border-radius: 0 !important;
    object-fit: cover !important;
    object-position: top center !important;
    display: block;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
}

/* Thin bottom gradient Ã¢â‚¬â€ does NOT cover face */
.jo-node-image-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 22px;
    background: linear-gradient(to top, rgba(255,255,255,1) 0%, transparent 100%);
    pointer-events: none;
}

/* Department placeholder */
.jo-node-photo-placeholder {
    width: 100% !important;
    height: 82px !important;
    border-radius: 0 !important;
    background: linear-gradient(135deg, #f1f5f9 0%, #e8edf5 100%) !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
    border: none !important;
    margin: 0 !important;
}

.jo-node-photo-placeholder svg {
    width: 34px; height: 34px;
    fill: #94a3b8;
}

.jo-node-photo-placeholder.jo-department-icon {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%) !important;
}

.jo-node-photo-placeholder.jo-department-icon svg {
    fill: #818cf8;
}

/* Hover overlay */
.jo-hover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(79,70,229,0.55), rgba(139,92,246,0.55));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.jo-node-image-wrapper.has-modal:hover .jo-hover-overlay { opacity: 1; }

.jo-plus-icon {
    color: white;
    font-size: 28px;
    font-weight: 200;
    line-height: 1;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* ===================== TEXT AREA ===================== */
.jo-node-name {
    font-size: 12.5px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.1px;
    line-height: 1.2;
    padding: 9px 12px 2px;
    width: 100%;
    box-sizing: border-box;
}

.jo-node-title {
    font-size: 9.5px;
    font-weight: 600;
    color: var(--jo-primary-color, #6366f1);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    line-height: 1.35;
    padding: 0 12px 12px;
    width: 100%;
    box-sizing: border-box;
}

/* ===================== INLINE ADDITIONAL POSITIONS ===================== */
.jo-node-inline-additional-positions {
    width: 100%;
    padding: 4px 10px 8px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-top: 1px solid #f1f5f9;
}

.jo-node-inline-ap-title {
    font-size: 9px;
    color: #94a3b8;
    font-weight: 500;
    line-height: 1.3;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 1px 0;
}

/* ===================== EXTRA INFO ===================== */
.jo-node-extra-info { display: none; }

/* ===================== ZOOM CONTROLS ===================== */
.jo-controls {
    position: absolute;
    bottom: 32px; right: 32px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(8px);
    padding: 8px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
    z-index: 10;
}

.jo-controls button {
    background: transparent;
    border: none;
    color: #64748b;
    width: 40px; height: 40px;
    border-radius: 12px;
    font-size: 18px;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.jo-controls button:hover {
    background: #f1f5f9;
    color: #1e293b;
}

/* ===================== MODAL OVERLAY ===================== */
.jo-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.8); /* Very dark, moody backdrop */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 99998;
    display: none;
}

/* ===================== MODAL ===================== */
.jo-modal {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: 
        radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.15) 0%, transparent 500px),
        radial-gradient(circle at 0% 100%, rgba(99, 102, 241, 0.12) 0%, transparent 400px),
        linear-gradient(145deg, #0f172a 0%, #1e293b 100%); /* Orbs integrated into background! */
    width: 95%;
    max-width: 1050px;
    border-radius: 24px;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.05),
        0 40px 100px rgba(0,0,0,0.5),
        0 10px 30px rgba(0,0,0,0.3) inset;
    z-index: 99999;
    display: none;
    overflow: hidden;
    text-align: left;
    max-height: 94vh;
    overflow-y: auto;
}

/* Close button */
.jo-modal-close {
    position: absolute;
    top: 20px; right: 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
    width: 38px; height: 38px;
    border-radius: 50%;
    font-size: 18px;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.jo-modal-close:hover {
    background: rgba(239, 68, 68, 0.1); /* Subtle red tint on hover */
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
    transform: rotate(90deg) scale(1.1);
}

/* ===================== LAYOUT ===================== */
.jo-modal-content {
    display: block; /* Switched to block so text naturally pushes height */
    padding: 40px 50px;
    min-height: 420px; 
    position: relative;
    z-index: 10;
}

/* ===== LEFT â€” Content Panel ===== */
.jo-modal-right {
    width: 55%; /* Text takes up 55% of width */
    position: relative;
    z-index: 2;
    /* The height of this text column now 100% controls the modal height! */
}

/* ===== RIGHT â€” Photo panel (Transparent) ===== */
.jo-modal-left {
    position: absolute;
    bottom: 0;
    right: 30px; /* Slight padding from right edge */
    width: 45%; 
    height: 100%; /* Matches the exact height driven by the text */
    z-index: 5;
    pointer-events: none; /* Prevents invisible parts of photo from blocking clicks */
}

.jo-modal-left img {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: bottom center; /* Pin the flat bottom edge to the bottom! */
    pointer-events: auto; /* Re-enable clicks on the actual image */
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.5));
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.jo-modal:hover .jo-modal-left img {
    transform: scale(1.03) translateY(-2px);
}

/* Hide wrappers/placeholders */
.jo-modal-left::before, .jo-modal-left::after { display: none; }
.jo-modal-left .jo-node-photo-placeholder { display: none; }

/* ===================== TYPOGRAPHY ===================== */
.jo-modal-right h2 {
    font-size: 40px; /* Reduced from 48px */
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -1px;
    line-height: 1.1;
    margin: 0 0 8px; /* Reduced margin */
    font-family: 'Inter', sans-serif;
}

.jo-modal-right h4 {
    font-size: 16px; /* Reduced from 18px */
    font-weight: 600;
    color: #38bdf8; /* Vibrant light blue for contrast */
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0 0 24px; /* Reduced margin */
    padding: 0;
    border: none;
    line-height: 1.4;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    gap: 12px;
}

.jo-modal-right h4::before {
    content: '';
    width: 24px; height: 3px;
    background: #38bdf8;
    border-radius: 2px;
}

.jo-modal-bio {
    font-size: 15px;
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 20px;
    max-height: 100px;
    overflow-y: auto;
}

/* ===================== CONTACTS & CARDS (GLASSMORPHISM) ===================== */
.jo-modal-contacts {
    display: flex;
    flex-direction: column;
    gap: 10px; /* Reduced gap */
    margin-bottom: 10px;
}

.jo-modal-contacts div,
.jo-add-pos-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px; /* Slightly less rounded */
    padding: 12px 16px; /* Reduced padding vertically to make cards thinner */
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.jo-modal-contacts div:hover,
.jo-add-pos-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Subtle glow inside card on hover */
.jo-modal-contacts div::after,
.jo-add-pos-card::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    transform: skewX(-20deg);
    transition: 0.5s;
    pointer-events: none;
}
.jo-modal-contacts div:hover::after,
.jo-add-pos-card:hover::after {
    left: 150%;
}

/* Icons */
.jo-modal-contacts .dashicons {
    color: #ffffff; /* User requested white icons */
    font-size: 18px; /* Reduced */
    width: 38px; /* Reduced */
    height: 38px; /* Reduced */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1); /* Changed to subtle white box to match white icon */
    border-radius: 10px;
    padding: 0;
    font-weight: normal;
}

.jo-modal-contacts a,
#jo-modal-phone {
    color: #f8fafc;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.5;
}

.jo-modal-contacts a:hover { color: #38bdf8; text-decoration: underline; }

/* Socials */
.jo-modal-socials { display: none; }

/* ===================== ADDITIONAL POSITIONS ===================== */
.jo-modal-additional-positions {
    margin-top: 20px; /* Reduced */
    padding-top: 20px; /* Reduced */
    border-top: 1px solid rgba(255,255,255,0.08);
}

.jo-add-pos-title {
    margin: 0 0 12px; /* Reduced */
    font-size: 12px;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.jo-add-pos-list { display: flex; flex-direction: column; gap: 10px; /* Reduced */ }

/* Custom icon for additional positions */
.jo-add-pos-card::before {
    content: "\f338"; /* dashicon briefcase/portfolio */
    font-family: dashicons;
    color: #fbbf24; /* soft yellow/gold accent */
    font-size: 18px;
    width: 38px; /* Reduced */
    height: 38px; /* Reduced */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(251, 191, 36, 0.1);
    border-radius: 10px;
    padding: 0;
    font-weight: normal;
}

.jo-add-pos-content { flex: 1; }
.jo-add-pos-header { margin-bottom: 2px; }

.jo-add-pos-header h5 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #f8fafc;
}

.jo-add-pos-meta {
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    line-height: 1.4;
}

.jo-add-pos-meta strong {
    color: #cbd5e1;
    font-weight: 500;
    margin-right: 2px;
}

.jo-add-pos-tasks { display: none; }
.jo-add-pos-doc { display: none; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 640px) {
    .jo-modal { max-width: 95%; border-radius: 20px; }
    .jo-modal-content { flex-direction: column; padding: 30px 20px; min-height: auto; }
    
    /* Photo moves to top on mobile */
    .jo-modal-left { order: 1; flex: none; width: 100%; height: 300px; align-items: flex-end; margin-bottom: 20px; }
    .jo-modal-left img { max-height: 100%; object-position: bottom; }
    
    .jo-modal-right { order: 2; flex: none; width: 100%; padding: 0; }
    .jo-modal-right h2 { font-size: 36px; text-align: center; }
    .jo-modal-right h4 { font-size: 16px; justify-content: center; margin-bottom: 30px; text-align: center; }
    .jo-modal-right h4::before { display: none; }
    
    .jo-node { min-width: 110px; max-width: 145px; }
    .jo-node-photo { height: 100px !important; }
}

/* ===== OVERRIDE THEME + ELEMENTOR RESET CSS ===== */
/* hello-elementor/reset.css sets: img { height: auto } - we must defeat it */
/* Note: Image optimizers wrap img in <picture class="jo-node-photo">, so target both! */
html body .jo-organogram-container .jo-node .jo-node-image-wrapper picture,
html body .jo-organogram-container .jo-node .jo-node-image-wrapper .jo-node-photo,
html body .jo-organogram-container .jo-node .jo-node-image-wrapper img {
    width: 100% !important;
    height: 145px !important;
    max-height: 145px !important;
    min-height: 145px !important;
    object-fit: cover !important; /* Changed back to cover to make it wider and zoomed in */
    object-position: top center !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    flex-shrink: 0 !important;
}

html body .jo-organogram-container .jo-node .jo-node-image-wrapper {
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%) !important;
    overflow: hidden !important; /* Prevents the image from spilling out into the text */
}

html body .jo-hover-overlay {
    display: none !important;
}

html body .jo-organogram-container .jo-node {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease !important;
    border-color: #0073a8 !important; /* Card Border */
}

html body .jo-organogram-container .jo-node:hover {
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: 0 15px 30px rgba(0, 115, 168, 0.15) !important;
    border-color: #38bdf8 !important;
}

html body .jo-organogram-container .jo-node .jo-node-image-wrapper::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 30px !important;
    background: linear-gradient(to top, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%) !important;
    pointer-events: none !important;
    display: block !important;
    z-index: 2 !important;
}

html body .jo-organogram-container .jo-node .jo-node-name {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    padding: 2px 12px 1px !important; /* Tighter vertical padding */
    margin: 0 !important;
    line-height: 1.1 !important;
}

html body .jo-organogram-container .jo-node .jo-node-title {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    padding: 1px 12px 6px !important; /* Tighter vertical padding */
    line-height: 1.2 !important;
    text-transform: uppercase !important;
    color: #0073a8 !important;
}

/* --- Detyra Shtesë Section --- */
html body .jo-organogram-container .jo-node .jo-node-inline-additional-positions {
    border-top: 1px solid #f1f5f9 !important;
    padding: 6px 12px 10px !important; /* Reduced vertical padding */
    text-align: left !important;
    background: #fafafa !important;
}

html body .jo-organogram-container .jo-node .jo-node-inline-ap-heading {
    font-size: 9px !important;
    font-weight: 600 !important;
    color: #94a3b8 !important;
    text-transform: uppercase !important;
    margin-bottom: 4px !important; /* Reduced margin */
    letter-spacing: 0.5px !important;
    line-height: 1 !important;
}

html body .jo-organogram-container .jo-node .jo-node-inline-ap-title {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #334155 !important;
    margin-bottom: 2px !important; /* Tighter spacing between items */
    padding-left: 6px !important;
    border-left: 2px solid #0073a8 !important;
    line-height: 1.2 !important;
}
