/* Site footer (footer_2023.cfm)
   Everything is scoped to .apFooter and prefixed "apf" so it can't clash
   with the older footer rules in style_2023.css / responsive_2023.css. */

.apFooter {
    --apf-ink: #17262f;          /* primary text */
    --apf-ink-soft: #46555e;     /* secondary text (7:1 on the light background) */
    --apf-accent: #007ba9;       /* brand blue for text: headings, icons, hover, focus (4.5:1+) */
    /* Brand gradients, same stops as the header buttons */
    --apf-grad-blue: linear-gradient(90deg, #45d0ef 0%, #1f97dd 100%);
    --apf-grad-brand: linear-gradient(90deg, #7fd12d 0%, #57b52f 22%, #45d0ef 60%, #1f97dd 100%);
    --apf-line: rgba(23, 38, 47, 0.12);
    --apf-bar: #14232d;

    position: relative;
    clear: both;
    float: none;
    width: 100%;
    color: var(--apf-ink);
    font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

.apFooter *,
.apFooter *::before,
.apFooter *::after {
    box-sizing: border-box;
}

.apFooter p,
.apFooter address {
    margin: 0;
    font-family: inherit;
    font-style: normal;
}

.apFooter ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.apFooter svg {
    flex-shrink: 0;
}

/* Make sure the hidden attribute wins over display rules below */
.apFooter [hidden] {
    display: none !important;
}

.apFooter .apfSrOnly {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Layout ---------- */

.apFooter .apfMain {
    position: relative;
    padding-top: 44px;
    /* Cool blue into warm sand, matching the site palette.
       Kept soft so text contrast stays even across the whole footer. */
    background:
        radial-gradient(900px 520px at 0% 0%, rgba(69, 208, 239, 0.16), transparent 70%),
        radial-gradient(900px 560px at 100% 100%, rgba(226, 210, 184, 0.55), transparent 70%),
        linear-gradient(135deg, #eef4f5 0%, #f8f9f8 52%, #f4efe7 100%);
}

/* Green-to-blue brand line across the top */
.apFooter .apfMain::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--apf-grad-brand);
}

.apFooter .apfWrap {
    width: 100%;
    max-width: 1250px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ---------- Brand row ---------- */

.apFooter .apfBrand {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--apf-line);
}

.apFooter .apfLogo {
    display: inline-block;
    border-radius: 6px;
}

.apFooter .apfLogo img {
    display: block;
    width: 220px;
    max-width: 100%;
    height: auto;
}

/* ---------- Headings + link lists ---------- */

.apFooter .apfHeading {
    margin: 0 0 10px;
    padding: 0;
    color: var(--apf-accent);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.6px;
    line-height: 1.4;
    text-transform: uppercase;
}

/* Features get a wider track so three columns fit without wrapping */
.apFooter .apfNav {
    display: grid;
    grid-template-columns: minmax(0, 3.4fr) repeat(3, minmax(0, 1fr));
    gap: 28px 40px;
    padding: 32px 0;
    border-bottom: 1px solid var(--apf-line);
}

/* Features fill down three columns (4 rows) */
.apFooter .apfListSplit {
    column-count: 3;
    column-gap: 24px;
}

.apFooter .apfListSplit li {
    break-inside: avoid;
}

.apFooter .apfLink {
    display: inline-block;
    padding: 4px 0;
    color: var(--apf-ink);
    font-size: 15px;
    line-height: 1.45;
    transition: color .15s ease;
}

.apFooter a.apfLink:hover {
    color: var(--apf-accent);
    text-decoration: underline !important;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

/* ---------- Contact strip + app badges (badges sit in the brand row) ---------- */

.apFooter .apfInfo {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px 40px;
    padding: 20px 0;
    border-bottom: 1px solid var(--apf-line);
}

.apFooter .apfContact {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    align-items: center;
    gap: 4px 28px;
}

.apFooter .apfContact li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.apFooter .apfContact svg {
    color: var(--apf-accent);
}

/* Address gets its own line under phone + email */
.apFooter .apfContact li:last-child {
    grid-column: 1 / -1;
}

.apFooter .apfContact address {
    padding: 4px 0;
    color: var(--apf-ink-soft);
    font-size: 15px;
}

.apFooter .apfApps {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
}

.apFooter .apfBadges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.apFooter .apfBadges a {
    display: inline-flex;
    border-radius: 8px;
    transition: transform .2s ease, box-shadow .2s ease;
}

.apFooter .apfBadges a:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px -10px rgba(20, 35, 45, 0.6);
}

.apFooter .apfBadges img {
    display: block;
    width: auto;
    height: 40px;
}

/* ---------- Ask AI about AestheticsPro ---------- */
/* Kept quieter than the main links: small label, light outline pills */

.apFooter .apfAi {
    max-width: 760px;
}

.apFooter .apfAiTitle {
    margin: 0 0 10px;
    padding: 0;
    color: var(--apf-ink-soft);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.apFooter .apfAiList {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.apFooter .apfAiLink,
.apFooter .apfAiCopy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 14px 0 12px;
    border: 1px solid var(--apf-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.6);
    color: var(--apf-ink);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}

.apFooter .apfAiIcon {
    display: block;
    width: 16px;
    height: 16px;
    object-fit: contain;
}

/* Single-color marks: tinted to the footer text color */
.apFooter .apfAiIconMono {
    filter: brightness(0) saturate(100%) invert(12%) sepia(14%) saturate(1200%) hue-rotate(160deg) brightness(92%);
}

.apFooter .apfAiLink:hover,
.apFooter .apfAiCopy:hover {
    border-color: #1f97dd;
    background: #ffffff;
    color: var(--apf-accent);
}

/* Copy is an action, not a destination: dashed outline sets it apart */
.apFooter .apfAiCopy {
    border-style: dashed;
    border-color: rgba(0, 123, 169, 0.45);
    background: transparent;
    color: var(--apf-accent);
}

.apFooter .apfAiCopy:focus-visible {
    outline: 2px solid var(--apf-accent);
    outline-offset: 3px;
}

.apFooter .apfAiStatus {
    min-height: 0;
    margin-top: 6px;
    color: var(--apf-accent);
    font-size: 13px;
}

.apFooter .apfAiStatus:empty {
    margin: 0;
}

.apFooter .apfAiManual {
    margin-top: 10px;
}

.apFooter .apfAiManual label {
    display: block;
    margin-bottom: 6px;
    color: var(--apf-ink-soft);
    font-size: 13px;
    font-weight: 400;
}

.apFooter .apfAiPromptText {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--apf-line);
    border-radius: 10px;
    background: #ffffff;
    color: var(--apf-ink);
    font-family: inherit;
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
}

.apFooter .apfAiPromptText:focus-visible {
    outline: 2px solid var(--apf-accent);
    outline-offset: 2px;
}

/* ---------- Trust + social ---------- */

.apFooter .apfMeta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 32px;
    padding: 18px 0;
}

.apFooter .apfTrust {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
}

.apFooter .apfTrust li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--apf-ink-soft);
    font-size: 14px;
    font-weight: 500;
}

.apFooter .apfTrust svg {
    width: 20px;
    height: 20px;
    color: var(--apf-accent);
}

.apFooter .apfSocial {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.apFooter .apfSocial a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--apf-line);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transition: background-color .2s ease, border-color .2s ease;
}

.apFooter .apfSocial img {
    display: block;
    width: 16px;
    height: 16px;
    /* Source icons are white; tint them to the footer ink color */
    filter: brightness(0) saturate(100%) invert(12%) sepia(14%) saturate(1200%) hue-rotate(160deg) brightness(92%);
    transition: filter .2s ease;
}

.apFooter .apfSocial a:hover {
    border-color: transparent;
    background: var(--apf-grad-blue);
}

.apFooter .apfSocial a:hover img {
    filter: brightness(0) invert(1);
}

/* ---------- Bottom bar ---------- */

.apFooter .apfBar {
    background: var(--apf-bar);
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
}

.apFooter .apfBarInner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0 24px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.apFooter .apfBar p {
    padding: 8px 0;
    color: inherit;
    font-size: 14px;
}

.apFooter .apfLegal {
    display: flex;
    flex-wrap: wrap;
    gap: 0 24px;
}

.apFooter .apfLegal a {
    display: inline-block;
    padding: 8px 0;
    color: #ffffff;
}

.apFooter .apfLegal a:hover {
    color: #ffffff;
    text-decoration: underline !important;
    text-underline-offset: 3px;
}

/* ---------- Keyboard focus ---------- */

.apFooter a:focus-visible {
    outline: 2px solid var(--apf-accent);
    outline-offset: 3px;
    border-radius: 6px;
}

.apFooter .apfSocial a:focus-visible,
.apFooter .apfAiLink:focus-visible,
.apFooter .apfAiCopy:focus-visible {
    border-radius: 999px;
}

.apFooter .apfBar a:focus-visible {
    outline-color: #7fd6e8;
}

/* ---------- Small desktop / tablet ---------- */

@media (max-width: 1199px) {
    /* Features take their own row in four columns; the other groups sit below */
    .apFooter .apfNav {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .apFooter .apfColFeatures {
        grid-column: 1 / -1;
    }

    .apFooter .apfListSplit {
        column-count: 4;
    }
}

@media (max-width: 899px) {
    .apFooter .apfListSplit {
        column-count: 3;
    }
}

/* ---------- Mobile ---------- */

@media (max-width: 767px) {
    .apFooter .apfWrap {
        padding: 0 20px;
    }

    .apFooter .apfMain {
        padding-top: 36px;
    }

    .apFooter .apfBrand {
        padding-bottom: 28px;
    }

    .apFooter .apfLogo img {
        width: 200px;
    }

    .apFooter .apfNav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 24px;
        padding: 28px 0;
    }

    .apFooter .apfListSplit {
        column-count: 2;
        column-gap: 20px;
    }

    .apFooter .apfLink {
        padding: 6px 0;
    }

    /* Contact stacks; apps sit under it */
    .apFooter .apfInfo {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px 0;
    }

    .apFooter .apfContact {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    /* Address breaks after the street line */
    .apFooter .apfContact address span {
        display: block;
    }

    .apFooter .apfContact li:last-child {
        align-items: flex-start;
    }

    .apFooter .apfContact li:last-child svg {
        margin-top: 6px;
    }

    .apFooter .apfApps {
        flex-direction: column;
        align-items: flex-start;
    }

    .apFooter .apfSocial a {
        width: 44px;
        height: 44px;
    }

    .apFooter .apfAiLink,
    .apFooter .apfAiCopy {
        min-height: 40px;
    }

    .apFooter .apfBarInner {
        flex-direction: column;
        align-items: flex-start;
        padding-top: 12px;
        padding-bottom: 12px;
    }
}

/* Very narrow phones: single-column features so long names don't cramp */
@media (max-width: 379px) {
    .apFooter .apfListSplit {
        column-count: 1;
    }

    .apFooter .apfSocial {
        gap: 6px;
    }

    .apFooter .apfSocial a {
        width: 40px;
        height: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .apFooter *,
    .apFooter *::before,
    .apFooter *::after {
        transition: none !important;
    }
}
