/* ─── Hero Section ───────────────────────────────────────── */



.hero {
    max-width: 1200px;
    width: 100%;
    margin: 16px auto;
    border-radius: 16px;
    overflow: hidden;
    height: 375px;
    padding: 0;
    text-align: center;
    position: relative;
    box-shadow: 0 8px 40px rgba(59, 130, 246, 0.1);
}

.hero img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0);
}

.hero-content {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 4px;
}

.hero-content h1 {
    font-size: 36px;
    color: #0f172a;
    margin-top: 18px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.hero-content p {
    font-size: 17px;
    color: #334155;
    max-width: 540px;
    margin: 50px auto 32px;
    font-weight: 500;
}

.btn-primary {
    display: inline-block;
    padding: 14px 36px;
    margin-top: 50px;
    background: linear-gradient(135deg, #484848, #7e7e7e);
    color: #fff;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.55);
}

.section {
    max-width: 1200px;
    margin: 16px auto;

    padding: 70px 40px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    -webkit-backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* ─── Editorial Section ───────────────────────────────────── */

.editorial-row {
    display: flex;
    min-height: 550px;
    flex-direction: column;
    align-items: center;
}

.editorial-row-img {
    position: relative;
    display: inline-block;
}

.text-on-image1,
.text-on-image2,
.text-on-image3 {
    position: absolute;
    left: 50px;
    color: #334155;
    width: 250px;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 2px 2px 5px #999999;
    word-wrap: break-word;
    text-align: center;
}

.text-on-image1 {
    top: 70px;
}

.text-on-image2 {
    top: 260px;
}

.text-on-image3 {
    top: 460px;
}

#editorial-box {
    position: relative;
    overflow: hidden;
}

.editorial-content {
    max-height: 600px;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.editorial-content.expanded {
    max-height: 3500px;
}

.editorial-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 20px;
    color: #0f172a;
    text-align: center;
}

.editorial-image {
    max-width: 400px;
    width: 35%;
    min-width: 260px;
    height: auto;
    aspect-ratio: 400 / 267;
    object-fit: cover;
    border-radius: 14px;
    flex-shrink: 1;
}

.content-sections-wrapper {
    max-width: 1200px;
    margin: 16px auto;
    display: flex;
    gap: 24px;
    justify-content: center;
    align-items: stretch;
}

.content-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-width: 800px;
    margin: 16px auto;
    border-radius: 16px;
    padding: 40px;
    min-height: 600px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 30px rgba(59, 130, 246, 0.1);
}

.editorial-btn {
    display: block;
    margin: 24px auto 0;
    padding: 10px 20px;
    background: linear-gradient(135deg, #484848, #7e7e7e);
    color: #fff;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}

.editorial-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.55);
}

.editorial-row.expanded-layout {
    flex-direction: column !important;
    align-items: stretch;
}

.editorial-image.expanded-image {
    width: 100% !important;
    max-width: 100% !important;
    height: 250px !important;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 20px;
    order: -1;
    transition: all 0.4s ease;
}

/* ─── Files Section ───────────────────────────────────────── */

.files-section {
    padding: 40px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    -webkit-backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    line-height: 1.8;
}

.files-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
}

.file-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 28px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    width: 250px;
    border-left: 4px solid #484848;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.file-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.18);
    border-color: #959595;
}

.file-card img {
    width: 200px;
    border-radius: 15px;
    margin-bottom: 6px;
}

.file-card h3 {
    font-size: 18px;
    color: #0f172a;
    margin-bottom: 8px;
    font-weight: 700;
}

.file-card p {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 20px;
    text-align: center;
}

/* .rtl .file-card p {
    text-align: right;
} */

.btn-secondary {
    padding: 9px 20px;
    background: linear-gradient(135deg, #484848, #7e7e7e);
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
    margin-top: auto;
}

.btn-secondary:hover {
    background: #484848;
}

/* ─── Video Section ───────────────────────────────────────── */
.video-section {
    padding: 40px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    line-height: 1.8;
}


.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 8px;
}

.video-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 275px;
    /* ارتفاع ثابت برای یکسان ماندن کارت‌ها */
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
    /* برای وسط چین شدن کل محتوای کارت */
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.18);
    border-color: #959595;
}

.video-thumbnail {
    width: 100%;
    /* عرض کامل کارت */
    aspect-ratio: 405 / 240;
    /* حفظ نسبت تصویر اصلی */
    border-radius: 8px;
    overflow: hidden;
    background: #1e293b;
    margin: 0 auto 8px auto;
    /* برای وسط چین شدن و فاصله از عنوان */
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* تصویر کامل فضای thumbnail را پر کند بدون کش آمدن */
    border-radius: 8px;
}


.video-card h3 {
    font-size: 16px;
    margin: 8px 0 4px 0;
    color: #0f172a;
    font-weight: 700;
}

.video-card p {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    margin: 0 auto;
    /* برای وسط چین شدن پاراگراف */
    flex-grow: 1;
    /* اجازه رشد به پاراگراف برای گرفتن فضای بیشتر در صورت نیاز */
    max-width: 100%;
    /* پاراگراف از عرض کارت بیرون نزند */
    line-height: 1.5;
    /* خوانایی بیشتر */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* محدود کردن به 2 خط */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

/* ─── News Section ───────────────────────────────────────── */

.rtl .news-card {
    border-left: none;
    border-right: 4px solid #484848;
}

.news-section {
    padding: 40px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    line-height: 1.8;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.news-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    border-left: 4px solid #484848;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.18);
    border-color: #959595;
}

.news-date {
    font-size: 12px;
    color: #484848;
    font-weight: 700;
    margin-bottom: 10px;
}

.news-card h3 {
    font-size: 17px;
    margin-bottom: 10px;
    font-weight: 700;
    color: #0f172a;
}

.news-card p {
    font-size: 13px;
    color: #64748b;
    line-height: 1.7;
    flex-grow: 1;
}

.read-more {
    font-size: 13px;
    font-weight: 700;
    color: #484848;
    text-decoration: none;
    transition: color 0.3s;
}

.read-more:hover {
    color: #1e40af;
}

/* ─── Mobile Responsive Styles ───────────────────────────── */

@media (max-width:768px) {

    /* Hero */
    .hero {
        margin: 10px 12px;
        width: calc(100% - 24px);
        height: auto;
        border-radius: 12px;
    }

    .hero-content {
        justify-content: center;
        padding: 10px;
    }



    .hero img {

        width: 100%;
        height: auto;
        object-fit: cover;

    }

    .hero-content h1 {
        font-size: 12px;
        margin-top: -15px;
        line-height: 1.3;
    }

    .hero-content p {
        font-size: 10px;
        margin: 2px auto;
        max-width: 150px;
        text-align: center;
    }

    .btn-primary {
        margin-top: 5px;
        padding: 5px 13px;
        font-size: 13px;
    }

    /* Editorial Mobile */
    .content-section {
        padding: 5px;
        min-height: auto;
    }

    .editorial-title {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .editorial-row {
        gap: 12px;
        align-items: center;
    }



    .editorial-row-img {
        width: 100%;
        display: flex;
        align-items: center;
        position: relative;
    }

    .editorial-row-img img {
        width: 100%;
        height: auto;
    }

    #section1 .editorial-image {
        width: 80%;
    }


    .text-on-image1,
    .text-on-image2,
    .text-on-image3 {
        width: 200px;
        font-size: 13px;
        inset-block-start: var(--top, 0);
        inset-inline-start: var(--start, 0);
    }

    .editorial-image {
        width: 100%;
        max-width: 100%;
        border-radius: 10px;
        aspect-ratio: auto;
    }

    .editorial-text {
        width: 100%;
        font-size: 14px;
        line-height: 1.5;

    }


    .editorial-text h2 {
        font-size: 18px;
        text-align: center;
    }

    .editorial-content.collapsed {
        max-height: 400px;
        overflow: hidden;
    }

    .editorial-content.expanded {
        max-height: none;
        overflow: visible;
    }

    .content-sections-wrapper {
        margin-left: 12px;
        margin-right: 12px;
        width: calc(100% - 24px);
        flex-direction: column;
        gap: 12px;
    }

    /* Video Mobile */

    .section.video-section {
        width: 92%;
    }

    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .video-grid .video-card p {
        text-align: center;
    }

    .video-thumbnail {
        width: 100%;
        aspect-ratio: 405 / 240;
        height: auto;
        /* ارتفاع بر اساس aspect-ratio تنظیم شود */
        border-radius: 8px;
        overflow: hidden;
        background: #1e293b;
        margin: 0 auto 4px auto;
        /* فاصله کمتر در موبایل */
    }

    .video-thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover;

    }


    .video-card {
        height: 180px;
        padding: 12px;
        text-align: center;
    }

    .video-card h3 {
        font-size: 12px;
        margin: 4px 0 2px 0;
        color: #0f172a;
        font-weight: 700;
    }

    .video-card p {
        font-size: 10px;
        color: #64748b;
        font-weight: 500;
        margin: 0 auto;
        line-height: 1.4;
        -webkit-line-clamp: 2;
        /* محدود کردن به 2 خط در موبایل */
        text-align: center;
    }

    /* Files Mobile */

    .files-section {
        width: 92%;
        padding: 16px 12px;
    }

    .files-grid {
        gap: 12px;
        align-items: stretch;
    }

    .file-card {
        width: calc(50% - 6px);
        height: auto;
        padding: 12px;
        align-items: center;
        text-align: center;
    }

    .file-card img {
        max-width: 60px;
        height: 60px;
        margin: 8px 0;
        border-radius: 8px;
    }

    .files-grid .file-card p {
        text-align: center;
    }

    .file-card h3 {
        font-size: 14px;
    }

    .file-card p {
        font-size: 10px;
    }

    .btn-secondary {
        padding: 8px 14px;
        margin-top: auto;
        font-size: 10px;

    }

    /* News Mobile */
    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-section {
        width: 92%;
        padding: 16px 12px;
    }

}