/**
 * Footer layout
 */

.site-footer {
    margin-block-start: var(--hemik-space-20);
    border-block-start: 1px solid rgb(109 40 217 / 0.12);
    background:
        linear-gradient(
            180deg,
            var(--hemik-color-surface) 0%,
            var(--hemik-color-surface-soft) 100%
        );
}

.site-footer__main {
    padding-block: clamp(var(--hemik-space-14, 3.5rem), 7vw, var(--hemik-space-20));
}

.site-footer__inner {
    display: grid;
    gap: var(--hemik-space-10);
}

.site-footer__brand,
.footer-navigation,
.footer-social,
.site-footer__widgets {
    min-width: 0;
}

.site-footer__brand {
    max-width: 30rem;
}

.site-footer__logo {
    display: flex;
    align-items: center;
}

.site-footer__logo .custom-logo-link {
    display: inline-flex;
    align-items: center;
}

.site-footer__logo .custom-logo {
    width: auto;
    max-width: min(13rem, 60vw);
    max-height: 3.25rem;
    border-radius: 0;
}

.site-footer__name {
    display: inline-block;
    color: var(--hemik-color-text);
    font-size: var(--hemik-font-size-2xl);
    font-weight: var(--hemik-font-weight-semibold);
    text-decoration: none;
}

.site-footer__name:hover {
    color: var(--hemik-color-brand);
}

.site-footer__motto {
    margin-block-start: var(--hemik-space-4);
    color: var(--hemik-color-brand);
    font-size: var(--hemik-font-size-sm);
    font-weight: var(--hemik-font-weight-semibold);
    letter-spacing: 0.05em;
}

.site-footer__description {
    max-width: 28rem;
    margin-block-start: var(--hemik-space-3);
    color: var(--hemik-color-text-soft);
    line-height: var(--hemik-line-height-relaxed);
}

.site-footer__heading {
    margin: 0 0 var(--hemik-space-4);
    color: var(--hemik-color-text);
    font-size: var(--hemik-font-size-sm);
    font-weight: var(--hemik-font-weight-semibold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.footer-navigation__menu,
.footer-social__menu,
.legal-navigation__menu {
    padding: 0;
    margin: 0;
    list-style: none;
}

.footer-navigation__menu {
    display: grid;
    gap: var(--hemik-space-2);
}

.footer-navigation__menu li,
.footer-social__menu li,
.legal-navigation__menu li {
    margin: 0;
}

.footer-navigation__menu a {
    display: inline-flex;
    min-height: 2.4rem;
    align-items: center;
    color: var(--hemik-color-text-soft);
    font-size: var(--hemik-font-size-sm);
    text-decoration: none;
}

.footer-navigation__menu a:hover,
.footer-navigation__menu .current-menu-item > a {
    color: var(--hemik-color-brand);
}

.footer-social__description {
    max-width: 18rem;
    margin-block-end: var(--hemik-space-4);
    color: var(--hemik-color-text-muted);
    font-size: var(--hemik-font-size-sm);
    line-height: 1.6;
}

.footer-social__menu {
    display: flex;
    flex-wrap: wrap;
    gap: var(--hemik-space-2);
}

.footer-social__menu a {
    display: inline-flex;
    min-height: 2.5rem;
    align-items: center;
    justify-content: center;
    padding-inline: var(--hemik-space-4);
    border: 1px solid rgb(109 40 217 / 0.16);
    border-radius: var(--hemik-radius-pill);
    background: rgb(255 255 255 / 0.7);
    color: var(--hemik-color-brand);
    font-size: var(--hemik-font-size-sm);
    font-weight: var(--hemik-font-weight-medium);
    text-decoration: none;
}

.footer-social__menu a:hover,
.footer-social__menu .current-menu-item > a {
    border-color: var(--hemik-color-border-strong);
    background: var(--hemik-color-brand-subtle);
    color: var(--hemik-color-action-hover);
}

.site-footer__widgets {
    display: grid;
    gap: var(--hemik-space-6);
}

.site-footer__widgets .widget {
    margin: 0;
    padding: var(--hemik-space-5);
    border: 1px solid rgb(109 40 217 / 0.10);
    border-radius: var(--hemik-radius-lg);
    background: rgb(255 255 255 / 0.62);
}

.site-footer__widgets .widget-title {
    margin-block-end: var(--hemik-space-3);
    font-size: var(--hemik-font-size-base);
}

/* --------------------------------------------------------------
 * Institutional / medical disclaimer
 * -------------------------------------------------------------- */

.site-footer__institutional {
    border-block-start: 1px solid rgb(109 40 217 / 0.12);
    border-block-end: 1px solid rgb(109 40 217 / 0.12);
    background:
        linear-gradient(
            90deg,
            rgb(109 40 217 / 0.055) 0%,
            rgb(139 92 246 / 0.08) 100%
        );
}

.site-footer__institutional-inner {
    display: grid;
    gap: var(--hemik-space-2);
    padding-block: var(--hemik-space-5);
}

.site-footer__institutional-label {
    color: var(--hemik-color-brand);
    font-size: var(--hemik-font-size-xs);
    font-weight: var(--hemik-font-weight-semibold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.site-footer__institutional-text {
    max-width: 62rem;
    color: var(--hemik-color-text-soft);
    font-size: var(--hemik-font-size-sm);
    line-height: 1.65;
}

/* --------------------------------------------------------------
 * Legal bar
 * -------------------------------------------------------------- */

.site-footer__legal {
    background: var(--hemik-color-deep, #24153D);
}

.site-footer__legal-inner {
    display: flex;
    flex-direction: column;
    gap: var(--hemik-space-4);
    padding-block: var(--hemik-space-4);
}

.site-footer__copyright {
    color: rgb(255 255 255 / 0.72);
    font-size: var(--hemik-font-size-xs);
}

.legal-navigation__menu {
    display: flex;
    flex-wrap: wrap;
    gap: var(--hemik-space-2) var(--hemik-space-5);
}

.legal-navigation__menu a {
    color: rgb(255 255 255 / 0.72);
    font-size: var(--hemik-font-size-xs);
    text-decoration: none;
}

.legal-navigation__menu a:hover,
.legal-navigation__menu .current-menu-item > a {
    color: var(--hemik-color-surface);
}

@media (min-width: 48rem) {
    .site-footer__inner {
        grid-template-columns: minmax(0, 1.5fr) minmax(10rem, 0.8fr) minmax(14rem, 1fr);
        align-items: start;
    }

    .site-footer__widgets {
        grid-column: 1 / -1;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .site-footer__institutional-inner {
        grid-template-columns: minmax(10rem, 0.28fr) minmax(0, 1fr);
        align-items: start;
    }

    .site-footer__legal-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .legal-navigation__menu {
        justify-content: flex-end;
    }
}

@media (min-width: 64rem) {
    .site-footer__inner {
        grid-template-columns:
            minmax(20rem, 1.55fr)
            minmax(10rem, 0.7fr)
            minmax(14rem, 0.9fr)
            minmax(16rem, 0.95fr);
    }

    .site-footer__widgets {
        grid-column: auto;
        grid-template-columns: 1fr;
    }
}

@media (forced-colors: active) {
    .site-footer__legal {
        background: Canvas;
    }

    .site-footer__copyright,
    .legal-navigation__menu a {
        color: CanvasText;
    }

    .footer-social__menu a,
    .site-footer__widgets .widget {
        border-color: CanvasText;
    }
}


/* ==============================================================
 * Social ecosystem — Visual 10
 * ============================================================== */

.footer-social__channels {
    display: grid;
    gap: var(--hemik-space-2);
}

.footer-social__channel {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--hemik-space-1) var(--hemik-space-3);
    align-items: center;
    padding: var(--hemik-space-4);
    border: 1px solid rgb(109 40 217 / 0.12);
    border-radius: var(--hemik-radius-lg);
    text-decoration: none;
}

.footer-social__channel-label {
    grid-column: 1 / -1;
    font-size: 0.68rem;
    font-weight: var(--hemik-font-weight-semibold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.footer-social__channel strong {
    font-size: var(--hemik-font-size-sm);
}

.footer-social__channel--facebook {
    border-color: transparent;
    background: var(--hemik-color-brand-deep);
    color: #fff;
}

.footer-social__channel--facebook .footer-social__channel-label {
    color: rgb(255 255 255 / 0.64);
}

.footer-social__channel--facebook:hover {
    background: #47245f;
    color: #fff;
}

.footer-social__channel--whatsapp {
    background: rgb(255 255 255 / 0.68);
    color: var(--hemik-color-brand);
}

.footer-social__channel--whatsapp .footer-social__channel-label {
    color: var(--hemik-color-text-muted);
}

.footer-social__channel--whatsapp:hover {
    border-color: var(--hemik-color-border-strong);
    background: var(--hemik-color-brand-subtle);
}

.footer-social__other {
    margin-block-start: var(--hemik-space-4);
}

.footer-social__other-label {
    display: block;
    margin-block-end: var(--hemik-space-2);
    color: var(--hemik-color-text-muted);
    font-size: 0.68rem;
    font-weight: var(--hemik-font-weight-semibold);
    letter-spacing: 0.07em;
    text-transform: uppercase;
}
