/**
 * APS Footer Redesign — namespaced under .aps-footer
 * Matches the URG_APS Mock up_Footer_041426.pdf design
 */

.aps-footer {
    background: #01333d;
    color: #ffffff;
    font-family: 'Wix Madefor Display', 'Inter', sans-serif;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ============================================================
   MAIN CONTENT TIER (links + sidebar)
   ============================================================ */
.aps-footer__main {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 0;
    max-width: 1400px;
    margin: 0 auto;
    padding: 56px 40px 40px;
    align-items: start;
}

/* ── Link Columns ── */
.aps-footer__columns {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2.5rem;
    padding-right: 40px;
    /* border-right: 1px solid rgba(255, 255, 255, 0.1); */
}

.aps-footer__col-heading {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #ffffff;
    margin-bottom: 16px;
}

.aps-footer__col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.aps-footer__col ul li a,
.aps-footer__col ul li span {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    transition: color 0.2s;
    line-height: 1.4;
    display: block;
}

.aps-footer__col ul li a:hover {
    color: #ffffff;
}

/* ── Sidebar ── */
.aps-footer__sidebar {
    padding-left: 40px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

/* Login block */
.aps-footer__login-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #00ffb7;
    color: #002e2e;
    border: none;
    border-radius: 999px;
    padding: 12px 24px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: filter 0.2s, transform 0.15s;
    width: 100%;
    justify-content: center;
    white-space: nowrap;
}

.aps-footer__login-btn:hover {
    filter: brightness(1.1);
    color: #002e2e;
}

.aps-footer__login-sub {
    font-size: 13px;
    color: #ffffff;
    margin-top: 10px;
    line-height: 1.5;
}

/* Divider within sidebar */
.aps-footer__sidebar-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    margin: 0;
}

/* Newsletter block */
.aps-footer__sidebar-heading {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.aps-footer__sidebar-text {
    font-size: 13px;
    color: #ffffff;
    line-height: 1.55;
    margin-bottom: 14px;
}

.aps-footer__subscribe-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.aps-footer__subscribe-input {
    flex: 1;
    background: #ffffff;
    border: none;
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 12px;
    color: #002e2e;
    outline: none;
    font-family: inherit;
    width: 100%;
}

.aps-footer__subscribe-input::placeholder {
    color: #9ca3af;
}

.aps-footer__subscribe-btn {
    background: #00ffb7;
    color: #002e2e;
    border: none;
    border-radius: 999px;
    padding: 10px 20px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    font-family: inherit;
    transition: filter 0.2s;
    white-space: nowrap;
    width: 100%;
}

.aps-footer__subscribe-btn:hover {
    filter: brightness(1.1);
}

/* APS Assistant block */
.aps-footer__assistant-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.aps-footer__assistant-icon {
    width: 36px;
    height: 36px;
    background: #00e8cd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.aps-footer__assistant-icon svg {
    width: 20px;
    height: 20px;
    fill: #002e2e;
}

.aps-footer__assistant-title {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
}

.aps-footer__assistant-sub {
    font-size: 12px;
    color: #ffffff;
    margin-bottom: 12px;
}

.aps-footer__assistant-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.aps-footer__assistant-links li {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.aps-footer__assistant-links li:last-child {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.aps-footer__assistant-links li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    font-size: 12px;
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s;
}

.aps-footer__assistant-links li a:hover {
    color: #00e8cd;
}

.aps-footer__assistant-links li a::after {
    content: '›';
    margin-left: auto;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.3);
}

/* ============================================================
   BOTTOM BAR
   ============================================================ */
.aps-footer__bottom-wrap {
    padding-bottom: 24px;
}

.aps-footer__bottom {
    padding: 10px 40px 24px;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.aps-footer__logo {
    flex-shrink: 0;
    min-width: 0;
}

.aps-footer__logos {
    --aps-footer-logo-height: 80px;
    display: flex;
    align-items: flex-end;
    gap: 28px;
}

.aps-footer__logo-aps,
.aps-footer__logo-urg {
    display: block;
    height: var(--aps-footer-logo-height);
    width: auto;
    max-width: none;
    flex-shrink: 0;
    object-fit: contain;
    object-position: left bottom;
}

.aps-footer__bottom-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

/* Desktop: children of this row participate in bottom-meta flex */
.aps-footer__bottom-meta-row {
    display: contents;
}

.aps-footer__copyright {
    font-size: 14px;
    color: #ffffff;
    text-align: left;
    line-height: 1;
    flex-shrink: 1;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.aps-footer__copyright a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s;
}

.aps-footer__policy-link {
    font-size: 14px;
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
    white-space: nowrap;
    line-height: 1;
    flex-shrink: 0;
}

.aps-footer__socials {
    display: inline-flex;
    gap: 8px;
    align-items: flex-end;
    flex-shrink: 0;
    transform: translateY(3px);
}

.aps-footer__social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1.5px solid #ffffff;
    color: #ffffff;
    text-decoration: none;
    font-size: 11px;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.aps-footer__social-btn:hover {
    border-color: #00e8cd;
    color: #00e8cd;
    background: rgba(0, 232, 205, 0.08);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* ── Tablet (≤ 1024px) ── */
@media (max-width: 1024px) {
    .aps-footer__main {
        grid-template-columns: 1fr;
        padding: 40px 24px 32px;
    }

    .aps-footer__columns {
        border-right: none;
        padding-right: 0;
        padding-bottom: 40px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        grid-template-columns: repeat(3, minmax(0, 1fr));
        text-align: center;
    }

    .aps-footer__col-heading {
        text-align: center;
    }

    .aps-footer__col ul {
        align-items: center;
    }

    .aps-footer__sidebar {
        padding-left: 0;
        padding-top: 32px;
        border-left: 0;
        align-items: center;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .aps-footer__login-btn {
        align-self: center;
    }

    .aps-footer__subscribe-row {
        justify-content: center;
    }

    .aps-footer__social-links {
        justify-content: center;
    }

    .aps-footer__bottom {

        padding: 20px 24px;
        flex-direction: column;
        text-align: center;
        align-items: center;
        justify-content: center;
    }

    .aps-footer__bottom-meta {
        width: 100%;
        flex-direction: column;
        align-items: center;
        gap: 14px;
        padding-bottom: 0;
    }

    .aps-footer__logos {
        --aps-footer-logo-height: 68px;
        gap: 20px;
    }

    .aps-footer__copyright {
        white-space: normal;
        text-align: center;
    }
}

/* Link column stacks — desktop: children join parent 5-col grid */
.aps-footer__col-stack {
    display: contents;
}

/* ── Phone (≤ 640px) ── */
@media (max-width: 640px) {
    .aps-footer__main {
        padding: 28px 16px 24px;
    }

    .aps-footer__columns {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        padding-bottom: 28px;
    }

    .aps-footer__sidebar {
        gap: 20px;
        padding-top: 20px;
    }

    .aps-footer__subscribe-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .aps-footer__subscribe-input,
    .aps-footer__subscribe-btn {
        width: 100%;
    }

    .aps-footer__subscribe-btn {
        justify-content: center;
    }

    .aps-footer__bottom {
        padding: 16px;
        gap: 12px;
    }

    .aps-footer__logo {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .aps-footer__logos {
        --aps-footer-logo-height: 56px;
        gap: 16px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .aps-footer__bottom-meta {
        width: 100%;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .aps-footer__copyright {
        font-size: 12px;
        line-height: 1.4;
        white-space: normal;
    }

    .aps-footer__policy-link {
        font-size: 12px;
    }

    .aps-footer__social-btn {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
}

/* ── Small tablet (641px – 900px): 2-column link grid ── */
@media (min-width: 768px) and (max-width: 900px) {
    .aps-footer__columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ============================================================
   MINIMAL BRANDING FOOTER (parts listing + secondary pages)
   Declared last so it wins over the responsive bottom-bar rules.
   ============================================================ */
.aps-footer__logos--compact {
    --aps-footer-logo-height: 60px;
    gap: 23px;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .aps-footer__logos--compact {
        --aps-footer-logo-height: 45px;
        gap: 15px;
        justify-content: center;
    }
}
