/* Modern Hexagonal Honeycomb Department Dashboard Styles */
.dept-dashboard-wrapper {
    --dept-accent: #1a237e;
    --dept-accent-soft: rgba(26, 35, 126, 0.14);
    --dept-accent-glow: rgba(26, 35, 126, 0.34);
    --hex-clip: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    --hex-center-clip: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    min-height: calc(100vh - 84px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 12px 16px;
    position: relative;
    overflow: hidden;
    font-family: 'Cairo', sans-serif;
}

/* Subtle ambient background orbs */
.dept-dashboard-wrapper::before,
.dept-dashboard-wrapper::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(75px);
}

.dept-dashboard-wrapper::before {
    width: 440px;
    height: 440px;
    top: -110px;
    right: -90px;
    background: var(--dept-accent-soft);
}

.dept-dashboard-wrapper::after {
    width: 360px;
    height: 360px;
    bottom: -90px;
    left: -70px;
    background: rgba(251, 192, 45, 0.15);
}

/* Honeycomb Canvas */
.honeycomb-menu {
    position: relative;
    width: var(--board-w, 720px);
    height: var(--board-h, 720px);
    z-index: 1;
}

/* Decorative Big Hexagon Guide connecting icons */
.hex-perimeter-guide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Positioned Hex Slot (handles drop-shadow along hex silhouette) */
.hex-slot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--hex-w, 134px);
    height: var(--hex-h, 154px);
    transform: translate(calc(-50% + var(--tx, 0px)), calc(-50% + var(--ty, 0px)));
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.1));
    transition: transform 0.32s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.32s ease;
    z-index: 5;
}

.hex-slot:hover,
.hex-slot:focus-within {
    transform: translate(calc(-50% + var(--tx, 0px)), calc(-50% + var(--ty, 0px))) scale(1.12);
    filter: drop-shadow(0 16px 28px var(--dept-accent-glow));
    z-index: 30;
}

/* Center Department Hexagon */
.hex-center-slot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--hex-w, 134px);
    height: var(--hex-h, 154px);
    transform: translate(-50%, -50%) scale(1.06);
    filter: drop-shadow(0 14px 28px var(--dept-accent-glow));
    z-index: 20;
    animation: hexHubPulse 4.5s ease-in-out infinite alternate;
}

.hex-center-hub {
    width: 100%;
    height: 100%;
    clip-path: var(--hex-center-clip);
    background: linear-gradient(145deg, var(--dept-accent), color-mix(in srgb, var(--dept-accent) 72%, #000000));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 14px 16px;
    color: #ffffff;
    position: relative;
}

.hex-center-hub::before {
    content: '';
    position: absolute;
    inset: 3px;
    clip-path: var(--hex-center-clip);
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.18) 0%, transparent 60%);
    pointer-events: none;
}

.hex-center-emoji {
    font-size: 2.35rem;
    line-height: 1;
    margin-bottom: 6px;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.25));
}

.hex-center-title {
    margin: 0;
    font-size: 0.96rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
}

.hex-center-subtitle {
    margin-top: 4px;
    font-size: 0.74rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@keyframes hexHubPulse {
    0% {
        filter: drop-shadow(0 12px 22px var(--dept-accent-soft));
    }
    100% {
        filter: drop-shadow(0 18px 34px var(--dept-accent-glow));
    }
}

/* Outer Hex Border Shell */
.hex-shell {
    width: 100%;
    height: 100%;
    clip-path: var(--hex-clip);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), color-mix(in srgb, var(--dept-accent) 28%, rgba(255, 255, 255, 0.7)));
    padding: 2.5px;
    display: flex;
    text-decoration: none;
    transition: background 0.3s ease;
}

.hex-slot:hover .hex-shell,
.hex-slot:focus-within .hex-shell {
    background: linear-gradient(145deg, var(--dept-accent), color-mix(in srgb, var(--dept-accent) 65%, #ffffff));
}

/* Inner Hex Surface */
.circle-item {
    width: 100%;
    height: 100%;
    clip-path: var(--hex-clip);
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.96), rgba(242, 245, 251, 0.88));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 14px 10px;
    text-decoration: none;
    position: relative;
    transition: background 0.3s ease;
}

.hex-slot:hover .circle-item,
.hex-slot:focus-within .circle-item {
    background: linear-gradient(155deg, #ffffff, color-mix(in srgb, var(--dept-accent) 8%, #ffffff));
}

.hex-shell:focus-visible {
    outline: none;
}

.circle-emoji {
    font-size: var(--emoji-size, 2.05rem);
    line-height: 1;
    margin-bottom: 6px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.hex-slot:hover .circle-emoji,
.hex-slot:focus-within .circle-emoji {
    transform: scale(1.16) rotate(-4deg);
}

.circle-title {
    font-size: var(--title-size, 0.8rem);
    font-weight: 700;
    color: var(--dept-accent);
    text-align: center;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    max-width: 100%;
}

/* Responsive fallback for tablets & mobile screens */
@media (max-width: 860px) {
    .honeycomb-menu {
        width: 100% !important;
        height: auto !important;
        max-width: 640px;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 14px;
        padding-top: 8px;
    }

    .hex-perimeter-guide {
        display: none;
    }

    .hex-center-slot {
        position: static;
        transform: none;
        width: 100%;
        height: auto;
        animation: none;
        margin-bottom: 10px;
    }

    .hex-center-hub {
        clip-path: none;
        border-radius: 20px;
        flex-direction: row;
        gap: 12px;
        padding: 14px 20px;
    }

    .hex-center-hub::before {
        clip-path: none;
        border-radius: 18px;
    }

    .hex-center-emoji {
        font-size: 2rem;
        margin-bottom: 0;
    }

    .hex-center-count {
        margin-top: 0;
        margin-right: auto;
    }

    .hex-slot {
        position: relative;
        top: auto;
        left: auto;
        transform: none !important;
        width: 126px;
        height: 144px;
    }

    .hex-slot:hover,
    .hex-slot:focus-within {
        transform: translateY(-4px) scale(1.05) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hex-center-slot {
        animation: none;
    }

    .hex-slot,
    .circle-emoji {
        transition: none;
    }
}
