/* ==========================================
   DEPARTMENT FOOTER
========================================== */

.department-footer {
    position: relative;
    width: 100%;
    min-height: 260px;
    padding: 28px 5.4% 30px;

    background: #162f6a;
    color: #ffffff;

    box-sizing: border-box;
}

.footer-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 40px;
    row-gap: 18px;

    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
}

/* ==========================================
   USEFUL LINKS
========================================== */

.footer-main-content {
    min-width: 0;
}

.footer-heading {
    margin: 0 0 18px;

    color: #ffffff;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.3;
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 25px;

    max-width: 1000px;
}

.footer-links-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    width: fit-content;
    color: #ffffff;

    font-size: 20px;
    line-height: 1.4;
    text-decoration: none;

    transition: color 0.2s ease;
}

.footer-link i {
    font-size: 12px;
    flex-shrink: 0;
}

.footer-link:hover {
    color: #d2dfff;
    text-decoration: underline;
}

/* ==========================================
   HOSTING INFORMATION
========================================== */

.footer-hosting-text {
    max-width: 1100px;
    margin: 18px 0 0;

    color: #ffffff;
    font-size: 20px;
    line-height: 1.65;
}

/* ==========================================
   GOVERNMENT LOGOS
========================================== */

.footer-logo-section {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 10px;

    padding-top: 28px;
}

.footer-logo-card {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 80px;
    height: 65px;
    padding: 8px;

    background: #ffffff;
    border-radius: 5px;

    box-sizing: border-box;
}

.footer-logo-card img {
    display: block;

    max-width: 100%;
    max-height: 100%;

    width: auto;
    height: auto;

    object-fit: contain;
}

.footer-nic-card {
    width: 168px;
}

/* ==========================================
   LAST UPDATED
========================================== */

.footer-last-updated {
    grid-column: 2;
    align-self: end;
    justify-self: end;

    margin-top: 5px;
    padding-right: 0;

    color: #ffffff;
    font-size: 18px;
    line-height: 1.5;
    text-align: right;
}

/* ==========================================
   BACK TO TOP BUTTON
========================================== */

.footer-back-to-top {
    position: absolute;
    right: 22px;
    bottom: 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;
    padding: 0;

    background: #162f6a;
    border: none;
    border-radius: 50%;

    color: #ffffff;
    font-size: 17px;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);

    cursor: pointer;
    transition: background-color 0.2s ease,
                transform 0.2s ease;
}

.footer-back-to-top:hover {
    background: #d2dfff;
    transform: translateY(-2px);
}

.footer-back-to-top:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

/* ==========================================
   TABLETS
========================================== */

@media (max-width: 992px) {

    .department-footer {
        padding: 28px 4% 35px;
    }

    .footer-container {
        grid-template-columns: minmax(0, 1fr);
        gap: 25px;
    }

    .footer-links-grid {
        max-width: 100%;
        gap: 20px;
    }

    .footer-link {
        font-size: 17px;
    }

    .footer-hosting-text {
        font-size: 16px;
    }

    .footer-logo-section {
        justify-content: flex-start;
        padding-top: 0;
    }

    .footer-last-updated {
        grid-column: 1;
        justify-self: start;
        text-align: left;
    }

    .footer-back-to-top {
        right: 18px;
        bottom: 18px;
    }
}

/* ==========================================
   MOBILE
========================================== */

@media (max-width: 576px) {

    .department-footer {
        padding: 25px 18px 75px;
    }

    .footer-heading {
        font-size: 18px;
        margin-bottom: 16px;
    }

    .footer-links-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px 15px;
    }

    .footer-links-column {
        gap: 13px;
    }

    .footer-link {
        font-size: 15px;
    }

    .footer-hosting-text {
        margin-top: 22px;
        font-size: 14px;
        line-height: 1.7;
    }

    .footer-logo-section {
        gap: 8px;
    }

    .footer-logo-card {
        width: 65px;
        height: 55px;
    }

    .footer-nic-card {
        width: 135px;
    }

    .footer-last-updated {
        font-size: 14px;
    }

    .footer-back-to-top {
        right: 16px;
        bottom: 16px;
        width: 38px;
        height: 38px;
    }
}