/* ============================================================
   FOOTER — Premium Redesign (Dedicated)
   Used by both landing + app layouts
   ============================================================ */

.nx-footer {
    background: linear-gradient(180deg, transparent 0%, rgba(84, 243, 154, 0.02) 100%);
    border-top: 1px solid rgba(84, 243, 154, 0.10);
    margin-top: 60px;
    position: relative;
    overflow: hidden;
}
.nx-footer::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 300px; height: 1px;
    background: linear-gradient(90deg, transparent, #54F39A, transparent);
    box-shadow: 0 0 20px rgba(84, 243, 154, 0.6);
    pointer-events: none;
}

.nx-footer-inner {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    box-sizing: border-box;
    /* Compact default padding */
    padding: 32px 24px 20px;
}

/* TOP — Brand + Newsletter */
.nx-footer-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(84, 243, 154, 0.08);
    margin-bottom: 24px;
}
.nx-footer-brand { display: flex; flex-direction: column; gap: 14px; }

.nx-footer-tagline {
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.6;
    margin: 0;
    max-width: 420px;
}

.nx-footer-newsletter-title {
    color: #ffffff;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
}
.nx-footer-newsletter-title i {
    color: #54F39A;
    filter: drop-shadow(0 0 6px rgba(84, 243, 154, 0.5));
}
.nx-footer-newsletter-sub {
    color: #94a3b8;
    font-size: 11px;
    margin-bottom: 10px;
    line-height: 1.5;
}

.nx-newsletter-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    position: relative;
}
.nx-newsletter-input {
    flex: 1;
    min-width: 200px;
    background: rgba(15, 20, 32, 0.7);
    border: 1px solid rgba(84, 243, 154, 0.20);
    border-radius: 12px;
    padding: 9px 14px;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    outline: none;
    min-height: 44px;
    transition: all 0.25s ease;
    -webkit-appearance: none;
            appearance: none;
}
.nx-newsletter-input::placeholder { color: rgba(148, 163, 184, 0.5); }
.nx-newsletter-input:focus {
    border-color: #54F39A;
    box-shadow: 0 0 0 3px rgba(84, 243, 154, 0.15), 0 4px 14px -4px rgba(84, 243, 154, 0.4);
    background: rgba(15, 20, 32, 0.9);
}

.nx-newsletter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: linear-gradient(135deg, #54F39A, #2ecc71);
    color: #0a2e1f;
    border: none;
    border-radius: 12px;
    font-weight: 800;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    min-height: 44px;
    position: relative;
    overflow: hidden;
    -webkit-appearance: none;
            appearance: none;
    touch-action: manipulation;
}
.nx-newsletter-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    transform: translateX(-150%) skewX(-25deg);
    animation: nx-btn-shine 4s ease-in-out infinite;
    pointer-events: none;
}
@keyframes nx-btn-shine {
    0%   { transform: translateX(-150%) skewX(-25deg); }
    100% { transform: translateX(250%) skewX(-25deg); }
}
.nx-newsletter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -8px rgba(84, 243, 154, 0.7);
}
.nx-newsletter-btn:active { transform: translateY(0) scale(0.98); }
.nx-newsletter-btn i { transition: transform 0.25s ease; }
.nx-newsletter-btn:hover i { transform: translateX(3px); }

.nx-newsletter-msg {
    width: 100%;
    color: #54F39A;
    font-size: 12px;
    font-weight: 700;
    margin-top: 4px;
    min-height: 16px;
}

/* MIDDLE — 4 columns */
.nx-footer-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(84, 243, 154, 0.08);
    margin-bottom: 24px;
}
.nx-footer-col { min-width: 0; }
.nx-footer-heading {
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
    padding-bottom: 6px;
    position: relative;
}
.nx-footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 22px; height: 2px;
    background: linear-gradient(90deg, #54F39A, transparent);
    border-radius: 2px;
}
.nx-footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.nx-footer-list li { margin: 0; }
.nx-footer-list a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    min-height: 28px;
    transition: all 0.2s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.nx-footer-list a i {
    color: rgba(84, 243, 154, 0.5);
    font-size: 11px;
    width: 14px;
    text-align: center;
    transition: color 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}
.nx-footer-list a:hover {
    color: #54F39A;
    transform: translateX(4px);
}
.nx-footer-list a:hover i {
    color: #54F39A;
    transform: scale(1.15);
}

/* TRUST BADGES */
.nx-footer-trust {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(84, 243, 154, 0.08);
    margin-bottom: 20px;
}
.nx-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-bottom: 14px;
}
.nx-trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(84, 243, 154, 0.08), rgba(84, 243, 154, 0.03));
    border: 1px solid rgba(84, 243, 154, 0.20);
    color: #7dffb8;
    font-size: 10.5px;
    font-weight: 700;
    white-space: nowrap;
    transition: all 0.25s ease;
}
.nx-trust-badge i {
    color: #54F39A;
    font-size: 11px;
    filter: drop-shadow(0 0 6px rgba(84, 243, 154, 0.5));
}
.nx-trust-badge:hover {
    border-color: rgba(84, 243, 154, 0.5);
    box-shadow: 0 0 20px rgba(84, 243, 154, 0.3);
    transform: translateY(-2px);
}

.nx-payment-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.nx-payment-label {
    color: #94a3b8;
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.nx-payment-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}
.nx-payment-logo {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    height: 28px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 11px;
    font-weight: 600;
    transition: all 0.25s ease;
    white-space: nowrap;
}
.nx-payment-logo i { font-size: 12px; }
.nx-payment-logo:hover {
    background: rgba(84, 243, 154, 0.06);
    border-color: rgba(84, 243, 154, 0.3);
    color: #54F39A;
    transform: translateY(-2px);
}

/* SOCIAL */
.nx-footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(84, 243, 154, 0.08);
    margin-bottom: 16px;
}
.nx-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.nx-social-btn:hover {
    transform: translateY(-3px);
    color: #fff;
    border-color: rgba(84, 243, 154, 0.4);
    background: rgba(84, 243, 154, 0.08);
    box-shadow: 0 8px 20px -8px rgba(84, 243, 154, 0.5);
}
.nx-social-facebook:hover  { background: rgba(24, 119, 242, 0.15); border-color: rgba(24, 119, 242, 0.5); color: #1877F2; }
.nx-social-twitter:hover   { background: rgba(29, 161, 242, 0.15); border-color: rgba(29, 161, 242, 0.5); color: #1DA1F2; }
.nx-social-instagram:hover { background: rgba(225, 48, 108, 0.15); border-color: rgba(225, 48, 108, 0.5); color: #E1306C; }
.nx-social-telegram:hover  { background: rgba(34, 158, 217, 0.15); border-color: rgba(34, 158, 217, 0.5); color: #229ED9; }
.nx-social-discord:hover   { background: rgba(88, 101, 242, 0.15); border-color: rgba(88, 101, 242, 0.5); color: #5865F2; }
.nx-social-linkedin:hover  { background: rgba(10, 102, 194, 0.15); border-color: rgba(10, 102, 194, 0.5); color: #0A66C2; }
.nx-social-reddit:hover    { background: rgba(255, 69, 0, 0.15); border-color: rgba(255, 69, 0, 0.5); color: #FF4500; }
.nx-social-trustpilot:hover { background: rgba(0, 182, 122, 0.15); border-color: rgba(0, 182, 122, 0.5); color: #00B67A; }

/* BOTTOM */
.nx-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.nx-footer-copy,
.nx-footer-made {
    color: rgba(148, 163, 184, 0.75);
    font-size: 11px;
    margin: 0;
}
.nx-footer-copy strong { color: #fff; font-weight: 700; }

.nx-heart {
    color: #EF4444;
    animation: nx-heart-beat 1.5s ease-in-out infinite;
    display: inline-block;
}
@keyframes nx-heart-beat {
    0%, 100% { transform: scale(1); }
    25%      { transform: scale(1.2); }
    50%      { transform: scale(1); }
    75%      { transform: scale(1.15); }
}

/* ============================================================
   LOGO — remove drop-shadow (x-logo has built-in glow)
   ============================================================ */
.nx-footer-brand svg,
.nx-footer-brand img,
.nx-footer-brand .logo,
.nx-footer-brand .app-brand-logo {
    filter: none;
    max-height: 28px;
}
.nx-footer-brand:hover svg,
.nx-footer-brand:hover img {
    filter: drop-shadow(0 0 8px rgba(84, 243, 154, 0.4));
    transition: filter 0.3s ease;
}

/* ============================================================
   DASHBOARD — content area is narrower (sidebar)
   Only apply 4-col force inside .content-wrapper
   ============================================================ */
.content-wrapper .nx-footer-inner {
    padding-left: 24px;
    padding-right: 24px;
    max-width: 100%;
}

@media (min-width: 768px) and (max-width: 1279px) {
    .content-wrapper .nx-footer-links {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
    .content-wrapper .nx-footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    .content-wrapper .nx-footer-heading { font-size: 12px; }
    .content-wrapper .nx-footer-list a  { font-size: 12px; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Desktop */
@media (min-width: 992px) {
    .nx-footer-inner { padding: 36px 40px 24px; }
    .nx-footer-links { gap: 30px; }
    .nx-footer-heading { font-size: 11.5px; }
    .nx-footer-list a { font-size: 12.5px; }
}

/* Tablet */
@media (max-width: 991.98px) {
    .nx-footer-top   { grid-template-columns: 1fr; gap: 30px; }
    .nx-footer-links { grid-template-columns: repeat(2, 1fr); gap: 18px; }
    .nx-footer-inner { padding: 30px 20px 20px; }
}

/* Mobile */
@media (max-width: 767.98px) {
    .nx-footer-inner { padding: 28px 16px 18px; }
    .nx-footer-top {
        gap: 20px;
        padding-bottom: 20px;
        margin-bottom: 20px;
    }
    .nx-footer-links {
        grid-template-columns: 1fr;
        gap: 16px;
        padding-bottom: 20px;
        margin-bottom: 20px;
    }
    .nx-footer-heading {
        font-size: 11px;
        margin-bottom: 8px;
        text-align: center;
    }
    .nx-footer-heading::after { left: 50%; transform: translateX(-50%); }
    .nx-footer-list { align-items: center; }
    .nx-footer-list a {
        justify-content: center;
        font-size: 12px;
        min-height: 36px;
        padding: 4px 0;
    }
    .nx-trust-row   { gap: 6px; }
    .nx-trust-badge { font-size: 10px; padding: 5px 10px; }
    .nx-payment-logo { font-size: 11px; height: 28px; padding: 4px 10px; }
    .nx-footer-social { gap: 8px; padding-bottom: 20px; margin-bottom: 16px; }
    .nx-social-btn {
        width: 42px;
        height: 42px;
        font-size: 15px;
    }
    .nx-footer-bottom { flex-direction: column; text-align: center; gap: 6px; }
    .nx-footer-copy,
    .nx-footer-made { font-size: 10.5px; }
}

/* ============================================================
   iOS SAFE AREA — placed LAST so nothing overrides it
   ============================================================ */
@supports (padding: max(0px)) {
    .nx-footer-inner,
    .content-wrapper .nx-footer-inner {
        padding-left:   max(16px, env(safe-area-inset-left));
        padding-right:  max(16px, env(safe-area-inset-right));
        padding-bottom: max(18px, calc(env(safe-area-inset-bottom) + 12px));
    }
}

/* iOS reset */
@supports (-webkit-touch-callout: none) {
    .nx-newsletter-input,
    .nx-newsletter-btn,
    .nx-social-btn { -webkit-appearance: none; appearance: none; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .nx-newsletter-btn::before,
    .nx-heart { animation: none; }
    .nx-trust-badge,
    .nx-social-btn,
    .nx-footer-list a,
    .nx-newsletter-btn { transition: none; }
}
/* =====================================================================
   🖼️ FOOTER LOGO — Fix stretched (overrides width="200px")
   ===================================================================== */

.nx-footer-brand .text-center,
.nx-footer-brand > a > span {
    display: inline-block !important;
    width: auto !important;
    max-width: max-content !important;
    line-height: 0;
}

.nx-footer-brand img.app-brand-img,
.nx-footer-brand img,
.nx-footer-brand a img {
    width: auto !important;
    height: auto !important;
    max-width: 160px !important;
    max-height: 36px !important;
    object-fit: contain !important;
    -o-object-fit: contain !important;
    object-position: left center !important;
    aspect-ratio: auto !important;
    display: block !important;
    flex-shrink: 0 !important;
    filter: none;
}

.nx-footer-brand .app-brand-img-collapsed {
    display: none !important;
}

.nx-footer-brand,
.nx-footer-brand > a {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: auto !important;
    max-width: max-content !important;
    flex-shrink: 0 !important;
    gap: 10px;
    text-decoration: none !important;
}

.nx-footer-brand:hover img.app-brand-img,
.nx-footer-brand:hover img {
    filter: drop-shadow(0 0 8px rgba(84, 243, 154, 0.4)) !important;
    transition: filter 0.3s ease;
}

@media (max-width: 767.98px) {
    .nx-footer-brand img.app-brand-img,
    .nx-footer-brand img {
        max-height: 30px !important;
        max-width: 130px !important;
    }
}

/* =====================================================================
   🖼️ HIDE COLLAPSED ICON in Footer (only show full logo)
   ===================================================================== */

.nx-footer .app-brand-img-collapsed,
.nx-footer-brand .app-brand-img-collapsed,
.nx-footer-brand img.app-brand-img-collapsed,
footer.nx-footer img.app-brand-img-collapsed,
.content-footer .nx-footer-brand .app-brand-img-collapsed,
.nx-footer-brand img[src*="icon-light"] {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    max-width: 0 !important;
    max-height: 0 !important;
    opacity: 0 !important;
    position: absolute !important;
    pointer-events: none !important;
}

/* Also hide in premium-ui.css context */
.nx-footer-brand img[src*="icon"]:not([src*="logo"]) {
    display: none !important;
}
