/******************************
📘 Cts MyLibrary PDF Styles
******************************/

/* عنوان بخش کتاب‌ها */
.cts-section-title {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  color: #0073aa;
  margin: 25px 0 15px;
  border-bottom: 2px solid #e6e6e6;
  padding-bottom: 8px;
}

/* 📚 شبکه کتابخانه من */
ظ

/* 📗 دکمه بازگشت */
.back-to-library {
  display: block; /* 👈 از inline-block به block تغییر کرد */
  background: #0073aa;
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s;
  width: fit-content;
  margin: 0 auto 30px; /* 👈 مرکز چین کردن دکمه */
  text-align: center;
}

.back-to-library:hover {
  background: #005f8d;
}

.cts-pdf-frame {
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
  background: #f9f9f9;
  margin-bottom: 30px;
}

/* 📱 واکنش‌گرا */
@media (max-width: 768px) {
  .cts-section-title {
    font-size: 20px;
  }

  .cts-pdf-title {
    font-size: 22px;
  }

  .cts-pdf-book img {
    height: 180px;
  }

  .cts-pdf-library-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .view-book-btn {
    font-size: 13px;
    padding: 5px 10px;
  }

  .back-to-library {
    font-size: 14px;
    padding: 7px 15px;
  }
}

/* ✨ حالت خیلی کوچک (زیر 480px) */
@media (max-width: 480px) {
  .cts-pdf-book img {
    height: 150px;
  }
  .cts-pdf-title {
    font-size: 20px;
  }
  .cts-pdf-library-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* 🔹 گرید کتاب‌ها */
.cts-pdf-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 25px;
  justify-items: center;
  align-items: start;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  direction: rtl; /* حفظ راست‌چین برای عنوان‌ها */
}

/* 🔹 کارت هر کتاب */
.cts-pdf-book {
  text-align: center;
  max-width: 180px;
  transition: transform 0.3s ease;
}

.cts-pdf-book img {
  width: 150px;
  height: 210px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.cts-pdf-book img:hover {
  transform: scale(1.05);
}

/* 🔹 عنوان کتاب */
.cts-pdf-book h3 {
  font-size: 15px;
  color: #333;
  margin: 10px 0 5px;
  height: 40px;
  overflow: hidden;
}

/* 🔹 دکمه مشاهده کتاب */
.view-book-btn {
  display: inline-block;
  background-color: #1e88e5;
  color: #fff;
  padding: 6px 14px;
  border-radius: 5px;
  font-size: 14px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.view-book-btn:hover {
  background-color: #1565c0;
}

/* 🔹 نسخه موبایل */
@media (max-width: 768px) {
  .cts-pdf-library-grid {
    grid-template-columns: repeat(2, 1fr); /* دو کتاب در هر ردیف */
    gap: 12px;
  }

  .cts-pdf-book img {
    width: 110px;   /* 🔹 کوچکتر شد */
    height: 160px;  /* 🔹 متناسب با نسبت کتاب */
  }

  .cts-pdf-book h3 {
    font-size: 13px;
    line-height: 1.3;
    margin-top: 6px;
  }

  .view-book-btn {
    font-size: 12px;
    padding: 5px 10px;
  }
}

.cts-pdf-title {
  text-align: center;
  color: #1e88e5;
}

.back-container {
  text-align: center;
  margin-bottom: 15px;
}

.back-to-library {
  display: inline-block;
  background: #1e88e5;
  color: white;
  padding: 10px 25px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.3s ease;
}

.back-to-library:hover {
  background: #1565c0;
}

