/*
 * ============================================================
 * M.H College
 * File: 50-footer.css
 * Purpose:
 * Footer layout, footer links, social icons and WhatsApp button
 * ============================================================
 */

/*
 * ============================================================
 * Site footer
 * ============================================================
 */

.site-footer {
    padding: 62px 0 20px;

    background: #060606;

    border-top: 1px solid var(--line);
}

/*
 * Footer columns
 */

.footer-grid {
    display: grid;

    grid-template-columns:
        1.4fr
        .7fr
        1fr;

    gap: 55px;
}

/*
 * Footer brand
 */

.footer-brand p {
    max-width: 450px;

    color: var(--muted);

    font-size: .95rem;
}

/*
 * Footer navigation
 */

.footer-links {
    display: grid;
    align-content: start;

    gap: 4px;
}

.footer-links h2 {
    margin: 0 0 8px;

    color: var(--gold-light);

    font-size: 1.05rem;
}

.footer-links a {
    display: inline-flex;
    align-items: center;

    width: fit-content;
    max-width: 100%;
    min-height: 44px;

    padding-block: 5px;

    color: #d6ccbc;

    font-size: .95rem;
    line-height: 1.55;

    transition:
        color .28s ease,
        transform .28s var(--ease-luxury);
}

.footer-links a:hover {
    color: var(--gold-light);

    transform: translateX(-2px);
}

.lang-he .footer-links a:hover {
    transform: translateX(2px);
}

/*
 * Footer contact
 */

.footer-contact {
    display: grid;
    align-content: start;

    gap: 4px;
}

.footer-contact > a {
    display: inline-flex;
    align-items: center;

    width: fit-content;
    max-width: 100%;
    min-height: 44px;

    gap: 10px;
    padding-block: 5px;

    color: #ddd4c7;

    font-size: .95rem;
    line-height: 1.55;

    transition:
        color .28s ease,
        transform .28s var(--ease-luxury);
}

.footer-contact > a:hover {
    color: var(--gold-light);

    transform: translateY(-1px);
}

.footer-contact > a:first-child span {
    display: inline-block;

    direction: ltr;
    unicode-bidi: isolate;
}

.footer-contact .icon {
    color: var(--gold);

    transition:
        color .28s ease,
        transform .28s var(--ease-luxury);
}

.footer-contact > a:hover .icon {
    color: var(--gold-light);

    transform: scale(1.08);
}

/*
 * Social links
 */

.social-links {
    display: flex;
    flex-wrap: wrap;

    gap: 12px;

    margin-top: 10px;
}

.social-links a {
    display: grid;
    place-items: center;

    width: 44px;
    height: 44px;

    flex: 0 0 44px;

    color: var(--gold-light);
    background: rgba(217, 173, 87, .025);

    border: 1px solid var(--line);
    border-radius: 50%;

    font-weight: 900;

    transition:
        transform .32s var(--ease-luxury),
        color .28s ease,
        border-color .28s ease,
        background .28s ease,
        box-shadow .32s ease;
}

.social-links a .icon {
    width: 19px;
    height: 19px;
}

.social-links a:hover {
    transform:
        translateY(-3px)
        scale(1.04);

    color: #17110a;

    background: linear-gradient(
        135deg,
        var(--gold-light),
        var(--gold)
    );

    border-color: var(--gold-light);

    box-shadow:
        0 12px 28px rgba(217, 173, 87, .2);
}

/*
 * Footer bottom row
 */

.footer-bottom {
    display: flex;
    justify-content: space-between;

    margin-top: 38px;
    padding-top: 18px;

    color: #9f978b;

    border-top: 1px solid rgba(255, 255, 255, .07);

    font-size: .88rem;
    line-height: 1.7;
}

/*
 * ============================================================
 * Floating WhatsApp button
 * ============================================================
 */

.floating-whatsapp {
    position: fixed;
    isolation: isolate;

    inset-inline-start: 18px;
    bottom: 22px;

    z-index: 900;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 48px;

    gap: 9px;
    padding: 10px 16px;

    color: #fffaf0;

    background:
        linear-gradient(
            145deg,
            #117744,
            #0c6638 58%,
            #084d2b
        );

    border: 1px solid rgba(217, 173, 87, .52);
    border-radius: 999px;

    font-size: .94rem;
    font-weight: 800;
    line-height: 1.2;

    text-shadow:
        0 1px 2px rgba(0, 0, 0, .34);

    box-shadow:
        0 12px 28px rgba(0, 0, 0, .34),
        0 7px 22px rgba(8, 77, 43, .24),
        inset 0 1px 0 rgba(255, 255, 255, .12);

    transition:
        transform .3s var(--ease-luxury),
        background .3s ease,
        border-color .3s ease,
        box-shadow .3s ease;
}

/*
 * Subtle inner highlight instead of a pulse ring
 */

.floating-whatsapp::before {
    content: "";

    position: absolute;
    inset: 2px;

    border: 1px solid rgba(255, 255, 255, .055);
    border-radius: inherit;

    pointer-events: none;
}

.floating-whatsapp:hover {
    transform:
        translateY(-3px)
        scale(1.012);

    background:
        linear-gradient(
            145deg,
            #16864f,
            #107443 58%,
            #0a5a32
        );

    border-color: rgba(245, 220, 152, .72);

    box-shadow:
        0 16px 34px rgba(0, 0, 0, .38),
        0 9px 24px rgba(8, 77, 43, .3),
        0 0 14px rgba(217, 173, 87, .07),
        inset 0 1px 0 rgba(255, 255, 255, .15);
}

/*
 * WhatsApp icon
 */

.floating-whatsapp .icon {
    width: 21px;
    height: 21px;

    flex: 0 0 21px;

    color: currentColor;

    transition:
        transform .3s var(--ease-luxury);
}

.floating-whatsapp:hover .icon {
    transform: scale(1.06);
}

/*
 * ============================================================
 * Tablet and mobile footer adjustments
 * ============================================================
 */

@media (max-width: 820px) {
    /*
     * Reserve enough space beneath the footer content so the
     * fixed WhatsApp button does not cover the bottom row.
     */

    .site-footer {
        padding-top: 52px;
        padding-bottom: calc(
            92px + env(safe-area-inset-bottom, 0px)
        );
    }

    .footer-grid {
        gap: 32px;
    }

    .footer-brand p {
        margin-bottom: 0;

        line-height: 1.8;
    }

    .footer-links,
    .footer-contact {
        gap: 2px;
    }

    .footer-bottom {
        margin-top: 30px;

        gap: 6px;

        text-align: center;
    }
}

@media (max-width: 560px) {
    .site-footer {
        padding-top: 46px;
        padding-bottom: calc(
            84px + env(safe-area-inset-bottom, 0px)
        );
    }

    .footer-grid {
        gap: 28px;
    }

    .footer-links a,
    .footer-contact > a {
        width: 100%;
    }

    .footer-bottom {
        margin-top: 26px;
        padding-top: 16px;

        font-size: .84rem;
    }

    /*
     * Higher specificity keeps this compact mobile design even
     * when responsive rules from 90-responsive.css are loaded.
     */

    body .floating-whatsapp {
        width: 50px;
        height: 50px;
        min-height: 50px;

        inset-inline-start: 12px;
        bottom: calc(
            12px + env(safe-area-inset-bottom, 0px)
        );

        gap: 0;
        padding: 0;

        border-color: rgba(217, 173, 87, .48);
    }

    body .floating-whatsapp .icon {
        width: 21px;
        height: 21px;

        flex-basis: 21px;
    }
}

/*
 * Prevent touch devices from retaining desktop hover movement.
 */

@media (hover: none) and (pointer: coarse) {
    .footer-links a:hover,
    .footer-contact > a:hover,
    .social-links a:hover,
    .floating-whatsapp:hover {
        transform: none;
    }

    .footer-contact > a:hover .icon,
    .floating-whatsapp:hover .icon {
        transform: none;
    }
}