/* ──────────────────────────────────────────────────────────────
   OPSIM Footer
   Light, transparent-gray surface. Desktop = 4-column grid,
   mobile = accordion. All colors come from --footer-* variables
   emitted by inc/customizer/customizer.php (customize_css), with
   safe fallbacks here so the footer renders standalone.
   ────────────────────────────────────────────────────────────── */

.opsim-footer {
    --ft-bg: var(--footer-bg, rgba(17, 24, 39, 0.03));
    --ft-text: var(--footer-text, #4B5563);
    --ft-heading: var(--footer-heading, #111827);
    --ft-hover: var(--footer-link-hover, var(--opsim-brand));
    --ft-border: var(--footer-border, #E5E7EB);
    --ft-social: var(--footer-social, #4B5563);
    --ft-social-bg: var(--footer-social-bg, transparent);
    --ft-social-border: var(--footer-social-border, #E5E7EB);
    --ft-logo-w: var(--footer-logo-width, 180px);

    background: var(--ft-bg);
    color: var(--ft-text);
    border-top: 1px solid var(--ft-border);
    margin-top: 60px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 32px;
    padding: 36px 0 32px;
}
.footer-grid > .footer-brand {
    min-width: 0;
}

.footer-logo {
    display: inline-block;
    line-height: 0;
    text-decoration: none;
}
.footer-logo img {
    width: auto;
    max-width: var(--ft-logo-w);
    height: auto;
    display: block;
}
.footer-logo-text {
    font-family: var(--opsim-font-secondary, inherit);
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--ft-heading);
}
.footer-about {
    margin: 14px 0 18px;
    max-width: 460px;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--ft-text);
}

.footer-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.footer-social {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ft-border);
    border-radius: var(--opsim-radius);
    background: transparent;
    color: var(--ft-social);
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-social svg {
    width: 18px;
    height: 18px;
    display: block;
}
.footer-social:hover,
.footer-social:focus-visible {
    color: #374151;
}

.footer-heading {
    margin: 0 0 14px;
    font-family: var(--opsim-font-secondary, inherit);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--ft-heading);
}
.footer-toggle {
    all: unset;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    font: inherit;
    color: inherit;
    box-sizing: border-box;
}
.footer-toggle:focus-visible {
    outline: 2px solid var(--ft-hover);
    outline-offset: 3px;
}
.footer-chevron {
    display: none;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}
.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}
.footer-links li + li {
    margin-top: 14px;
}
.footer-links a {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--ft-text);
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-links a:hover,
.footer-links a:focus-visible {
    color: var(--ft-hover);
}

.footer-bottom {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 20px;
    padding: 16px 0;
    border-top: 1px solid var(--ft-border);
    font-size: 0.8rem;
}
.footer-copy {
    margin: 0;
    margin-right: auto;
}
.footer-legal-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.footer-legal-list a {
    color: var(--ft-text);
    text-decoration: none;
}
.footer-legal-list a:hover {
    color: var(--ft-hover);
}
.footer-credit {
    color: var(--ft-text);
    text-decoration: none;
    opacity: 0.85; /* 0.75 put the default text at 3.9:1 on the footer ground. */
}
.footer-credit:hover {
    color: var(--ft-hover);
    opacity: 1;
}

@media (max-width: 1199px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px 40px;
    }
    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767px) {
    .opsim-footer {
        margin-top: 25px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 20px 0 4px;
    }
    .footer-logo img {
        max-width: var(--footer-logo-width-mobile, 180px);
    }
    .footer-about {
        max-width: 100%;
        margin: 10px 0 14px;
        font-size: 12px;
        line-height: 1.5;
    }
    .footer-socials {
        margin-bottom: 18px;
        gap: 8px;
    }
    .footer-social {
        width: 32px;
        height: 32px;
        border-radius: var(--opsim-radius);
    }
    .footer-social svg {
        width: 14px;
        height: 14px;
    }
    .opsim-footer:not(.no-accordion) .footer-col {
        border-top: 1px solid var(--ft-border);
    }
    .opsim-footer:not(.no-accordion) .footer-heading {
        margin: 0;
        font-size: 13px !important;
        font-weight: 500 !important;
        letter-spacing: 0.02em;
    }
    .opsim-footer:not(.no-accordion) .footer-toggle {
        padding: 11px 0 !important;
        cursor: pointer;
    }
    .opsim-footer:not(.no-accordion) .footer-chevron {
        display: block;
        width: 14px;
        height: 14px;
    }
    .opsim-footer:not(.no-accordion) .footer-panel {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.28s ease;
    }
    .opsim-footer:not(.no-accordion) .footer-panel-inner {
        overflow: hidden;
        min-height: 0;
    }
    .opsim-footer:not(.no-accordion) .footer-col.is-open .footer-panel {
        max-height: 500px;
    }
    .opsim-footer:not(.no-accordion) .footer-col.is-open .footer-chevron {
        transform: rotate(180deg);
    }
    .opsim-footer:not(.no-accordion) .footer-panel-inner {
        padding-bottom: 12px !important;
    }
    .footer-links li + li {
        margin-top: 8px !important;
    }
    .footer-links a {
        font-size: 12px !important;
        font-weight: 400 !important;
    }
    .footer-bottom {
        margin-top: 6px;
        padding: 12px 0;
        gap: 8px;
        font-size: 11px;
    }
    .footer-copy {
        margin-right: 0;
        font-size: 11px !important;
        font-weight: 400 !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .footer-panel,
    .footer-chevron,
    .footer-social,
    .footer-links a {
        transition: none;
    }
}
