/* ==========================================================================
   Footer — Modern Light Theme (DESKTOP ONLY: min-width 992px)
   Mobile styles scoped separately to preserve existing UX.
   ========================================================================== */

@media (min-width: 992px) {
    .footer.footer-modern {
        background: #f8fafc;
        color: #334155;
        padding: 0;
        border-top: 1px solid #e2e8f0;
    }

    .footer.footer-modern .footer-main {
        padding: 3.5rem 0 2.75rem;
        background:
            radial-gradient(ellipse 80% 60% at 100% 0%, rgba(59, 130, 246, 0.06) 0%, transparent 55%),
            radial-gradient(ellipse 60% 50% at 0% 100%, rgba(56, 189, 248, 0.05) 0%, transparent 50%),
            #f8fafc;
    }

    .footer.footer-modern .footer-grid {
        display: grid;
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.75fr) minmax(0, 0.75fr) minmax(0, 1.35fr);
        gap: 2rem 2.5rem;
        align-items: start;
    }

    .footer.footer-modern .footer-brand-block {
        padding-right: 0.5rem;
    }

    .footer.footer-modern .footer-logo-link {
        display: inline-block;
        margin-bottom: 1rem;
        padding: 0.65rem 0.85rem;
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 14px;
        box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
        transition: transform 0.25s ease, box-shadow 0.25s ease;
    }

    .footer.footer-modern .footer-logo-link:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 22px rgba(59, 130, 246, 0.12);
    }

    .footer.footer-modern .footer-logo {
        height: 44px;
        width: auto;
        display: block;
    }

    .footer.footer-modern .footer-tagline {
        display: inline-flex;
        align-items: center;
        gap: 0.45rem;
        margin-bottom: 0.85rem;
        font-size: 0.95rem;
        font-weight: 600;
        color: #2563eb;
    }

    .footer.footer-modern .footer-tagline i {
        color: #ef4444;
        font-size: 0.82rem;
    }

    .footer.footer-modern .footer-desc {
        margin: 0;
        font-size: 0.92rem;
        line-height: 1.65;
        color: #64748b;
        max-width: 22rem;
    }

    .footer.footer-modern .footer-col-title {
        margin: 0 0 1.1rem;
        font-size: 0.78rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: #1e3a8a;
    }

    .footer.footer-modern .footer-link-list {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 0.55rem;
    }

    .footer.footer-modern .footer-link-list a {
        display: inline-flex;
        align-items: center;
        gap: 0.55rem;
        font-size: 0.9rem;
        font-weight: 500;
        color: #475569;
        text-decoration: none;
        transition: color 0.2s ease, transform 0.2s ease;
    }

    .footer.footer-modern .footer-link-list a i {
        width: 1rem;
        color: #3b82f6;
        font-size: 0.82rem;
        text-align: center;
    }

    .footer.footer-modern .footer-link-list a:hover {
        color: #2563eb;
        transform: translateX(3px);
    }

    .footer.footer-modern .footer-col-contact {
        min-width: 0;
    }

    .footer.footer-modern .footer-contact-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.85rem;
    }

    .footer.footer-modern .footer-contact-card {
        display: flex;
        gap: 0.75rem;
        align-items: flex-start;
        min-width: 0;
        min-height: 118px;
        padding: 1rem 1.05rem;
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 16px;
        box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
        overflow: hidden;
        transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    }

    .footer.footer-modern .footer-contact-card:hover {
        border-color: rgba(59, 130, 246, 0.28);
        box-shadow: 0 10px 28px rgba(59, 130, 246, 0.1);
        transform: translateY(-2px);
    }

    .footer.footer-modern .footer-contact-card > i {
        flex-shrink: 0;
        width: 36px;
        height: 36px;
        display: grid;
        place-items: center;
        border-radius: 10px;
        background: linear-gradient(135deg, #eff6ff, #dbeafe);
        color: #2563eb;
        font-size: 0.9rem;
    }

    .footer.footer-modern .footer-contact-card > div {
        flex: 1;
        min-width: 0;
    }

    .footer.footer-modern .footer-contact-card strong {
        display: block;
        margin-bottom: 0.35rem;
        font-size: 0.82rem;
        font-weight: 700;
        color: #0f172a;
        line-height: 1.3;
    }

    .footer.footer-modern .footer-contact-card span {
        display: block;
        font-size: 0.78rem;
        line-height: 1.55;
        color: #64748b;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .footer.footer-modern .footer-contact-card a {
        display: inline-block;
        max-width: 100%;
        color: #2563eb;
        text-decoration: none;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .footer.footer-modern .footer-contact-card a:hover {
        text-decoration: underline;
    }

    .footer.footer-modern .footer-bar {
        background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #0ea5e9 100%);
        padding: 1.15rem 0;
    }

    .footer.footer-modern .footer-bar-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1.5rem;
        flex-wrap: wrap;
    }

    .footer.footer-modern .footer-bar-copy,
    .footer.footer-modern .footer-bar-meta {
        margin: 0;
        font-size: 0.84rem;
        color: rgba(255, 255, 255, 0.92);
        line-height: 1.5;
    }

    .footer.footer-modern .footer-bar-meta a {
        color: #ffffff;
        font-weight: 600;
        text-decoration: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.35);
    }

    .footer.footer-modern .footer-bar-meta a:hover {
        border-bottom-color: #ffffff;
    }

    .footer.footer-modern .footer-legal {
        display: flex;
        align-items: center;
        gap: 1.25rem;
    }

    .footer.footer-modern .footer-legal a {
        font-size: 0.84rem;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.88);
        text-decoration: none;
        transition: color 0.2s ease;
    }

    .footer.footer-modern .footer-legal a:hover {
        color: #ffffff;
    }
}

/* ==========================================================================
   Mobile bottom navigation + mobile footer (unchanged from before desktop redesign)
   ========================================================================== */

.mobile-bottom-nav {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -2px 16px rgba(15, 23, 42, 0.06);
    padding-bottom: env(safe-area-inset-bottom, 0);
    -webkit-tap-highlight-color: transparent;
}

.mobile-bottom-nav__inner {
    max-width: 100%;
    margin: 0 auto;
    padding: 0.125rem 0.25rem;
}

.mobile-bottom-nav__list {
    display: flex;
    align-items: center;
    justify-content: space-around;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.mobile-bottom-nav__list li {
    flex: 1;
    min-width: 0;
}

.mobile-bottom-nav__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-height: 2.25rem;
    padding: 0.25rem 0.125rem;
    border-radius: 8px;
    text-decoration: none;
    color: #94a3b8;
    transition: color 0.15s ease;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.mobile-bottom-nav__icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.25rem;
    position: relative;
}

.mobile-bottom-nav__link i {
    font-size: 0.9375rem;
    line-height: 1;
    transition: color 0.15s ease;
}

.mobile-bottom-nav__label {
    display: none;
}

.mobile-bottom-nav__link.is-active {
    color: #2563eb;
    background: transparent;
}

.mobile-bottom-nav__link.is-active .mobile-bottom-nav__icon-wrap::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #2563eb;
}

.mobile-bottom-nav__link.is-active i {
    color: #2563eb;
}

.mobile-bottom-nav__link:active {
    opacity: 0.7;
}

/* Classic mobile footer strip — hidden on desktop */
.footer-mobile-classic {
    display: none;
}

@media (min-width: 992px) {
    .footer-mobile-classic {
        display: none !important;
    }
}

@media (max-width: 991.98px) {
    .mobile-bottom-nav {
        display: block;
    }

    body.has-mobile-bottom-nav {
        padding-bottom: calc(2.5rem + env(safe-area-inset-bottom, 0px));
    }

    /* Hide new light footer blocks on mobile — use classic strip only */
    .footer.footer-modern .footer-main,
    .footer.footer-modern .footer-bar {
        display: none !important;
    }

    .footer.footer-modern {
        background: #0f172a;
        color: #ffffff;
        padding: 15px 0 10px;
    }

    .footer-mobile-classic {
        display: block;
    }

    .footer-mobile-classic__nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 0.75rem 0.85rem;
        margin-bottom: 0.85rem;
    }

    .footer-mobile-classic__nav a {
        color: rgba(255, 255, 255, 0.92);
        font-size: 0.75rem;
        font-weight: 500;
        text-decoration: none;
        transition: color 0.2s ease;
    }

    .footer-mobile-classic__nav a:hover {
        color: #38bdf8;
    }

    .footer-mobile-classic__divider {
        border: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        margin: 0 0 0.75rem;
    }

    .footer-mobile-classic__copy,
    .footer-mobile-classic__meta {
        margin: 0;
        text-align: center;
        font-size: 0.65rem;
        line-height: 1.45;
        color: rgba(255, 255, 255, 0.55);
    }

    .footer-mobile-classic__meta {
        margin-top: 0.35rem;
    }

    .footer-mobile-classic__meta a {
        color: rgba(255, 255, 255, 0.55);
        text-decoration: none;
    }

    .footer-mobile-classic__legal {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.75rem;
        margin-top: 0.65rem;
    }

    .footer-mobile-classic__legal a {
        color: rgba(255, 255, 255, 0.85);
        font-size: 0.65rem;
        text-decoration: none;
    }

    .footer-mobile-classic__legal a:hover {
        color: #38bdf8;
    }

    .scroll-to-top {
        display: flex !important;
        bottom: calc(2.85rem + env(safe-area-inset-bottom, 0px)) !important;
        width: 42px !important;
        height: 42px !important;
        font-size: 0.9rem !important;
    }
}

@media (max-width: 380px) {
    .mobile-bottom-nav__inner {
        padding: 0.1rem 0.15rem;
    }

    .mobile-bottom-nav__link {
        min-height: 2rem;
        padding: 0.2rem 0.05rem;
    }

    .mobile-bottom-nav__link i {
        font-size: 0.875rem;
    }
}
