/* Site footer ?? 36kr-inspired dark layout */

.footer {
    padding: 0 !important;
    background: #2b2d30 !important;
    color: rgba(255, 255, 255, 0.72);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Override common.css .footer p (light theme border + dark text) */
.footer p {
    border-top: none !important;
    padding: 0 !important;
    text-align: inherit !important;
    line-height: inherit !important;
    font-size: inherit !important;
    color: inherit !important;
}

.footer a {
    color: inherit;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 60px;
    box-sizing: border-box;
}

/* ---------- Main row ---------- */
.footer-main {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) auto;
    gap: 2.5rem 3rem;
    padding: 2.75rem 0 2rem;
    align-items: start;
}

.footer-brand {
    min-width: 0;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none !important;
    color: #fff !important;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 0.85rem;
}

.footer-logo img {
    display: block;
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.footer-desc {
    margin: 0;
    max-width: 320px;
    font-size: 0.8125rem !important;
    line-height: 1.65 !important;
    color: rgba(255, 255, 255, 0.55) !important;
}

/* ---------- Link columns ---------- */
.footer-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem 2rem;
}

.footer-col__title {
    margin: 0 0 0.85rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
}

.footer-col__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-col__list li {
    margin: 0;
}

.footer-col__list a {
    display: block;
    padding: 0.2rem 0;
    font-size: 0.8125rem;
    line-height: 1.85;
    color: rgba(255, 255, 255, 0.55) !important;
    text-decoration: none !important;
    transition: color 0.15s ease;
}

.footer-col__list a:hover {
    color: #fff !important;
}

/* ---------- App download (right) ---------- */
.footer-app {
    flex-shrink: 0;
    text-align: center;
}

.footer-app__title {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
}

.footer-app .cph-app-fd {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 160px;
    margin: 0 auto;
}

.footer-app .cph-app-fd-qr {
    width: 120px;
    height: 120px;
    padding: 6px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 0.65rem;
    box-shadow: none;
}

.footer-app .cph-app-fd-qr img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.footer-app .cph-app-fd-cap {
    margin: 0 0 0.2rem;
    font-size: 0.75rem !important;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75) !important;
    line-height: 1.4 !important;
}

.footer-app .cph-app-fd-sub {
    margin: 0 0 0.75rem;
    font-size: 0.6875rem !important;
    color: rgba(255, 255, 255, 0.45) !important;
    line-height: 1.4 !important;
}

.footer-app .cph-app-fd-stores {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.footer .cph-app-fd-store {
    display: inline-flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 132px;
    height: 40px;
    padding: 0 12px;
    background: #000;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 8px;
    box-sizing: border-box;
    transition: opacity 0.2s ease, background 0.2s ease;
    line-height: 1;
    overflow: hidden;
    float: none;
}

.footer .cph-app-fd-store:hover {
    opacity: 0.9;
    background: #1a1a1a;
    color: #fff !important;
    text-decoration: none !important;
}

.footer .cph-app-fd-store-ico,
.footer .cph-app-fd-store svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex-shrink: 0;
    display: block;
}

.footer .cph-app-fd-store-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-width: 0;
    line-height: 1.05;
    text-align: left;
}

.footer .cph-app-fd-store-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #fff !important;
    line-height: 1.1;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

.footer .cph-app-fd-store-action {
    display: block;
    font-size: 9px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85) !important;
    line-height: 1.1;
    margin: 1px 0 0;
    padding: 0;
    letter-spacing: 0.1px;
    white-space: nowrap;
}

/* ---------- Bottom meta: letters + email ---------- */
.footer-bottom {
    padding: 1.15rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-letters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.15rem 0.35rem;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.45);
}

.footer-letters__label {
    color: rgba(255, 255, 255, 0.55);
    margin-right: 0.15rem;
}

.footer-letters__sep {
    margin: 0 0.35rem 0 0.15rem;
    color: rgba(255, 255, 255, 0.25);
}

.footer-letters a {
    color: rgba(255, 255, 255, 0.45) !important;
    text-decoration: none !important;
    transition: color 0.15s ease;
}

.footer-letters a:hover {
    color: #fff !important;
}

.footer-contact {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45) !important;
    line-height: 1.6;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.55) !important;
    text-decoration: none !important;
    transition: color 0.15s ease;
}

.footer-contact a:hover {
    color: #fff !important;
}

/* ---------- Copyright ---------- */
.footer-copy {
    margin: 0;
    padding: 1rem 0 1.35rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    text-align: center;
    font-size: 0.75rem !important;
    color: rgba(255, 255, 255, 0.35) !important;
    line-height: 1.5 !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 1050px) {
    .footer-inner {
        padding: 0 24px;
    }

    .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-desc {
        max-width: none;
    }

    .footer-app {
        grid-column: 1 / -1;
        justify-self: center;
    }
}

@media (max-width: 640px) {
    .footer-inner {
        padding: 0 20px;
    }

    .footer-main {
        grid-template-columns: 1fr;
        padding: 2rem 0 1.5rem;
    }

    .footer-nav {
        grid-template-columns: 1fr 1fr;
    }

    .footer-nav .footer-col:last-child {
        grid-column: 1 / -1;
    }

    .footer-letters {
        gap: 0.1rem 0.25rem;
    }
}
