/**
 * Site footer — standalone CSS (no Vite/Tailwind build required).
 * Linked from components/footer.blade.php
 */
/* Use footer.site-footer so rules beat legacy Vite bundle (footer footer.site-footer .footer-grid-main, etc.) */
footer.site-footer,
.site-footer {
    background-color: #111827;
    color: #d1d5db;
    margin-bottom: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body > .site-footer {
    margin-top: auto;
}

.site-footer__container {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    box-sizing: border-box;
}

@media (min-width: 640px) {
    .site-footer__container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1280px) {
    .site-footer__container {
        max-width: 80rem;
    }
}

@media (min-width: 1536px) {
    .site-footer__container {
        max-width: 96rem;
    }
}

.site-footer__container--main {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

@media (min-width: 1024px) {
    .site-footer__container--main {
        padding-top: 2.75rem;
        padding-bottom: 2.75rem;
    }
}

.site-footer__container--bar {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.site-footer a,
.site-footer button {
    text-decoration: none;
}

.site-footer .hidden {
    display: none !important;
}

.site-footer .newsletter-message {
    font-size: 0.875rem;
}

.site-footer h4,
.site-footer h5 {
    margin: 0;
    font-weight: 600;
}

.footer-link {
    color: #9ca3af;
    font-size: 0.875rem;
    line-height: 1.5;
    transition: color 0.2s ease;
}

.footer-link:hover,
.footer-link:focus-visible {
    color: #f87171;
}

.footer-text-link {
    color: #6b7280;
    font-size: 0.75rem;
    text-decoration: underline;
    text-underline-offset: 2px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.footer-text-link:hover {
    color: #d1d5db;
}

.footer-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff !important;
    background-color: #e60012;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}

.footer-btn-primary:hover,
.footer-btn-primary:focus-visible {
    background-color: #c40010;
    color: #ffffff !important;
}

footer.site-footer .footer-grid-main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

@media (min-width: 1024px) {
    footer.site-footer .footer-grid-main {
        grid-template-columns: 1fr 1fr 1fr 1.15fr;
        column-gap: 2rem;
        row-gap: 1rem;
    }
}

.footer-nav-details {
    border-bottom: 1px solid #374151;
}

@media (min-width: 1024px) {
    .footer-nav-details {
        border-bottom: none;
    }
}

.footer-nav-details__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.875rem 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    list-style: none;
}

@media (min-width: 1024px) {
    .footer-nav-details__summary {
        display: none;
    }
}

.footer-nav-details__summary::-webkit-details-marker {
    display: none;
}

.footer-nav-details__chevron {
    flex-shrink: 0;
    color: #9ca3af;
    transition: transform 0.2s ease;
}

.footer-nav-details[open] .footer-nav-details__chevron {
    transform: rotate(180deg);
}

.footer-nav-details__heading {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 1rem;
}

.footer-nav-details__heading--desktop {
    display: none;
}

@media (min-width: 1024px) {
    .footer-nav-details__heading--desktop {
        display: block;
    }
}

.footer-nav-details__body {
    padding-bottom: 0.75rem;
}

@media (min-width: 1024px) {
    /* <details> 默认折叠会隐藏链接；桌面端 summary 已 display:none，必须强制展开内容 */
    details.footer-nav-details:not([open]) .footer-nav-details__heading--desktop,
    details.footer-nav-details:not([open]) .footer-nav-details__body {
        display: block !important;
    }

    .footer-nav-details__body {
        display: block !important;
        padding-bottom: 0;
    }
}

.footer-link-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-link-list li + li {
    margin-top: 0.625rem;
}

.site-footer__social-col {
    padding-top: 0.5rem;
}

@media (min-width: 1024px) {
    .site-footer__social-col {
        padding-top: 0;
    }
}

.site-footer__social-heading {
    margin-bottom: 1rem;
}

@media (max-width: 1023px) {
    .site-footer__social-heading {
        padding-top: 0.5rem;
    }
}

.footer-social-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.footer-social-item {
    position: relative;
}

.footer-social-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background-color: #1f2937;
    border: 1px solid #374151;
    border-radius: 9999px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    padding: 0;
}

.footer-social-trigger:hover,
.footer-social-item.is-open .footer-social-trigger {
    background-color: #374151;
    border-color: #4b5563;
    transform: scale(1.05);
}

.footer-social-trigger__icon {
    width: 1.5rem;
    height: 1.5rem;
    object-fit: contain;
}

.footer-social-trigger__fallback {
    font-size: 0.75rem;
    color: #9ca3af;
}

.footer-social-qrcode {
    position: absolute;
    bottom: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    min-width: 9.5rem;
    padding: 0.75rem;
    text-align: center;
    background: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

.footer-social-qrcode::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: #ffffff;
}

.footer-social-qrcode[hidden] {
    display: none !important;
}

.footer-social-item.is-open .footer-social-qrcode {
    display: block !important;
}

@media (min-width: 1024px) {
    .footer-social-item:hover .footer-social-qrcode {
        display: block !important;
    }

    .footer-social-item:hover .footer-social-qrcode[hidden] {
        display: block !important;
    }
}

.footer-social-qrcode__img {
    width: 7.5rem;
    height: 7.5rem;
    border-radius: 0.25rem;
    display: block;
    margin: 0 auto 0.5rem;
}

.footer-social-qrcode__label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #374151;
}

.footer-quick-contact {
    margin-top: 1.25rem;
    padding: 0.875rem 1rem;
    background-color: #1f2937;
    border: 1px solid #374151;
    border-radius: 0.5rem;
}

@media (min-width: 1024px) {
    .footer-quick-contact {
        margin-top: 1.5rem;
        max-width: 16rem;
    }
}

.footer-quick-contact__title {
    margin: 0 0 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
}

.footer-quick-contact__phone {
    display: block;
    font-size: 1.125rem;
    font-weight: 700;
    color: #facc15;
    line-height: 1.3;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.footer-quick-contact__phone:hover,
.footer-quick-contact__phone:focus-visible {
    color: #fde047;
    outline: none;
}

.footer-quick-contact__hint {
    margin: 0.375rem 0 0;
    font-size: 0.75rem;
    color: #9ca3af;
    line-height: 1.4;
}

.site-footer__bar {
    border-top: 1px solid #374151;
    background-color: #0f1419;
}

.site-footer__bar-inner {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-size: 0.8125rem;
}

.site-footer__policies {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 0.75rem;
}

.site-footer__legal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    color: #9ca3af;
}

.site-footer__beian {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.site-footer__sep {
    color: #4b5563;
    user-select: none;
}

.site-footer .beian-link,
.site-footer .inline-flex {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

@media (min-width: 768px) {
    .site-footer__bar-inner {
        gap: 0.75rem;
    }

    .site-footer__legal {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
}

.site-footer .footer-nav-details__body ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer .footer-nav-details__body ul li + li {
    margin-top: 0.625rem;
}

.site-footer .footer-nav-details__body a {
    color: #9ca3af;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.site-footer .footer-nav-details__body a:hover {
    color: #f87171;
}

/* Modals (newsletter / unsubscribe) */
.site-footer-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.site-footer-modal.hidden {
    display: none !important;
}

.site-footer-modal:not(.hidden) {
    display: flex;
}

.site-footer-modal__panel {
    position: relative;
    width: 100%;
    max-width: 28rem;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 0.5rem;
    color: #111827;
    box-sizing: border-box;
}

.site-footer-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
}

.site-footer-modal__close:hover {
    color: #4b5563;
}

.site-footer-modal__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 1rem;
    color: #111827;
}

.site-footer-modal__field {
    margin-bottom: 1rem;
}

.site-footer-modal__label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.site-footer-modal__input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    color: #111827;
    box-sizing: border-box;
}

.site-footer-modal__input:focus {
    outline: none;
    border-color: #e60012;
    box-shadow: 0 0 0 2px rgba(230, 0, 18, 0.2);
}

.site-footer-modal__row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.site-footer-modal__row .site-footer-modal__input {
    flex: 1;
}

.site-footer-modal__captcha-img {
    width: 6rem;
    height: 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    cursor: pointer;
    flex-shrink: 0;
}

.site-footer-modal__refresh {
    font-size: 0.875rem;
    color: #e60012;
    background: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.site-footer-modal__refresh:hover {
    color: #c40010;
}

.site-footer-modal__error {
    display: block;
    font-size: 0.75rem;
    color: #dc2626;
    margin-top: 0.25rem;
}

.site-footer-modal__error.hidden {
    display: none !important;
}

.site-footer-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
}

.site-footer-modal__btn-secondary {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: #374151;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    cursor: pointer;
}

.site-footer-modal__btn-secondary:hover {
    background: #f9fafb;
}

.site-footer-modal__btn-danger {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
    background: #dc2626;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
}

.site-footer-modal__btn-danger:hover {
    background: #b91c1c;
}
