/* ============================================
   FOOTER STYLES - UMES
   Adapted from Knowledge Hub style
   ============================================ */

/* ============ Footer base – navy with Jali blue/green accents ============ */
.footer {
    background:
        radial-gradient(900px 420px at 88% -10%, rgba(0, 138, 54, .14), transparent 60%),
        radial-gradient(800px 420px at 4% 112%, rgba(7, 152, 213, .12), transparent 58%),
        linear-gradient(180deg, #0a1a2e 0%, #06111f 60%, #040c16 100%);
    color: #ffffff;
    padding: 84px 0 0;
    margin-top: auto;
    position: relative;
    overflow: hidden;
}
.footer-top-border {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #008036 0%, #075987 45%, #0798d5 100%);
    width: 100%;
}
.footer::before {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(159, 242, 201, .18);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* Footer Content Grid - 2 columns */
.footer-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    margin-bottom: 2.5rem;
}

/* ============================================
   BRAND SECTION WITH LOGO
   ============================================ */
.footer-brand {
    text-align: left;
}

.footer-logo-wrapper {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
    text-decoration: none;
    justify-content: flex-start;
}

.footer-logo-img {
    height: 54px;
    width: auto;
    object-fit: contain;
    filter: brightness(1.05) contrast(1.02) drop-shadow(0 2px 8px rgba(0, 0, 0, .4));
    transition: filter 0.2s ease;
}

.footer-logo-wrapper:hover .footer-logo-img {
    filter: brightness(1.08) contrast(1.02) drop-shadow(0 0 10px rgba(79, 224, 164, .45));
}

.footer-logo-text-section {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.footer-logo-title {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: #fff;
    margin: 0;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
}

.footer-logo-subtitle {
    font-size: 0.55rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #5fd3ff;
    text-transform: uppercase;
    margin-top: 2px;
    line-height: 1.3;
    text-shadow: 0 0 2px rgba(0, 0, 0, .3);
}

/* Brand description */
.footer-brand-desc {
    margin-top: 1rem;
    padding-left: 0;
}

.footer-brand-desc p {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, .78);
    line-height: 1.7;
    margin-bottom: 0.8rem;
    max-width: 460px;
}

.footer-tagline {
    font-size: 0.72rem;
    color: #9ff2c9;
    font-weight: 800;
    letter-spacing: .04em;
    display: inline-block;
    padding: 0.4rem 1rem;
    background: linear-gradient(90deg, rgba(0, 128, 54, .18), rgba(0, 74, 173, .18));
    border: 1px solid rgba(159, 242, 201, .28);
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
}

/* ============================================
   LINKS SECTION
   ============================================ */
.footer-links {
    text-align: left;
}

.footer-links h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #eaf6ff;
    margin-bottom: 1.3rem;
    position: relative;
    display: inline-block;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .3);
}

.footer-links h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 42px;
    height: 3px;
    background: linear-gradient(90deg, #008036, #0798d5);
    border-radius: 3px;
}

/* Quick Links Grid - 2 columns */
.footer-links-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem 1.5rem;
}

.footer-links-grid li {
    margin: 0;
}

.footer-links-grid a {
    color: rgba(255, 255, 255, .78);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-links-grid a i {
    width: 20px;
    font-size: 0.85rem;
    color: #38bdf8;
    transition: all 0.3s ease;
}

.footer-links-grid a:hover {
    color: #9ff2c9;
    transform: translateX(5px);
}

.footer-links-grid a:hover i {
    transform: translateX(3px);
    color: #5fd3ff;
}

/* ============================================
   FOOTER BOTTOM
   ============================================ */
.footer-bottom {
    text-align: center;
    padding: 1.4rem 0 1.5rem;
    border-top: 1px solid rgba(95, 211, 255, .14);
    background: rgba(4, 12, 22, .55);
    font-size: 0.78rem;
    color: rgba(255, 255, 255, .62);
}

.footer-bottom p {
    margin: 0;
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 25px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--umes-blue, #0b8a6e), var(--umes-sky, #38bdf8));
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    font-size: 1rem;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: linear-gradient(135deg, var(--umes-sky, #38bdf8), var(--umes-blue, #0b8a6e));
    transform: translateX(-50%) translateY(-3px);
    box-shadow: 0 6px 20px rgba(11, 138, 110, 0.4);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1023px) and (min-width: 768px) {
    .footer-container {
        padding: 0 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-brand,
    .footer-links {
        text-align: center;
    }

    .footer-logo-wrapper {
        justify-content: center;
    }

    .footer-brand-desc {
        max-width: 80%;
        margin-left: auto;
        margin-right: auto;
    }

    .footer-links h4 {
        display: block;
        text-align: center;
    }

    .footer-links h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-links-grid {
        max-width: 350px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 767px) {
    .footer {
        padding: 2.6rem 0 1rem;
    }

    .footer-container {
        padding: 0 0.75rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.8rem;
        margin-bottom: 1.5rem;
    }

    .footer-brand {
        text-align: left;
    }

    .footer-logo-wrapper {
        justify-content: flex-start;
        margin-bottom: 0.75rem;
        gap: 0.6rem;
    }

    .footer-logo-img {
        height: 42px;
    }

    .footer-logo-title {
        font-size: 1rem;
    }

    .footer-logo-subtitle {
        font-size: 0.5rem;
    }

    .footer-brand-desc {
        margin-top: 0.8rem;
        text-align: left;
    }

    .footer-brand-desc p {
        font-size: 0.75rem;
        text-align: left;
    }

    .footer-tagline {
        font-size: 0.65rem;
        padding: 0.2rem 0.6rem;
    }

    .footer-links {
        text-align: left;
    }

    .footer-links h4 {
        display: inline-block;
        text-align: left;
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .footer-links h4::after {
        left: 0;
        transform: none;
        width: 35px;
    }

    .footer-links-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
        margin-top: 0.5rem;
    }

    .footer-links-grid li {
        margin: 0;
    }

    .footer-links-grid a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        padding: 0.6rem 0.3rem;
        font-size: 0.7rem;
        text-align: center;
        background: rgba(255, 255, 255, 0.04);
        border-radius: 10px;
        transition: all 0.2s ease;
    }

    .footer-links-grid a i {
        width: auto;
        font-size: 1rem;
        margin: 0 auto;
        display: block;
    }

    .footer-links-grid a span {
        display: block;
        font-size: 0.65rem;
    }

    .footer-links-grid a:hover {
        transform: translateY(-2px);
        background: rgba(11, 138, 110, 0.12);
    }

    .footer-links-grid a:hover i {
        color: var(--umes-blue, #0b8a6e);
    }

    .footer-bottom {
        font-size: 0.65rem;
        padding-top: 1rem;
    }

    .back-to-top {
        bottom: 15px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 38px;
        height: 38px;
    }
}

@media (max-width: 480px) {
    .footer-container {
        padding: 0 0.5rem;
    }

    .footer-content {
        gap: 1.5rem;
    }

    .footer-logo-img {
        height: 35px;
    }

    .footer-logo-title {
        font-size: 0.8rem;
    }

    .footer-logo-subtitle {
        font-size: 0.45rem;
    }

    .footer-brand-desc p {
        font-size: 0.7rem;
    }

    .footer-tagline {
        font-size: 0.6rem;
        padding: 0.2rem 0.5rem;
    }

    .footer-links-grid {
        gap: 0.4rem;
    }

    .footer-links-grid a {
        padding: 0.5rem 0.2rem;
    }

    .footer-links-grid a i {
        font-size: 0.85rem;
    }

    .footer-links-grid a span {
        font-size: 0.6rem;
    }

    .footer-bottom {
        font-size: 0.55rem;
    }

    .back-to-top {
        width: 32px;
        height: 32px;
        bottom: 12px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
}

@media (max-width: 767px) and (orientation: landscape) {
    .footer {
        padding: 1.5rem 0 0.8rem;
    }

    .footer-content {
        gap: 1.2rem;
    }

    .footer-logo-img {
        height: 38px;
    }

    .footer-logo-title {
        font-size: 0.7rem;
    }

    .footer-logo-subtitle {
        font-size: 0.5rem;
    }

    .footer-links-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 0.4rem;
    }

    .footer-links-grid a {
        flex-direction: column;
        padding: 0.4rem 0.2rem;
    }

    .footer-links-grid a i {
        font-size: 0.85rem;
    }

    .footer-links-grid a span {
        font-size: 0.6rem;
    }
}

@media (min-width: 1200px) {
    .footer-logo-img {
        height: 55px;
    }

    .footer-logo-title {
        font-size: 1.0rem;
    }

    .footer-logo-subtitle {
        font-size: 0.65rem;
    }

    .footer-links-grid {
        gap: 0.8rem 2rem;
    }
}