/**
 * Tieu Hao Pro footer component.
 *
 * Scope: footer composition, columns, contact area and legal/navigation links.
 * Content, URLs and business data belong to WordPress templates/settings.
 */

.thp-footer {
    border-top: 1px solid var(--thp-color-border);
    background: var(--thp-color-surface-subtle);
    color: var(--thp-color-text-secondary);
}

.thp-footer__main {
    padding-block: var(--thp-space-12) var(--thp-space-9);
}

.thp-footer__grid {
    display: grid;
    grid-template-columns: minmax(1.4fr, 2fr) repeat(3, minmax(0, 1fr));
    gap: var(--thp-space-8);
}

.thp-footer__brand {
    display: inline-flex;
    align-items: center;
    margin-bottom: var(--thp-space-4);
    color: var(--thp-color-brand-deep);
    font-weight: 800;
    text-decoration: none;
}

.thp-footer__logo {
    width: auto;
    max-width: 180px;
    max-height: 48px;
}

.thp-footer__description {
    max-width: 44ch;
    margin: 0;
}

.thp-footer__title {
    margin: 0 0 var(--thp-space-4);
    color: var(--thp-color-text);
    font-size: 1rem;
    font-weight: 800;
}

.thp-footer__list {
    display: flex;
    flex-direction: column;
    gap: var(--thp-space-3);
    margin: 0;
    padding: 0;
    list-style: none;
}

.thp-footer__list li {
    margin: 0;
}

.thp-footer__link {
    color: inherit;
    text-decoration: none;
}

.thp-footer__link:hover {
    color: var(--thp-color-brand);
}

.thp-footer__contact {
    display: flex;
    flex-direction: column;
    gap: var(--thp-space-3);
}

.thp-footer__contact-item {
    display: flex;
    gap: var(--thp-space-3);
    align-items: flex-start;
}

.thp-footer__contact-icon {
    display: inline-flex;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    color: var(--thp-color-brand);
}

.thp-footer__contact-icon > svg {
    width: 100%;
    height: 100%;
}

.thp-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--thp-space-4);
    padding-block: var(--thp-space-5);
    border-top: 1px solid var(--thp-color-border);
    font-size: var(--thp-font-size-sm);
}

.thp-footer__legal {
    display: flex;
    flex-wrap: wrap;
    gap: var(--thp-space-4);
}

.thp-footer__social {
    display: flex;
    flex-wrap: wrap;
    gap: var(--thp-space-2);
}

.thp-footer__social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--thp-color-border);
    border-radius: 50%;
    background: var(--thp-color-surface);
    color: var(--thp-color-text);
    text-decoration: none;
}

.thp-footer__social-link:hover {
    border-color: var(--thp-color-brand);
    color: var(--thp-color-brand);
}

@media (max-width: 1023px) {
    .thp-footer__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .thp-footer__brand-column {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767px) {
    .thp-footer__main {
        padding-block: var(--thp-space-9) var(--thp-space-7);
    }

    .thp-footer__grid {
        grid-template-columns: 1fr;
        gap: var(--thp-space-7);
    }

    .thp-footer__brand-column {
        grid-column: auto;
    }

    .thp-footer__bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .thp-footer__legal {
        flex-direction: column;
        gap: var(--thp-space-2);
    }
}

.thp-footer__bottom nav {
    min-width: 0;
}

.thp-footer__bottom nav .thp-footer__list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--thp-space-3);
    margin: 0;
    padding: 0;
    list-style: none;
}

.thp-footer__bottom nav .thp-footer__list .menu-item {
    margin: 0;
}

.thp-footer__bottom nav .thp-footer__list a {
    color: inherit;
    text-decoration: none;
}

.thp-footer__bottom nav .thp-footer__list a:hover {
    color: var(--thp-color-brand);
}

@media (max-width: 767px) {
    .thp-footer__bottom nav .thp-footer__list {
        flex-direction: column;
        gap: var(--thp-space-2);
    }
}
