/* ============================================
   Site Footer
   ============================================ */

.site-footer {
    position: relative;
    z-index: 1;
    direction: rtl;
    color: var(--color-text-primary);
    padding: 80px 20px 28px;
}

.sf-container {
    max-width: 1180px;
    margin: 0 auto;
}

/* ========== Main Layout ========== */

.sf-main {
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr 1fr 1.25fr;
    gap: 34px;
    align-items: flex-start;
}

/* ============================================
   CSS Mask Icons
   All footer icons except social icons
   ============================================ */

.sf-icon,
.sf-contact-icon {
    display: inline-block;
    flex-shrink: 0;
    background-color: currentColor;

    -webkit-mask-size: contain;
    mask-size: contain;

    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;

    -webkit-mask-position: center;
    mask-position: center;
}

.sf-icon {
    width: 20px;
    height: 20px;
    color: var(--color-site);
    filter: drop-shadow(0 0 10px rgba(17, 155, 218, 0.18));
}

.sf-contact-icon {
    width: 18px;
    height: 18px;
    color: var(--color-text-secondary);
    opacity: 0.9;
    transition:
        color 0.28s,
        opacity 0.28s,
        transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Section title icons */

.sf-icon--links {
    -webkit-mask-image: url("/assets/svg/link.svg");
    mask-image: url("/assets/svg/link.svg");
}

.sf-icon--collaboration {
    -webkit-mask-image: url("/assets/svg/footer-collaboration.svg");
    mask-image: url("/assets/svg/footer-collaboration.svg");
}

.sf-icon--support {
    -webkit-mask-image: url("/assets/svg/footer-support.svg");
    mask-image: url("/assets/svg/footer-support.svg");
}

.sf-icon--contact {
    -webkit-mask-image: url("/assets/svg/footer-contact.svg");
    mask-image: url("/assets/svg/footer-contact.svg");
}

/* Contact icons */

.sf-contact-icon--phone {
    -webkit-mask-image: url("/assets/svg/phone.svg");
    mask-image: url("/assets/svg/phone.svg");
}

.sf-contact-icon--email {
    -webkit-mask-image: url("/assets/svg/email.svg");
    mask-image: url("/assets/svg/email.svg");
}

/* ========== Brand ========== */

.sf-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
}

.sf-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.sf-logo {
    width: 76px;
    height: 76px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 10px 24px rgba(17, 155, 218, 0.16));
    transition:
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.35s;
}

.sf-logo-link:hover .sf-logo {
    transform: translateY(-4px) scale(1.03);
    filter: drop-shadow(0 14px 32px rgba(17, 155, 218, 0.28));
}

.sf-slogan {
    margin: 0;
    max-width: 260px;
    color: var(--color-text-secondary);
    font-size: 0.96rem;
    line-height: 1.9;
}

/* ========== Columns ========== */

.sf-column,
.sf-contact {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sf-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    color: var(--color-text-primary);
    font-size: 1rem;
    font-weight: 800;
}

/* ========== Links ========== */

.sf-links,
.sf-contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sf-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sf-link {
    position: relative;
    display: inline-flex;
    width: fit-content;
    color: var(--color-text-secondary);
    font-size: 0.92rem;
    line-height: 1.8;
    text-decoration: none;
    transition:
        color 0.28s,
        transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.sf-link::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background: var(--color-site);
    opacity: 0.85;
    transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.sf-link:hover {
    color: var(--color-text-primary);
    transform: translateX(-4px);
}

.sf-link:hover::after {
    width: 100%;
}

/* ========== Contact ========== */

.sf-contact-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sf-contact-item {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--color-text-secondary);
}

.sf-contact-link {
    color: var(--color-text-secondary);
    font-size: 0.92rem;
    text-decoration: none;
    direction: ltr;
    transition:
        color 0.28s,
        transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.sf-contact-item:hover .sf-contact-icon {
    color: var(--color-site);
    opacity: 1;
    transform: scale(1.08);
}

.sf-contact-link:hover {
    color: var(--color-site);
    transform: translateX(-3px);
}

/* ========== Socials ========== */

.sf-socials {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
    justify-content: center;
}

.sf-social-link {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    text-decoration: none;
    background: transparent;
    transition:
        transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
        background-color 0.32s,
        box-shadow 0.32s;
}

.sf-social-link:hover {
    transform: translateY(-4px);
    background-color: var(--color-fu-chip-bg);
    box-shadow: 0 10px 24px rgba(17, 155, 218, 0.12);
}

.sf-social-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: block;
    opacity: 0.82;
    transition:
        opacity 0.28s,
        transform 0.28s;
}

.sf-social-link:hover .sf-social-icon {
    opacity: 1;
    transform: scale(1.08);
}

/* ========== Bottom Bar ========== */

.sf-bottom {
    margin-top: 54px;
    padding-top: 22px;
    border-top: 1px solid var(--color-fu-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.sf-copyright {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: 0.86rem;
    line-height: 1.9;
}

.sf-terms-link {
    color: var(--color-text-secondary);
    font-size: 0.86rem;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.28s;
}

.sf-terms-link:hover {
    color: var(--color-site);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1050px) {
    .sf-main {
        grid-template-columns: repeat(3, 1fr);
        gap: 36px 28px;
    }

    .sf-brand {
        grid-column: 1 / -1;
        align-items: center;
        text-align: center;
    }

    .sf-slogan {
        max-width: 420px;
    }
}

@media (max-width: 760px) {
    .site-footer {
        padding: 64px 16px 24px;
    }

    .sf-main {
        grid-template-columns: repeat(2, 1fr);
        gap: 34px 22px;
    }

    .sf-contact {
        grid-column: 1 / -1;
    }

    .sf-bottom {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        margin-top: 42px;
    }

    .sf-copyright {
        max-width: 520px;
    }
}

@media (max-width: 520px) {
    .site-footer {
        padding: 54px 14px 22px;
    }

    .sf-main {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .sf-brand {
        align-items: flex-start;
        text-align: right;
    }

    .sf-logo {
        width: 68px;
        height: 68px;
    }

    .sf-title {
        font-size: 0.98rem;
    }

    .sf-icon {
        width: 19px;
        height: 19px;
    }

    .sf-link,
    .sf-contact-link {
        font-size: 0.9rem;
    }

    .sf-social-link {
        width: 36px;
        height: 36px;
    }

    .sf-social-icon {
        width: 21px;
        height: 21px;
    }

    .sf-bottom {
        align-items: flex-start;
        text-align: right;
        gap: 12px;
    }

    .sf-terms-link {
        white-space: normal;
    }
}
