/* ==============================
   فونت ایران‌سنس (محلی)
============================== */
@font-face {
    font-family: 'IranSans';
    src: url('/app/assets/fonts/IRANSans.woff2') format('woff2'),
         url('/app/assets/fonts/IRANSans.woff') format('woff'),
         url('/app/assets/fonts/IRANSans.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* =============================
   Base
============================= */
body {
    font-family: 'IranSans', sans-serif;
    background:#f8f9fa;
    margin:0;
    direction:rtl;
    text-align:right;
    overflow-x:hidden;
}

img{max-width:100%;display:block}

/* =============================
   HERO SLIDER
============================= */
.slider-img {
  height: 330px;
  object-fit: cover;
}

.carousel-caption h5 {
  font-size: 26px;
  font-weight: bold;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.carousel-caption p {
  font-size: 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

@media (max-width: 575px) {
  .slider-img {
    height: 190px;
  }
  .carousel-caption h5 {
    font-size: 18px;
  }
  .carousel-caption p {
    font-size: 13px;
  }
}


/* =============================
   HEADER
============================= */
.main-header{
  background:#1976d2;
  padding:8px 0;
  position:sticky;
  top:0;
  z-index:1000;
}

.main-logo{
  height:34px;
  border-radius:6px;
}

.main-menu .menu-item{
  color:#e3f2fd;
  text-decoration:none;
  font-weight:500;
  display:flex;
  align-items:center;
  gap:4px;
}

.login-btn{
  background:#004c97;
  color:#fff;
  padding:6px 12px;
  border-radius:6px;
  text-decoration:none;
  font-size:14px;
}

.menu-toggle{
  color:#fff;
  border:none;
  background:none;
  font-size:28px;
}

.mobile-menu{
  display:none;
  flex-direction:column;
  background:#1976d2;
  padding:12px;
}
.mobile-menu.open{display:flex}

.mobile-item{
  color:#fff;
  padding:8px 0;
  text-decoration:none;
  font-size:15px;
}

/* =============================
   COURSES SLIDER
============================= */
/* ==== اسکرول افقی کارت‌ها ==== */
.courses-scroll {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
}

/* ==== کارت دوره ==== */
.course-card {
    width: 300px;
    min-width: 300px;
    max-width: 300px;

    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);

    scroll-snap-align: start;
    transition: 0.2s;

    display: flex;
    flex-direction: column;
    min-height: 410px;   /* ارتفاع نهایی یکسان — تست‌شده */
}

/* انیمیشن هاور */
.course-card:hover {
    transform: translateY(-4px);
}

/* ==== تصویر ==== */
.course-thumb img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
}

/* ==== داخل کارت ==== */
.course-card .p-3 {
    flex: 1;                      /* بخش قابل کشش */
    display: flex;
    flex-direction: column;
}

/* ==== عنوان ==== */
.course-card h5 {
    font-size: 16px;
    font-weight: bold;
    line-height: 1.4;
    min-height: 40px;  /* ارتفاع استاندارد برای 2 خط */
    margin-bottom: 8px;
}

/* ==== توضیحات (ثابت‌سازی ارتفاع کارت) ==== */
.course-card p {
    min-height: 70px;   /* حدود 3 خط */
    max-height: 70px;
    overflow: hidden;
    margin-bottom: 12px;
}

/* ==== نام مدرس ==== */
.teacher-name {
    font-size: 13px;
    color: #0288d1;
    margin-bottom: 10px;
}

/* ==== قیمت ==== */
.price {
    font-weight: bold;
    color: #1976d2;
}

/* ==== دکمه + قیمت همیشه پایین ==== */
.course-card .d-flex {
    margin-top: auto !important;
}

/* =============================
   BLOG SLIDER
============================= */
.blog-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x mandatory;
}

.blog-card {
  width: 300px;   /* یا هر مقدار دلخواه */
  min-width: 300px;
  max-width: 300px;
  background:#fff;
  border-radius:12px;
  overflow:hidden;
  box-shadow:0 2px 10px rgba(0,0,0,0.1);
  scroll-snap-align:start;
  transition:.2s;
}

.blog-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}

.card-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-tag {
  background: #e3f2fd;
  color: #1565c0;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 12px;
  margin-left: 3px;
  white-space: nowrap;
}

.blog-desc {
  font-size: 14px;
  margin-bottom: 16px;
  color: #555;
}

.read-more-btn {
  margin-top: auto; /* مهم‌ترین بخش: تراز دکمه */
  border-radius: 10px;
  font-weight: 600;
}

/* =============================
   FAQ
============================= */
.faq-box{
  background:#fff;
  border-radius:12px;
  padding:22px;
  box-shadow:0 2px 10px rgba(0,0,0,0.1);
}
.accordion-button{
  background:#e3f2fd;
  color:#0d47a1;
  font-weight:600;
}
.accordion-button:not(.collapsed){
  background:#1976d2;
  color:#fff;
  box-shadow:none;
}
.accordion-item{
  border:none;
  border-bottom:1px solid #eee;
}

/* =============================
   FOOTER
============================= */
.site-footer{
  background:#0d47a1;
  color:#fff;
  padding:40px 0;
  margin-top:50px;
}
.footer-logo{
  height:55px;
  border-radius:8px;
}
.footer-line{
  border-color:#ffffff55;
  margin:20px 0;
}
.trust-box{
  background:#fff;
  border-radius:12px;
  padding:10px;
  display:inline-block;
}
copyright{
  font-size:14px;
}

/* =============================
   MOBILE
============================= */
@media(max-width:575px){
  .course-card{min-width:260px}
  .blog-card{
    min-width:260px;
    max-width:260px;
  }
}
