﻿:root {
    --brand-primary: #2054a7;
    --brand-accent: #1babe8;
    --brand-dark: #0b1220;
    --btn-radius: 14px;
    --btn-shadow: 0 6px 16px rgba(32,84,167,.18);
    --btn-shadow-hover: 0 10px 22px rgba(32,84,167,.28);
    --btn-transition: all .18s ease;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --bottom-nav-height: 60px;
}

html {
    min-height: 100%;
}

body {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

.app-header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: calc(10px + var(--safe-top)) calc(14px + var(--safe-right)) 10px calc(14px + var(--safe-left));
    direction: ltr !important;
}

jdp-container {
    z-index: 100000000 !important
}

.modal-header .btn-close {
    margin-right: auto;
    margin-left: 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    flex-wrap: nowrap; /* ⛔️ هرگز نره خط بعد */
    min-width: 0;
}

/* سمت چپ */
.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto; /* اجازه جمع شدن */
    min-width: 0;
}

.logo {
    max-height: 40px;
    height: auto;
    width: auto;
    flex-shrink: 0; /* لوگو له نشه */
    display: block;
}

/* متن متحرک */
.rotator {
    position: relative;
    height: 24px;
    overflow: hidden;
    flex: 1 1 auto;
    min-width: 0; /* خیلی مهم */
    max-width: 100%;
}

.rotator-text {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #111827;
    font-size: 15px;
    font-weight: 600;
    line-height: 24px;
}

    /* انیمیشن‌ها */
    .rotator-text.animate-out {
        animation: slideOutDown 300ms ease forwards;
    }

    .rotator-text.animate-in {
        animation: slideInDown 300ms ease forwards;
    }

@keyframes slideOutDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }

    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* سمت راست */
.header-right {
    flex: 0 0 auto;
    flex-shrink: 0;
}

/* 📱 موبایل: همه چیز کوچیک‌تر ولی تک‌خط */
@media (max-width: 576px) {

    .app-header {
        padding: calc(6px + var(--safe-top)) calc(8px + var(--safe-right)) 6px calc(8px + var(--safe-left));
    }

    .logo {
        max-height: 25px; /* کوچیک‌تر */
    }

    .rotator {
        height: 20px;
    }

    .rotator-text {
        font-size: 12px; /* متن کوچیک‌تر */
        line-height: 20px;
    }

    .header-left {
        gap: 6px;
    }

    .btn-group .btn {
        padding: 2px 6px;
        font-size: 11px;
        white-space: nowrap;
    }
}

.forceLangFont {
/*    font-family: 'Calibri' !important;*/
    font-weight: bold;
    border-color: #dcdcdc
}


.profile-link {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    transition: background .2s ease;
}

    .profile-link:hover {
        background: rgba(32,84,167,.08);
    }

.profile-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

@media (max-width: 576px) {
    .profile-link {
        width: 28px;
        height: 28px;
    }

    .profile-icon {
        width: 18px;
        height: 18px;
    }
}


.general-grid {
    row-gap: .75rem;
}

.general-tile {
    border: 1px solid rgba(11,18,32,.08);
    background: #fff;
    border-radius: 14px;
    padding: .6rem .35rem;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    min-height: 72px;
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
    box-shadow: 0 2px 10px rgba(11,18,32,.04);
}

    .general-tile:hover {
        transform: translateY(-2px);
        border-color: rgba(32,84,167,.28);
        box-shadow: 0 8px 18px rgba(11,18,32,.10);
    }

.general-icon-img {
    width: 32px;
    height: 32px;
    margin-bottom: .5rem;
    object-fit: contain;
    display: block;
    /* اگر SVG ها تک‌رنگ هستند و می‌خوای با تم رنگی بشن، بعداً می‌تونیم filter بدیم */
}

.general-title {
    font-size: .72rem;
    line-height: 1.1;
    text-align: center;
    color: var(--brand-dark);
    font-weight: 600;
    padding: 0 .2rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
 /*   overflow: hidden;*/
/*    min-height: 1.6rem;*/
}

@media (max-width: 360px) {
    .general-title {
        font-size: .68rem;
    }

    .general-icon-img {
        width: 24px;
        height: 24px;
    }
}

/* ===== App Inputs (Floating Placeholder) ===== */
.app-field {
    position: relative;
    width: 100%;
}

/* input / textarea مشترک */
.app-input {
    width: 100%;
    height: 52px;
    padding: 16px 14px 10px 14px; /* بالا جا برای لیبل */
    border-radius: 14px;
    border: 1px solid rgba(11,18,32,.14);
    background: #fff;
    color: var(--brand-dark);
    outline: none;
    font-size: 0.95rem;
    transition: border-color .18s ease, box-shadow .18s ease;
}

    /* فوکوس */
    .app-input:focus {
        border-color: rgba(32,84,167,.55);
        box-shadow: 0 0 0 .18rem rgba(32,84,167,.12);
    }

    /* برای فعال شدن placeholder-shown باید placeholder وجود داشته باشد */
    .app-input::placeholder {
        color: transparent;
    }

/* لیبل شناور */
.app-label {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    /* RTL/LTR safe */
    inset-inline-start: 14px;
    left: 14px; /* fallback */

    color: rgba(11,18,32,.55);
    font-weight: 600;
    font-size: .92rem;
    pointer-events: none;
    padding: 0 6px;
    border-radius: 8px;
    transition: all .16s ease;
    background: transparent;
}

/* اگر صفحه RTL بود، fallback left را خنثی کن */
[dir="rtl"] .app-label {
    left: auto;
    right: 14px;
}

/* حالت اولیه: مثل placeholder */
.app-input:placeholder-shown + .app-label {
    top: 50%;
    transform: translateY(-50%);
    font-size: .92rem;
    color: rgba(11,18,32,.55);
    background: transparent;
    box-shadow: none;
}

/* حالت فعال: فوکوس یا مقدار دارد */
.app-input:focus + .app-label,
.app-input:not(:placeholder-shown) + .app-label {
    top: 8px;
    transform: none;
    font-size: .72rem;
    color: rgba(32,84,167,.95);
    background: #fff;
    box-shadow: 0 0 0 2px #fff;
}

/* ولیدیشن */
.app-validation {
    display: block;
    margin-top: 6px;
    font-size: .82rem;
}

/* مرکزچین */
.text-center .app-input {
    text-align: center;
}

/* موبایل */
@media (max-width: 576px) {
    .app-input {
        height: 50px;
    }
}

.is-invalid.app-input {
    border-color: rgba(220,53,69,.6) !important;
}

    .is-invalid.app-input:focus {
        box-shadow: 0 0 0 .18rem rgba(220,53,69,.12) !important;
    }

    .is-invalid.app-input + .app-label {
        color: rgba(220,53,69,.95) !important;
    }


/* پایه */
.btn {
    border-radius: var(--btn-radius);
    font-weight: 700;
    letter-spacing: .2px;
    transition: var(--btn-transition);
    position: relative;
}

    /* ===== Focus Halo Unified ===== */
    .btn:focus,
    .btn:focus-visible {
        box-shadow: 0 0 0 .25rem rgba(32,84,167,.25), 0 6px 16px rgba(32,84,167,.18);
    }

/* ================= PRIMARY ================= */

.btn-primary {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-accent) 100%);
    border: none;
    color: #fff;
    box-shadow: var(--btn-shadow);
}

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: var(--btn-shadow-hover);
        filter: brightness(1.08);
    }

/* ================= OUTLINE PRIMARY ================= */

.btn-outline-primary {
    border: 2px solid var(--brand-primary);
    background: transparent;
    color: var(--brand-primary);
}

    .btn-outline-primary:hover {
        background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
        color: #fff;
        border-color: transparent;
        transform: translateY(-2px);
        box-shadow: var(--btn-shadow);
    }

/* ================= ACCENT ================= */

.btn-accent {
    background: linear-gradient(135deg, var(--brand-accent), #4ecbff);
    border: none;
    color: #fff;
    box-shadow: 0 6px 16px rgba(27,171,232,.25);
}

    .btn-accent:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 22px rgba(27,171,232,.35);
        filter: brightness(1.08);
    }

/* ===== OUTLINE ACCENT ===== */

.btn-outline-accent {
    border: 2px solid var(--brand-accent);
    background: transparent;
    color: var(--brand-accent);
}

    .btn-outline-accent:hover {
        background: linear-gradient(135deg, var(--brand-accent), #4ecbff);
        color: #fff;
        border-color: transparent;
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(27,171,232,.25);
    }

/* ================= DARK ================= */

.btn-dark {
    background: linear-gradient(135deg, var(--brand-dark), #1e293b);
    border: none;
    color: #fff;
    box-shadow: 0 6px 16px rgba(11,18,32,.22);
}

    .btn-dark:hover {
        transform: translateY(-2px);
        filter: brightness(1.08);
    }

/* ================= SOFT ================= */

.btn-soft-primary {
    background: linear-gradient(135deg, rgba(32,84,167,.08), rgba(27,171,232,.12));
    color: var(--brand-primary);
    border: none;
}

    .btn-soft-primary:hover {
        background: linear-gradient(135deg, rgba(32,84,167,.15), rgba(27,171,232,.22));
        transform: translateY(-2px);
    }

/* ================= Disabled ================= */

.btn:disabled,
.btn.disabled {
    opacity: .6;
    box-shadow: none !important;
    transform: none !important;
}

/* ================= Sizes ================= */

.btn-sm {
    padding: .4rem .8rem;
    font-size: .8rem;
}

.btn-lg {
    padding: .85rem 1.6rem;
    font-size: 1.05rem;
}

/* ================= Mobile ================= */

@media (max-width: 576px) {
    .btn {
        font-size: .9rem;
        padding: .6rem 1rem;
    }
}

.global-loader {
    position: fixed;
    inset: 0;
    backdrop-filter: blur(1px);
    background: rgba(255,255,255,.55);
    z-index: 9999;
    display: none; /* پلاگین خودش block می‌کنه */
    text-align: center; /* وسط افقی */
    padding-top: 200px; /* فاصله از بالا */
}

    .global-loader .spinner-border {
        color: var(--brand-primary);
        width: 2.6rem;
        height: 2.6rem;
    }

.h2Index{
    font-size:1.2rem!important
}

.smallBox{
    max-width:500px;
    margin:0 auto;
}

.formTitle{
    font-weight:bold;
    font-size:1.2rem!important
}

/* ===== Car Sale ===== */
.car-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.car-page-head h1 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--brand-dark);
    margin: 0 0 4px;
}

.car-page-head p {
    margin: 0;
    color: rgba(11,18,32,.62);
    font-size: .92rem;
}

.car-form {
    border: 1px solid rgba(11,18,32,.08);
    border-radius: 8px;
    padding: 14px;
    background: #fff;
}

.car-stepper {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.car-step-dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(32,84,167,.24);
    background: #fff;
    color: var(--brand-primary);
    font-weight: 900;
}

.car-step-dot.active {
    background: var(--brand-primary);
    color: #fff;
}

.car-form-step {
    display: none;
}

.car-form-step.active {
    display: block;
}

.car-form-step h2 {
    font-size: 1rem;
    font-weight: 900;
    color: var(--brand-dark);
    margin-bottom: 12px;
}

.car-step-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.brand-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
    gap: 8px;
}

.brand-option {
    border: 1px solid rgba(11,18,32,.12);
    border-radius: 8px;
    padding: 8px 6px;
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    text-align: center;
    transition: border-color .16s ease, box-shadow .16s ease;
}

.brand-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.brand-option img {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.brand-option span {
    font-size: .78rem;
    font-weight: 700;
    color: var(--brand-dark);
}

.brand-option:has(input:checked) {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(32,84,167,.10);
}

.price-mode {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.price-option {
    border: 1px solid rgba(11,18,32,.12);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    text-align: center;
    font-weight: 800;
}

.price-option input {
    margin-inline-end: 4px;
}

.car-form .select2-container--default .select2-selection--single {
    height: 38px;
    border: 1px solid #dee2e6;
    border-radius: .375rem;
}

.car-form .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px;
    padding-inline: 12px 28px;
}

.car-form .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
}

.car-ad-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.car-buy-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.car-filter-panel,
.car-filter-form {
    border: 1px solid rgba(11,18,32,.08);
    border-radius: 8px;
    padding: 12px;
    background: #fff;
}

.car-filter-panel .car-filter-form,
.modal-body .car-filter-form {
    border: 0;
    padding: 0;
}

.filter-title {
    font-weight: 900;
    color: var(--brand-dark);
    margin-bottom: 10px;
}

.car-ad-card {
    display: block;
    border: 1px solid rgba(11,18,32,.08);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(11,18,32,.05);
}

.car-ad-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #f3f4f6;
}

.car-ad-card-body {
    display: grid;
    gap: 4px;
    padding: 10px;
}

.car-ad-card-body strong,
.car-ad-card-body b {
    color: var(--brand-dark);
}

.car-ad-card-body span {
    font-size: .86rem;
    color: rgba(11,18,32,.65);
}

.car-details-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
    gap: 14px;
    align-items: start;
}

.car-gallery-main {
    display: block;
    width: 100%;
    border: 0;
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
    cursor: zoom-in;
}

.car-gallery-main img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

.car-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.car-gallery-thumb {
    border: 0;
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
    display: block;
    background: #f3f4f6;
    cursor: pointer;
}

.car-gallery-thumb.active {
    box-shadow: 0 0 0 3px rgba(32,84,167,.32);
}

.empty-state.compact {
    padding: 12px;
    font-size: .9rem;
}

.car-gallery-thumbs img,
.car-gallery-thumb img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

.lg-backdrop {
    background-color: rgba(0,0,0,.92);
}

.lg-outer .lg-image {
    max-width: 96vw;
    max-height: 88vh;
    object-fit: contain;
}

.car-info-panel {
    border: 1px solid rgba(11,18,32,.08);
    border-radius: 8px;
    padding: 14px;
    background: #fff;
}

.car-info-panel h1 {
    font-size: 1.25rem;
    font-weight: 900;
    margin-bottom: 12px;
    color: var(--brand-dark);
}

.car-spec-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.car-spec-list span,
.car-price-box {
    background: #f8fafc;
    border: 1px solid rgba(11,18,32,.06);
    border-radius: 8px;
    padding: 9px;
}

.car-price-box {
    display: grid;
    gap: 4px;
    margin-bottom: 12px;
}

.car-price-box strong {
    font-size: 1.1rem;
    color: var(--brand-primary);
}

.auction-form {
    border-top: 1px solid rgba(11,18,32,.08);
    padding-top: 12px;
}

.empty-state,
.car-no-image {
    border: 1px dashed rgba(11,18,32,.18);
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    color: rgba(11,18,32,.62);
    background: #fff;
}

.my-ad-list {
    display: grid;
    gap: 10px;
}

.my-ad-item {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 12px;
    border: 1px solid rgba(11,18,32,.08);
    border-radius: 8px;
    padding: 10px;
    background: #fff;
}

.my-ad-item > img {
    width: 140px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    background: #f3f4f6;
}

.my-ad-main h2 {
    margin: 0 0 4px;
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--brand-dark);
}

.my-ad-main p {
    margin: 0;
    color: rgba(11,18,32,.62);
    font-size: .88rem;
}

.status-pill {
    border-radius: 999px;
    padding: 4px 9px;
    font-size: .75rem;
    font-weight: 800;
}

.status-pill.active {
    color: #166534;
    background: #dcfce7;
}

.status-pill.inactive {
    color: #64748b;
    background: #f1f5f9;
}

.bid-list {
    display: grid;
    gap: 6px;
    margin-top: 10px;
}

.bid-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px;
    border-radius: 8px;
    background: #f8fafc;
}

.accepted-phone {
    margin-top: 8px;
    padding: 8px;
    border-radius: 8px;
    color: #075985;
    background: #e0f2fe;
    font-weight: 800;
}

/* ===== Public Service Providers ===== */
.provider-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.provider-page-head h1 {
    color: var(--brand-dark);
    font-size: 1.35rem;
    font-weight: 900;
    margin: 0 0 4px;
}

.provider-page-head p {
    color: rgba(11,18,32,.62);
    margin: 0;
}

.provider-filter-form {
    background: #fff;
    border: 1px solid rgba(11,18,32,.08);
    border-radius: 8px;
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto auto;
    gap: 8px;
    margin-bottom: 12px;
    padding: 10px;
}

.provider-list {
    display: grid;
    gap: 10px;
}

.provider-item {
    align-items: start;
    background: #fff;
    border: 1px solid rgba(11,18,32,.08);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    grid-template-columns: 96px minmax(0, 1fr);
    padding: 10px;
}

.provider-logo {
    aspect-ratio: 1 / 1;
    background: #f3f4f6;
    border-radius: 8px;
    object-fit: cover;
    width: 96px;
}

.provider-main {
    min-width: 0;
}

.provider-title-row {
    align-items: start;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.provider-title-row h2 {
    color: var(--brand-dark);
    font-size: 1.05rem;
    font-weight: 900;
    margin: 0 0 4px;
}

.provider-province {
    color: var(--brand-primary);
    font-size: .86rem;
    font-weight: 800;
}

.provider-address {
    color: rgba(11,18,32,.68);
    line-height: 1.8;
    margin: 8px 0;
}

.provider-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.provider-services {
    background: #f8fafc;
    border: 1px solid rgba(11,18,32,.06);
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    padding: 8px;
}

.provider-services span {
    background: #fff;
    border: 1px solid rgba(32,84,167,.14);
    border-radius: 999px;
    color: var(--brand-dark);
    font-size: .82rem;
    font-weight: 800;
    padding: 4px 9px;
}

@media (max-width: 768px) {
    .car-page-head {
        align-items: stretch;
        flex-direction: column;
    }

    .price-mode,
    .car-details-layout,
    .car-buy-layout,
    .provider-filter-form,
    .provider-item {
        grid-template-columns: 1fr;
    }

    .provider-logo {
        width: 76px;
    }

    .my-ad-item {
        grid-template-columns: 1fr;
    }

    .my-ad-item > img {
        width: 100%;
    }
}

/* ============================================================
   Bottom Navigation Bar  (PWA-style)
   ============================================================ */

/* ===== Bottom Navigation Bar ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    flex-direction: row;
    direction: ltr;
    align-items: center;
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(11,18,32,.07);
    box-shadow: 0 -2px 28px rgba(11,18,32,.11);
    box-sizing: border-box;
    padding-bottom: var(--safe-bottom);
    height: calc(var(--bottom-nav-height) + var(--safe-bottom));
}

/* هر آیتم */
.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: var(--bottom-nav-height);
    padding: 5px 2px 4px;
    text-decoration: none;
    color: rgba(11,18,32,.38);
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .1px;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    transition: color .18s ease;
    user-select: none;
}

/* محفظه آیکون */
.bottom-nav-icon-wrap {
    width: 42px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: background .2s ease, transform .18s ease;
}

/* تصویر آیکون */
.bottom-nav-img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    opacity: .42;
    transition: opacity .18s ease, transform .18s ease;
    display: block;
}

/* حالت فعال */
.bottom-nav-item.active {
    color: var(--brand-primary);
}
.bottom-nav-item.active .bottom-nav-icon-wrap {
    transform: translateY(-2px);
}
.bottom-nav-item.active .bottom-nav-img {
    opacity: 1;
    transform: scale(1.06);
}

/* hover روی غیرفعال */
.bottom-nav-item:hover:not(.active) {
    color: rgba(32,84,167,.65);
}
.bottom-nav-item:hover:not(.active) .bottom-nav-img {
    opacity: .72;
}

/* ─── لیبل متنی ─── */
.bottom-nav-lbl {
    font-size: .62rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .05px;
}

/* ─── دکمه خانه (وسط - برجسته) ─── */
.bottom-nav-home {
    flex: 1.1;
}

.bottom-nav-home-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--brand-primary) 0%, #1a3d8c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 18px rgba(32,84,167,.38), 0 1px 4px rgba(32,84,167,.22);
    margin-top: -15px;
    transition: transform .18s ease, box-shadow .18s ease;
    flex-shrink: 0;
}

.bottom-nav-home-btn svg {
    width: 22px;
    height: 22px;
    stroke: #fff;
}

.bottom-nav-home.active .bottom-nav-home-btn {
    background: linear-gradient(145deg, #0b1220 0%, #1a2f60 100%);
    box-shadow: 0 4px 18px rgba(11,18,32,.35);
}

.bottom-nav-home:hover .bottom-nav-home-btn {
    transform: translateY(-3px);
    box-shadow: 0 8px 26px rgba(32,84,167,.5);
}

.bottom-nav-home .bottom-nav-lbl {
    margin-top: 2px;
    color: var(--brand-primary);
}

.bottom-nav-home.active .bottom-nav-lbl {
    color: var(--brand-dark);
}

/* ─── فضای خالی پایین ─── */
body {
    padding-bottom: calc(var(--bottom-nav-height) + var(--safe-bottom));
}

body.has-no-bottom-nav {
    padding-bottom: 0 !important;
}

/* ─── دسکتاپ: تمام عرض + آیتم‌های بزرگ‌تر ─── */
@media (min-width: 768px) {
    :root {
        --bottom-nav-height: 70px;
    }

    .bottom-nav {
        left: 0;
        right: 0;
        max-width: none;
        transform: none;
        border-radius: 0;
        justify-content: center;
        gap: 0;
    }

    .bottom-nav-item {
        flex: 0 0 120px;
        font-size: .7rem;
    }

    .bottom-nav-icon-wrap {
        width: 52px;
        height: 36px;
    }

    .bottom-nav-img {
        width: 32px;
        height: 32px;
    }
}

/* ═══════════════════════════════════════════
   صفحه اول — Home Page Sections
═══════════════════════════════════════════ */

body.page-home {
    background: #eef1f8;
}

.home-page-bg {
    min-height: 100vh;
    --home-tile-min-height: auto;
}

.home-sections-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: .75rem 16px 1rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

/* ─── کارت پایه ─── */
.home-card {
    background: #fff;
    border-radius: 18px;
    padding: .85rem 1rem .9rem;
    box-shadow: 0 1px 10px rgba(11,18,32,.07), 0 0 0 1px rgba(11,18,32,.05);
    border-top: 3px solid var(--brand-primary);
}

/* کارت با accent کمرنگ‌تر (تعمیرگاه / نمایشگاه) */
.home-card-accent {
    border-top-color: rgba(32,84,167,.45);
}

/* ─── عنوان و زیرعنوان کارت ─── */
.home-card-title {
    font-size: .82rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin: 0 0 2px;
    line-height: 1.2;
    letter-spacing: -.01em;
}

.home-card-sub {
    font-size: .67rem;
    color: rgba(11,18,32,.38);
    margin: 0 0 .65rem;
    font-weight: 500;
}

/* ─── گرید تایل‌ها — CSS auto-fill بجای Bootstrap cols ─── */
.home-tile-grid {
    container-type: inline-size;
}

/* override Bootstrap row/col داخل گرید */
.home-tile-grid .row.general-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
    grid-auto-rows: 1fr;
    align-items: stretch;
    gap: 8px !important;
    margin: 0 !important;
}

.home-tile-grid .row.general-grid > [class*="col"] {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    padding: 0 !important;
}

/* تایل داخل کارت */
.home-tile-grid .general-tile {
    background: #f4f6fc;
    border-color: rgba(32,84,167,.08);
    min-height: 0;
    aspect-ratio: unset;
    height: 100%;
    min-block-size: var(--home-tile-min-height);
    box-sizing: border-box;
    border-radius: 12px;
    padding: .55rem .3rem;
}

.home-tile-grid .general-icon-img {
    width: 32px;
    height: 32px;
    margin-bottom: .8rem;
}

.home-tile-grid .general-tile:hover {
    background: #fff;
    border-color: rgba(32,84,167,.26);
    box-shadow: 0 4px 14px rgba(32,84,167,.10);
}

/* ─── بخش SEO ─── */
.home-section-seo {
    background: rgba(11,18,32,.02);
    box-shadow: none;
    border: 1px solid rgba(11,18,32,.06);
    border-top: none;
    border-radius: 14px;
    padding: .9rem 1rem 1rem;
    font-size: .82rem;
    line-height: 1.75;
    color: rgba(11,18,32,.7);
}

.home-section-seo h3 {
    font-size: .95rem;
    font-weight: 800;
    color: var(--brand-dark);
    margin: 0 0 .5rem;
}

.home-section-seo h4 {
    font-size: .88rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin: .9rem 0 .35rem;
}

.home-section-seo h5 {
    font-size: .82rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin: .75rem 0 .3rem;
}

.home-section-seo p {
    margin: 0 0 .5rem;
}

.home-section-seo ul {
    margin: 0 0 .5rem;
    padding-inline-start: 1.25rem;
}

.home-section-seo ul li {
    margin-bottom: .2rem;
}

/* ─── ردیف دو ستون تخصصی ─── */
.home-pro-row {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

/* ─── دسکتاپ ─── */
@media (min-width: 992px) {
    .home-sections-wrap {
        padding: 1.25rem 24px 1.5rem;
        gap: 1rem;
    }

    .home-card {
        padding: 1.25rem 1.4rem 1.1rem;
        border-radius: 20px;
    }

    .home-pro-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .home-tile-grid .row.general-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px !important;
    }

    .home-tile-grid .general-tile {
        padding: .7rem .4rem;
    }

    .home-tile-grid .general-icon-img {
        width: 36px;
        height: 36px;
        margin-bottom: .8rem;
    }
}

/* ══════════════════════════════════════════
   مجله / Mag pages
══════════════════════════════════════════ */

/* ─── head ─── */
.mag-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.mag-page-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--brand-dark);
    margin: 0 0 .2rem;
}

.mag-page-sub {
    font-size: .82rem;
    color: rgba(11,18,32,.5);
    margin: 0;
}

/* ─── filter bar ─── */
.mag-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: .75rem;
}

.mag-filter-bar .form-control,
.mag-filter-bar .form-select {
    flex: 1 1 160px;
    min-width: 0;
    font-size: .85rem;
}

.mag-count {
    font-size: .8rem;
    color: rgba(11,18,32,.45);
    margin: 0 0 .75rem;
}

/* ─── grid ─── */
.mag-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

/* ─── card ─── */
.mag-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 8px rgba(11,18,32,.07), 0 0 0 1px rgba(11,18,32,.05);
    text-decoration: none;
    color: inherit;
    transition: box-shadow .15s, transform .15s;
}

.mag-card:hover {
    box-shadow: 0 4px 18px rgba(11,18,32,.12);
    transform: translateY(-2px);
    color: inherit;
    text-decoration: none;
}

.mag-card-img-wrap {
    position: relative;
    aspect-ratio: 16/9;
    background: #eef1f8;
    overflow: hidden;
}

.mag-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mag-card-img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #dce4f5 0%, #eef1f8 100%);
}

/* ─── badge ─── */
.mag-badge {
    position: absolute;
    top: .5rem;
    right: .5rem;
    font-size: .68rem;
    font-weight: 700;
    padding: .2rem .5rem;
    border-radius: 30px;
    color: #fff;
    line-height: 1.4;
}

.mag-badge-news     { background: #e8403a; }
.mag-badge-article  { background: var(--brand-primary); }
.mag-badge-tutorial { background: #1a9e5c; }

/* ─── card body ─── */
.mag-card-body {
    padding: .75rem .9rem .8rem;
    display: flex;
    flex-direction: column;
    gap: .3rem;
    flex: 1;
}

.mag-card-title {
    font-size: .92rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mag-card-desc {
    font-size: .78rem;
    color: rgba(11,18,32,.55);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mag-card-date {
    font-size: .72rem;
    color: rgba(11,18,32,.35);
    margin-top: auto;
}

/* ─── pagination ─── */
.mag-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    justify-content: center;
    margin: 1rem 0 2rem;
}

.mag-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 .5rem;
    border-radius: 8px;
    border: 1px solid rgba(11,18,32,.12);
    background: #fff;
    color: var(--brand-dark);
    font-size: .85rem;
    text-decoration: none;
    transition: background .12s, color .12s;
}

.mag-page-btn.active,
.mag-page-btn:hover {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #fff;
    text-decoration: none;
}

/* ─── empty ─── */
.mag-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: rgba(11,18,32,.4);
}

/* ─── detail page ─── */
.mag-detail-back {
    margin-bottom: 1rem;
}

.mag-detail {
    max-width: 780px;
    margin: 0 auto;
}

.mag-detail-header {
    margin-bottom: 1.25rem;
}

.mag-detail-header .mag-badge {
    position: static;
    display: inline-block;
    margin-bottom: .5rem;
}

.mag-detail-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--brand-dark);
    line-height: 1.5;
    margin: 0 0 .5rem;
}

.mag-detail-desc {
    font-size: .9rem;
    color: rgba(11,18,32,.6);
    margin: 0 0 .5rem;
}

.mag-detail-meta {
    display: flex;
    gap: 1rem;
    font-size: .78rem;
    color: rgba(11,18,32,.4);
    flex-wrap: wrap;
}

.mag-detail-img-wrap {
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    aspect-ratio: 16/9;
    background: #eef1f8;
}

.mag-detail-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mag-detail-body {
    font-size: .92rem;
    line-height: 1.85;
    color: rgba(11,18,32,.82);
}

.mag-detail-body h2,
.mag-detail-body h3,
.mag-detail-body h4 {
    font-weight: 700;
    margin: 1.5rem 0 .6rem;
    color: var(--brand-dark);
}

.mag-detail-body img {
    max-width: 100%;
    border-radius: 10px;
}

.mag-detail-body a {
    color: var(--brand-primary);
}

/* ─── admin form card ─── */
.admin-form-card {
    background: #fff;
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 1px 8px rgba(11,18,32,.07), 0 0 0 1px rgba(11,18,32,.05);
}
/* ══════════════════════════════════════════
   OTP 4-box
══════════════════════════════════════════ */
.otp-boxes {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: .25rem auto;
}

.otp-cell {
    width: 60px;
    height: 64px;
    border: 2px solid rgba(11,18,32,.18);
    border-radius: 14px;
    background: #f4f6fc;
    font-size: 1.7rem;
    font-weight: 700;
    text-align: center;
    color: var(--brand-dark, #0b1220);
    caret-color: var(--brand-primary, #2054a7);
    outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
    -webkit-appearance: none;
    appearance: none;
}

.otp-cell:focus {
    border-color: var(--brand-primary, #2054a7);
    box-shadow: 0 0 0 3px rgba(32,84,167,.15);
    background: #fff;
}

.otp-cell:not(:placeholder-shown) {
    border-color: var(--brand-primary, #2054a7);
    background: #fff;
}

/* موبایل کوچک */
@media (max-width: 360px) {
    .otp-cell {
        width: 52px;
        height: 56px;
        font-size: 1.5rem;
        border-radius: 12px;
    }

    .otp-boxes {
        gap: 8px;
    }
}
