/* ------------------------ */
/* CSS اصلی سایت - دسکتاپ */
/* ------------------------ */

body {
  margin: 0;
  font-family: Vazirmatn, Tahoma, sans-serif;
  background: #94BDFF;
  color: #222;
  display: block; /* ✅ مهم */
}

/* فونت‌ها */
@font-face { font-family: 'B-Titr'; src: url('../../fonts/B-Titr.TTF'); }
@font-face { font-family: 'B-Nazanin'; src: url('../../fonts/B-Nazanin.TTF'); }
@font-face { font-family: 'B-Nazanin-Bold'; src: url('../../fonts/B-Nazanin-Bold.TTF'); }
@font-face { font-family: 'Vazirmatn'; src: url('../../fonts/Vazirmatn.woff'); }
@font-face { font-family: 'IRANSans-Bold'; src: url('../../fonts/IRANSans-Bold.ttf'); }
@font-face { font-family: 'IRANSans-Light'; src: url('../../fonts/IRANSans-Light.ttf'); }
@font-face { font-family: 'IRANSans-Medium'; src: url('../../fonts/IRANSans-Medium.ttf'); }
@font-face { font-family: 'IRANSans-UltraLight'; src: url('../../fonts/IRANSans-UltraLight.ttf'); }
@font-face { font-family: 'IRANSans'; src: url('../../fonts/IRANSans.ttf'); }
@font-face { font-family: 'Shabnam-Bold'; src: url('../../fonts/Shabnam-Bold.woff2'); }
@font-face { font-family: 'Shabnam-Light'; src: url('../../fonts/Shabnam-Light.woff2'); }
@font-face { font-family: 'Shabnam-Medium'; src: url('../../fonts/Shabnam-Medium.woff2'); }
@font-face { font-family: 'Shabnam-Thin'; src: url('../../fonts/Shabnam-Thin.woff2'); }
@font-face { font-family: 'Shabnam'; src: url('../../fonts/Shabnam.woff2'); }

/* ---------------- Header ---------------- */
header {
  background: linear-gradient(135deg, #3975C4, #6CA0DC);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 25px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
}
header .right, header .center, header .left { flex: 1; }
header .right { text-align: right; font-weight:bold; font-family:'B-Titr'; color: #fff; text-shadow: 1px 1px 2px rgba(0,0,0,0.3); }
header .center {
  text-align:center;
  font-size:32px;
  font-weight:bold;
  font-family:'B-Titr';
  color:#FFD700;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
header .left {
  display:flex;
  align-items:center;
  gap:10px;
  justify-content:flex-end;
  font-family:'B-Titr';
  color:#fff;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}
header img {
  width: 32px;
  height: 75px;
  transition: transform 0.3s ease;
}
header img:hover { transform: rotate(10deg) scale(1.05); }

/* ---------------- Menu ---------------- */
#side-menu {
  padding-top: 90px;
  position: fixed;
  top: 0;
  right: -250px;
  width: 250px;
  height: 100%;
  background: #fff;
  box-shadow: -5px 0 15px rgba(0,0,0,0.15);
  transition: 0.3s;
  font-family: 'B-Nazanin', Tahoma, sans-serif;
  z-index: 1000;
  overflow-y: auto;
}
#side-menu.open { right: 0; }
#side-menu a {
  display: block;
  padding: 12px 15px;
  margin: 5px 10px;
  text-decoration: none;
  color: #3975C4;
  border-radius: 8px;
  transition: 0.2s; 
  font-family:'B-Titr';
}
#side-menu a:hover { background: #f0f4ff; }
#side-menu .username {
  font-weight: bold;
   margin: 5px 10px;
  color: #222;
  margin-bottom: 15px;
  text-align: center;
  background: #f0f4ff;
  padding: 10px;
  border-radius: 8px;
}
#menu-btn {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 1100;
  font-size: 22px;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background: #3975C4;
  color: #fff;
  cursor: pointer;
  font-family:'B-Titr';
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
#menu-btn:hover { background: #2851a3; }

/* ---------------- Main Desktop ---------------- */
main {
  display: flex;
  min-height: calc(100vh - 70px);
  padding: 40px;
  box-sizing: border-box;
  gap: 0px;
   justify-content: flex-start;
    margin-top: -100px;    /* ⬅ چسبیدن به محتوای بالا */
}

.text-section, .text-section2 {
  flex: 2;
  padding: 10px;
  font-size: 18px;
  line-height: 1.9;
    margin-top: 50px;    /* ⬅ چسبیدن به محتوای بالا */

}
.text-section { font-family:'B-Titr'; }
.text-section2 { font-family:'B-Nazanin-Bold'; }
    .image-column {
width: 60%;
  display: flex;
  min-height: calc(100vh - 70px);
  padding: 40px;
  box-sizing: border-box;
  gap: 0px;
    margin-top: 0px;
    }
.image-section {
  flex: 1;
  display: flex;
  padding: 20px;
  justify-content: center;
  align-items: center;
}
.image-section img {
  max-width: 100%;
  max-height: 500px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    margin-top: -100px;    /* ⬅ چسبیدن به محتوای بالا */
}
.image-section2 {
  flex: 2;
  display: flex;
  justify-content: center;
  align-items: center;
}
.image-section2 img {
  max-width: 100%;
  max-height: 500px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    margin-top: -100px;    /* ⬅ چسبیدن به محتوای بالا */
}
/* ===== اسلایدر تمام‌عرض ===== */
.slider-section {
    width: 100%;
    overflow: hidden;
    background: #94BDFF;
    padding: 0px 0px 0px;
    margin-top: -200px;    /* ⬅ چسبیدن به محتوای بالا */
}

.slider-track {
    display: flex;
    gap: 15px;
    animation: sliderMove 30s linear infinite;
}

.slide {
    flex: 0 0 calc(100% / 5);
}

.slide img {
    width: 100%;
    height: 200px;
    object-fit: contain; /* بدون برش */
    border-radius: 14px;
    box-shadow: 0 8px 18px rgba(0,0,0,0.15);
}

/* انیمیشن */
@keyframes sliderMove {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}



/* ---------------- Responsive Mobile ---------------- */
@media (max-width: 768px) {

    body { font-size: 16px; line-height: 1.6; }
    .container { margin: 0; padding: 10px; box-sizing: border-box; }

    /* Header */
    header .right, header .center, header .left { font-size: 12px; }
    header .center { font-size: 20px; white-space: nowrap; overflow: visible; text-overflow: ellipsis; }
    header img { width: 20px; height: 46px; }
    header .left span { display: none; }
    #menu-btn { font-size: 20px; padding: 8px 10px; }

    /* Main layout: متن بالا، عکس‌ها در یک ردیف */
 @media (max-width: 768px) {
    main {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 5px;
        gap: 2px; /* فاصله بین متن‌ها و ردیف عکس‌ها */
    margin-top: 0px;    /* ⬅ فاصله محتوای تا بالاش */
    }

    .text-section, .text-section2 {
        width: 90%;
        padding: 2px;
        margin: 0;
        text-align: right;
        line-height: 1.5;
        font-size: 14px !important;
        line-height: 1.6;
    }
.text-section h2 {
        font-size: 22px !important;
        margin-bottom: 6px;
}
    .image-column {
        width: 40%;  
        display: flex;
        flex-direction: column;
              gap: 6px;
        padding: 2px;

    }

    .image-row {
        display: flex;
        flex-direction: column;
        justify-content: center;
        width: 100%;
        gap: 2px;
        margin: 0;
        padding: 0;
    }

    .image-section, .image-section2 {
        flex: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0;
        margin: 0;
    }

    .image-section img {
        width: 70%;
        max-width: 70%;
        height: 70%;
        object-fit: contain;
        border-radius: 12px;
    margin-top: 0px;    /* ⬅ فاصله محتوای تا بالاش */
    }


.image-section2 img {
        width: 90%;
        max-width: 100%;
        height: auto;
        object-fit: contain;
        border-radius: 12px;
    margin-top: 0px;    /* ⬅ فاصله محتوای تا بالاش */

    }
    .image-section img:hover,
    .image-section2 img:hover {
        transform: scale(1.03);
    }
header img { width: 20px; height: 46px; }

    /* ===== اسلایدر ===== */
    .slider-section {
        width: 100%;
        margin-top: -300px;
    }

    .slide {
        flex: 0 0 calc(100% / 2.2);
    }

    .slide img {
        height: 110px;
    }
}


    /* کارت‌ها و فایل‌ها */
    .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
    .card { padding: 15px; font-size: 0.9rem; border-radius: 12px; }
    .file { font-size: 0.85rem; padding: 10px; }
    .search { font-size: 0.9rem; padding: 10px; }
    h2, h3, h4 { font-size: 1.1rem; }
}

/* =========================================================
   ✅ Dark Theme for USER dashboard only (body.user-dark)
   ========================================================= */
body.user-dark{
  background:
    radial-gradient(900px 420px at 50% -10%, rgba(59,130,246,.22), transparent 60%),
    radial-gradient(700px 340px at 10% 10%, rgba(34,197,94,.12), transparent 55%),
    linear-gradient(180deg, #0b1220, #0f172a);
  color: rgba(226,232,240,.95);
}

/* Header in user dashboard */
body.user-dark header{
  background: linear-gradient(135deg, #0b1220, #111c33);
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
}
body.user-dark header .center{ color: #ffd54a; }
body.user-dark header .right,
body.user-dark header .left{ color: rgba(226,232,240,.92); }

/* Menu button */
body.user-dark #menu-btn{
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 10px 25px rgba(0,0,0,.35);
}
body.user-dark #menu-btn:hover{ background: #1d4ed8; }

/* Side menu */
body.user-dark #side-menu{
  background: rgba(2,6,23,.92);
  border-left: 1px solid rgba(148,163,184,.14);
  box-shadow: -18px 0 45px rgba(0,0,0,.50);
}
body.user-dark #side-menu a{
  color: rgba(226,232,240,.92);
  border: 1px solid rgba(148,163,184,.10);
  background: rgba(148,163,184,.06);
  font-family: Vazirmatn, Tahoma, sans-serif !important;
}
body.user-dark #side-menu a:hover{
  background: rgba(59,130,246,.16);
}
body.user-dark #side-menu .username{
  color: rgba(226,232,240,.95);
  background: rgba(59,130,246,.14);
}

/* Main default in dashboard */
body.user-dark main{
  background: transparent;
}

/* Footer */
body.user-dark footer{
  color: rgba(226,232,240,.75);
}
body.user-dark footer p{
  color: rgba(226,232,240,.75);
}
/* جلوگیری از margin-top منفیِ main در داشبورد */
body.user-dark main{
  margin-top: 0 !important;
  padding: 18px 12px !important;
  min-height: calc(100vh - 70px);
}
/* =========================
   ✅ Pretty Menu Button
   ========================= */

/* پایه */
#menu-btn{
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 1100;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  font-size: 18px;
  line-height: 1;
  padding: 10px 14px;

  border: 1px solid rgba(255,255,255,.35);
  border-radius: 14px;

  background: rgba(57,117,196,.92);
  color: #fff;

  cursor: pointer;
  font-family: Vazirmatn, Tahoma, sans-serif; /* یکدست */
  font-weight: 900;

  box-shadow: 0 14px 30px rgba(0,0,0,.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease, opacity .15s ease;
}

/* هاور */
#menu-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 18px 38px rgba(0,0,0,.22);
  background: rgba(40,81,163,.95);
  border-color: rgba(255,255,255,.55);
}

/* کلیک */
#menu-btn:active{
  transform: translateY(0) scale(.98);
  opacity: .95;
  box-shadow: 0 12px 26px rgba(0,0,0,.18);
}

/* فوکوس کیبورد */
#menu-btn:focus-visible{
  outline: none;
  box-shadow: 0 0 0 4px rgba(57,117,196,.28), 0 18px 38px rgba(0,0,0,.22);
}

/* آیکن همبرگر خوشگل‌تر (بدون تغییر HTML) */
#menu-btn{
  letter-spacing: .2px;
}


/* اگر متن خود دکمه الان "☰ منو" است، این باعث میشه دوتا ☰ نبینی */
#menu-btn{
  /* متن را کمی تمیزتر کنیم */
}
#menu-btn{
  /* وقتی داخل HTML ☰ هست، می‌تونی این خط رو فعال کنی تا فقط متن "منو" بماند:
     (اما چون نمی‌خوای HTML تغییر کند، این بخش اختیاری است)
  */
}

/* موبایل */
@media (max-width: 768px){
  #menu-btn{
    top: 12px;
    right: 12px;
    padding: 9px 12px;
    font-size: 16px;
    border-radius: 13px;
  }
  #menu-btn::before{
    font-size: 18px;
  }
}

/* =========================
   ✅ Dark mode version (dashboard)
   ========================= */
body.user-dark #menu-btn{
  background: rgba(37,99,235,.92);
  border-color: rgba(148,163,184,.20);
  box-shadow: 0 14px 34px rgba(0,0,0,.45);
}
body.user-dark #menu-btn:hover{
  background: rgba(29,78,216,.95);
  border-color: rgba(148,163,184,.30);
  box-shadow: 0 18px 44px rgba(0,0,0,.55);
}
body.user-dark #menu-btn:focus-visible{
  box-shadow: 0 0 0 4px rgba(59,130,246,.30), 0 18px 44px rgba(0,0,0,.55);
}

/* =========================
   live_room page scoped compact site header
   ========================= */
body.user-dark.live-page-compact-header header{
  padding: 10px 18px;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
}
body.user-dark.live-page-compact-header header .center{
  font-size: 28px;
  line-height: 1.05;
}
body.user-dark.live-page-compact-header header .left,
body.user-dark.live-page-compact-header header .right{
  font-size: 13px;
}
body.user-dark.live-page-compact-header header .left{
  gap: 8px;
}
body.user-dark.live-page-compact-header header img{
  height: 56px;
  width: auto;
}
body.user-dark.live-page-compact-header #menu-btn{
  top: 10px;
  right: 10px;
  font-size: 16px;
  padding: 8px 12px;
  border-radius: 12px;
}
@media (max-width: 768px){
  body.user-dark.live-page-compact-header header{
    padding: 9px 14px;
  }
  body.user-dark.live-page-compact-header header .center{
    font-size: 19px;
    line-height: 1.05;
  }
  body.user-dark.live-page-compact-header header .left,
  body.user-dark.live-page-compact-header header .right{
    font-size: 11px;
  }
  body.user-dark.live-page-compact-header header img{
    height: 34px;
    width: auto;
  }
  body.user-dark.live-page-compact-header #menu-btn{
    top: 8px;
    right: 8px;
    font-size: 15px;
    padding: 7px 10px;
    border-radius: 11px;
  }
}


/* live_room v08 tighter site header fit (page-scoped, ratio preserved) */
body.user-dark.live-page-compact-header header{
  padding: 8px 16px;
  border-bottom-left-radius: 13px;
  border-bottom-right-radius: 13px;
}
body.user-dark.live-page-compact-header header .center{
  font-size: 25px;
  line-height: 1.02;
}
body.user-dark.live-page-compact-header header .left,
body.user-dark.live-page-compact-header header .right{
  font-size: 12px;
}
body.user-dark.live-page-compact-header header .left{
  gap: 7px;
}
body.user-dark.live-page-compact-header header img{
  height: 48px;
  width: auto;
}
body.user-dark.live-page-compact-header #menu-btn{
  top: 8px;
  right: 8px;
  font-size: 15px;
  padding: 7px 11px;
  border-radius: 11px;
}
@media (max-width: 768px){
  body.user-dark.live-page-compact-header header{
    padding: 8px 12px;
  }
  body.user-dark.live-page-compact-header header .center{
    font-size: 18px;
  }
  body.user-dark.live-page-compact-header header .left,
  body.user-dark.live-page-compact-header header .right{
    font-size: 10px;
  }
  body.user-dark.live-page-compact-header header img{
    height: 32px;
    width: auto;
  }
  body.user-dark.live-page-compact-header #menu-btn{
    top: 7px;
    right: 7px;
    font-size: 14px;
    padding: 6px 9px;
    border-radius: 10px;
  }
}
