/* تنظیمات پایه */
body {
    margin: 0;
    font-family: "Vazirmatn", Tahoma, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}
/* ===== HEADER ===== */

.main-header{
    width:100%;
    background:#003366;
    color:white;
    direction:rtl;
}

/* ===== LOGO ===== */

.logo-top{
    background:#002347;
    text-align:center;
    padding:15px 0;
}

.site-title{
    font-size:26px;
    font-weight:bold;
}

/* ===== HEADER GRID (ROW 2) ===== */

.header-grid{
    display:grid;
        grid-template-columns: 1fr 240px;
    align-items:center;
    padding:10px 10px 5px 10px;
    margin-right: 5px;
    
    
}

/* ===== NAVIGATION ===== */

.main-nav{
    display:flex;
   /* flex-direction: row-reverse;  */ /* مهم: ترتیب لینک‌ها را برعکس کن */
   /* justify-content:flex-start; */   /* شروع محور = راست در RTL */
    align-items:center;
    text-align: right;
    gap:18px;
    flex-wrap:nowrap;              /* که ستون نشوند اگر جا کم شد (در دسکتاپ) */
    margin-right: 0;    
  
width: fit-content;             /* عرض فقط به اندازه خود منو */
    margin-right: 0;
    margin-left: auto;  
}


.main-nav a{
    color:white;
    text-decoration:none;
    font-size:15px;
    padding:6px 10px;
    transition:0.3s;
    margin-right: 5px;
}
.main-nav a:hover{
    background:#0055aa;
    border-radius:4px;
}

/* ===== REGISTER BUTTON ===== */

.highlight-btn{
    background:#ff9800;
    border-radius:5px;
    padding:26px 14px;
}

.highlight-btn:hover{
    background:#ffb74d;
}

/* ===== CLOCK + DATE ===== */

.top-left-info{
    text-align:left;
    line-height:1.6;
    font-size:13px;
}

.clock{
    font-weight:bold;
    font-size:20px;
}

.calendar-fa{
    font-size:13px;
}

.calendar-en{
    font-size:12px;
    opacity:0.85;
}
/* بدنه اصلی */
.main-layout {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
}

.toolbox {
    flex: 1;
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    height: fit-content;
}

.content-area {
    flex: 3;
}

/* بخش خوش آمدگویی */
.welcome-titles {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #003366;
    margin-bottom: 15px;
}

.en-title {
    color: #bdc3c7;
    font-size: 1.5rem;
}

.register-callout {
    text-align: center;
    margin: 20px 0;
}

.register-callout a {
    font-size: 22px;
    color: #d35400;
    text-decoration: none;
    font-weight: bold;
    border: 2px dashed #d35400;
    padding: 10px 30px;
    border-radius: 10px;
}

/* بنر سبز (افعال بی قاعده) */
.verb-banner {
    background-color: #ebf9eb;
    border: 1px solid #c3e6cb;
    border-right: 5px solid #28a745;
    padding: 10px 20px;
    border-radius: 5px;
    margin: 20px 0;
}

.verb-banner a {
    color: #721c24;
    text-decoration: underline;
}

/* بخش اخبار و ادامه مطلب */
.news-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.badge {
    background: #3498db;
    color: white;
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 12px;
}

.news-thumb {
    width: 150px;
    float: left;
    margin: 0 0 15px 15px;
    border-radius: 8px;
    border: 2px solid #eee;
}

.hidden-content {
    display: none;
    margin-top: 15px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.read-more-btn {
    background: #003366;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
}

/* فوتر */
.main-footer {
    background: #002347;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 50px;
}
/* ستون سمت راست */
.right-sidebar{
    direction:rtl;
    width:280px;
}

/* کارت اصلی سایدبار */
.sidebar-card{
    background:#ffffff;
    border:1px solid #e3e6ef;
    border-radius:14px;
    box-shadow:0 6px 16px rgba(0,0,0,0.1);
    padding:15px;
    font-family:Tahoma;
}

/* عنوان */
.sidebar-title{
    text-align:center;
    font-size:20px;
    margin-bottom:15px;
    color:#1f2d3d;
    border-bottom:1px solid #e6ecf2;
    padding-bottom:8px;
}

/* لیست لینک‌ها */
.sidebar-links{
    list-style:none;
    padding:0;
    margin:0;
}

/* هر آیتم */
.sidebar-links li{
    margin-bottom:10px;
}

/* لینک‌های اصلی */
.sidebar-link{
    display:block;
    background:#f8fafc;
    border:1px solid #e2e8f0;
    border-radius:8px;
    padding:10px;
    text-decoration:none;
    color:#1d3557;
    font-size:16px;
    transition:.25s;
}

.sidebar-link:hover{
    background:#0d6efd;
    color:white;
}

/* دکمه فلش */
#btnsites{
    margin-top:6px;
    padding:4px 8px;
    border-radius:6px;
    border:1px solid #dbe3f0;
    background:#eef3ff;
    cursor:pointer;
}

#btnsites:hover{
    background:#0d6efd;
    color:white;
}

/* زیرمنو */
.sidebar-section {
    margin-top:8px;
    background:#f7f9fc;
    border:5px solid #e2e8f0;
    border-radius:8px;
    padding:6px;
       display:none;
}
.title-sidebar-section {
    display:flex; 
    align-items:center;
     justify-content:space-between;
}
/* لینک‌های زیرمنو */
.sidebar-section a{
    padding:6px;
    text-decoration:none;
    color:#2c3e50;
    border-radius:6px;
    text-decoration: none;
}

.sidebar-section a:hover{
    background:#e8f0ff;
    color:#0d6efd;
}

/* حدیث */
.sidebar-links script{
    display:block;
    margin-top:10px;
}

/* سامانه‌دهی */
.samandehi{
    text-align:center;
    margin-top:15px;
    padding-top:12px;
    border-top:1px dashed #dbe2ea;
}

#samandehi-logo{
    max-width:95px;
    cursor:pointer;
    transition:.3s;
}

#samandehi-logo:hover{
    transform:scale(1.05);
}

/* تصویر پایین */
.sidebar-image{
    text-align:center;
    margin-top:15px;
}

.sidebar-image img{
    max-width:100%;
    border-radius:10px;
}

/* اگر select قبلی را نمی‌خواهی */
.right-sidebar select {
    display:none;
}

/* ریسپانسیو موبایل */
@media (max-width: 768px) {
    .main-layout {
        flex-direction: column;
    }
    
    .header-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .top-left-info {
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.2);
        padding: 10px 0;
        width: 100%;
        text-align: center;
    }

    .main-nav {
        display: none;
        flex-direction: column;
        width: 100%;
    }

    .main-nav.show {
        display: flex;
    }

    .menu-toggle {
        display: block;
        cursor: pointer;
        font-size: 25px;
    }

    .news-thumb {
        width: 100%;
        float: none;
        margin: 0 0 15px 0;
    }
}