﻿/* =======================
   استایل کلی سایت
======================= */
body {
    font-family: 'IRANSans', Tahoma, sans-serif;
    font-feature-settings: "lnum";
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
}

/* کانتینر عمومی */
.container {
    max-width: 1200px;
    margin: auto;
    padding: 15px;
}

/* =======================
   هدر قرمز اصلی (main-header)
======================= */
/* هدر شفاف بیرون، رنگ برند فقط روی container */
.main-header {
    background: transparent !important;
    direction: rtl !important;
    z-index: 1050;
}

/* container قرمز و گوشه گرد */
.header-container {
    background-color: #b30000 !important;
    border-radius: 12px;
}

/* navbar */
.main-header .navbar {
    background: transparent !important;
    padding: 0;
}

/* برند */
.main-header .navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
    color: #fff !important;
}

    .main-header .navbar-brand span {
        font-size: 1.25rem;
        color: #fff;
    }

/* لینک‌ها */
.main-header .nav-link {
    color: #fff !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

    .main-header .nav-link:hover,
    .main-header .nav-link.active {
        color: #ffd1d1 !important;
        text-shadow: 0 0 6px rgba(255, 255, 255, 0.4);
    }

/* dropdown */
.main-header .dropdown-menu {
    background-color: #fff;
    border: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    right: 0;
    left: auto;
    text-align: right;
}

.main-header .dropdown-item {
    color: #333;
    transition: 0.2s;
}

    .main-header .dropdown-item:hover {
        background-color: #fce6e6;
        color: #b30000;
    }

/* navbar collapse و راست‌چین */
.main-header .navbar-collapse {
    direction: rtl !important;
    justify-content: flex-start;
}

.main-header .navbar-nav {
    flex-direction: row !important;
}

.main-header .nav-item {
    margin-right: 15px;
    margin-left: 0;
}

/* جستجو */
.search-container .form-control {
    height: 34px;
}

.search-container .btn {
    height: 34px;
}

/* ریسپانسیو */
@media (max-width: 992px) {
    .search-container {
        width: 100%;
    }
}


/* ---------- آیکون جستجو ---------- */
.search-container {
    position: relative;
}

    .search-container .form-control {
        border-radius: 8px;
        border: none;
        outline: none;
        padding-right: 40px;
    }

    .search-container .bi-search {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        color: #6c757d;
    }

    .search-container .btn {
        border-radius: 8px;
        font-weight: 600;
        background-color: #fff;
        color: #b30000;
        transition: all 0.3s ease;
    }

        .search-container .btn:hover {
            background-color: #ffe5e5;
        }

/* ---------- منوی همبرگری سفید ---------- */
.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.6);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.95)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* =======================
   کارت‌ها
======================= */
/*.card {
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    padding: 15px;
    margin-bottom: 20px;
    background-color: white;
    border: none;
    transition: all 0.3s ease;
}

.card-title {
    font-size: 1rem;
}

.card-text {
    font-size: 0.9rem;
}

.card-img-top {
    height: 200px;
    object-fit: cover;
    transition: height 0.3s ease;
}

.car-image {
    max-width: 120px;
    height: auto;
    transition: max-width 0.3s ease;
    border: 2px solid #ddd;
}
*/
/* =======================
   جدول‌ها
======================= */
table {
    width: 100%;
    border-collapse: collapse;
}

    table th, table td {
        border: 1px solid #ddd;
        padding: 8px;
        text-align: center;
    }

/* =======================
   فوتر دسکتاپ
======================= */
.footer {
    background: linear-gradient(90deg, #343a40, #212529);
    padding: 2rem 0;
    text-align: center;
}

    .footer a {
        color: #f8f9fa;
        text-decoration: none;
        margin: 0 10px;
    }

        .footer a:hover {
            color: #adb5bd;
        }

/* =======================
   فوتر موبایل (ثابت پایین صفحه)
======================= */
.mobile-footer-menu {
    display: none !important;
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    background-color: #b30000;
    color: white;
    border-top: 2px solid #990000;
    z-index: 1000;
    height: 60px;
    justify-content: space-around;
    align-items: center;
}

    .mobile-footer-menu a {
        flex: 1;
        text-align: center;
        text-decoration: none;
        color: #fff;
        font-size: 12px;
        transition: all 0.3s;
    }

        .mobile-footer-menu a i {
            font-size: 20px;
            display: block;
            margin-bottom: 3px;
        }

        .mobile-footer-menu a.active,
        .mobile-footer-menu a:hover {
            color: #ffdddd;
        }

/* =======================
   ریسپانسیو
======================= */
@media (max-width: 768px) {
    body {
        font-size: 14px;
        background-color: #fff !important;
        padding-bottom: 60px; /* برای فوتر موبایل */
    }

    .main-header {
        text-align: center;
    }

    .navbar-brand span {
        font-size: 1.1rem;
    }

    .search-container {
        margin-top: 10px;
        justify-content: center !important;
    }

    .navbar a {
        display: block;
        margin: 8px 0;
    }
    /* فاصله بین منوی بازشده و فوتر موبایل */
    .navbar-collapse {
        margin-bottom: 90px; /* ارتفاع فوتر موبایل + کمی فاصله */
    }
    .container {
        padding: 8px;
    }

    /*.card {
        padding: 10px;
        font-size: 14px;
    }

    .card-img-top {
        height: 100px;
    }

    .car-image {
        max-width: 80px;
    }*/

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .mobile-footer-menu {
        display: flex !important;
    }

    .main-header .navbar-nav {
        flex-direction: column !important;
        text-align: center;
    }

    .main-header .nav-item {
        margin: 5px 0;
    }
}
