/*
 * ============================================================
 * GMP Global Footer  (v1.0.2)
 * Gym Marketing Pros, staging.gymmarketingpros.com
 * Prompt 06, AVADA-NATIVE-GLOBAL-FOOTER v6.3
 * Manifests: GMP-DSM-20261110, GMP-RCM-20261111
 * Loaded by inc/site-footer.php on every front-end page, with
 * assets/js/gmp-footer.js (opens the link groups on desktop,
 * one-open-at-a-time accordion below 1024px, in-page CTA).
 *
 * Hosts (CSS Class fields):
 *  .gmp-footer             Footer Main Container (the footer landmark)
 *  .gmp-footer-tagline     Tagline Text Block
 *  .gmp-footer-cta         Strategy call Button (with gmp-btn)
 *  .gmp-footer-social      Social Links Element
 *  .gmp-footer-links       Link group Text Blocks (five)
 *  .gmp-footer-links--first  First link group (top divider below 1024px)
 *  .gmp-footer-legal       Copyright and legal links Text Block
 *
 *  1. Shared resets inside the footer Text Blocks
 *  2. Brand row: tagline, button, social circles
 *  3. Link groups: common
 *  4. Link groups: desktop columns (1024px and up)
 *  5. Link groups: accordion (1023px and below)
 *  6. Bottom bar: copyright and legal links
 *  7. Reduced motion
 *
 * Colors are DSM palette tokens only. :is(.x, #gmp-unused)
 * lifts a rule to ID level so it beats Avada's footer-area and
 * element rules without !important. Breakpoints are the DSM
 * Medium (1023px) and Small (719px) values.
 * ============================================================
 */


/* ============================================================
 * 1. SHARED RESETS
 * Avada's p margin is right for body copy; in the footer the
 * Column Gap and these blocks own every space, so the inner
 * paragraph margins go to 0. WordPress can add empty paragraphs
 * around block HTML and shortcodes; they never take space.
 * ============================================================ */

:is(.gmp-footer-tagline, .gmp-footer-links, .gmp-footer-legal, #gmp-unused) p {
    margin: 0;
}

:is(.gmp-footer-tagline, .gmp-footer-links, .gmp-footer-legal, #gmp-unused) p:empty {
    display: none;
}


/* ============================================================
 * 2. BRAND ROW
 * The Brand Column is a wrapping Row (Gap 40px / 24px). The
 * tagline starts at no width and grows up to its own text
 * width, so on desktop the button and circles sit 40px after
 * the text and the tagline wraps before they would; below
 * 1024px the full-width button (gmp-btn--full-md) and the
 * circles drop to their own lines.
 * ============================================================ */

.gmp-footer .gmp-footer-tagline {
    flex: 1 1 0%;
    font-weight: 900; /* DSM 3: typography1 Display Heading, weight 900 */
}

/* Size, line height, letter spacing and uppercase are Text Block
   fields; family and axes come from gmp-display. */
:is(.gmp-footer-tagline, #gmp-unused) p {
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
}

.gmp-footer :is(.fusion-button-wrapper:has(.gmp-footer-cta), .fusion-button.gmp-footer-cta, .gmp-footer-social) {
    flex: 0 0 auto;
}

@media (min-width: 1024px) {
    /* One line on desktop, as in the design. */
    :is(.gmp-footer, #gmp-unused) .gmp-footer-cta .fusion-button-text {
        white-space: nowrap;
    }
}

/* Full width below 1024px. gmp-btn--full-md alone lost to an Avada
   rule in this Row column on the live site (2026-11-11: button
   stayed 329px), so the footer sets it here, lifted to ID level. */
@media (max-width: 1023px) {
    :is(.gmp-footer, #gmp-unused) :is(.fusion-button-wrapper:has(.gmp-footer-cta), a.fusion-button.gmp-footer-cta) {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    :is(.gmp-footer, #gmp-unused) a.fusion-button.gmp-footer-cta {
        display: flex !important;
    }
}

/* Social circles: 48px, 10px apart. Box Padding, Box Border and
   the Regular / Hover fill and border colors are Builder fields;
   Avada renders the links inline, pulls the row up and writes
   each icon color inline, so those three are reset here. */
:is(.gmp-footer-social, #gmp-unused) .fusion-social-networks-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 !important;
}

:is(.gmp-footer-social, #gmp-unused) .fusion-social-network-icon {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 48px !important;
    height: 48px !important;
    margin: 0 !important;
    line-height: 1;
    color: var(--awb-color1) !important;
    text-decoration: none;
    transition: background-color .25s, border-color .25s, transform .25s;
}

:is(.gmp-footer-social, #gmp-unused) .fusion-social-network-icon:is(:hover, :focus-visible) {
    color: var(--awb-color1) !important;
    transform: translateY(-2px);
}

/* Keyboard focus gets the hover fill and border (no Builder
   field holds a focus state). */
:is(.gmp-footer-social, #gmp-unused) .fusion-social-network-icon:focus-visible {
    background-color: var(--awb-color4) !important;
    border-color: var(--awb-color4) !important;
    outline: 2px solid var(--awb-color1);
    outline-offset: 3px;
}


/* ============================================================
 * 3. LINK GROUPS: COMMON
 * Each group is one Text Block holding
 * details > summary + nav > ul > li > a.
 * Avada's footer area sets its own type on lists and links, so
 * every layer inherits and the type is set once below.
 * ============================================================ */

:is(.gmp-footer-links, #gmp-unused) :is(details, summary, nav, ul, li, a) {
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
}

:is(.gmp-footer-links, #gmp-unused) details {
    margin: 0;
    padding: 0;
}

:is(.gmp-footer-links, #gmp-unused) summary {
    position: relative;
    display: flex;
    align-items: center;
    list-style: none;
    font-family: "GMP Roboto Flex", var(--awb-typography3-font-family);
    text-align: left;
}

:is(.gmp-footer-links, #gmp-unused) summary::-webkit-details-marker {
    display: none;
}

:is(.gmp-footer-links, #gmp-unused) summary::marker {
    content: "";
}

:is(.gmp-footer-links, #gmp-unused) ul {
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
}

:is(.gmp-footer-links, #gmp-unused) li {
    margin: 0;
    padding: 0;
}

:is(.gmp-footer-links, #gmp-unused) a {
    display: flex;
    align-items: center;
    padding: 6px 0;
    font-family: "GMP Roboto Flex", var(--awb-typography3-font-family);
    font-weight: 400; /* design: footer links use the regular weight */
    line-height: 1.4;
    text-decoration: none;
}

:is(.gmp-footer-links, #gmp-unused) a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}


/* ============================================================
 * 4. LINK GROUPS: DESKTOP (1024px and up)
 * Five columns, always open. The label is the DSM Eyebrow Label
 * set in Muted Text; links are Light Text on Dark and turn
 * Brand Red, nudging 4px right. gmp-footer.js opens the groups
 * and takes the labels out of the Tab order; the
 * ::details-content rule shows the links even before it runs.
 * ============================================================ */

@media (min-width: 1024px) {

    :is(.gmp-footer-links, #gmp-unused) summary {
        margin: 0 0 14px;
        padding: 0;
        font-size: var(--awb-typography5-font-size, 12px);
        font-weight: 700; /* DSM 3: typography5 Eyebrow Label, weight 700 */
        line-height: var(--awb-typography5-line-height, normal);
        letter-spacing: var(--awb-typography5-letter-spacing, .14em);
        text-transform: uppercase;
        color: var(--awb-color6);
        cursor: default;
        pointer-events: none;
    }

    :is(.gmp-footer-links, #gmp-unused) summary::before,
    :is(.gmp-footer-links, #gmp-unused) summary::after {
        display: none;
    }

    :is(.gmp-footer-links, #gmp-unused) a {
        min-height: 36px;
        font-size: 15px; /* design: footer link size at 1024px and up */
        color: var(--awb-color12);
        transition: color .2s, transform .25s;
    }

    :is(.gmp-footer-links, #gmp-unused) a:is(:hover, :focus-visible) {
        color: var(--awb-color4);
        transform: translateX(4px);
    }
}

/* Kept on its own: a browser that does not know ::details-content
   drops only this rule (gmp-footer.js opens the groups there). */
@media (min-width: 1024px) {
    .gmp-footer-links details::details-content {
        content-visibility: visible;
    }
}


/* ============================================================
 * 5. LINK GROUPS: ACCORDION (1023px and below)
 * 64px rows between Divider on Dark lines, label in white with
 * a 32px round + that turns 45 degrees and fills Button Red
 * when open (shared --gmp-icon-plus). One group open at a time
 * (gmp-footer.js).
 * ============================================================ */

@keyframes gmp-footer-fade-up {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 1023px) {

    :is(.gmp-footer-links, #gmp-unused) details {
        border-bottom: 1px solid var(--awb-color19);
    }

    :is(.gmp-footer-links--first, #gmp-unused) details {
        border-top: 1px solid var(--awb-color19);
    }

    :is(.gmp-footer-links, #gmp-unused) summary {
        min-height: 64px;
        margin: 0;
        padding: 0 48px 0 0;
        font-size: 14px; /* design: accordion label size below 1024px */
        font-weight: 800; /* DSM 3: Roboto Flex weight 800 (weights the design uses) */
        line-height: 1.3;
        letter-spacing: .1em;
        text-transform: uppercase;
        color: var(--awb-color1);
        cursor: pointer;
    }

    /* Round outline (Border on Dark), Button Red with a Brand Red
       border when open. */
    :is(.gmp-footer-links, #gmp-unused) summary::before {
        content: "";
        position: absolute;
        top: 50%;
        right: 0;
        width: 32px;
        height: 32px;
        margin-top: -16px;
        box-sizing: border-box;
        border: 1px solid var(--awb-color17);
        border-radius: 50%;
        background-color: hsla(var(--awb-color5-h),var(--awb-color5-s),var(--awb-color5-l),calc(var(--awb-color5-a) - 100%));
        transition: background-color .25s, border-color .25s;
    }

    /* The + (shared icon), 12px, white; turns 45 degrees open. */
    :is(.gmp-footer-links, #gmp-unused) summary::after {
        content: "";
        position: absolute;
        top: 50%;
        right: 10px;
        width: 12px;
        height: 12px;
        margin-top: -6px;
        background-color: var(--awb-color1);
        -webkit-mask: var(--gmp-icon-plus) center / 12px 12px no-repeat;
                mask: var(--gmp-icon-plus) center / 12px 12px no-repeat;
        transition: transform .35s cubic-bezier(.2, .8, .2, 1);
    }

    :is(.gmp-footer-links, #gmp-unused) details[open] > summary::before {
        border-color: var(--awb-color4);
        background-color: var(--awb-color5);
    }

    :is(.gmp-footer-links, #gmp-unused) details[open] > summary::after {
        transform: rotate(45deg);
    }

    :is(.gmp-footer-links, #gmp-unused) summary:focus-visible {
        outline: 2px solid var(--awb-color1);
        outline-offset: 3px;
    }

    :is(.gmp-footer-links, #gmp-unused) nav {
        padding: 0 0 16px;
    }

    :is(.gmp-footer-links, #gmp-unused) details[open] > nav {
        animation: gmp-footer-fade-up .3s cubic-bezier(.2, .8, .2, 1);
    }

    :is(.gmp-footer-links, #gmp-unused) a {
        min-height: 44px;
        font-size: 16px; /* design: accordion link size below 1024px */
        color: var(--awb-color11);
        transition: color .2s;
    }

    :is(.gmp-footer-links, #gmp-unused) a:is(:hover, :focus-visible) {
        color: var(--awb-color4);
    }
}


/* ============================================================
 * 6. BOTTOM BAR
 * One Text Block: the copyright paragraph and the legal links
 * paragraph. Size, letter spacing and the Muted Text color are
 * Text Block fields; family, weight and the layout live here.
 * Side by side from 720px, stacked and left aligned below.
 * ============================================================ */

.gmp-footer-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 14px 32px;
}

/* Size and letter spacing come from the Text Block fields; family
   and weight are set on the paragraphs and links themselves (an
   Avada Text Block rule beat them on the block, live 2026-11-11). */
:is(.gmp-footer-legal, #gmp-unused) :is(p, a) {
    font: inherit;
    letter-spacing: inherit;
    font-family: "GMP Roboto Flex", var(--awb-typography3-font-family);
    font-weight: 500; /* DSM 3: Roboto Flex weight 500 (weights the design uses) */
}

:is(.gmp-footer-legal, #gmp-unused) p:has(a) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 24px;
}

:is(.gmp-footer-legal, #gmp-unused) a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--awb-color6);
    text-decoration: none;
    transition: color .2s;
}

:is(.gmp-footer-legal, #gmp-unused) a:is(:hover, :focus-visible) {
    color: var(--awb-color1);
}

:is(.gmp-footer-legal, #gmp-unused) a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

@media (max-width: 719px) {
    .gmp-footer-legal {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* ============================================================
 * 7. REDUCED MOTION
 * Same states, no movement.
 * ============================================================ */

@media (prefers-reduced-motion: reduce) {
    :is(.gmp-footer-social, #gmp-unused) .fusion-social-network-icon,
    :is(.gmp-footer-links, #gmp-unused) a,
    :is(.gmp-footer-links, #gmp-unused) summary::before,
    :is(.gmp-footer-links, #gmp-unused) summary::after,
    :is(.gmp-footer-legal, #gmp-unused) a {
        transition: none;
    }

    :is(.gmp-footer-social, #gmp-unused) .fusion-social-network-icon:is(:hover, :focus-visible),
    :is(.gmp-footer-links, #gmp-unused) a:is(:hover, :focus-visible) {
        transform: none;
    }

    :is(.gmp-footer-links, #gmp-unused) details[open] > nav {
        animation: none;
    }
}
