/* پایه‌ها */
body {
    font-family: "Vazir", sans-serif;
    background-color: #f8f5ff;
    direction: rtl;
    color: #333;
}

/* بارگذاری فونت‌های Vazir */
@font-face {
    font-family: 'Vazir';
    src: url('/static/fonts/Vazir-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Vazir';
    src: url('/static/fonts/Vazir-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Vazir';
    src: url('/static/fonts/Vazir-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

.home-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Banner Section */
.banner-section {
    margin-bottom: 40px;
}

.banner-content {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(160, 125, 255, 0.2);
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.banner-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.banner-text h1 {
    font-size: 36px;
    margin-bottom: 10px;
    font-family: 'Vazir', sans-serif;
    font-weight: bold;
}

.banner-text p {
    font-size: 18px;
    margin-bottom: 20px;
    font-family: 'Vazir', sans-serif;
    font-weight: normal;
}

.banner-button {
    display: inline-block;
    padding: 12px 30px;
    background-color: #8b5cf6;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Vazir', sans-serif;
    font-weight: 500;
    transition: background-color 0.3s, transform 0.3s;
}

.banner-button:hover {
    background-color: #7c3aed;
    transform: scale(1.03);
}

.banner-button:active {
    transform: scale(0.98);
}

/* About Section */
.about-section {
    margin-bottom: 40px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f5ff 100%);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(160, 125, 255, 0.15);
    border: 1px solid #e3d7ff;
}

.section-title {
    font-size: 24px;
    color: #6a0dad;
    margin-bottom: 20px;
    text-align: right;
    font-family: 'Vazir', sans-serif;
    font-weight: bold;
    line-height: 1.6;
}

.about-text {
    font-size: 16px;
    color: #4a4a4a;
    line-height: 2;
    margin-bottom: 20px;
    font-family: 'Vazir', sans-serif;
    font-weight: bold;
}

.features-list, .actions-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.features-list li, .actions-list li {
    font-size: 16px;
    color: #4a4a4a;
    margin-bottom: 12px;
    position: relative;
    padding-right: 30px;
    font-family: 'Vazir', sans-serif;
    font-weight: normal;
    line-height: 1.8;
}

.features-list li::before, .actions-list li::before {
    content: "✔";
    color: #2f9e44;
    position: absolute;
    right: 0;
    font-size: 18px;
    font-weight: bold;
}

.features-list li strong {
    color: #2f9e44;
    font-weight: bold;
}

/* Main and Sidebar Layout */
.main-sidebar-container {
    display: flex;
    gap: 20px;
}

.main-content {
    flex: 3;
}

.sidebar {
    flex: 1;
    background-color: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(160, 125, 255, 0.1);
}

.sidebar-title {
    font-size: 20px;
    color: #6a0dad;
    margin-bottom: 15px;
    font-family: 'Vazir', sans-serif;
    font-weight: 500;
}

.news-list {
    list-style: none;
    padding: 0;
}

.news-item {
    margin-bottom: 15px;
}

.news-link {
    font-size: 16px;
    color: #6a0dad;
    text-decoration: none;
    font-weight: 500;
    font-family: 'Vazir', sans-serif;
}

.news-link:hover {
    color: #7c3aed;
}

.news-details {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
    font-family: 'Vazir', sans-serif;
    font-weight: normal;
}

.news-date {
    font-size: 12px;
    color: #999;
    font-family: 'Vazir', sans-serif;
}

/* Success Section */
.success-section {
    margin-bottom: 40px;
    position: relative; /* برای قرار گرفتن دکمه‌های فلش */
}

.success-grid-container {
    position: relative;
    max-width: 800px; /* محدود کردن عرض گرید برای دسکتاپ */
    margin: 0 auto;
}

.success-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 20px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
    scroll-behavior: smooth; /* اسکرول نرم */
}

.success-card {
    flex: 0 0 160px; /* عرض ثابت برای کارت‌ها در دسکتاپ */
    background-color: #fff;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(160, 125, 255, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.success-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(160, 125, 255, 0.15);
}

.success-image {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 2px solid #e3d7ff;
}

.success-name {
    font-size: 16px;
    color: #6a0dad;
    margin-bottom: 5px;
    font-family: 'Vazir', sans-serif;
    font-weight: 500;
}

.success-university {
    font-size: 14px;
    color: #666;
    font-family: 'Vazir', sans-serif;
    font-weight: normal;
}

.arrow-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: #8b5cf6;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s, transform 0.3s;
    z-index: 10;
}

.arrow-button:hover {
    background-color: #7c3aed;
    transform: translateY(-50%) scale(1.1);
}

.arrow-button:active {
    transform: translateY(-50%) scale(0.95);
}

.arrow-left {
    right: -50px;
}

.arrow-right {
    left: -50px;
}

/* Packages Section */
.packages-section {
    margin-bottom: 40px;
}

.packages-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 15px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.package-card {
    flex: 0 0 200px;
    background-color: #fff;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(160, 125, 255, 0.1);
    border: 1px solid #e3d7ff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.package-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 24px rgba(160, 125, 255, 0.2);
}

.package-poster {
    width: 100%;
    max-width: 150px;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
    transition: transform 0.4s ease;
    cursor: pointer;
    margin-bottom: 10px;
}

.package-poster:hover {
    transform: scale(1.03);
}

.package-title {
    font-size: 16px;
    color: #6a0dad;
    margin-bottom: 5px;
    font-family: 'Vazir', sans-serif;
    font-weight: 500;
}

.package-type {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    font-family: 'Vazir', sans-serif;
    font-weight: normal;
}

.package-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #8b5cf6;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Vazir', sans-serif;
    font-weight: 500;
    transition: background-color 0.3s, transform 0.3s;
}

.package-button:hover {
    background-color: #7c3aed;
    transform: scale(1.03);
}

.package-button:active {
    transform: scale(0.98);
}

.no-packages, .no-success, .no-news {
    text-align: center;
    color: #666;
    font-size: 16px;
    margin-top: 20px;
    font-family: 'Vazir', sans-serif;
    font-weight: normal;
}

.no-poster {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    font-family: 'Vazir', sans-serif;
    font-weight: normal;
}

.more-packages {
    text-align: center;
    margin-top: 30px;
}

.more-button {
    padding: 12px 30px;
    background-color: #6a0dad;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Vazir', sans-serif;
    font-weight: 500;
    transition: background-color 0.3s, transform 0.3s;
}

.more-button:hover {
    background-color: #7c3aed;
    transform: scale(1.03);
}

.more-button:active {
    transform: scale(0.98);
}

/* ریسپانسیو برای تبلت‌ها */
@media (max-width: 1024px) {
    .home-container {
        max-width: 100%;
        margin: 30px 15px;
        padding: 0 10px;
    }

    .main-sidebar-container {
        flex-direction: column;
        gap: 15px;
    }

    .sidebar {
        margin-top: 20px;
        padding: 15px;
    }

    .banner-content {
        height: 350px;
    }

    .banner-text h1 {
        font-size: 32px;
    }

    .banner-text p {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .banner-button {
        font-size: 15px;
        padding: 10px 25px;
    }

    .packages-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 20px;
        flex-wrap: wrap;
        overflow-x: visible;
    }

    .package-card {
        flex: none;
        min-width: 200px;
        padding: 15px;
    }

    .package-poster {
        max-width: 180px;
    }

    .package-title {
        font-size: 15px;
    }

    .package-type {
        font-size: 13px;
    }

    .package-button {
        font-size: 13px;
        padding: 8px 18px;
    }

    .success-grid-container {
        max-width: 600px; /* محدود کردن عرض گرید برای تبلت */
    }

    .success-grid {
        gap: 15px;
    }

    .success-card {
        flex: 0 0 140px;
        padding: 12px;
    }

    .success-image {
        width: 55px;
        height: 55px;
    }

    .success-name {
        font-size: 13px;
    }

    .success-university {
        font-size: 11px;
    }

    .arrow-button {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }

    .arrow-left {
        right: -40px;
    }

    .arrow-right {
        left: -40px;
    }

    .about-section {
        padding: 20px;
    }

    .section-title {
        font-size: 22px;
    }

    .about-text {
        font-size: 15px;
        line-height: 1.8;
    }

    .features-list li, .actions-list li {
        font-size: 14px;
        margin-bottom: 10px;
    }
}

/* ریسپانسیو برای موبایل */
@media (max-width: 600px) {
    .home-container {
        margin: 10px 5px;
        padding: 0 5px;
        width: 100%;
        max-width: 100%;
    }

    .banner-content {
        height: 220px;
        border-radius: 8px;
        overflow: hidden;
    }

    .banner-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        -webkit-object-fit: cover;
    }

    .banner-text {
        padding: 10px;
        background: rgba(0, 0, 0, 0.6);
        border-radius: 6px;
        max-width: 95%;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        -webkit-transform: translate(-50%, -50%);
    }

    .banner-text h1 {
        font-size: 20px;
        margin-bottom: 5px;
        line-height: 1.3;
    }

    .banner-text p {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .banner-button {
        font-size: 12px;
        padding: 6px 16px;
        border-radius: 5px;
    }

    .about-section {
        padding: 10px;
        border-radius: 8px;
        box-shadow: 0 2px 6px rgba(160, 125, 255, 0.1);
    }

    .section-title {
        font-size: 18px;
        line-height: 1.4;
    }

    .about-text {
        font-size: 14px;
        line-height: 1.6;
    }

    .features-list li, .actions-list li {
        font-size: 13px;
        margin-bottom: 6px;
        padding-right: 20px;
    }

    .features-list li::before, .actions-list li::before {
        font-size: 14px;
    }

    .packages-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 10px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .package-card {
        flex: 0 0 160px;
        padding: 8px;
        border-radius: 8px;
        box-shadow: 0 2px 5px rgba(160, 125, 255, 0.1);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .package-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 4px 10px rgba(160, 125, 255, 0.15);
    }

    .package-poster {
        max-width: 100px;
        max-height: 70px;
        object-fit: cover;
        -webkit-object-fit: cover;
        border-radius: 6px;
        margin-bottom: 8px;
    }

    .package-title {
        font-size: 14px;
        margin-bottom: 3px;
    }

    .package-type {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .package-button {
        font-size: 12px;
        padding: 6px 14px;
        border-radius: 5px;
    }

    .success-grid-container {
        max-width: 100%;
    }

    .success-grid {
        gap: 8px;
    }

    .success-card {
        flex: 0 0 120px;
        padding: 8px;
        border-radius: 6px;
        box-shadow: 0 2px 5px rgba(160, 125, 255, 0.1);
    }

    .success-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(160, 125, 255, 0.15);
    }

    .success-image {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        object-fit: cover;
        -webkit-object-fit: cover;
        margin-bottom: 6px;
    }

    .success-name {
        font-size: 13px;
        margin-bottom: 2px;
    }

    .success-university {
        font-size: 11px;
    }

    .arrow-button {
        display: none; /* مخفی کردن دکمه‌های فلش در موبایل */
    }

    .sidebar {
        padding: 8px;
        border-radius: 6px;
    }

    .sidebar-title {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .news-link {
        font-size: 13px;
    }

    .news-details {
        font-size: 12px;
        line-height: 1.5;
    }

    .news-date {
        font-size: 10px;
    }

    .more-button {
        font-size: 12px;
        padding: 6px 16px;
        border-radius: 5px;
    }
}