/* ====================================================================================================
   FOOTER COMPONENT
   ====================================================================================================
   Footer styles including social icons and back-to-top button
   ==================================================================================================== */

/* ===== FOOTER BASE ===== */
.footer-section {
    background: var(--color-white);
    padding: var(--space-16) var(--container-padding) var(--space-8);
}


.footer-title {
    color: var(--color-black);
    font-size: var(--font-size-h4);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-4);
}

.footer-text {
    color: var(--color-gray-400);
    font-size: var(--font-size-body-sm);
    line-height: var(--line-height-relaxed);
}

.footer-link {
    display: block;
    color: var(--color-gray-400);
    font-size: var(--font-size-body-sm);
    text-decoration: none;
    transition: var(--transition-fast);
    margin-bottom: var(--space-3);
}

.footer-link:hover {
    color: var(--color-primary);
}

/* ===== FOOTER LOGO ===== */
.footer-logo {
    width: 120px;
    margin-bottom: var(--space-4);
}

/* ===== FOOTER COLUMNS ===== */
.footer-columns {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: var(--space-8);
}

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

@media (max-width: 600px) {
    .footer-columns {
        grid-template-columns: 1fr;
    }
}

/* ===== FOOTER SOCIAL ICONS ===== */
.footer-social {
    display: flex;
    gap: var(--space-4);
    margin-top: var(--space-6);
}

.footer-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-white);
    transition: var(--transition-base);
}

.footer-social-icon:hover {
    background: var(--color-primary);
    transform: translateY(-3px);
}

/* Shared Component Styles */
.social-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-white);
    transition: var(--transition-base);
}

.social-icon-link img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.social-icon-link:hover {
    transform: translateY(-3px);
}

.footer-dbd-logo {
    height: 40px;
    width: auto;
}

/* ===== FOOTER BOTTOM BAR ===== */
.footer-bottom {
    border-top: 1px solid var(--color-gray-700);
    padding-top: var(--space-6);
    margin-top: var(--space-8);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copyright {
    color: var(--color-gray-500);
    font-size: var(--font-size-body-xs);
}

/* ===== BACK TO TOP BUTTON ===== */
/* ===== FLOATING BUTTONS (CENTRALIZED) ===== */
.floating-buttons-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    align-items: center;
}

.footer-floating-btn {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-white);
    border-radius: var(--radius-round);
    color: var(--color-white);
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-base);
}

.footer-floating-btn:hover {
    transform: translateY(-3px);
}

.footer-floating-btn img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.footer-floating-btn.back-to-top {
    background: var(--color-primary);
    width: 50px;
    height: 50px;
}

.footer-floating-btn.back-to-top:hover {
    background: var(--color-primary-dark);
}

/* ===== BACK TO TOP BUTTON ===== */
.footer-social-backtotop-content {
    display: none;
}

.footer-social-backtotop-content-display {
    display: block;
}

/* ===== SOCIAL CHAT BUTTONS (LINE/FACEBOOK) ===== */
.footer-social-chat {
    position: fixed;
    bottom: 100px;
    right: 20px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

/* LINE button */
.footer-floating-btn.line {
    background: linear-gradient(135deg, #39cd02, #2aaa00);
    width: 54px;
    height: 54px;
    box-shadow: 0 4px 16px rgba(57, 205, 2, 0.45), 0 2px 6px rgba(0, 0, 0, 0.18);
    animation: pulse-line 2.8s ease-in-out infinite;
    position: relative;
}

.footer-floating-btn.line::after {
    content: 'LINE';
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%) translateX(6px);
    background: rgba(30, 30, 30, 0.82);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 4px 9px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.footer-floating-btn.line:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.footer-floating-btn.line:hover {
    background: linear-gradient(135deg, #44e802, #39cd02);
    box-shadow: 0 6px 24px rgba(57, 205, 2, 0.6), 0 2px 8px rgba(0, 0, 0, 0.18);
    transform: scale(1.12) translateY(-2px);
}

.footer-floating-btn.line img {
    width: 32px;
    height: 32px;
}

/* Messenger button */
.footer-floating-btn.facebook {
    background: linear-gradient(135deg, #0082fb, #006dd6);
    width: 54px;
    height: 54px;
    box-shadow: 0 4px 16px rgba(0, 130, 251, 0.45), 0 2px 6px rgba(0, 0, 0, 0.18);
    animation: pulse-messenger 2.8s ease-in-out infinite 1.4s;
    position: relative;
}

.footer-floating-btn.facebook::after {
    content: 'Messenger';
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%) translateX(6px);
    background: rgba(30, 30, 30, 0.82);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 4px 9px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.footer-floating-btn.facebook:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.footer-floating-btn.facebook:hover {
    background: linear-gradient(135deg, #1a90ff, #0082fb);
    box-shadow: 0 6px 24px rgba(0, 130, 251, 0.6), 0 2px 8px rgba(0, 0, 0, 0.18);
    transform: scale(1.12) translateY(-2px);
}

.footer-floating-btn.facebook img {
    width: 32px;
    height: 32px;
}

/* Pulse animations */
@keyframes pulse-line {

    0%,
    100% {
        box-shadow: 0 4px 16px rgba(57, 205, 2, 0.45), 0 2px 6px rgba(0, 0, 0, 0.18);
    }

    50% {
        box-shadow: 0 4px 24px rgba(57, 205, 2, 0.75), 0 2px 8px rgba(0, 0, 0, 0.22);
    }
}

@keyframes pulse-messenger {

    0%,
    100% {
        box-shadow: 0 4px 16px rgba(0, 130, 251, 0.45), 0 2px 6px rgba(0, 0, 0, 0.18);
    }

    50% {
        box-shadow: 0 4px 24px rgba(0, 130, 251, 0.75), 0 2px 8px rgba(0, 0, 0, 0.22);
    }
}

/* ===== LINE CHAT POPUP ===== */
.footer-line-content {
    display: none;
    position: fixed;
    bottom: 180px;
    right: 20px;
    z-index: 1000;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18), 0 2px 12px rgba(57, 205, 2, 0.12);
    width: 300px;
    overflow: hidden;
    animation: slideUpCard 0.25s ease;
}

.footer-line-content-card {
    display: flex;
    flex-direction: column;
}

/* LINE header banner */
.footer-line-content-card>.d-flex {
    background: linear-gradient(135deg, #39cd02, #2aaa00);
    padding: 14px 14px 16px;
    align-items: center;
    gap: 0;
}

.footer-line-content-card-logo {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, 0.7);
    object-fit: cover;
    flex-shrink: 0;
}

.footer-line-content-card .ms-3 {
    margin-left: 12px !important;
}

.footer-line-content-card-h1 {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.footer-line-content-card-plain {
    color: rgba(255, 255, 255, 0.88);
    font-size: 11.5px;
    margin: 2px 0 0;
    line-height: 1.4;
}

.footer-line-content-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    padding: 0;
    flex-shrink: 0;
}

.footer-line-content-close:hover {
    background: rgba(255, 255, 255, 0.35);
}

.footer-line-content-chat {
    background: #f2f2f7;
    margin: 14px 14px 0;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.75;
    color: #333;
}

.footer-line-content-chat-btn {
    display: block;
    margin: 12px 14px 14px;
    background: linear-gradient(135deg, #39cd02, #2aaa00);
    color: #fff;
    text-align: center;
    text-decoration: none;
    padding: 11px 0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
    transition: opacity 0.2s, transform 0.2s;
    box-shadow: 0 3px 10px rgba(57, 205, 2, 0.35);
}

.footer-line-content-chat-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
    color: #fff;
}

.footer-line-content-qr {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
}

/* ===== FACEBOOK CHAT POPUP ===== */
.footer-facebook-content {
    display: none;
    position: fixed;
    bottom: 180px;
    right: 20px;
    z-index: 1000;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18), 0 2px 12px rgba(0, 130, 251, 0.12);
    width: 300px;
    overflow: hidden;
    animation: slideUpCard 0.25s ease;
}

.footer-facebook-content-card {
    display: flex;
    flex-direction: column;
}

/* Messenger header banner */
.footer-facebook-content-card>.d-flex {
    background: linear-gradient(135deg, #0082fb, #006dd6);
    padding: 14px 14px 16px;
    align-items: center;
}

.footer-facebook-content-card-logo {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, 0.7);
    object-fit: cover;
    flex-shrink: 0;
}

.footer-facebook-content-card .ms-3 {
    margin-left: 12px !important;
}

.footer-facebook-content-card-h1 {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.footer-facebook-content-card-plain {
    color: rgba(255, 255, 255, 0.88);
    font-size: 11.5px;
    margin: 2px 0 0;
    line-height: 1.4;
}

.footer-facebook-content-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    padding: 0;
    flex-shrink: 0;
}

.footer-facebook-content-close:hover {
    background: rgba(255, 255, 255, 0.35);
}

.footer-facebook-content-chat {
    background: #f2f2f7;
    margin: 14px 14px 0;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.75;
    color: #333;
}

.footer-facebook-content-chat-btn {
    display: block;
    margin: 12px 14px 14px;
    background: linear-gradient(135deg, #0082fb, #006dd6);
    color: #fff;
    text-align: center;
    text-decoration: none;
    padding: 11px 0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
    transition: opacity 0.2s, transform 0.2s;
    box-shadow: 0 3px 10px rgba(0, 130, 251, 0.35);
}

.footer-facebook-content-chat-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
    color: #fff;
}

/* Slide-up entry animation for both cards */
@keyframes slideUpCard {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.97);
    }

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

/* ===== PROMOTION BANNER ===== */
#footer-promotion-10per10month {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 998;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: var(--color-white);
    padding: var(--space-3) var(--space-6);
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-4);
}

.footer-promotion-text {
    font-size: var(--font-size-body-md);
    font-weight: var(--font-weight-medium);
}

.footer-promotion-link {
    color: var(--color-white);
    text-decoration: underline;
    font-weight: var(--font-weight-semibold);
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }

    .footer-social-chat-btn {
        width: 50px;
        height: 50px;
    }

    .footer-line-content,
    .footer-facebook-content {
        right: 10px;
        left: 10px;
        width: auto;
    }
}