/* ==========================================
   FOOTER CSS (Single Source Component Styles)
========================================== */
.footer-modern {
    background-color: #061b30;
    background-image: url('../images/common/foot.png'), linear-gradient(135deg, #0B2C4D 0%, #061B30 100%);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;

    color: #ffffff;
    padding: 70px 20px 30px;
    font-family: 'Inter', sans-serif;
    position: relative;
    overflow: hidden;
}

.footer-modern .container {
    max-width: 1250px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr 1.2fr;
    gap: 40px;
    margin-bottom: 50px;
}

/* BRAND COLUMN */
.footer-brand-col {
    display: flex;
    flex-direction: column;
}

.footer-logo-brand {
    text-decoration: none;
    margin-bottom: 15px;
    display: inline-block;
}

.footer-brand-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    display: block;
    letter-spacing: 0.5px;
}

.footer-brand-sub {
    font-size: 0.8rem;
    color: #e8dcc4;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: block;
    margin-top: 2px;
}

.footer-brand-desc {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin: 0 0 20px 0;
}

.footer-social-links {
    display: flex;
    gap: 10px;
    margin-top: 22px;

}

.footer-social-links a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e8dcc4;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.footer-social-links a:hover {
    background: #dca331;
    color: #0B2C4D;
    transform: translateY(-3px);
}

.footer-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: #e8dcc4;
    margin: 0 0 25px 0;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.footer-links a,
.footer-links li {
    color: #ffffff;
    font-size: 0.95rem;
    text-decoration: none;
    font-weight: 400;
    transition: 0.3s;
}

.footer-links a:hover {
    color: #e8dcc4;
    padding-left: 6px;
}

.footer-contact-icon {
    margin-right: 12px;
    color: #e8dcc4;
    width: 16px;
    text-align: center;
    margin-top: 3px;
    flex-shrink: 0;
}

/* 3D SPINNING GLOBE */
.globe-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.globe-link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.globe-link:hover {
    transform: translateY(-5px);
}

.spinning-globe {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    background-color: #f1f4f8;
    background-image: url('../images/common/globe.jpg');
    background-size: auto 100%;
    background-repeat: repeat-x;

    transform: rotate(-12deg);
    box-shadow:
        inset -20px -20px 40px rgba(0, 30, 80, 0.4),
        inset 10px 10px 30px rgba(255, 255, 255, 0.8),
        0 12px 30px rgba(0, 0, 0, 0.35);

    animation: spin-earth 12s linear infinite;
    background-blend-mode: multiply;
    background-color: #638ac4;
}

.spinning-globe::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.3) 1px, transparent 1px);
    background-size: 25px 25px;
    background-position: center center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    pointer-events: none;
}

.spinning-globe::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.4) 0%, transparent 60%);
    pointer-events: none;
    z-index: 2;
}

@keyframes spin-earth {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.globe-text {
    margin-top: 15px;
    color: #e8dcc4;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    transition: color 0.3s ease;
}

.globe-link:hover .globe-text {
    color: #ffffff;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 25px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 0.5fr 1fr 1fr 1.2fr;
    }
}

@media (max-width: 991px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .empty-left-space {
        display: none;
    }
}


/* =========================================================
   MOBILE FOOTER REFINEMENT
   Keeps the existing footer content/functionality unchanged.
   ========================================================= */

@media (max-width: 768px) {
    .footer-modern {
        padding: 55px 16px 22px;
        background-image:
            linear-gradient(180deg,
                rgba(6, 27, 48, 0.78) 0%,
                rgba(6, 27, 48, 0.94) 48%,
                #061b30 100%),
            url('../images/common/foot.png');
        background-size: 100% 100%, auto 300px;
        background-position: center center, 27% top;
        background-repeat: no-repeat, no-repeat;
    }

    .footer-modern .container {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 34px 24px;
        margin-bottom: 38px;
    }

    /* Keep the school introduction full-width */
    .footer-brand-col {
        grid-column: 1 / -1;
        max-width: 620px;
    }

    .footer-logo-brand {
        margin-bottom: 12px;
    }

    .footer-brand-title {
        font-size: 1.3rem;
    }

    .footer-brand-sub {
        font-size: 0.72rem;
        letter-spacing: 1.6px;
    }

    .footer-brand-desc {
        max-width: 600px;
        font-size: 0.86rem;
        line-height: 1.65;
        margin-bottom: 17px;
    }

    .footer-social-links {
        gap: 9px;
    }

    .footer-social-links a {
        width: 35px;
        height: 35px;
        flex: 0 0 35px;
    }

    .footer-title {
        font-size: 1.15rem;
        margin-bottom: 17px;
    }

    .footer-links li {
        margin-bottom: 11px;
        font-size: 0.88rem;
        line-height: 1.45;
        align-items: flex-start;
    }

    .footer-links a {
        font-size: 0.88rem;
        line-height: 1.45;
    }

    .footer-contact-icon {
        margin-right: 9px;
        width: 15px;
        min-width: 15px;
        margin-top: 3px;
    }

    /* Location becomes a clean centered block on phones */
    .globe-container {
        grid-column: 1 / -1;
        align-items: center;
        text-align: center;
    }

    .globe-container .footer-title {
        margin-bottom: 14px;
    }

    .globe-link {
        align-items: center;
    }

    .spinning-globe {
        width: 145px;
        height: 145px;
    }

    .globe-text {
        margin-top: 12px;
        font-size: 0.86rem;
        justify-content: center;
    }

    .footer-bottom {
        padding-top: 19px;
        font-size: 0.76rem;
        line-height: 1.5;
    }
}

/* Smaller phones */
@media (max-width: 480px) {
    .footer-modern {
        padding: 48px 14px 18px;
        background-size: 100% 100%, auto 240px;
        background-position: center center, 25% top;
    }

    .footer-grid {
        gap: 29px 18px;
    }

    .footer-brand-title {
        font-size: 1.18rem;
    }

    .footer-brand-sub {
        font-size: 0.66rem;
        letter-spacing: 1.35px;
    }

    .footer-brand-desc {
        font-size: 0.82rem;
        line-height: 1.6;
    }

    .footer-title {
        font-size: 1.05rem;
        margin-bottom: 14px;
    }

    .footer-links li,
    .footer-links a {
        font-size: 0.82rem;
    }

    .footer-links li {
        margin-bottom: 10px;
    }

    .footer-contact-icon {
        margin-right: 7px;
        width: 14px;
        min-width: 14px;
    }

    .spinning-globe {
        width: 130px;
        height: 130px;
    }

    .footer-bottom {
        font-size: 0.72rem;
    }
}

/* Very narrow phones: stack the two text columns */
@media (max-width: 360px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-brand-col,
    .globe-container {
        grid-column: auto;
    }

    .footer-brand-col {
        max-width: none;
    }

    .globe-container {
        align-items: center;
    }
}

/* =========================================================
   DESKTOP FOOTER TEXT VISIBILITY
   The background image must sit BELOW the readability overlay.
   ========================================================= */

@media (min-width: 769px) {
    .footer-modern {
        background-image:
            linear-gradient(90deg,
                rgba(6, 27, 48, 0.90) 0%,
                rgba(6, 27, 48, 0.72) 24%,
                rgba(6, 27, 48, 0.40) 43%,
                rgba(6, 27, 48, 0.82) 62%,
                rgba(6, 27, 48, 0.96) 100%),
            url('../images/common/foot.png');
        background-size: 100% 100%, cover;
        background-position: center center, center center;
        background-repeat: no-repeat, no-repeat;
    }

    .footer-brand-col {
        position: relative;
        z-index: 3;
    }

    .footer-brand-title,
    .footer-brand-sub,
    .footer-brand-desc,
    .footer-social-links {
        position: relative;
        z-index: 4;
    }

    .footer-brand-title {
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
    }

    .footer-brand-sub {
        text-shadow: 0 1px 5px rgba(0, 0, 0, 0.85);
    }

    .footer-brand-desc {
        max-width: 390px;
        color: rgba(255, 255, 255, 0.96);
        text-shadow: 0 2px 5px rgba(0, 0, 0, 0.90);
    }

    .footer-social-links a {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    }
}

/* Preserve the stronger mobile readability treatment */
@media (max-width: 768px) {
    .footer-modern {
        background-image:
            linear-gradient(180deg,
                rgba(6, 27, 48, 0.78) 0%,
                rgba(6, 27, 48, 0.94) 48%,
                #061b30 100%),
            url('../images/common/foot.png');
    }
}