﻿/* ---------------------- */
/* عمومی */
html, body {
    background: #fff;
    color: #222;
    font-family: 'iranyekan', Tahoma, sans-serif;
    scroll-behavior: smooth;
}

/* لینک‌ها */
a {
    color: #1e56a0;
    text-decoration: none;
    transition: color 0.2s ease;
}

    a:hover {
        color: #163d73;
    }

/* ---------------------- */
/* کارت‌ها */
.card {
    border-radius: 14px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
    display: flex;
    flex-direction: column;
    background: #fff;
}

    .card:hover {
        transform: translateY(-6px);
        box-shadow: 0 12px 26px rgba(0,0,0,0.12);
    }

/* تیتر بالای هر اسلایدر */
.carousel-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
    color: #213074;
}

/* تیتر وسط تصویر */
.slide-title {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    background: rgba(0,0,0,0.55);
    padding: 6px 12px;
    border-radius: 6px;
    text-align: center;
}

/* توضیحات */
.slide-summery {
    text-align: justify;
    direction: rtl;
    font-size: 0.95rem;
    line-height: 1.8;
    padding: 0.8rem;
}

/* لینک ادامه */
.read-more {
    color: #3273dc;
    font-weight: 600;
    margin-right: 6px;
    text-decoration: none;
    transition: color .2s;
}

    .read-more:hover {
        text-decoration: underline;
        color: #213074;
    }

/* ---------------------- */
/* اسلایدرها */
.carousel {
    padding: 0.8rem 0;
    overflow: hidden;
    position: relative;
}

.carousel-container {
    display: flex;
    width: 100%;
    transition: transform 0.5s ease;
    gap: 1rem;
    will-change: transform;
    direction: ltr;
}

.carousel-item {
    flex: 0 0 100% !important;
    min-width: 100% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* ناوبری */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
    transition: background 0.2s ease;
}

    .carousel-nav:hover {
        background: rgba(255,255,255,1);
    }

.carousel-nav-left {
    left: 10px;
}

.carousel-nav-right {
    right: 10px;
}

/* ---------------------- */
/* تصاویر داخل اسلایدر */
.carousel-item .card-image {
    aspect-ratio: 4 / 3;
    width: 100%;
    overflow: hidden;
    position: relative;
}

    .carousel-item .card-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.4s ease;
    }

    .carousel-item .card-image:hover img {
        transform: scale(1.05);
    }

/* دو اسلایدر کنار هم */
.dual-carousel {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-bottom: 2rem;
}

    .dual-carousel .carousel {
        flex: 1 1 48%;
    }

@media (max-width: 768px) {
    .dual-carousel .carousel {
        flex: 1 1 100%;
    }
}
/* Progress Bar شماره اسلاید */
.carousel-progress {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(33,48,116,0.85);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    z-index: 10;
    user-select: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* دکمه‌های ناوبری */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 42px;
    height: 42px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    transition: background 0.3s ease, transform 0.2s ease;
}

    .carousel-nav:hover {
        background: rgba(255,255,255,1);
        transform: scale(1.1);
    }

/* دکمه‌های چپ و راست */
.carousel-nav-left {
    left: 10px;
}

.carousel-nav-right {
    right: 10px;
}

/* انیمیشن نرم تغییر اسلاید */
.carousel-container {
    display: flex;
    width: 100%;
    transition: transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
    gap: 1rem;
    will-change: transform;
    direction: ltr;
}

/* ---------------------- */
/* تبلیغات */
.ads-section .ad-box {
    background: #f9f9f9;
    border: 1px solid #ddd;
    text-align: center;
    padding: 2rem;
    border-radius: 8px;
    min-height: 120px;
    transition: all .3s ease;
}

    .ads-section .ad-box:hover {
        background: #fff;
        box-shadow: 0 6px 16px rgba(0,0,0,0.1);
    }

/* ---------------------- */
/* ویدیو */
.video-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 8px;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(33,48,116,0.75);
    color: white;
    padding: 14px;
    border-radius: 50%;
    font-size: 22px;
    transition: background .3s ease;
}

    .play-button:hover {
        background: rgba(33,48,116,0.9);
    }

/* ---------------------- */
/* بلوک‌های متنی */
.text-columns-section .text-block {
    background: #fff;
    padding: 1.4rem;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    border-bottom: 5px solid #213074;
    margin-bottom: 30px;
    transition: transform .2s ease;
}

    .text-columns-section .text-block:hover {
        transform: translateY(-4px);
    }

.text-block h3 {
    margin-bottom: 20px;
    color: #213074;
}

/* ---------------------- */
/* ویدیو در کارت */
.card-video {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 10px;
    background: #000;
}

    .card-video iframe,
    .card-video video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.card-content p,
.card-content h3 {
    direction: rtl;
    text-align: justify;
}
/* رنگ پس‌زمینه منو */
/* پایه برای navbar */
.custom-navbar {
    background-color: #213074;
    font-family: iranyekan, Tahoma, sans-serif;
    padding: 0.15rem 0;
    box-shadow: none;
    color: #fff !important;
    position: sticky;
    top: 0;
    z-index: 1000;
}

    /* استایل آیتم‌ها */
    .custom-navbar .navbar-item {
        color: #fff !important;
        font-weight: 600;
        text-align: center;
        padding: 0.6rem 0.8rem;
        transition: background .25s ease;
        background-color: #213074;
    }

        .custom-navbar .navbar-item:hover,
        .custom-navbar .navbar-link:hover {
            background-color: rgba(255,255,255,0.08);
            color: rgba(0,0,0,0.6) !important;
        }
    /* لوگو در حالت عادی */
    .custom-navbar .navbar-brand img {
        height: 56px;
        max-height: 56px;
        width: auto;
        transition: all 0.3s ease;
    }

/* اطمینان از اولویت بالاتر */
.navbar-brand > a.navbar-item img {
    height: 56px !important;
    transition: all 0.3s ease;
}
/* در حالت موبایل فقط اندازه و فاصله تغییر کند */
@media (max-width: 768px) {

    /* کوچک‌تر شدن لوگو */
    .custom-navbar .navbar-brand img,
    .navbar-brand > a.navbar-item img {
        height: 38px !important;
        max-height: 38px !important;
        width: auto;
    }
}
/* رنگ پایه */
.button {
    background-color: #213074;
    color: white;
}

    .button:hover {
        background-color: #0f1a4b;
    }

.input:focus {
    border-color: #213074;
    box-shadow: 0 0 0 0.125em rgba(33, 48, 116, 0.25);
}

.label {
    color: #213074;
    font-weight: bold;
}
