/**
 * Footer Styles
 * Site footer, footer grid, contact list, payment/social icons, newsletter form, copyright.
 * Extracted from footer.php inline <style> block.
 */

/* Modern Luxury Footer Styles */
.site-footer {
    background: var(--primary, #0d3e9a);
    color: #ffffff;
    padding: 64px 0 0;
    font-size: 14.5px;
    margin-top: auto;
    position: relative;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2.2fr 1fr 1fr 1.4fr;
    gap: 48px;
    padding-bottom: 40px;
    border-bottom: none !important;
}

.footer-brand-col .footer-logo-text {
    font-family: 'SVN-Gilroy Bold', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    display: block;
    margin-bottom: 12px;
}

.footer-desc {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    font-size: 13.5px;
    max-width: 340px;
}

.footer-heading {
    font-family: 'SVN-Gilroy Bold', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 18px;
    letter-spacing: 0.2px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 13.5px;
}

.footer-links li a:hover {
    color: #ffffff;
    transform: translateX(3px);
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.contact-value {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13.5px;
    font-weight: 500;
}

/* Extras Row (Payments, Social, Newsletter) */
.footer-extras-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1.3fr;
    gap: 32px;
    padding: 24px 0 40px;
    border-top: none !important;
    margin-top: 0 !important;
}

.footer-extras-label {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 12px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.footer-payment-icons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-payment-icon {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50px;
    font-size: 12.5px;
    font-weight: 600;
    color: #ffffff;
    transition: all 0.2s ease;
}

.footer-payment-icon:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.25);
}

.footer-social-icons {
    display: flex;
    gap: 10px;
}

.footer-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    color: #ffffff;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.footer-social-icon:hover {
    background: #ffffff;
    color: var(--primary, #0d3e9a);
    border-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Newsletter: underline chỉ nằm dưới ô nhập, không kéo dài qua nút Đăng ký */
footer#colophon.site-footer .footer-newsletter-form,
.footer-newsletter-form {
    max-width: 320px !important;
}

footer#colophon.site-footer .footer-newsletter-form .newsletter-pill-input,
.newsletter-pill-input {
    display: flex !important;
    align-items: center !important;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 0 !important;
    border-radius: 0 !important;
    padding: 3px 0 !important;
    height: 38px !important;
    box-sizing: border-box !important;
    gap: 8px !important;
    transition: all 0.2s ease !important;
}

footer#colophon.site-footer .footer-newsletter-form .newsletter-pill-input:focus-within,
.newsletter-pill-input:focus-within {
    border-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
}

footer#colophon.site-footer .footer-newsletter-form .newsletter-pill-input:focus-within input,
.newsletter-pill-input:focus-within input {
    border-bottom-color: #ffffff !important;
}

footer#colophon.site-footer .footer-newsletter-form .newsletter-mail-icon,
.newsletter-mail-icon {
    color: rgba(255, 255, 255, 0.6) !important;
    flex-shrink: 0 !important;
    margin-right: 6px !important;
}

footer#colophon.site-footer .footer-newsletter-form .newsletter-pill-input input,
footer#colophon.site-footer .footer-newsletter-form .newsletter-pill-input input[type="email"],
footer#colophon.site-footer .footer-newsletter-form input[type="email"],
.newsletter-pill-input input {
    flex: 1 !important;
    border: 0 !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.55) !important;
    border-width: 0 0 2px 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    color: #ffffff !important;
    font-size: 12.5px !important;
    font-family: inherit !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 8px 4px 0 !important;
    margin: 0 !important;
    height: 32px !important;
    line-height: 28px !important;
    min-width: 0 !important;
    border-radius: 0 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    transition: border-color 0.2s ease !important;
}

footer#colophon.site-footer .footer-newsletter-form .newsletter-pill-input input::placeholder,
footer#colophon.site-footer .footer-newsletter-form .newsletter-pill-input input[type="email"]::placeholder,
.newsletter-pill-input input::placeholder {
    color: rgba(255, 255, 255, 0.55) !important;
    font-size: 12.5px !important;
    opacity: 1 !important;
}

footer#colophon.site-footer .footer-newsletter-form .newsletter-pill-input input:-webkit-autofill,
footer#colophon.site-footer .footer-newsletter-form .newsletter-pill-input input:-webkit-autofill:hover,
footer#colophon.site-footer .footer-newsletter-form .newsletter-pill-input input:-webkit-autofill:focus {
    -webkit-text-fill-color: #ffffff !important;
    -webkit-background-clip: text !important;
    box-shadow: none !important;
    transition: background-color 999999s ease-in-out 0s !important;
}

footer#colophon.site-footer .footer-newsletter-form .btn-newsletter-submit,
.btn-newsletter-submit {
    height: 32px !important;
    line-height: 32px !important;
    border-radius: 50px !important;
    padding: 0 16px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

/* Copyright Single Divider */
.copyright {
    padding: 24px 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.55);
    font-size: 13px;
    font-weight: 400;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

@media (max-width: 992px) {
    .footer-grid {
        gap: 32px; /* giữ nguyên khoảng cách grid như thiết kế cũ (≤600px sẽ được override 28px ở block dưới) */
    }
}

/* Tablet nhỏ / laptop hẹp (992-1280px): hàng thanh toán/social xếp 2 cột thay vì 3
   — 3 pill thanh toán cần ~355px, cột 3-cột tại 1024-1280px quá hẹp gây wrap vỡ layout. */
@media (max-width: 1280px) {
    .footer-extras-row {
        grid-template-columns: 1fr 1fr;
    }
    .footer-newsletter {
        grid-column: span 2;
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
        text-align: center;
    }
    .footer-brand-col .footer-desc {
        margin: 0 auto;
    }
    .footer-extras-row {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
    }
    .footer-newsletter {
        grid-column: span 1;
    }
    .footer-payment-icons, .footer-social-icons {
        justify-content: center;
    }
    .footer-newsletter-form {
        margin: 0 auto;
    }
}

/* ===== Footer accordion (thu gọn/mở rộng trên mobile) =====
   Desktop (>=992px): cả 3 cột luôn hiển thị đầy đủ, không có icon.
   Mobile (<=991px): tiêu đề thành nút bấm, nội dung thu gọn mặc định,
   bấm để mở/rút. JS toggle thêm class .is-open (xem footer.php). */
.footer-heading .footer-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    padding: 0;
    margin: 0;
    border: 0;
    background: none;
    cursor: pointer;
    font: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    color: inherit;
    text-align: left;
}

.footer-toggle-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.footer-collapse {
    display: grid;
    grid-template-rows: 1fr; /* desktop: luôn mở */
    transition: grid-template-rows 0.3s ease;
}

.footer-collapse > * {
    min-height: 0;
    overflow: hidden;
}

@media (min-width: 992px) {
    .footer-toggle-icon {
        display: none; /* desktop không cần icon thu gọn */
    }
}

@media (max-width: 991px) {
    .footer-heading {
        margin-bottom: 0; /* mobile: ngắt dòng bằng nút bấm thay vì margin */
    }

    /* Thu hẹp khoảng trống giữa hàng liên kết (cột cuối) và hàng
       thanh toán/social/newsletter trên mobile — tránh "đáy trống" lớn. */
    .footer-grid {
        padding-bottom: 8px;
    }

    /* Tablet/di động: hàng thanh toán/social xếp 1 cột, căn giữa —
       đồng bộ với footer đang căn giữa, tránh pill thanh toán bị wrap vỡ. */
    .footer-extras-row {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
        padding-top: 12px;
    }

    .footer-payment-icons,
    .footer-social-icons {
        justify-content: center;
    }

    .footer-newsletter {
        grid-column: span 1;
    }

    .footer-newsletter-form {
        margin: 0 auto;
    }

    .footer-heading .footer-toggle {
        justify-content: center;
        padding: 10px 0;
    }

    .footer-collapse {
        grid-template-rows: 0fr; /* mặc định thu gọn trên mobile */
    }

    .footer-widget.is-open .footer-collapse {
        grid-template-rows: 1fr;
    }

    .footer-widget.is-open .footer-collapse > * {
        padding-bottom: 18px;
    }

    .footer-widget.is-open .footer-toggle-icon {
        transform: rotate(180deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .footer-collapse,
    .footer-toggle-icon {
        transition: none;
    }
}
