/* WeChat QR Code Hover Effect in Footer */
.wechat-hover-box .wechat-qr-code {
    display: none;
    position: absolute;
    left: 0;
    bottom: 100%;
    /* Position above the link */
    z-index: 100;
    background: #fff;
    padding: 8px;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    width: 150px;
    /* Size of the popup box */
    margin-bottom: 10px;
    transform-origin: bottom left;
}

.wechat-hover-box .wechat-qr-code img {
    width: 100%;
    height: auto;
    display: block;
}

/* Arrow indicator */
.wechat-hover-box .wechat-qr-code::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 20px;
    border-width: 6px;
    border-style: solid;
    border-color: #fff transparent transparent transparent;
}

.wechat-hover-box:hover .wechat-qr-code {
    display: block;
    animation: zoomInPopup 0.3s ease forwards;
}

@keyframes zoomInPopup {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Update Container Width to 80% on large screens */
@media (min-width: 992px) {
    .container {
        max-width: 80%;
    }
}

/* Floating Contact */
.floating-contact {
    position: fixed;
    bottom: 85px;
    right: 15px;
    z-index: 999;
}

/* Telegram click -> WeChat QR modal */
.tg-qr-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.tg-qr-modal.show {
    display: flex;
}

.tg-qr-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.tg-qr-modal.show .tg-qr-backdrop {
    animation: tgQrFade 200ms ease;
}

.tg-qr-dialog {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    max-width: 320px;
    width: 86%;
    z-index: 1;
    transform: scale(0.94);
    opacity: 0;
}

.tg-qr-modal.show .tg-qr-dialog {
    animation: tgQrZoom 220ms ease forwards;
}

.tg-qr-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #999;
}

.tg-qr-close:hover {
    color: #333;
}

@keyframes tgQrFade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes tgQrZoom {
    0% {
        opacity: 0;
        transform: scale(0.94) translateY(12px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.floating-contact .contact-box {
    width: 88px;
    min-height: 88px;
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    border: none;
    animation: floatContactBounce 6s infinite;
}

.floating-contact .contact-label {
    font-size: 12px;
    line-height: 1.2;
    margin-top: 6px;
    color: #fff;
}

.floating-contact .contact-whatsapp {
    background: #25d366;
}

.floating-contact .contact-telegram {
    background: #0088cc;
}

.floating-contact .contact-wechat {
    background: #09bb07;
}

.wechat-hover-box .floating-qr {
    right: calc(100% + 12px);
    left: auto;
    top: -30%;
    bottom: auto;
    transform: translateY(-50%);
    margin: 0;
    width: 140px;
}

.wechat-hover-box .floating-qr::after {
    top: 50% !important;
    bottom: auto !important;
    left: 100% !important;
    transform: translateY(-50%);
    border-color: transparent transparent transparent #fff !important;
    border-width: 6px !important;
}

/* Step Tab Section */
.step-item {
    cursor: pointer;
    transition: all 0.3s ease;
}

.step-item:hover {
    background-color: #f8f9fa;
}

.step-item.active {
    background: linear-gradient(135deg, #5b6afb 0%, #7d8afd 100%);
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 10px 20px rgba(91, 106, 251, 0.2);
}

.step-item.active .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

.step-item.active h3,
.step-item.active p {
    color: #fff !important;
}

.step-img {
    transition: opacity 0.3s ease;
    border-radius: 8px;
    box-shadow: none;
}

/* Solution Section */
.solution-section {
    padding: 80px 0;
    background: #0b1628;
    background-image: radial-gradient(circle at center, #1a2a40 0%, #0b1628 100%);
    position: relative;
    overflow: hidden;
}

.solution-container {
    position: relative;
    height: 600px;
    margin-top: 30px;
}

.center-circle-wrap {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 350px;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.rotating-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px dashed rgba(255, 255, 255, 0.15);
    animation: rotate 30s linear infinite;
}

.rotating-ring.ring-2 {
    width: 76%;
    height: 76%;
    top: 12%;
    left: 12%;
    border: 2px dashed rgba(55, 125, 255, 0.4);
    animation: rotate-reverse 20s linear infinite;
}

.center-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 200px;
}

.center-content img {
    max-width: 140px;
    margin-bottom: 15px;
}

.center-content p {
    color: #fff;
    font-size: 14px;
    margin-bottom: 15px;
}

.solution-item {
    position: absolute;
    width: 260px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.solution-item-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    color: #fff;
}

.solution-item-header .icon-box {
    width: 40px;
    height: 40px;
    background: #007bff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    border-radius: 4px;
    font-size: 18px;
    flex-shrink: 0;
}

.solution-item h4 {
    color: #fff;
    margin-bottom: 0;
    font-size: 18px;
}

.item-top-left {
    top: 5%;
    left: 0;
}

.item-bottom-left {
    bottom: 15%;
    left: 5%;
}

.item-top-right {
    top: 5%;
    right: 0;
}

.item-bottom-right {
    bottom: 15%;
    right: 5%;
}

.item-bottom-center {
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    text-align: center;
}

.item-bottom-center .solution-item-header {
    justify-content: center;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes rotate-reverse {
    from {
        transform: rotate(360deg);
    }

    to {
        transform: rotate(0deg);
    }
}

@media (max-width: 991px) {
    .solution-container {
        height: auto;
    }

    .solution-item,
    .center-circle-wrap {
        position: relative;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        transform: none !important;
        margin: 0 auto 40px;
        text-align: center;
    }

    .solution-item-header {
        justify-content: center;
    }

    .item-bottom-center {
        width: 100%;
    }
}

/* Hero Partner Logos - Auto Highlight Animation */
@keyframes partnerHighlight {
    0% {
        opacity: 0.7;
        transform: translateY(0) scale(1);
        filter: none;
    }

    5% {
        opacity: 1;
        transform: translateY(-5px) scale(1.1);
        filter: drop-shadow(0 5px 15px rgba(255, 255, 255, 0.3));
    }

    15% {
        opacity: 1;
        transform: translateY(-5px) scale(1.1);
        filter: drop-shadow(0 5px 15px rgba(255, 255, 255, 0.3));
    }

    20% {
        opacity: 0.7;
        transform: translateY(0) scale(1);
        filter: none;
    }

    100% {
        opacity: 0.7;
        transform: translateY(0) scale(1);
        filter: none;
    }
}

.partner-logo-hero {
    height: 69px;
    opacity: 0.7;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-right: 1.5rem;
    cursor: pointer;
    animation: partnerHighlight 10s infinite;
}

/* Sequential delays for auto-highlight */
.partners-hero-container .partner-logo-hero:nth-child(1) {
    animation-delay: 0s;
}

.partners-hero-container .partner-logo-hero:nth-child(2) {
    animation-delay: 2s;
}

.partners-hero-container .partner-logo-hero:nth-child(3) {
    animation-delay: 4s;
}

.partners-hero-container .partner-logo-hero:nth-child(4) {
    animation-delay: 6s;
}

.partners-hero-container .partner-logo-hero:nth-child(5) {
    animation-delay: 8s;
}

/* Pause animation on container hover so user can interact */
.partners-hero-container:hover .partner-logo-hero {
    animation-play-state: paused;
}

/* Force hover state */
.partner-logo-hero:hover {
    opacity: 1 !important;
    transform: translateY(-5px) scale(1.1) !important;
    filter: drop-shadow(0 5px 15px rgba(255, 255, 255, 0.3)) !important;
}

/* Mobile responsiveness for Partner Logos */
@media (max-width: 767px) {
    .partners-hero-container {
        flex-wrap: wrap;
    }

    .partner-logo-hero {
        height: 44px;
        /* Smaller on mobile */
        margin-right: 1rem;
        margin-bottom: 0.8rem;
        /* Space between rows */
    }
}

/* Soft Badges for Product Cards */
.badge-soft-primary {
    background-color: rgba(253, 126, 20, 0.1);
    color: #fd7e14;
}

.badge-soft-success {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.badge-soft-warning {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.badge-soft-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Contact Page Styles */
.contact-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #fd7e14, #00c9a7);
    transition: height 0.3s ease;
    z-index: 0;
}

.contact-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.contact-card:hover::before {
    height: 100%;
    opacity: 0.05;
}

/* Fix clickability of contact card links by elevating content above the hover overlay */
.contact-card>* {
    position: relative;
    z-index: 2;
}

.contact-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    font-size: 40px;
    position: relative;
    z-index: 1;
    transition: all 0.4s ease;
}

.contact-card:hover .contact-icon-wrapper {
    transform: scale(1.1) rotate(10deg);
}

.contact-qr {
    max-width: 200px;
    /* Increased from 150px */
    margin: 0 auto;
    opacity: 0;
    max-height: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    overflow: hidden;
}

.contact-card:hover .contact-qr {
    opacity: 1;
    max-height: 300px;
    /* Increased height to fit larger QR */
    transform: translateY(0);
    margin-top: 20px;
}

/* Specific Colors for Contact Icons */
.bg-telegram {
    background-color: rgba(42, 171, 238, 0.1);
    color: #2AABEE;
}

.bg-whatsapp {
    background-color: rgba(37, 211, 102, 0.1);
    color: #25D366;
}

.bg-wechat {
    background-color: rgba(9, 184, 62, 0.1);
    color: #09B83E;
}

/* Floating animation for icons */
@keyframes floatIcon {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0);
    }
}

.contact-icon-wrapper i {
    animation: floatIcon 3s ease-in-out infinite;
}

/* Payment Methods Animation - Auto Highlight */
@keyframes paymentAutoHighlight {

    0%,
    100% {
        transform: translateY(0) scale(1);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    }

    10%,
    25% {
        transform: translateY(-5px) scale(1.1);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    }

    35% {
        transform: translateY(0) scale(1);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    }
}

@keyframes paymentImgAutoHighlight {

    0%,
    100% {
        filter: grayscale(100%);
        opacity: 0.6;
    }

    10%,
    25% {
        filter: grayscale(0%);
        opacity: 1;
    }

    35% {
        filter: grayscale(100%);
        opacity: 0.6;
    }
}

.payment-icon-wrapper {
    margin: 10px;
    padding: 15px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 60px;
    animation: paymentAutoHighlight 14s infinite;
}

.payment-icon-wrapper img {
    max-height: 100%;
    max-width: 100%;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
    animation: paymentImgAutoHighlight 14s infinite;
}

/* Sequential Delays for Payment Icons */
.payment-icon-wrapper:nth-child(1),
.payment-icon-wrapper:nth-child(1) img {
    animation-delay: 0s;
}

.payment-icon-wrapper:nth-child(2),
.payment-icon-wrapper:nth-child(2) img {
    animation-delay: 2s;
}

.payment-icon-wrapper:nth-child(3),
.payment-icon-wrapper:nth-child(3) img {
    animation-delay: 4s;
}

.payment-icon-wrapper:nth-child(4),
.payment-icon-wrapper:nth-child(4) img {
    animation-delay: 6s;
}

.payment-icon-wrapper:nth-child(5),
.payment-icon-wrapper:nth-child(5) img {
    animation-delay: 8s;
}

.payment-icon-wrapper:nth-child(6),
.payment-icon-wrapper:nth-child(6) img {
    animation-delay: 10s;
}

.payment-icon-wrapper:nth-child(7),
.payment-icon-wrapper:nth-child(7) img {
    animation-delay: 12s;
}

/* Force Highlight on Hover */
.payment-icon-wrapper:hover {
    animation-play-state: paused;
    transform: translateY(-5px) scale(1.1) !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

.payment-icon-wrapper:hover img {
    animation-play-state: paused;
    filter: grayscale(0%) !important;
    opacity: 1 !important;
}

/* Floating Contact Auto Animation (Sequential Bounce) */
@keyframes floatContactBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    10% {
        transform: translateY(-6px);
    }

    20% {
        transform: translateY(0);
    }
}

.floating-contact .contact-box {
    animation: floatContactBounce 6s infinite;
}

/* Staggered delays */
.floating-contact .contact-item:nth-child(1) .contact-box {
    animation-delay: 0s;
}

.floating-contact .contact-item:nth-child(2) .contact-box {
    animation-delay: 2s;
}

.floating-contact .contact-item:nth-child(3) .contact-box {
    animation-delay: 4s;
}

/* Pause on container hover */
.floating-contact:hover .contact-box {
    animation-play-state: paused;
}

/* Slick Custom Dots (White) */
.slick-custom-dots .slick-dots {
    position: absolute;
    bottom: -40px;
    left: 0;
    right: 0;
    text-align: center;
    padding: 0;
    margin: 0;
    list-style: none;
}

.slick-custom-dots .slick-dots li {
    display: inline-block;
    margin: 0 5px;
}

.slick-custom-dots .slick-dots li button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    text-indent: -9999px;
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 0;
    outline: none;
}

.slick-custom-dots .slick-dots li.slick-active button {
    background: #fff;
    width: 25px;
    border-radius: 4px;
}

/* Article List Styles */
.article {
    padding: 60px 0;
    background-color: #f8f9fa;
}

.article-part {
    max-width: 1140px;
    margin: 0 auto;
}

.article-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 4 items per row */
    gap: 20px;
}

.article-item {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    height: 100%;
    /* Ensure equal height */
}

.article-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.article_a {
    display: flex;
    flex-direction: column;
    /* Stack image and text vertically */
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.article_a:hover {
    text-decoration: none;
    color: inherit;
}

.article_img {
    width: 100%;
    height: 160px;
    /* Fixed height for images */
    overflow: hidden;
}

.article_img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.5s ease;
}

.article-item:hover .article_img img {
    transform: scale(1.05);
}

.article_cont {
    flex: 1;
    padding: 20px;
    /* Padding inside the card content */
    display: flex;
    flex-direction: column;
}

.article_cont h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
    /* Limit title lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article_cont p {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0;
    line-height: 1.5;
    /* Limit description text */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    gap: 15px;
}

.pagination button {
    padding: 8px 20px;
    border: 1px solid #dee2e6;
    background-color: #fff;
    color: #007bff;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.pagination button:hover:not(:disabled) {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

.pagination button:disabled {
    color: #adb5bd;
    cursor: not-allowed;
    background-color: #f8f9fa;
}

.pagination span {
    font-size: 0.95rem;
    color: #6c757d;
    font-weight: 500;
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
    .article-list {
        grid-template-columns: repeat(3, 1fr);
        /* 3 items on large tablets/small laptops */
    }
}

@media (max-width: 992px) {
    .article-list {
        grid-template-columns: repeat(2, 1fr);
        /* 2 items on tablets */
    }
}

@media (max-width: 576px) {
    .article-list {
        grid-template-columns: 1fr;
        /* 1 item on mobile */
    }

    .article-item {
        max-width: 400px;
        margin: 0 auto;
        width: 100%;
    }
}

.aws-frost {
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-wechat-f {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
