body{
  direction: rtl;
  font-family: Tahoma;
  margin:0;
  background:#f4f7f6;
}

/* HEADER */

.site-header{
  background:#fff;
  padding:15px 40px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  border-bottom:2px solid #1a237e;
}

.logo-name{
  font-size:24px;
  font-weight:bold;
  color:#1a237e;
}

.news-ticker-wrapper{
  background:#001a57;
  height:40px;
  overflow:hidden;
  position:relative;
  display:flex;
  align-items:center;
  direction:ltr;
}

/* کانتینر داخلی ویو */
.news-ticker-wrapper .js-view-dom-id-a4321e384425e1d3335d5c787a0ca030fd5245504221eea5086db3c2d99a7ae8{
  display:inline-block;
  white-space:nowrap;
  padding-left:100%;
  animation:ticker 20s linear infinite;
}

/* هر خبر */
.news-ticker-wrapper .views-row{
  display:inline-block;
  padding:0 40px;
  color:#fff;
  font-weight:bold;
}

/* انیمیشن */
@keyframes ticker{
  0%{
    transform:translateX(0);
  }
  100%{
    transform:translateX(-100%);
  }
}

/* توقف با موس */
.news-ticker-wrapper:hover .js-view-dom-id-a4321e384425e1d3335d5c787a0ca030fd5245504221eea5086db3c2d99a7ae8{
  animation-play-state:paused;
}

/* باکس اخبار */
.news-ticker-wrapper::after{
  content:"اخبار فوری";
  position:absolute;
  right:0;
  top:0;
  background:#ff9800;
  color:#fff;
  padding:0 30px;
  height:100%;
  display:flex;
  align-items:center;
  font-weight:bold;
  clip-path:polygon(20% 0%,100% 0%,100% 100%,0% 100%);
}

/* ORANGE LABEL */

.news-ticker-wrapper::after{
  content:"اخبار فوری";
  position:absolute;
  right:0;
  top:0;
  background:#ff9800;
  color:#fff;
  padding:0 30px;
  height:100%;
  display:flex;
  align-items:center;
  font-weight:bold;
  clip-path: polygon(20% 0%,100% 0%,100% 100%,0% 100%);
}

/* MAIN GRID */

.main-content-layout{
  display:grid;
  grid-template-columns:22% 56% 22%;
  gap:20px;
  padding:20px 40px;
}

.sidebar-right,
.sidebar-left{
  background:#fff;
  border:1px solid #ddd;
  padding:15px;
}

.main-content{
  background:#fff;
  padding:15px;
}

/* FOOTER */

.site-footer{
  background:#001a57;
  color:#fff;
  padding:40px;
}

.footer-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:20px;
}

.footer-col{
  border-left:1px solid #2d3b7c;
  padding:10px;
}

.footer-col:last-child{
  border-left:none;
}

/* MOBILE */

@media(max-width:400px){

.main-content-layout{
grid-template-columns:1fr;
}

.footer-grid{
grid-template-columns:1fr;
}

.news-ticker-wrapper::after{
display:none;
}

}
.news-ticker-wrapper{
  background:#001a57;
  height:42px;
  overflow:hidden;
  position:relative;
  display:flex;
  align-items:center;
  direction:ltr;
}

/* ظرف ویو */
.news-ticker-wrapper .views-element-container{
  display:inline-block;
  white-space:nowrap;
  padding-left:100%;
  animation:ticker-scroll 20s linear infinite;
}

.news-ticker-wrapper .views-row{
  display:inline-flex;
  align-items:center;
  padding:0 25px;
  color:#fff;
  font-weight:bold;
    direction:rtl;
}

/* جداکننده */
.news-ticker-wrapper .views-row::after{
  content:"●";
  color:#ff9800;
  margin:0 20px;
  font-size:10px;
  line-height:1;
}


/* حذف علامت بعد از آخرین خبر */
.news-ticker-wrapper .views-row:last-child::after{
  content:"";
}


/* انیمیشن حرکت */
@keyframes ticker-scroll{
  0%{
    transform:translateX(-100%);
  }
  100%{
    transform:translateX(0);
  }
}

/* توقف با موس */
.news-ticker-wrapper:hover .views-element-container{
  animation-play-state:paused;
}

/* باکس اخبار */
.news-ticker-wrapper::after{
  content:"⚡ اخبار ویژه";
  position:absolute;
  right:0;
  top:0;
  background:#ff9800;
  color:#fff;
  padding:0 30px;
  height:100%;
  display:flex;
  align-items:center;
  font-weight:bold;
  clip-path:polygon(20% 0%,100% 0%,100% 100%,0% 100%);
}



.views-field-field-khbr img{
 max-width:100%;
  height:auto;
  display:block;
}

.sidebar-right a{
  display:block;
  background:#0d6efd;
  color:#fff;
  text-decoration:none;
  padding:12px 16px;
  margin-bottom:10px;
  border-radius:8px;
  font-weight:bold;
  text-align:center;
  transition:all 0.3s ease;
}

/* حالت hover */
.sidebar-right a:hover{
  background:#ff9800;
  transform:translateY(-2px);
  box-shadow:0 4px 10px rgba(0,0,0,0.2);
}

.sidebar-right ul{
  list-style:none;
  padding:0;
  margin:0;
}

.sidebar-right li{
  list-style:none;
}
.sidebar-right li{
  margin:0;
  padding:0;
}
#block-sport-theme-mnwwyzhhkarbranbdwndwytdrsayt-menu{display:none;}
/* باکس فرم */
.user-login-form{
  max-width:420px;
  margin:40px auto;
  padding:30px;
  background:#ffffff;
  border-radius:10px;
  box-shadow:0 6px 20px rgba(0,0,0,0.1);
  font-family:inherit;
}

/* لیبل ها */
.user-login-form label{
  display:block;
  margin-bottom:6px;
  font-weight:bold;
  color:#333;
}

/* فیلدها */
.user-login-form input.form-text{
  width:100%;
  padding:10px 12px;
  border:1px solid #ddd;
  border-radius:6px;
  margin-bottom:18px;
  font-size:14px;
  transition:all .25s ease;
}

/* فوکوس */
.user-login-form input.form-text:focus{
  border-color:#0d6efd;
  outline:none;
  box-shadow:0 0 0 3px rgba(13,110,253,0.15);
}

/* دکمه ورود */
.user-login-form .form-submit{
  width:100%;
  background:#0d6efd;
  color:#fff;
  border:none;
  padding:12px;
  font-size:15px;
  font-weight:bold;
  border-radius:6px;
  cursor:pointer;
  transition:all .3s ease;
}

/* hover دکمه */
.user-login-form .form-submit:hover{
  background:#ff9800;
  transform:translateY(-2px);
  box-shadow:0 4px 12px rgba(0,0,0,0.2);
}

/* فاصله دکمه */
.user-login-form .form-actions{
  margin-top:10px;
}
/* محدود کردن تصاویر داخل محتوای اصلی */
.main-content img {
    max-width: 100%;    /* باعث می‌شود عرض تصویر هرگز از عرض والد خود بیشتر نشود */
    height: auto;       /* تناسب ابعاد تصویر را حفظ می‌کند تا دفرمه نشود */
    display: block;      /* برای حذف فاصله‌های اضافی زیر تصویر */
    margin: 10px auto;  /* اختیاری: تصویر را وسط‌چین می‌کند */
}
/* MOBILE */
/* SUPER MOBILE OPTIMIZATION */
@media (max-width: 768px) {
  
  /* حذف حاشیه‌های کل صفحه */
  .main-content-layout {
    grid-template-columns: 30% 70% !important; /* ستون منو را کمی لاغرتر کردیم برای فضای فرم */
    gap: 4px !important;
    padding: 5px 2px !important;
  }

  /* حذف کادر و سایه اضافی ستون‌ها برای باز شدن فضا */
  .sidebar-right, .main-content {
    padding: 5px !important;
    border: none !important;
    background: transparent !important; /* حذف پس‌زمینه سفید برای چسبیدن به لبه‌ها */
  }

  /* بهینه‌سازی دکمه‌های آبی سمت راست */
  .sidebar-right a {
    font-size: 10px !important;
    padding: 6px 2px !important;
    margin-bottom: 4px !important;
    border-radius: 4px !important;
    line-height: 1.2;
    letter-spacing: -0.5px; /* فشرده‌سازی متن برای جا شدن */
  }

  /* بهینه‌سازی فرم ورود (بسیار مهم) */
  .user-login-form {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 10px 8px !important;
    box-shadow: none !important;
    border: 1px solid #ddd !important;
    background: #fff; /* فقط خود فرم سفید باشد */
    border-radius: 8px;
  }

  /* بزرگتر کردن فیلدها برای لمس راحت‌تر با وجود عرض کم */
  .user-login-form input.form-text {
    padding: 8px !important;
    margin-bottom: 12px !important;
    font-size: 13px !important;
  }

  /* فشرده‌سازی لیبل‌ها */
  .user-login-form label {
    font-size: 11px !important;
    margin-bottom: 3px !important;
  }

  /* دکمه ورود در فرم */
  .user-login-form .form-submit {
    padding: 10px !important;
    font-size: 13px !important;
  }

  /* هدر و لوگو (جمع‌وجور کردن بخش بالا) */
  .site-header {
    padding: 8px 10px !important;
    flex-direction: row-reverse; /* جابجایی لوگو و متن اگر نیاز بود */
  }
  
  .logo-name {
    font-size: 14px !important;
  }

  .site-header img {
    height: 150px; /* کوچک کردن لوگو برای باز شدن فضا در ارتفاع */
    width: auto;
  }

  /* مخفی کردن المان‌های غیر ضروری */
  .sidebar-left {
    display: none !important;
  }
}
/* اصلاح هدر در موبایل */
.site-header {
    padding: 10px !important;
    display: flex !important;
    flex-direction: row !important; /* اطمینان از کنار هم بودن */
    justify-content: space-between !important;
    align-items: center !important;
}

.site-header img {
    height: auto !important; /* حذف محدودیت ارتفاع قبلی */
 
    width: auto !important;
 
    flex-shrink: 0; /* جلوگیری از فشرده شدن لوگو */
}

.logo-name {
    font-size: 13px !important; /* سایز فونت متن کنار لوگو */
    line-height: 1.4 !important;
    text-align: right !important;
    flex: 1; /* اشغال فضای باقی‌مانده توسط متن */
    margin-right: 10px;
}

/* اگر متن هدر شامل تگ‌های p یا div داخلی است */
.logo-name span, .logo-name p {
    font-size: 12px !important;
    margin: 0 !important;
}
.news-ticker-wrapper .views-element-container{
  display:inline-flex;
  white-space:nowrap;
  padding-left:100%;
  animation:ticker-scroll 20s linear infinite;
}

.news-ticker-wrapper .views-row{
  display:inline-flex;
  align-items:center;
  padding:0 25px;
  color:#fff;
  font-weight:bold;
}
/* جدول خبر */
.khabar-css table{
  width:100%;
  border-collapse:collapse;
  background:#ffffff;
  border-radius:8px;
  overflow:hidden;
  font-size:14px;
}

/* ردیف ها */
.khabar-css tbody tr{
  border-bottom:1px solid #e5e7eb;
  transition:background .2s ease;
}

.khabar-css tbody tr:hover{
  background:#f5f9ff;
}

/* سلول ها */
.khabar-css td{
  padding:10px;
  vertical-align:middle;
}

/* لینک عنوان خبر */
.khabar-css .views-field-title a{
  color:#0f172a;
  font-weight:600;
  text-decoration:none;
  transition:.2s;
  display:block;
}

.khabar-css .views-field-title a:hover{
  color:#0284c7;
}

/* دکمه ویرایش */
.khabar-css .views-field-edit-node a{
  display:inline-block;
  padding:5px 10px;
  background:#0ea5e9;
  color:#fff;
  border-radius:6px;
  font-size:12px;
  text-decoration:none;
  transition:.2s;
}

.khabar-css .views-field-edit-node a:hover{
  background:#0369a1;
  box-shadow:0 3px 6px rgba(0,0,0,.2);
}

/* دکمه افزودن خبر */
.khabar-css header a{
  display:inline-block;
  margin-bottom:12px;
  padding:8px 16px;
  background:linear-gradient(135deg,#22c55e,#16a34a);
  color:#fff;
  border-radius:8px;
  text-decoration:none;
  font-weight:600;
  transition:.2s;
}

.khabar-css header a:hover{
  transform:translateY(-2px);
  box-shadow:0 4px 10px rgba(0,0,0,.25);
}

/* جلوگیری از بیرون زدن لینک */
.khabar-css td{
  word-break:break-word;
}

/* تصویر خبر */
.khabar-css img{
  border-radius:6px;
}
/* مخفی کردن موارد اضافی برای خلوت شدن صفحه */
.field--name-field-khbr .description, 
#edit-body-0-format, 
.text-summary-wrapper,
.tabledrag-handle {
    display: none !important;
}

/* استایل کلی کادر تصویر خبر */
#edit-field-khbr-ajax-wrapper details {
    border: 1px solid #e0e0e0 !important;
    background-color: #fdfdfd !important;
    border-radius: 10px !important;
    padding: 20px !important;
}

/* مرتب سازی ردیف جدول به صورت یک ردیف منعطف */
#edit-field-khbr-table tbody tr {
    display: flex !important;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 1px solid #eee;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 10px;
    flex-direction: row-reverse; /* برای سازگاری بهتر با جهت فارسی */
}

/* تنظیم بخش تصویر پیش‌نمایش */
.image-preview {
    flex: 0 0 100px;
}

.image-preview img {
    border-radius: 4px;
    border: 1px solid #ddd;
}

/* استایل دهی به فیلدهای Alt و Title در کنار هم */
.image-widget.form-managed-file {
    display: flex !important;
    flex: 1;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: nowrap;
}

.image-widget .js-form-item {
    flex: 1;
    margin: 0 !important;
}

/* زیبا سازی لیبل‌ها و اینپوت‌ها */
.image-widget label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 0.85rem;
    color: #555;
}

.image-widget input[type="text"] {
    width: 100% !important;
    padding: 8px !important;
    border: 1px solid #ccc !important;
    border-radius: 5px !important;
}

/* دکمه حذف */
#edit-field-khbr-table .button {
    background: #ff4d4d !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 6px 12px !important;
    cursor: pointer;
    transition: 0.3s;
}

#edit-field-khbr-table .button:hover {
    background: #cc0000 !important;
}

/* تراز کردن دکمه افزودن فایل */
.image-widget-data {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
