    body {
        font-family: Arial, sans-serif;
        margin: 0;
        background-image: url("background.png");
        background-size: cover;
        background-position: center;
        background-attachment: fixed;
    }

    .department-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 50px 30px;
        padding: 20px 80px 60px;
    }

    .department-card {
        text-align: center;
        background: white;
        padding: 20px;
        border-radius: 12px;
        border: 1px solid #eee;
        opacity: 0;
        transform: translateY(40px);
        transition: 
            opacity 0.6s ease,
            transform 0.6s ease,
            box-shadow 0.25s ease;
    }

    .department-card.show {
        opacity: 1;
        transform: translateY(0);
    }

    .department-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
    }

    .department-card { cursor: pointer; }
    .department-card:focus-visible { outline: 3px solid #2c7be5; outline-offset: 3px; }


    .department-card img {
        width: 90px;
        height: 90px;
        object-fit: contain;
        margin-bottom: 10px;
        transition: transform 0.25s ease;
    }

    .department-card:hover img {
        transform: scale(1.1);
    }

    .department-card h3 {
        font-size: 14px;
        font-weight: bold;
        margin-bottom: 12px;
        line-height: 1.3;
    }

    .label {
        font-weight: bold;
        font-size: 12px;
        margin-top: 8px;
    }

    .department-card p {
        font-size: 12px;
        margin: 2px 0;
    }

    .view-details { display: inline-block; margin-top: 14px; color: #1a5ec8; font-size: 12px; font-weight: bold; }

    .card-details-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, 0.55); }
    .card-details-content { position: relative; width: min(100%, 560px); max-height: min(80vh, 680px); overflow-y: auto; padding: 32px; border-radius: 14px; background: #fff; color: #222; text-align: left; }
    .details-close { position: absolute; top: 10px; right: 14px; border: 0; background: transparent; color: #444; font-size: 30px; line-height: 1; cursor: pointer; }
    .details-logo { display: block; width: 88px; height: 88px; margin: 0 auto 12px; object-fit: contain; }
    .card-details-content h2, .card-details-content h3 { text-align: center; }
    .details-list { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 24px 0; }
    .details-list dt { font-weight: bold; }
    .details-list dd { margin: 0; overflow-wrap: anywhere; }
    .details-description { white-space: pre-wrap; line-height: 1.55; overflow-wrap: anywhere; }

    .logout-btn {
        background: #e74c3c;
        color: white;
        padding: 8px 15px;
        border-radius: 5px;
        text-decoration: none;
    }

    .logout-btn:hover {
        background: #c0392b;
    }

    @media (max-width: 1000px) {
        .department-grid {
            grid-template-columns: repeat(2, 1fr);
        }
    }

    @media (max-width: 600px) {
        .department-grid {
            grid-template-columns: 1fr;
            padding: 20px;
        }
    }
