/**
 * GC Theme — Footer
 *
 * Site footer with brand block, link columns, badges,
 * disclaimer, and bottom bar.
 *
 * @package GC_Theme
 */

/* ── Site footer shell ── */
.site-footer {
    background: var(--gc-bg-soft);
    color: var(--gc-text);
    border-top: 1px solid var(--gc-border);
}

.footer-accent {
    height: 3px;
    background: var(--gc-primary);
}

/* ── Brand block ── */
.footer-brand {
    max-width: 1280px;
    margin: 0 auto;
    padding: 15px 31px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.footer-brand-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-brand-logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--gc-navy);
    letter-spacing: -0.02em;
    text-decoration: none;
}

.footer-brand-logo span {
    color: var(--gc-primary);
}

.footer-brand .custom-logo-link img {
    max-height: 40px;
    width: auto;
}

/* Dark-mode logo swap: light by default, dark when [data-theme="dark"].
   Mirrors the header's .site-branding swap, scoped to .footer-branding. */
.footer-branding .gc-logo--dark { display: none; }
[data-theme="dark"] .footer-branding .gc-logo--light { display: none; }
[data-theme="dark"] .footer-branding .gc-logo--dark { display: block; }

.footer-brand-tagline {
    font-size: 14px;
    color: var(--gc-text-muted);
    max-width: 420px;
    line-height: 1.5;
}

.footer-brand-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.footer-brand-right a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--gc-border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, background 0.2s;
    text-decoration: none;
    color: var(--gc-text-muted);
}

.footer-brand-right a:hover {
    border-color: var(--gc-primary);
    background: rgba(0, 198, 174, 0.08);
    color: var(--gc-primary);
}

.footer-brand-right a svg {
    width: 16px;
    height: 16px;
}

/* ── Main columns ── */
.footer-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 25px 31px 48px;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-col h3 {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
    color: var(--gc-navy);
}

.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: var(--gc-text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: var(--gc-primary);
}

/* ── Divider ── */
.footer-divider {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}

.footer-divider hr {
    border: none;
    border-top: 1px solid var(--gc-border);
}

/* ── Badges ── */
.footer-badges {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 40px;
}

.badge-section {
    margin-bottom: 36px;
}

.badge-section:last-child {
    margin-bottom: 0;
}

.badge-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--gc-text-muted);
    margin-bottom: 20px;
    text-align: center;
}

.badge-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.badge-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    opacity: 0.35;
    transition: opacity 0.3s;
}

.badge-link:hover {
    opacity: 0.7;
}

.badge-row img {
    height: 28px;
    width: auto;
    display: block;
}

.badge-row.certifications img {
    height: 32px;
}

.badge-18 svg {
    color: var(--gc-text-muted);
}

/* ── Per-badge size overrides ── */
.badge-ncpg img        { height: 28px !important; }
.badge-mga img         { height: 28px !important; }
.badge-gambleaware img { height: 19px !important; }
.badge-gli img         { height: 18px !important; }
.badge-gamcare img     { height: 28px !important; }
.badge-ecogra img      { height: 24px !important; }
.badge-betblocker img  { height: 24px !important; }
.badge-gpwa img        { height: 28px !important; }
.badge-dmca img        { height: 28px !important; }
.badge-wordfence img   { height: 25px !important; }
.badge-norton img      { height: 33px !important; }
.badge-18 img          { height: 26px !important; }

/* ── Disclaimer ── */
.footer-disclaimer {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px 20px;
}

.footer-disclaimer p {
    font-size: 12px;
    color: var(--gc-text-muted);
    text-align: center;
    line-height: 1.7;
    max-width: 900px;
    margin: 0 auto;
}

/* ── Bottom bar ── */
.footer-bottom {
    border-top: 1px solid var(--gc-border);
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.footer-bottom .copyright {
    font-size: 13px;
    color: var(--gc-text-muted);
}

.footer-bottom .copyright a {
    color: var(--gc-primary);
    text-decoration: none;
    font-weight: 600;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .footer-main {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .footer-brand {
        flex-direction: column;
        align-items: flex-start;
        padding: 32px 24px 0;
        gap: 24px;
    }

    /* The accordion already ends with a divider line on the last section,
       so the standalone divider before the badges is redundant on mobile. */
    .footer-divider--main {
        display: none;
    }

    .footer-main {
        grid-template-columns: 1fr 1fr;
        padding: 40px 24px;
        gap: 32px;
    }

    .footer-divider {
        padding: 0 24px;
    }

    .footer-badges {
        padding: 3px 24px 32px;
    }

    .badge-row {
        gap: 24px;
    }

    /* Mobile has no hover. Show the logos a touch muted and slightly
       desaturated so the mixed brand colours don't clash, without going
       as dim as the desktop resting state. */
    .badge-link {
        opacity: 0.65;
        filter: grayscale(35%);
    }

    .footer-disclaimer {
        padding: 0 24px 20px;
    }

    .footer-bottom {
        padding: 20px 24px;
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .footer-main {
        grid-template-columns: 1fr;
    }
}

/* ════════════════════════════════════════════════════════════════════
   MOBILE FOOTER ACCORDION  (≤768px)
   Each footer-col becomes a collapsible section: tap the heading to
   expand/collapse its links. Desktop is unaffected (chevron hidden,
   lists always visible).
   ════════════════════════════════════════════════════════════════════ */

/* Chevron hidden on desktop */
.footer-col__chevron { display: none; }

@media (max-width: 768px) {
    /* Single column stack */
    .footer-main {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .footer-col {
        border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    }
    .footer-col:first-child {
        border-top: 1px solid rgba(148, 163, 184, 0.18);
    }

    /* Heading becomes the tappable toggle */
    .footer-col h3 {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin: 0;
        padding: 18px 0;
        cursor: pointer;
        user-select: none;
    }

    .footer-col__chevron {
        display: inline-flex;
        align-items: center;
        flex-shrink: 0;
        transition: transform 0.25s ease;
    }
    .footer-col__chevron svg {
        width: 18px;
        height: 18px;
    }
    .footer-col.is-open .footer-col__chevron {
        transform: rotate(180deg);
    }

    /* Links collapsed by default, expand when open */
    .footer-col ul {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
        padding: 0;
    }
    .footer-col.is-open ul {
        max-height: 500px;
        padding: 0 0 18px;
    }
    .footer-col ul li {
        margin-bottom: 14px;
    }
    .footer-col ul li:last-child {
        margin-bottom: 0;
    }
}

/* On the ≤480px breakpoint the single-column rule already applies above;
   keep it consistent (no separate grid needed). */
@media (max-width: 480px) {
    .footer-main {
        grid-template-columns: 1fr;
    }
}