/* فوتر سایت: ستون‌های هم‌اندازه و هم‌ارتفاع؛ در موبایل آکاردئونی.
   همه قاعده‌ها زیر .sf هستند تا با قالب قدیمی فوتر تداخل نکنند. */

.sf {
    --sf-ink: #0f172a;
    --sf-text: #475569;
    --sf-line: #e2e8f0;
    margin-top: 32px;
    background: #f1f5f9;
    border-top: 1px solid var(--sf-line);
    color: var(--sf-text);
    font-size: 13.5px;
}

.sf a { color: inherit; text-decoration: none; transition: color .15s ease; }
.sf a:hover { color: var(--novin-theme-dark, #067f8c); }

/* ── نوار برند و خبرنامه ── */
.sf-band {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    padding: 28px 0;
    border-bottom: 1px solid var(--sf-line);
}

.sf-brand { display: flex; align-items: center; gap: 16px; min-width: 0; }
.sf-logo img { display: block; height: 56px; width: auto; max-width: 160px; object-fit: contain; }

.sf-brand-text { min-width: 0; }

.sf-brand-text p {
    margin: 0 0 8px;
    line-height: 1.95;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sf-social { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }

.sf-social a {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--sf-line);
    color: var(--sf-text);
}

.sf-social a:hover { background: var(--novin-theme); border-color: var(--novin-theme); color: #fff; }

.sf-news { min-width: 0; }
.sf-news strong { display: block; margin-bottom: 8px; color: var(--sf-ink); font-size: 14.5px; font-weight: 800; }
.sf-news form { display: flex; gap: 8px; }

.sf-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--sf-line);
    border-radius: 12px;
    background: #fff;
    font-size: 13px;
}

.sf-input:focus { outline: 2px solid rgba(var(--novin-theme-rgb, 8, 184, 200), .35); border-color: var(--novin-theme); }

.sf-btn {
    flex: 0 0 auto;
    height: 44px;
    padding: 0 22px;
    border: 0;
    border-radius: 12px;
    background: var(--novin-theme);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.sf-btn:hover { background: var(--novin-theme-dark, #067f8c); }

.sf-msg { display: block; margin-top: 6px; }
.sf-msg-ok { color: #15803d; }
.sf-msg-err { color: #b91c1c; }

/* ── ستون‌های لینک: پنج ستون برابر؛ هر ردیف هم‌ارتفاع ── */
.sf-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 28px 24px;
    padding: 28px 0;
    align-items: stretch;
}

.sf-col { min-width: 0; }

.sf-title {
    position: relative;
    margin: 0 0 14px;
    padding-bottom: 10px;
    color: var(--sf-ink);
    font-size: 15px;
    font-weight: 800;
}

.sf-title::after {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    bottom: 0;
    width: 28px;
    height: 3px;
    border-radius: 3px;
    background: var(--novin-theme);
}

.sf-list { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.sf-list li { line-height: 1.8; }
.sf-mail { margin-top: 4px; word-break: break-all; }
.sf-mail i { margin-inline-end: 4px; color: var(--novin-theme-dark, #067f8c); }

.sf-toggle { display: none; }

/* ── نوار پایین ── */
.sf-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 20px;
    padding: 16px 0 20px;
    border-top: 1px solid var(--sf-line);
    font-size: 12.5px;
}

.sf-policy { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; }

/* ── لپ‌تاپ کوچک: ۳ ستون ── */
@media (max-width: 1199.98px) {
    .sf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ── تبلت و موبایل: آکاردئونی تا فضای کمتری بگیرد ── */
@media (max-width: 991.98px) {
    .sf-band { grid-template-columns: 1fr; gap: 18px; padding: 20px 0; }
    .sf-grid { grid-template-columns: 1fr; gap: 0; padding: 4px 0; }

    .sf-col { border-bottom: 1px solid var(--sf-line); }
    .sf-col:last-child { border-bottom: 0; }

    .sf-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 14px 2px;
        border: 0;
        background: none;
        color: var(--sf-ink);
        font-size: 14.5px;
        font-weight: 800;
        text-align: start;
    }

    .sf-toggle i { font-size: 11px; transition: transform .2s ease; }
    .sf-toggle:not(.collapsed) i { transform: rotate(180deg); }

    .sf-list { padding: 0 2px 14px; }
}

@media (max-width: 575.98px) {
    .sf-brand { align-items: flex-start; }
    .sf-logo img { height: 46px; }
    .sf-bottom { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    .sf a, .sf-toggle i { transition: none; }
}
