/* --- CSS สำหรับหน้า Dashboard (เพิ่มต่อท้ายไฟล์เดิม) --- */

/* กรอบแบนเนอร์แบบ Placeholder (มีเส้นปะ) */
.banner-placeholder-box {
  width: 100%;
  height: 150px; /* ความสูงของกล่อง */
  background-color: #f8f9fa; /* สีพื้นหลังเทาอ่อนๆ */
  border: 2px dashed #dee2e6; /* เส้นขอบปะ */
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #adb5bd; /* สีตัวหนังสือ */
  font-weight: bold;
  font-size: 1.2rem;
  transition: all 0.3s;
}
.banner-placeholder-box:hover {
  border-color: #ffc107; /* เปลี่ยนสีขอบเมื่อชี้ */
  color: #ffc107;
  background-color: #fff;
}

/* ปรับแต่งส่วนรายวิชาในหน้า Dashboard (เฉพาะหน้านี้) */
.dashboard-subjects .subject-link {
  cursor: default; /* เมาส์ไม่เปลี่ยนเป็นรูปมือ */
  pointer-events: none; /* กดไม่ได้จริง */
  color: #444; /* สีตั้งต้นตาม Index */
}
.dashboard-subjects .subject-link:hover {
  color: #d19c00; /* สีเหลืองเข้มตอนชี้ */
  text-decoration: none;
}

/* ปรับปุ่มดูเพิ่มเติมให้กดไม่ได้ */
.dashboard-subjects .btn-see-more {
  pointer-events: none;
  opacity: 0.6; /* ให้ดูจางลงนิดนึงว่ากดไม่ได้ */
}
.subject-header-bar {
  background-color: #ffc107; /* [แก้ไข] พื้นหลังสีเหลือง */
  padding: 20px 0;
  margin-top: 3rem;
  margin-bottom: 3rem;
  text-align: center;
}
.subject-header-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: #212529; /* ตัวหนังสือสีเข้ม */
  margin: 0;
}

.cat-title {
  font-size: 1.2rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 15px;
  border-bottom: 2px solid #ffc107; /* ขีดเส้นใต้สีเหลือง */
  display: inline-block;
  padding-bottom: 5px;
}

.subject-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.subject-list li {
  margin-bottom: 8px;
}

.subject-link {
  text-decoration: none;
  color: #0d6efd; /* สีฟ้า */
  font-size: 0.95rem;
  transition: color 0.2s;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: default; /* เมาส์ไม่เปลี่ยนรูปมือ */
}
.subject-link:hover {
  color: #0a58ca;
  text-decoration: none;
}
.subject-link i {
  color: #ffc107 !important; /* ไอคอนสีเหลือง */
}

.btn-see-more {
  margin-bottom: 30px;
  display: inline-block;
  margin-top: 10px;
  font-size: 0.85rem;
  color: #6c757d;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  padding: 5px 15px;
  border-radius: 50px;
  text-decoration: none;
  pointer-events: none; /* กดไม่ได้ */
}

.profile-card {
  border: none;
  border-radius: 15px;
  transition: transform 0.3s;
}
.profile-img-large {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.rec-tutor-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #ffc107;
}
.info-icon-box {
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1rem;
}

.info-icon-email {
  background-color: #e3f2fd;
  color: #0d6efd;
}

.info-icon-line {
  background-color: #d1e7dd;
  color: #198754;
}

.info-icon-phone {
  background-color: #ffd781;
  color: #ffae00;
}

.info-icon-facebook {
  background-color: #e7f3ff;
  color: #1877f2;
}
.edu-row {
  border-bottom: 1px solid #eee;
  padding: 15px 0;
}
.edu-row:last-child {
  border-bottom: none;
}
.edu-label {
  font-weight: bold;
  color: #555;
}
.edu-value {
  color: #000;
  font-weight: 500;
}
.honor-badge {
  background-color: #fff3cd;
  color: #856404;
  padding: 5px 10px;
  border-radius: 50px;
  font-size: 0.9rem;
  display: inline-block;
  margin-bottom: 5px;
}
.degree-title {
  color: #dc3545;
  font-weight: bold;
  font-size: 1.1rem;
}

/* ===== Tutor Dashboard - Page Specific Styles ===== */
body {
  background: #F9F9F9;
}

.section-bar {
  background: #000;
  color: #FFC107;
  text-align: center;
  padding: 12px 10px;
}

.recommended-swiper {
  padding: 6px 0 10px;
}

.recommended-swiper .swiper-slide {
  height: auto;
}

.random-tutors-section {
  background: #ffff;
  border-radius: 16px;
  padding: 40px 20px 30px;
  margin-top: 50px;
  margin-bottom: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
  border: 1px solid #e9ecef;
}

.random-tutor-swiper {
  padding: 10px 0 20px;
}

.random-tutor-swiper .swiper-slide {
  width: 260px;
  height: auto;
}

.random-tutor-title {
  color: #1a1a1a;
  font-size: 2rem;
}

.random-tutor-divider {
  border-bottom: 2px solid #ffc107;
  margin: 0 auto;
  width: 100%;
}

.cta-title {
  font-size: 2.5rem;
}

/* --- MODERN CARD STYLES (from tutor-list.php) --- */
.tutor-card-modern {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease;
  opacity: 1;
  transform: scale(1);
}

.tutor-card-inner {
  position: relative;
  background: white;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e5e5;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.tutor-card-modern:hover .tutor-card-inner {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  border-color: #fcd34d;
}

.tutor-image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 100%;
  background: linear-gradient(135deg, #f5f5f5 0%, #e5e5e5 100%);
  overflow: hidden;
}

.tutor-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.5s ease;
}

.tutor-card-modern:hover .tutor-image {
  transform: scale(1.08);
}

.tutor-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.tutor-card-modern:hover .tutor-image-overlay {
  opacity: 1;
}

.overlay-content {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: white;
  border-radius: 9999px;
  color: #171717;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  transform: translateY(10px);
  transition: transform 0.2s ease;
}

.tutor-card-modern:hover .overlay-content {
  transform: translateY(0);
}

.tutor-details {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tutor-name-modern {
  font-size: 1.1rem;
  font-weight: 700;
  color: #171717;
  margin: 0;
  transition: color 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tutor-card-modern:hover .tutor-name-modern {
  color: #d97706;
}

.tutor-education {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.875rem;
}

.education-item {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.5rem;
}

.education-item i {
  color: #202020;
  font-size: 0.875rem;
}

.education-text {
  color: #525252;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.tutor-rating-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.5rem;
  margin-top: auto;
  border-top: 1px solid #f5f5f5;
}

.rating-stars i {
  font-size: 0.875rem;
  margin: 0 1px;
}

.star-standard {
  color: #f59e0b;
}

.star-premium {
  color: #dc2626;
}

.subject-pill-link {
  display: inline-block;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.subject-pill-link:hover {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
  text-decoration: none;
  color: inherit;
}

.subject-pill-disabled {
  cursor: default;
  opacity: 0.9;
}

@media (max-width: 768px) {
  .random-tutor-swiper .swiper-slide {
    width: 220px;
  }

  .tutor-img-wrapper {
    height: 130px;
  }

  .tutor-info {
    padding: 10px 8px 12px;
  }

  .tutor-name {
    font-size: 0.9rem;
  }

  .tutor-rating {
    font-size: 0.9rem;
  }

  .cta-title {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .random-tutor-swiper .swiper-slide {
    width: 200px;
  }

  .tutor-img-wrapper {
    height: 110px;
  }

  .tutor-rating {
    font-size: 0.85rem;
  }

  .tutor-rating i {
    margin: 0;
  }

  .cta-title {
    font-size: 1.75rem;
  }
}

