.footer {
    background: var(--color-primary);
    position: relative;
    z-index: 1;
    color: #cbd5e1;
}

.footer-shape {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: .05;
    z-index: -1;
}

.footer-shape img {
    width: 80%;
    max-width: 700px;
}

.footer-widget {
    position: relative;
    z-index: 1;
    padding: 64px 0;
}

.footer-logo img {
    width: 250px;
    margin-bottom: 25px;
}

.copyright {
    padding: 16px 0;
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright .footer-menu {
    margin: 0;
    padding: 0;
    text-align: right;
}

.copyright .footer-menu li {
    display: inline-block;
    margin-left: 25px;
    font-size: 16px;
}

.copyright .footer-menu li a {
    color: #F5FAFF;
    transition: all .5s ease-in-out;
}

.copyright .footer-menu li a:hover {
    color: #FDA31B;
}

.copyright .copyright-text {
    color: #94a3b8;
    margin-bottom: 0px;
    font-size: 14px;
}

.footer-widget-box h3 {
    position: relative;
    font-size: 17px;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    line-height: 20px;
    margin-bottom: 20px;
}

/* .footer-widget-box h3::before {
    content: '';
    position: absolute;
    width: 90px;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    bottom: 0;
    left: 0;
    z-index: -1;
}

.footer-widget-box h3::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 3px;
    background: #000;
    bottom: 0;
    left: 18px;
    z-index: -1;
} */

.footer-widget-box ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
    list-style: none;
}

.footer-widget-box ul li {
    position: relative;
}

.footer-widget-box.list ul li::before {
    content: "\203A";
    color: var(--color-5);
    font-size: 18px;
    margin-right: 8px;
    display: inline-block;
}

.footer-widget-box.certification ul li::before {
    content: "\2713";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-right: 10px;
    background: #22c55e33;
    color: #22c55e;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
}

.footer-widget-box ul li a {
    color: #cbd5e1;
    transition: all .3s ease-in-out;
    font-size: 14px;
}

.footer-widget-box ul li a:hover {
    /* padding-left: 10px; */
    color: var(--color-5);
}

.footer-widget-box p {
    margin-bottom: 16px;
}

.top-certification {
    padding: 12px;
    background-color: #ffffff0d;
    border: 1px solid #ffffff1a;
    border-radius: 8px;
    margin-top: 24px;
}

.footer-widget-box.contact ul li img {
    width: 15px !important;
    height: 15px !important;
    object-fit: contain;
    transform: translateY(3px);
}

.footer-widget-box.contact ul li {
    display: grid;
    grid-template-columns: 14px auto;
    gap: 12px;
}

.subscribe-button {
    font-weight: 700;
    padding: 10px 18px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--color-5);
    color: #FFF !important;
    font-size: 14px;
    margin-top: 15px;
}

.subscribe-button:hover {
    background-color: #897337;
}

.copyright-wrapper ul {
    display: flex;
    gap: 8px;
    justify-content: space-between;
    list-style: none;
    flex-wrap: wrap;
}

.copyright-wrapper ul li a {
    height: 38px;
    width: 38px;
    border-radius: 5px;
    background: #FFF;
    color: #FDA31B;
    transition: all .5s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
}

.copyright-wrapper ul li a img {
    width: 20px !important;
    height: 20px;
    object-fit: contain;
}

.footer-contact ul {
    flex-direction: row;
    gap: 12px;
    margin-top: 20px;
}

.footer-contact li {
    position: relative;
    display: flex;
    justify-content: start;
    align-items: center;
    color: #F5FAFF;
    font-size: 14px;
    /* margin-bottom: 2px; */
    padding-left: 0 !important;
    flex-wrap: wrap;
}

.footer-contact li::before {
    display: none !important;
}

.footer-contact li a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-duration: .15s;
    transition-timing-function: cubic-bezier(.4, 0, .2, 1);
    background-color: #ffffff1a;
}

.footer-contact li a:hover {
    background-color: var(--color-5);
}

.footer-contact li img {
    width: 14px !important;
    display: block;
    object-fit: contain;
}

.footer-widget-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

@media all and (max-width: 1024px) {
    .footer-widget-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }
}


@media all and (max-width: 767px) {

    .footer-social {
        justify-content: flex-start;
        margin-top: 20px;
    }

    .copyright {
        padding: 16px 0;
        position: relative;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .copyright::before {
        width: 40%;
    }


    .doi-tac {
        padding: 30px 0;
    }

    .footer-widget {
        padding: 30px 0px;
    }

    .footer-widget-box h3 {
        margin-bottom: 20px;
    }

    .footer-widget-wrapper {
        /* grid-template-columns: repeat(1, 1fr); */
        gap: 24px;
    }

    .footer-widget-box.info,
    .footer-widget-box.contact {
        grid-column: span 2;
    }

    .copyright-wrapper ul li {
        width: 100%;
        text-align: center;
    }
}

.backtotop {
    cursor: pointer;
    background: var(--color-5);
    bottom: 10px;
    color: #FFF;
    font-size: 12px;
    font-weight: 700;
    height: 40px;
    padding: 2px;
    position: fixed;
    right: 20px;
    text-align: center;
    text-transform: uppercase;
    width: 40px;
    z-index: 3;
    border-radius: 4px;
    height: 45px;
}

.backtotop svg {
    width: 22px;
    height: 22px;
    margin-bottom: -10px;
}

.backtotop svg path {
    stroke: #fff;
}


/* ===== WIDGET WRAPPER ===== */
#widget {
    position: fixed;
    bottom: 75px;
    right: 12px;
    z-index: 99;
}

/* ===== POPUP PANEL ===== */
#panel {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 260px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    display: none;
    animation: slideUp 0.25s ease;
}

#panel.active {
    display: block;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Panel Header */
.panel-header {
    background: var(--color-primary);
    padding: 12px 18px;
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.3px;
}

/* Contact Items */
.contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    /* cursor: pointer; */
    border-bottom: 1px solid #f3f3f3;
    transition: background 0.15s;
    text-decoration: none;
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-item:hover {
    background: #fafafa;
}

.contact-icon {
    display: flex;
    border-radius: 50%;
}

.contact-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    padding: 5px;
    border-radius: 50%;
}

#fab img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    position: absolute;
    transition: opacity 0.25s, transform 0.25s;
    opacity: 0;
    transform: scale(0.7);
}

.contact-text {
    flex: 1;
}

.contact-name {
    font-weight: 600;
    font-size: 14px;
    color: #222;
}

.contact-sub {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

/* ===== FLOATING BUTTON ===== */
#fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, box-shadow 0.3s;
    outline: none;
    position: relative;
    background: var(--color-5);
    box-shadow: 0 6px 20px rgb(36 40 84 / 50%);
}

#fab:hover {
    transform: scale(1.1);
}

#fab img {
    width: 26px;
    height: 26px;
    /* fill: white; */
    position: absolute;
    transition: opacity 0.25s, transform 0.25s;
}

/* Pulse ring */
#fab::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 3px solid var(--color-5);
    opacity: 0.4;
    animation: pulse 2s ease-out infinite;
}

.footer-widget .text-description strong {
    font-size: 16px;
    letter-spacing: 0.4px;
    font-weight: 900;
    color: #FFF;
}

.footer-widget .text-description span {
    font-size: 12px;
    color: var(--color-5);
}

@keyframes pulse {
    0% {
        transform: scale(0.9);
        opacity: 0.4;
    }

    70% {
        transform: scale(1.3);
        opacity: 0;
    }

    100% {
        transform: scale(0.9);
        opacity: 0;
    }
}

/* Close X button style */
#fab.is-open::before {
    display: none;
}

#fab.is-open {
    transform: none;
}

#fab.is-open:hover {
    transform: rotate(90deg);
}

.fab-close {
    width: 24px;
    height: 24px;
    position: relative;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

#fab.is-open .fab-close {
    display: flex;
}

.fab-close::before,
.fab-close::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2.5px;
    background-color: #fff;
    border-radius: 2px;
}

.fab-close::before {
    transform: rotate(45deg);
}

.fab-close::after {
    transform: rotate(-45deg);
}

/* Backdrop */
#backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    z-index: 98;
}

#backdrop.active {
    display: block;
}

@media (max-width: 575px) {
    .backtotop {
        bottom: 60px;
    }

    #widget {
        bottom: 125px;
    }
}

@media (max-width: 380px) {

    .footer-widget-box.list,
    .footer-widget-box.certification {
        grid-column: span 2;
    }
}