/* Shared footer - light mode, multi-column */
:root {
    --technex-badge-height: calc(2 * 6px + clamp(10px, 1.2vw, 13px) * 1.2);
    --technex-robot-height: var(--technex-badge-height);
    --technex-footer-height: auto;
}

html, body {
    min-height: 100vh !important;
    width: 100% !important;
}

body {
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
    background-color: #ffffff !important;
    color: #111827 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.main-container {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* ============================
   FOOTER MULTI-COLUMN
   ============================ */
.technex-footer {
    width: 100% !important;
    position: relative !important;
    margin-top: auto !important;
    background-color: #f5f6f7 !important;
    border-top: 1px solid #e8eaed !important;
    color: #6b7280 !important;
    font-size: 13px !important;
    box-sizing: border-box !important;
    z-index: 999 !important;
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
    min-height: unset !important;
    padding: 0 !important;
}

.footer-main {
    max-width: 1280px !important;
    margin: 0 auto !important;
    padding: 48px 32px 32px !important;
    display: grid !important;
    grid-template-columns: 2fr 1fr 1fr 1fr !important;
    gap: 40px !important;
    box-sizing: border-box !important;
}

.footer-brand { display: flex !important; flex-direction: column !important; gap: 16px !important; }

.footer-logo-wrap {
    display: inline-flex !important;
    align-items: center !important;
}

.footer-logo-img {
    height: 20px !important;
    width: auto !important;
    display: block !important;
}

.footer-brand-desc {
    font-size: 13px !important;
    color: #6b7280 !important;
    line-height: 1.65 !important;
    max-width: 260px !important;
}

.footer-subscribe {
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
    flex-wrap: wrap !important;
}

.footer-email-input {
    flex: 1 !important;
    min-width: 140px !important;
    padding: 9px 14px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    color: #111827 !important;
    background: #f9fafb !important;
    outline: none !important;
    transition: border-color .2s !important;
    -webkit-user-select: auto !important;
    user-select: auto !important;
}
.footer-email-input:focus { border-color: rgba(81,0,214,.4) !important; }
.footer-email-input::placeholder { color: #9ca3af !important; }

.footer-subscribe-btn {
    padding: 9px 18px !important;
    background: #5B5FF8 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    transition: background-color .2s !important;
}
.footer-subscribe-btn:hover { background: #4f53df !important; }

.footer-col { display: flex !important; flex-direction: column !important; gap: 12px !important; }

.footer-col-title {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    letter-spacing: 0.02em !important;
    margin-bottom: 4px !important;
}

.footer-col a, .footer-col span {
    font-size: 13px !important;
    color: #6b7280 !important;
    text-decoration: none !important;
    transition: color .15s !important;
    display: block !important;
}
.footer-col a:hover { color: #111827 !important; }
.footer-col .disabled-link { color: #d1d5db !important; cursor: default !important; font-size: 12px !important; }

/* Bottom bar — PC/tablet: copyright trái, links phải */
.footer-bottom {
    border-top: 1px solid #f3f4f6 !important;
    padding: 18px 32px !important;
    max-width: 1280px !important;
    margin: 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 16px !important;
    font-size: 12px !important;
    color: #9ca3af !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

.footer-bottom > span,
.footer-bottom .footer-copy {
    color: #9ca3af !important;
    font-size: 12px !important;
    letter-spacing: 0.02em !important;
    text-transform: none !important;
    white-space: nowrap !important;
}

.footer-bottom-links {
    display: flex !important;
    align-items: center !important;
    gap: 24px !important;
    flex-shrink: 0 !important;
}

.footer-bottom-links a {
    color: #9ca3af !important;
    text-decoration: none !important;
    font-size: 12px !important;
    transition: color .15s !important;
}
.footer-bottom-links a:hover { color: #374151 !important; }

/* Fallback simple footer — 1 dòng căn giữa */
.footer-text-wrap,
.footer-inner {
    width: 100% !important;
    max-width: none !important;
    margin: 0 auto !important;
    padding: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    box-sizing: border-box !important;
    color: #9ca3af !important;
    font-size: 12px !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    line-height: 1.4 !important;
}

.footer-copy {
    color: inherit !important;
    font-size: inherit !important;
    letter-spacing: inherit !important;
    text-transform: inherit !important;
}

.footer-links {
    display: none !important;
}

.technex-footer a {
    color: #6b7280 !important;
    text-decoration: none !important;
}
.technex-footer a:hover {
    color: #111827 !important;
    text-decoration: none !important;
}

/* Responsive */
@media (max-width: 1023px) {
    .footer-main {
        grid-template-columns: 1fr 1fr !important;
        gap: 28px !important;
        padding: 36px 20px 24px !important;
    }
    .footer-brand { grid-column: 1 / -1 !important; }
}

@media (max-width: 767px) {
    .footer-bottom {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        gap: 12px !important;
        padding: 20px 16px !important;
    }
    .footer-bottom > span,
    .footer-bottom .footer-copy {
        white-space: normal !important;
    }
    .footer-bottom-links {
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 16px !important;
    }
}

@media (max-width: 560px) {
    .footer-main {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
        padding: 28px 20px 20px !important;
    }
}
