/**
 * Footer Block Styles
 *
 * Translates styles from original theme:
 * - scss/footer/_footer.scss
 * - scss/template-parts/footer/_footer-columns.scss
 * - scss/template-parts/footer/_footer-utilities.scss
 */

/* ==========================================================================
   Footer Wrapper
   ========================================================================== */

.site-footer {
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Footer Columns Grid Layout
   ========================================================================== */

/*
 * Structure: .footer-columns contains:
 * - 1 .footer-logo
 * - 5 .footer-col (Youth, College/Club, Team USA, Discover, About)
 *
 * Responsive behavior:
 * - Mobile (< 768px): Single column stack
 * - Tablet (768px+): 3-column grid
 * - Desktop (1024px+): Full 6-column grid (logo + 5 columns)
 *
 * Layout type is "default" in block markup so WP doesn't inject
 * inline flex styles — grid is controlled entirely via CSS.
 */

.footer-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--wp--preset--spacing--50);

    /* Tablet (768px+): 3-column grid */
    @media (min-width: 768px) {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--wp--preset--spacing--60);
    }

    /* Desktop (1024px+): Full grid layout */
    @media (min-width: 1024px) {
        grid-template-columns: 130px repeat(5, 1fr);
        gap: var(--wp--preset--spacing--60);
    }
}

/* ==========================================================================
   Footer Logo
   ========================================================================== */

.footer-logo {
    padding-bottom: var(--wp--preset--spacing--40);

    @media (min-width: 768px) {
        padding-bottom: 0;
        grid-column: 1 / -1;
    }

    @media (min-width: 1024px) {
        grid-column: auto;
    }

    & img {
        max-width: 130px;
        width: 100%;
    }
}

/* ==========================================================================
   Footer Column Spacing
   ========================================================================== */

/*
 * Tighten default block gap inside columns, then add explicit
 * spacing before secondary headers (headers that follow a link list).
 * Original theme: .group + .group { padding-top: 25px; }
 */

/*
 * theme.json sets blockGap: 0 globally, so all spacing within
 * footer columns must be handled explicitly here.
 * Original: .group + .group { padding-top: 25px; }
 */

.footer-col {
    /* Standard gap between all child blocks */
    & > * + * {
        margin-top: var(--wp--preset--spacing--20);
    }

    /* Breathing room before headers that follow lists or other headers */
    & > .footer-links + .footer-col-header,
    & > .footer-col-header + .footer-col-header {
        margin-top: var(--wp--preset--spacing--60);
    }
}

/* ==========================================================================
   Footer Column Typography
   ========================================================================== */

/*
 * Column headers: Proxima Nova, uppercase, blue → red on hover.
 * Applied to all h6 headings in footer columns via .footer-col-header class.
 * Includes section headers (Youth, College) and standalone headers (Masters, Beach).
 */

.footer-col-header {
    font-family: var(--wp--preset--font-family--body);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--wp--preset--color--blue);
    text-decoration: none;

    & a {
        color: inherit;
        text-decoration: none;
        font-weight: inherit;

        &:hover {
            color: var(--wp--preset--color--bright-red);
        }
    }
}

/* Footer Link Lists */
.footer-links {
    list-style: none;
    padding: 0;
    margin: var(--wp--preset--spacing--30) 0 0 0;
    font-size: 0.8125rem;

    & li {
        padding: 0;
        margin-bottom: var(--wp--preset--spacing--20);
    }

    & a {
        font-family: var(--wp--preset--font-family--body);
        font-weight: 400;
        color: var(--wp--preset--color--blue);
        text-decoration: none;
        transition: color 0.2s ease;

        &:hover {
            color: var(--wp--preset--color--bright-red);
        }
    }
}

/* ==========================================================================
   Footer Utilities (Copyright + Social)
   ========================================================================== */

.footer-utilities {
    font-family: var(--wp--preset--font-family--body);

    /* Copyright text */
    & .footer-copyright {
        font-size: 0.75em;
        line-height: 1.5;
    }

    /* Site map / privacy links */
    & .footer-legal {
        font-size: 0.675em;

        & a {
            color: var(--wp--preset--color--charcoal);
            text-decoration: none;

            &:hover {
                color: var(--wp--preset--color--bright-red);
            }
        }
    }

    /* Social Icons */
    & .wp-block-social-links {
        gap: var(--wp--preset--spacing--30);
    }

    & .wp-block-social-links .wp-social-link {
        color: var(--wp--preset--color--red);

        &:hover {
            color: var(--wp--preset--color--bright-red);
        }
    }

    /* Force dark icon color (override WordPress's icon color) */
    & .wp-block-social-links.has-icon-color .wp-social-link svg {
        fill: currentColor;
    }

    /* Mobile: stack utilities vertically */
    @media (max-width: 567px) {
        flex-direction: column;
        align-items: flex-start !important;

        & .wp-block-social-links {
            margin-top: var(--wp--preset--spacing--40);
        }
    }
}
