/* ============================================
   Footer Module — Enterprise 360° Matrix
   ============================================ */

.footer {
    background: var(--bg-secondary, #080c16);
    border-top: 1px solid var(--border);
    padding: var(--space-16, 64px) 0 var(--space-8, 32px);
    position: relative;
    overflow: hidden;
}

[data-theme="light"] .footer {
    background: #f8fafc;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* --- Top Brand & Trust Row --- */
.footer__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-12, 48px);
    padding-bottom: var(--space-10, 40px);
    margin-bottom: var(--space-12, 48px);
    border-bottom: 1px solid var(--border);
}

.footer__brand {
    max-width: 380px;
    flex-shrink: 0;
}

.footer__logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    text-decoration: none;
    color: var(--text-primary);
    font-weight: var(--weight-bold);
    font-size: var(--text-xl);
    margin-bottom: var(--space-3);
}

.footer__logo-img {
    height: 34px;
    width: auto;
}

.footer__logo-text {
    font-weight: var(--weight-extrabold);
    letter-spacing: -0.02em;
}

.footer__desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.65;
    margin-bottom: var(--space-5);
}

.footer__social {
    display: flex;
    gap: 10px;
}

.footer__social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: var(--radius-md, 10px);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: all var(--transition-fast, 0.15s ease);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.footer__social a:hover {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* --- Trust Badges Grid --- */
.footer__trust-badges {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    flex: 1;
    max-width: 650px;
}

.footer__trust-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.footer__trust-item:hover {
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
}

.footer__trust-icon {
    font-size: 1.35rem;
    line-height: 1;
    flex-shrink: 0;
}

.footer__trust-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.footer__trust-text strong {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.footer__trust-text span {
    font-size: 0.725rem;
    color: var(--text-muted);
}

/* --- 5-Column Matrix --- */
.footer__matrix {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-8, 32px);
    margin-bottom: var(--space-12, 48px);
}

.footer__col {
    display: flex;
    flex-direction: column;
}

.footer__heading {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-4, 16px);
    position: relative;
    display: inline-block;
}

.footer__heading::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 20px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

.footer__links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer__links li a {
    color: var(--text-muted);
    font-size: 0.825rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    transition: color 0.15s ease, transform 0.15s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.footer__links li a:hover {
    color: var(--accent);
    transform: translateX(2px);
}

.footer__badge {
    font-size: 0.625rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

/* --- Bottom Bar --- */
.footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-6, 24px);
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.775rem;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.footer__bottom-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer__made-in {
    font-size: 0.725rem;
    color: var(--text-muted);
}

.footer__bottom-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.footer__bottom-right a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer__bottom-right a:hover {
    color: var(--accent);
}

.footer__dian-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    font-size: 0.725rem;
    font-weight: 600;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 6px #10b981;
    animation: statusPulse 2s infinite ease-in-out;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

/* ============================================
   Responsive Breakpoints
   ============================================ */
@media (max-width: 1024px) {
    .footer__top {
        flex-direction: column;
        gap: var(--space-8);
    }
    .footer__brand {
        max-width: 100%;
    }
    .footer__trust-badges {
        max-width: 100%;
        width: 100%;
    }
    .footer__matrix {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-8);
    }
}

@media (max-width: 768px) {
    .footer {
        padding-bottom: calc(var(--space-8, 32px) + 85px + env(safe-area-inset-bottom, 0px));
    }
    .footer__matrix {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-6);
    }
    .footer__links li a {
        min-height: 44px;
    }
    .footer__bottom {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    .footer__bottom-right {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .footer__matrix {
        grid-template-columns: 1fr;
    }
    .footer__trust-badges {
        grid-template-columns: 1fr;
    }
}
