/* ========================================
   DEPARTMENT SELECTION PAGE STYLES
   Modern, centered design with icon cards
   ======================================== */

.departmentSelection {
    min-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.departmentHeader {
    text-align: center;
    margin-bottom: 48px;
    max-width: 600px;
}

.departmentTitle {
    font-size: 42px;
    font-weight: 950;
    letter-spacing: -0.5px;
    color: #eaf0ff;
    margin: 0 0 12px 0;
    background: linear-gradient(135deg, #eaf0ff 0%, #a3b9e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.departmentSubtitle {
    font-size: 18px;
    font-weight: 600;
    color: var(--muted);
    margin: 0;
    letter-spacing: 0.2px;
}

.departmentGrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
}

@media (min-width: 768px) {
    .departmentGrid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 28px;
    }
}

@media (min-width: 1200px) {
    .departmentGrid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 32px;
    }
}

/* Department Card */
.departmentCard {
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.departmentCard:hover {
    transform: translateY(-8px);
}

.departmentCard:active {
    transform: translateY(-4px);
}

.departmentCardInner {
    background: linear-gradient(180deg, rgba(15, 26, 46, 0.95), rgba(12, 22, 40, 0.92));
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 20px;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    min-height: 240px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25),
                0 0 0 1px rgba(59, 130, 246, 0.1) inset;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.departmentCard:hover .departmentCardInner {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 12px 36px rgba(59, 130, 246, 0.25),
                0 0 0 1px rgba(59, 130, 246, 0.3) inset,
                0 0 40px rgba(59, 130, 246, 0.15) inset;
    background: linear-gradient(180deg, rgba(20, 31, 51, 0.98), rgba(15, 25, 43, 0.95));
}

/* Animated gradient background on hover */
.departmentCardInner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.15), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.departmentCard:hover .departmentCardInner::before {
    opacity: 1;
}

/* Icon Container */
.departmentIcon {
    width: 96px;
    height: 96px;
    border-radius: 20px;
    background: rgba(59, 130, 246, 0.12);
    border: 2px solid rgba(59, 130, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.departmentIcon::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(147, 197, 253, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.departmentCard:hover .departmentIcon {
    border-color: rgba(59, 130, 246, 0.6);
    background: rgba(59, 130, 246, 0.18);
    transform: scale(1.05);
}

.departmentCard:hover .departmentIcon::before {
    opacity: 1;
}

.departmentIcon img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    /*filter: brightness(0) invert(1);*/
    opacity: 0.9;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.departmentCard:hover .departmentIcon img {
    opacity: 1;
    transform: scale(1.1);
    filter: brightness(0) invert(1) drop-shadow(0 0 8px rgba(59, 130, 246, 0.6));
}

/* Department Name */
.departmentName {
    font-size: 20px;
    font-weight: 900;
    color: #eaf0ff;
    text-align: center;
    letter-spacing: 0.3px;
    line-height: 1.3;
    transition: all 0.3s ease;
    position: relative;
}

.departmentCard:hover .departmentName {
    color: #ffffff;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

/* Empty State */
.emptyState {
    text-align: center;
    padding: 60px 20px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(15, 26, 46, 0.85), rgba(12, 22, 40, 0.75));
    border: 1px dashed rgba(59, 130, 246, 0.3);
    max-width: 500px;
    margin: 0 auto;
}

.emptyState p {
    font-size: 18px;
    font-weight: 700;
    color: var(--muted);
    margin: 0;
    line-height: 1.6;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .departmentSelection {
        padding: 24px 12px;
        min-height: calc(100vh - 80px);
    }

    .departmentTitle {
        font-size: 28px;
        margin: 0 0 8px 0;
    }

    .departmentSubtitle {
        font-size: 14px;
    }

    .departmentHeader {
        margin-bottom: 24px;
    }

    .departmentGrid {
        gap: 16px;
        padding: 0 12px;
    }

    .departmentCardInner {
        padding: 24px 16px;
        min-height: 180px;
        gap: 14px;
        border-radius: 16px;
    }

    .departmentIcon {
        width: 72px;
        height: 72px;
        border-radius: 16px;
    }

    .departmentIcon img {
        width: 42px;
        height: 42px;
    }

    .departmentName {
        font-size: 16px;
    }

    .emptyState {
        padding: 40px 16px;
        border-radius: 16px;
    }

    .emptyState p {
        font-size: 16px;
    }
}

/* Extra compact for smaller mobile screens */
@media (max-width: 480px) {
    .departmentSelection {
        padding: 16px 8px;
    }

    .departmentTitle {
        font-size: 24px;
        margin: 0 0 6px 0;
    }

    .departmentSubtitle {
        font-size: 13px;
    }

    .departmentHeader {
        margin-bottom: 20px;
    }

    .departmentGrid {
        gap: 12px;
        padding: 0 8px;
        grid-template-columns: 1fr;
    }

    .departmentCardInner {
        padding: 20px 14px;
        min-height: 160px;
        gap: 12px;
        border-radius: 14px;
    }

    .departmentIcon {
        width: 64px;
        height: 64px;
        border-radius: 14px;
    }

    .departmentIcon img {
        width: 38px;
        height: 38px;
    }

    .departmentName {
        font-size: 15px;
    }

    .emptyState {
        padding: 32px 14px;
    }

    .emptyState p {
        font-size: 14px;
    }
}

/* Animation on page load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.departmentCard {
    animation: fadeInUp 0.5s ease-out backwards;
}

.departmentCard:nth-child(1) { animation-delay: 0.1s; }
.departmentCard:nth-child(2) { animation-delay: 0.15s; }
.departmentCard:nth-child(3) { animation-delay: 0.2s; }
.departmentCard:nth-child(4) { animation-delay: 0.25s; }
.departmentCard:nth-child(5) { animation-delay: 0.3s; }
.departmentCard:nth-child(6) { animation-delay: 0.35s; }
.departmentCard:nth-child(7) { animation-delay: 0.4s; }
.departmentCard:nth-child(8) { animation-delay: 0.45s; }
