/* =====================================
   DYNAMIC WEBSITE FOOTER
===================================== */

.footer {
    background: #111111;
    color: #ffffff;
    margin-top: 80px;
    width: 100%;
    overflow: hidden;
}

.footer-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 65px 40px 55px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 45px;
    box-sizing: border-box;
}

.footer-column {
    min-width: 0;
}

.footer-logo {
    width: 140px;
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 20px;
    object-fit: contain;
}

.footer-column h3 {
    color: #ffffff;
    font-size: 21px;
    line-height: 1.3;
    margin: 0 0 20px;
    font-weight: 700;
}

.footer-column p {
    color: #d5d5d5;
    line-height: 1.8;
    margin: 0 0 12px;
    font-size: 15px;
    overflow-wrap: anywhere;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column li {
    margin-bottom: 11px;
}

.footer-column a {
    color: #d5d5d5;
    text-decoration: none;
    transition: color .25s ease, padding-left .25s ease;
    overflow-wrap: anywhere;
}

.footer-column a:hover {
    color: #B8902D;
    padding-left: 3px;
}

/* Contact links should remain clean */
.footer-column p a {
    padding-left: 0;
}

.footer-column p a:hover {
    padding-left: 0;
}

/* =====================================
   SOCIAL MEDIA
===================================== */

.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 50%;
    color: #ffffff;
    padding: 0;
    transition:
        background .25s ease,
        color .25s ease,
        border-color .25s ease,
        transform .25s ease;
}

.footer-social a:hover {
    background: #B8902D;
    border-color: #B8902D;
    color: #ffffff;
    padding-left: 0;
    transform: translateY(-2px);
}

/* =====================================
   COPYRIGHT
===================================== */

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.12);
    text-align: center;
    padding: 20px 25px;
    color: #bfbfbf;
    font-size: 14px;
    line-height: 1.7;
    box-sizing: border-box;
}

.footer-bottom span {
    display: inline-block;
    margin-left: 8px;
}

/* =====================================
   TABLET
===================================== */

@media (max-width: 1024px) {
    .footer-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 40px 30px;
        padding: 55px 30px 45px;
    }
}

/* =====================================
   MOBILE
===================================== */

@media (max-width: 768px) {
    .footer {
        margin-top: 55px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 35px;
        padding: 45px 22px 35px;
        text-align: center;
    }

    .footer-logo {
        width: 125px;
        margin: 0 auto 18px;
    }

    .footer-column h3 {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .footer-column p {
        font-size: 14px;
        line-height: 1.75;
    }

    .footer-social {
        justify-content: center;
        margin-top: 18px;
    }

    .footer-column a:hover {
        padding-left: 0;
    }

    .footer-bottom {
        padding: 18px 15px;
        font-size: 13px;
    }

    .footer-bottom span {
        display: block;
        margin: 5px 0 0;
    }
}

/* =====================================
   VERY SMALL PHONES
===================================== */

@media (max-width: 400px) {
    .footer-container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .footer-social a {
        width: 38px;
        height: 38px;
    }
}

/* =========================================================
   RTSE STUDENT FOOTER FIX
   Scoped only to RTSE student pages
   ========================================================= */

body:has(.rtse-student-header-only) .footer {
    width: 100%;
    margin-top: 45px;
}

body:has(.rtse-student-header-only) .footer-container {
    width: 100%;
    max-width: 1200px;
    box-sizing: border-box;
}

body:has(.rtse-student-header-only) .footer-column {
    min-width: 0;
}

body:has(.rtse-student-header-only) .footer-column p,
body:has(.rtse-student-header-only) .footer-column a,
body:has(.rtse-student-header-only) .footer-column li {
    overflow-wrap: anywhere;
    word-break: normal;
}

@media (max-width: 768px) {

    body:has(.rtse-student-header-only) .footer {
        margin-top: 35px;
    }

    body:has(.rtse-student-header-only) .footer-container {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 35px 20px 30px;
        gap: 30px;
        text-align: center;
        box-sizing: border-box;
    }

    body:has(.rtse-student-header-only) .footer-column {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
    }

    body:has(.rtse-student-header-only) .footer-logo {
        width: 105px;
        max-width: 100%;
        margin: 0 auto 15px;
    }

    body:has(.rtse-student-header-only) .footer-column h3 {
        font-size: 19px;
        margin: 0 0 13px;
    }

    body:has(.rtse-student-header-only) .footer-column p {
        font-size: 13px;
        line-height: 1.7;
        margin-bottom: 9px;
    }

    body:has(.rtse-student-header-only) .footer-column ul {
        margin: 0;
    }

    body:has(.rtse-student-header-only) .footer-column li {
        margin-bottom: 8px;
    }

    body:has(.rtse-student-header-only) .footer-social {
        justify-content: center;
        margin-top: 16px;
    }

    body:has(.rtse-student-header-only) .footer-bottom {
        padding: 17px 14px;
        font-size: 12px;
        line-height: 1.6;
    }

    body:has(.rtse-student-header-only) .footer-bottom span {
        display: block;
        margin: 5px 0 0;
    }
}
