@import url(../persian_fonts/iransans-farsi-numbers/iransans-farsi-numbers-font.css);

@font-face {
    font-family: Vazir;
    src: url("../persian_fonts/vazir-font/Vazir.woff2") format(woff2);
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: Sahel;
    src: url("../persian_fonts/sahel-font/Sahel.woff2") format(woff2);
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: Yekan;
    src: url("../persian_fonts/yekan-font/Yekan.woff") format(woff);
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}


body {
    font-family: "IRANSans";
    line-height: 1.7;
    background-color: #F2F2F2;
    color: #000000;
}

.custom-navbar {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1030;
}

.consult-button {
    background: hsla(323, 91%, 51%, 1);
    background: linear-gradient(90deg, hsla(323, 91%, 51%, 1) 0%, hsla(329, 20%, 24%, 1) 100%);
    background: -moz-linear-gradient(90deg, hsla(323, 91%, 51%, 1) 0%, hsla(329, 20%, 24%, 1) 100%);
    background: -webkit-linear-gradient(90deg, hsla(323, 91%, 51%, 1) 0%, hsla(329, 20%, 24%, 1) 100%);
    filter: progid: DXImageTransform.Microsoft.gradient(startColorstr="#F4119E", endColorstr="#4A313E", GradientType=1);
    color: white !important;
    padding: 8px 16px;
    border-radius: 5px;
    border: none;
    transition: 0.3s;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    -ms-border-radius: 5px;
    -o-border-radius: 5px;
}

    .consult-button:hover {
        opacity: 0.85;
    }

.navbar-brand img {
    height: 40px;
}

.nav-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.main-content {
    margin-top: 100px;
    margin-bottom: 50px;
}

.hero {
    background: linear-gradient(90deg, hsla(186, 33%, 94%, 1) 0%, hsla(216, 41%, 79%, 1) 100%);
    color: #2F3C4F;
}

    .hero h1 {
        font-size: 28px;
        font-weight: bold;
    }

.search-form .form-control {
    border-top-right-radius: 30px;
    border-bottom-right-radius: 30px;
    border: 1px solid #ccc;
    padding-right: 1.5rem;
    padding-left: 1.5rem;
}

.search-form .btn {
    border-top-left-radius: 30px;
    border-bottom-left-radius: 30px;
    background-color: #2A4759;
    border-color: #2A4759;
    color: #fff;
    padding-left: 2rem;
    padding-right: 2rem;
}

    .search-form .btn:hover {
        background-color: #1e3442;
    }
/* Ads Card */

.ad-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 16px;
    direction: rtl;
    padding: 1rem;
}

.ad-card {
    width: 100%;
    max-width: 250px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    cursor: default;
}

/* بخش تصویر */
.ad-img-container {
    width: 100%;
    height: 200px; /* ارتفاع ثابت برای نمایش کامل تصویر */
    background-color: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

    .ad-img-container img {
        width: 100%;
        height: 100%;
        object-fit: contain; /* نمایش کامل تصویر حتی اگر کشیده بشه */
        /* می‌تونی از object-fit: scale-down استفاده کنی اگه بخوای بدون کشیدگی ولی با سایز واقعی */
    }

/* بدنه کارت */
.ad-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex-grow: 1;
}

.ad-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
    text-align: right;
}

.btn-outline-primary {
    display: inline-block;
    text-align: center;
    border: 1px solid #2A4759;
    color: #2A4759;
    background-color: transparent;
    border-radius: 6px;
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
    text-decoration: none;
}

    .btn-outline-primary:hover {
        background-color: #2A4759;
        color: #fff;
    }


/* Sidebar */

.side-bar {
    background-color: #fff;
    color: #333 !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.1);
}

.cata-content {
    background-color: #fff;
    color: #333 !important;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgb(0 134 212 / 0.15);
}


/* منو اصلی */
.menu {
    padding-left: 0;
    font-size: 14px;
    color: #444;
    user-select: none;
}

    /* آیتم‌های لیست */
    .menu li {
        margin-top: 8px;
        position: relative;
    }

    /* لینک‌ها */
    .menu a {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 14px;
        border-radius: 8px;
        background-color: #fff;
        color: #333 !important;
        text-decoration: none;
        box-shadow: 0 1px 3px rgb(0 0 0 / 0.1);
        transition: background-color 0.25s ease, box-shadow 0.25s ease;
        cursor: pointer;
    }

        .menu a:hover {
            background-color: #e0f0ff;
            box-shadow: 0 4px 8px rgb(0 134 212 / 0.15);
            color: #007acc !important;
        }

/* زیرمنوها */
.submenu {
    display: none;
    margin-top: 6px;
    margin-right: 16px;
    border-left: 2px solid #ddd;
    padding-left: 10px;
}

    /* لینک‌های زیرمنو */
    .submenu li a {
        font-size: 13px;
        background-color: #fafafa;
        color: #555 !important;
        box-shadow: none;
        padding: 6px 12px;
        border-radius: 6px;
        transition: background-color 0.25s ease;
    }

        .submenu li a:hover {
            background-color: #dceeff;
            color: #007acc !important;
        }

/* آیکون فلش */
.arrow {
    transition: transform 0.3s ease;
    stroke: #666;
}

/* چرخش فلش وقتی باز است */
.open > a .arrow {
    transform: rotate(90deg);
}

/* نمایش زیرمنو وقتی باز */
.open > .submenu {
    display: block;
}

/* Footer  */

.blog-footer {
    padding: 2.5rem 0;
    color: #727272;
    text-align: center;
    background-color: #f9f9f9;
    border-top: .05rem solid #e5e5e5;
}

    .blog-footer p:last-child {
        margin-bottom: 0;
    }

    /* Pdf and outside link */

.btnpdf {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    margin: 10px;
    font-size: 16px;
    color: white;
    border: none;
    border-radius: 12px;
    text-decoration: none;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .btnpdf svg {
        width: 20px;
        height: 20px;
        fill: white;
    }

    .btnpdf.download {
        background-color: #28a745;
    }

        .btnpdf.download:hover {
            background-color: #218838;
        }

    .btnpdf.external {
        background-color: #007bff;
    }

        .btnpdf.external:hover {
            background-color: #0056b3;
        }