/* ===== فونت ایران سنس X ===== */
@font-face {
    font-family: 'IRANSans';
    src: url('../fonts/IRANSansXFaNum-regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSans';
    src: url('../fonts/IRANSansXFaNum-bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* ===== استایل پایه ===== */
body {
    margin: 0;
    font-family: 'IRANSans', sans-serif;
    background: #111;
    color: #fff;
    text-align: right;
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 15px; /* کاهش از 16px */
}

/* ===== پارتیکل‌ها و تصویر زمینه ===== */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 50;
    pointer-events: none;
}

.background-img {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: url('../images/background.jpg') center/cover no-repeat;
    background-color: #300;
    z-index: 10;
    opacity: 0.7;
}

/* ===== باکس شیشه‌ای (اصلاح شده) ===== */
.glass-box {
    display: grid;
    /* اصلاح: تعیین اندازه ثابت و حداکثری برای پوستر و باقی فضای موجود برای محتوا */
    grid-template-columns: minmax(300px, 400px) 1fr;
    gap: 30px;
    background: rgba(50,0,0,0.3);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(200,0,0,0.2);
    border-radius: 20px;
    padding: 30px;
    margin: 50px auto;
    max-width: 1200px;
    position: relative;
    z-index: 100;
    box-shadow: 0 0 30px rgba(200,0,0,0.3);
    max-height: 90vh;
    overflow: hidden;
}

/* ===== ستون پوستر (اصلاح شده) ===== */
.poster-column {
    display: flex;
    justify-content: center;
    align-items: center;
    /* حذف height: 100% که در Grid باعث رفتار نامشخص می‌شد */
    height: auto; 
}

.poster-link {
    position: relative;
    display: inline-block;
    overflow: hidden;
    border-radius: 15px;
    transition: transform 0.3s;
    /* حذف height: 100% که در Grid باعث رفتار نامشخص می‌شد */
    height: auto;
}

.poster-link:hover {
    transform: scale(1.02);
}

.poster-img {
    display: block;
    width: 100%;
    /* اصلاح: حذف وابستگی به نمای دستگاه (90vh) و استفاده از auto */
    height: auto; 
    max-height: 100%; /* برای اینکه از ستون Grid بیرون نزند */
    
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(200,0,0,0.5);
    border: 2px solid rgba(200,0,0,0.3);
}

/* ===== ستون تب‌ها ===== */
.tabs-column {
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    position: relative;
}

/* استایل آکاردئون اصلی */
.accordion-section {
    margin-bottom: 15px;
    width: 100%;
}

.accordion-button {
    background: rgba(100,0,0,0.5);
    border: none;
    padding: 15px 20px;
    border-radius: 8px;
    cursor: pointer;
    color: #fff;
    transition: 0.3s;
    font-family: 'IRANSans';
    font-size: 15px;
    font-weight: bold;
    width: 100%;
    text-align: right;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.accordion-button.active {
    background: rgba(200,0,0,0.7);
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}

.accordion-button:hover {
    background: rgba(150,0,0,0.6);
}

.accordion-icon {
    font-size: 17px;
    transition: transform 0.3s;
}

.accordion-button.active .accordion-icon {
    transform: rotate(45deg);
}

.accordion-content {
    display: none;
    padding: 0;
    background: rgba(50,0,0,0.2);
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    animation: fadeIn 0.3s ease;
    max-height: 40vh;
    overflow-y: auto;
}

.accordion-content.active {
    display: block;
    padding: 15px;
    border: 1px solid rgba(200,0,0,0.2);
    border-top: none;
}

/* استایل تب‌ها */
.tabs-container {
    width: 100%;
}

.tab-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 15px;
}

.tab-button {
    background: rgba(70,0,0,0.4);
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    color: #fff;
    transition: 0.3s;
    font-family: 'IRANSans';
    font-size: 13px;
    text-align: center;
    flex: 1;
    min-width: 100px;
}

.tab-button.active {
    background: rgba(150,0,0,0.6);
}

.tab-button:hover {
    background: rgba(120,0,0,0.5);
}

.tab-content {
    display: none;
    padding: 10px 15px;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

/* محتوای تب‌ها */
.sub-title {
    color: #f66;
    margin: 15px 0 10px;
    font-size: 1em;
}

.content-list {
    padding-right: 20px;
    margin: 10px 0;
}

.content-list li {
    margin-bottom: 5px;
    position: relative;
    right: 15px;
}

/* ===== دکمه‌ها ===== */
.submit-btn-container {
    padding-top: 5px;
}

.button-row {
    display: flex;
    flex-direction: row; /* مستقل از rtl */
    gap: 10px;
    margin-bottom: 15px;
}

.main-btn {
    flex-grow: 3;
    flex-basis: 0;
    order: 1;
    padding: 18px;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
    font-family: 'IRANSans';
    font-size: 17px;
    text-align: center;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    box-sizing: border-box;
    background: linear-gradient(to bottom, #d00, #900);
    box-shadow: 0 5px 15px rgba(200,0,0,0.5);
}

.main-btn:hover {
    background: linear-gradient(to bottom, #c00, #800);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(200,0,0,0.6);
}

.download-btn {
    flex-grow: 1;
    flex-basis: 0;
    order: 2;
    padding: 15px;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
    font-family: 'IRANSans';
    font-size: 15px;
    text-align: center;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    box-sizing: border-box;
    background: linear-gradient(to bottom, #006, #003);
    box-shadow: 0 5px 15px rgba(0,0,100,0.5);
}

.download-btn:hover {
    background: linear-gradient(to bottom, #005, #002);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,100,0.6);
}

.support-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.support-btn {
    flex: 1;
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
    font-family: 'IRANSans';
    font-size: 13px;
    text-align: center;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.eitaa-btn {
    background: linear-gradient(to bottom, #2e7d32, #1b5e20);
    color: white;
    border: 1px solid #1b5e20;
}

.eitaa-btn:hover {
    background: linear-gradient(to bottom, #1b5e20, #0d3e11);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.telegram-btn {
    background: linear-gradient(to bottom, #388e3c, #2e7d32);
    color: white;
    border: 1px solid #2e7d32;
}

.telegram-btn:hover {
    background: linear-gradient(to bottom, #2e7d32, #1b5e20);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.address-info {
    font-size: 11px;
    color: #aaa;
    text-align: center;
    margin-top: 10px;
    padding-top:5px;
    border-top: 1px solid rgba(200,0,0,0.2);
}

.address-info p {
    margin: 5px 0;
}

/* اسکرول بار */
.accordion-content::-webkit-scrollbar,
.tab-content::-webkit-scrollbar {
    width: 8px;
}

.accordion-content::-webkit-scrollbar-track,
.tab-content::-webkit-scrollbar-track {
    background: rgba(50,0,0,0.1);
    border-radius: 10px;
}

.accordion-content::-webkit-scrollbar-thumb,
.tab-content::-webkit-scrollbar-thumb {
    background-color: rgba(200,0,0,0.5);
    border-radius: 10px;
}

/* انیمیشن‌ها */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== ریسپانسیو موبایل ===== */
@media (max-width: 900px) {
    .glass-box {
        grid-template-columns: 1fr;
        padding: 20px;
        max-height: none;
        height: auto;
    }
    
    .poster-column {
        height: auto;
        margin-bottom: 20px;
    }
    
    .accordion-button {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .tab-button {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .button-row {
        flex-direction: column;
    }
    
    .main-btn {
        width: 100%;
        flex: auto;
        font-size: 15px;
        padding: 16px;
        order: 1;
    }
    
    .download-btn {
        width: 100%;
        flex: auto;
        font-size: 14px;
        order: 2;
    }
    
    .support-buttons {
        display: flex;
        gap: 10px;
    }
    
    .content-list li {
        right: 10px;
    }
    
    .accordion-content, .tab-content {
        max-height: none;
    }
}