/* HH3D-style footer + social */

#footer.footer-wrapper {
    background: #12141a !important;
    border-top: 1px solid rgba(255, 255, 255, .06);
    padding: 36px 0 18px;
    color: rgba(255, 255, 255, .78);
}

#footer .footer-widgets,
#footer .footer {
    background: transparent !important;
}

/* Footer content = cùng container site (header/home) */
#footer.footer-wrapper > .row,
#footer .footer-widgets > .row,
#footer .container,
.absolute-footer .container {
    box-sizing: border-box;
    width: 100%;
    max-width: var(--hh-site-width, 1140px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: var(--hh-site-pad, 15px) !important;
    padding-right: var(--hh-site-pad, 15px) !important;
}

/* Khôi phục gutter cột — override global .col { padding: 0 0 30px } */
#footer .col,
#footer .columns,
#footer .gallery-item {
    padding-left: 15px !important;
    padding-right: 15px !important;
    padding-bottom: 30px !important;
}

#footer .col-inner {
    padding: 8px 0 16px;
}

/* Logo */
#footer .img,
#footer .img-inner {
    border-radius: 12px;
    overflow: hidden;
}

#footer .img {
    width: 96px !important;
    max-width: 96px;
    margin: 0 0 14px;
}

#footer .img-inner {
    padding-top: 100% !important;
    background: #1a1d24;
}

#footer .img img {
    object-fit: cover;
}

/* About text */
#footer p {
    margin: 0;
    font-size: 13px;
    line-height: 1.65;
    color: rgba(255, 255, 255, .62);
}

#footer p a,
#footer p strong a {
    color: #ff9a2f !important;
    text-decoration: none !important;
    font-weight: 700;
}

#footer p a:hover {
    color: #ffb347 !important;
}

/* Info heading + links */
#footer .text {
    color: rgba(255, 255, 255, .88);
}

#footer #text-1116231831,
#footer .text:first-child {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #fff !important;
    margin-bottom: 10px;
}

#footer #text-1202822054,
#footer .text a {
    display: inline-block;
    margin: 4px 6px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .78) !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background .18s ease, border-color .18s ease, color .18s ease;
}

#footer .text a:hover {
    background: rgba(255, 154, 47, .12);
    border-color: rgba(255, 154, 47, .35);
    color: #ffb347 !important;
}

#footer .gap-element {
    padding-top: 18px !important;
}

/* ===== Social icons ===== */
#footer .social-icons.follow-icons {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 4px 0 0;
    padding: 0;
}

#footer .social-icons .icon.button,
#footer .follow-icons a.icon.button,
#footer .social-icons a.button.circle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 50% !important;
    border: 1px solid rgba(255, 255, 255, .12) !important;
    background: #1c1f26 !important;
    box-shadow: none !important;
    color: rgba(255, 255, 255, .82) !important;
    line-height: 1 !important;
    float: none !important;
    transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease !important;
}

#footer .social-icons .icon.button i,
#footer .follow-icons a.icon.button i {
    margin: 0 !important;
    font-size: 16px !important;
    color: inherit !important;
}

#footer .social-icons .icon.button:hover,
#footer .follow-icons a.icon.button:hover {
    transform: translateY(-2px);
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .35) !important;
}

#footer .social-icons a.facebook:hover { background: #1877f2 !important; }
#footer .social-icons a.tiktok:hover { background: #111 !important; border-color: rgba(255,255,255,.2) !important; }
#footer .social-icons a.x:hover,
#footer .social-icons a.twitter:hover { background: #000 !important; }
#footer .social-icons a.email:hover { background: #ea4335 !important; }
#footer .social-icons a.pinterest:hover { background: #e60023 !important; }
#footer .social-icons a.linkedin:hover { background: #0a66c2 !important; }
#footer .social-icons a.youtube:hover { background: #ff0000 !important; }
#footer .social-icons a.flickr:hover { background: #ff0084 !important; }
#footer .social-icons a.px500:hover { background: #222 !important; }

/* Absolute copyright bar */
.absolute-footer {
    background: #0c0e12 !important;
    border-top: 1px solid rgba(255, 255, 255, .05);
    padding: 14px 0 !important;
    color: rgba(255, 255, 255, .5);
}

.absolute-footer .copyright-footer {
    font-size: 12px;
    text-align: center;
}

.absolute-footer .copyright-footer a {
    color: #ff9a2f !important;
    text-decoration: none !important;
    font-weight: 700;
}

.absolute-footer .copyright-footer a:hover {
    color: #ffb347 !important;
}

.absolute-footer .footer-primary.pull-left {
    float: none !important;
    width: 100%;
}

/* Info links — flex wrap, căn giữa */
#footer .text:has(a) {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    text-align: center;
}

#footer #text-1202822054 a,
#footer .text a {
    margin: 0;
}

/* Sitemap (đôi khi nằm ngoài .text) */
#footer a[href*="sitemap"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0 0;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.78) !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
}

#footer a[href*="sitemap"]:hover {
    background: rgba(255, 154, 47, 0.12);
    border-color: rgba(255, 154, 47, 0.35);
    color: #ffb347 !important;
}

@media (max-width: 849px) {
    #footer.footer-wrapper {
        padding: 24px 0 10px;
        text-align: center;
    }

    #footer.footer-wrapper > .row,
    #footer .footer-widgets > .row,
    #footer .container,
    .absolute-footer .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    #footer .col,
    #footer .columns {
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-bottom: 16px !important;
        flex-basis: 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    #footer .col-inner {
        padding: 4px 0 8px;
    }

    /* Logo — đè width % inline của UX Builder */
    #footer .img,
    #footer [id^="image_"] {
        width: 72px !important;
        max-width: 72px !important;
        margin: 0 auto 12px !important;
    }

    #footer .img-inner {
        padding-top: 100% !important;
    }

    #footer p {
        font-size: 12.5px;
        line-height: 1.6;
        padding: 0 4px;
        text-align: center;
    }

    #footer #text-1116231831,
    #footer .text:first-child,
    #footer .text:not(:has(a)) {
        text-align: center !important;
        font-size: 14px;
        margin: 8px 0 12px !important;
    }

    #footer .text:has(a) {
        justify-content: center;
        gap: 8px;
        margin: 0 0 6px;
    }

    #footer #text-1202822054 a,
    #footer .text a {
        padding: 6px 12px;
        font-size: 12.5px;
    }

    #footer .gap-element {
        padding-top: 12px !important;
    }

    #footer .social-icons.follow-icons {
        gap: 8px;
        margin: 8px auto 0;
        max-width: 280px;
        justify-content: center;
    }

    #footer .social-icons .icon.button,
    #footer .follow-icons a.icon.button,
    #footer .social-icons a.button.circle {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        min-height: 36px !important;
    }

    #footer .social-icons .icon.button i,
    #footer .follow-icons a.icon.button i {
        font-size: 14px !important;
    }

    #footer a[href*="sitemap"] {
        margin: 12px auto 4px;
    }

    .absolute-footer {
        padding: 12px 12px !important;
    }

    .absolute-footer .copyright-footer {
        font-size: 11.5px;
        line-height: 1.45;
        padding: 0 8px;
    }

    a.back-to-top#top-link,
    a.back-to-top.button {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        right: 12px !important;
        bottom: 16px !important;
    }
}

@media (max-width: 767px) {
    #footer.footer-wrapper {
        padding: 20px 0 8px;
    }

    #footer .img,
    #footer [id^="image_"] {
        width: 64px !important;
        max-width: 64px !important;
    }

    #footer .social-icons.follow-icons {
        max-width: 260px;
        gap: 5px;
    }
}

/* ===== Back to top ===== */
a.back-to-top#top-link,
a.back-to-top.button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    margin: 0 !important;
    right: 18px !important;
    bottom: 22px !important;
    border-radius: 50% !important;
    border: 1px solid rgba(255, 255, 255, .12) !important;
    background: #1c1f26 !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .45) !important;
    color: rgba(255, 255, 255, .88) !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none; /* ẩn thì không chặn click */
    transform: translateY(10px);
    transition:
        opacity .22s ease,
        visibility .22s ease,
        transform .22s ease,
        background .18s ease,
        border-color .18s ease,
        color .18s ease,
        box-shadow .18s ease !important;
}

a.back-to-top#top-link.active,
a.back-to-top.button.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

a.back-to-top#top-link i,
a.back-to-top.button i {
    margin: 0 !important;
    font-size: 18px !important;
    line-height: 1 !important;
    color: inherit !important;
}

a.back-to-top#top-link:hover,
a.back-to-top.button:hover {
    background: linear-gradient(180deg, #ffb347 0%, #f07a16 100%) !important;
    border-color: rgba(255, 180, 80, .45) !important;
    color: #fff !important;
    box-shadow: 0 10px 24px rgba(240, 122, 22, .4) !important;
    transform: translateY(-2px);
}
