/*
Theme Name: Astra Child Sticky Final
Template: astra
Version: 1.3
Description: Astra child theme with styled sidebar and working fixed sticky header.
Author: ChatGPT Dev
*/

/* ------------------ SIDEBAR WIDGET STYLE ------------------ */
.widget {
  background: #fff;
  border: 1px solid #eee;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.widget-title {
  font-weight: 600;
  font-size: 18px;
  border-left: 4px solid #fbbf24;
  padding-left: 10px;
  margin-bottom: 15px;
}

.sidebar-cta {
  background: #fffbea;
  text-align: center;
  border: 1px dashed #f59e0b;
  padding: 15px;
  border-radius: 10px;
}

.sidebar-cta h4 {
  font-size: 16px;
  margin-bottom: 10px;
}

.btn-sidebar {
  display: inline-block;
  padding: 8px 15px;
  background-color: #f59e0b;
  color: white;
  border-radius: 6px;
  text-decoration: none;
}

.btn-sidebar:hover {
  background-color: #d97706;
}

/* ------------------ STICKY HEADER ------------------ */
.ast-primary-header-bar {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 10010;
  background-color: #ffffff;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ast-primary-header-bar.shrink {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  background-color: #f9fafb;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

/* Đẩy nội dung xuống dưới sticky header */
.site-content {
  padding-top: 90px !important;
}

/* ------------------ DROPDOWN MENU ------------------ */

/* Hiển thị menu cấp 2 khi hover */
.main-header-menu li:hover > .sub-menu {
  top: 100%;
  margin-top: 12px;
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Style menu cấp 2 */
.main-header-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 10px;
  background: #ffffff;
  padding: 10px 0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 180px;
  z-index: 9999;
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
}

/* Item trong dropdown */
.main-header-menu .sub-menu li {
  padding: 8px 20px;
  transition: background 0.3s ease;
}

/* Hover item */
.main-header-menu .sub-menu li:hover {
  background-color: #f5f5f5;
}

/* Link trong dropdown */
.main-header-menu .sub-menu li a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  display: block;
  transition: color 0.3s ease;
}

/* Hover link */
.main-header-menu .sub-menu li a:hover {
  color: #e63946; /* màu nhấn theo thương hiệu */
}

/*--  CSS bố cục 4 cột đẹp, responsive:  --*/
.course-category-grid {
  padding: 40px 20px;
  max-width: 1200px;
  margin: auto;
}
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}
.course-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  text-align: center;
  transition: transform 0.2s ease;
}
.course-card:hover {
  transform: translateY(-4px);
}
.course-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.course-card h3 {
  font-size: 18px;
  margin: 12px 0 6px;
}
.course-card p {
  color: #555;
  font-size: 14px;
  margin-bottom: 16px;
}
.course-card a {
  color: inherit;
  text-decoration: none;
  display: block;
  height: 100%;
}


/*------------- Khung form giữa trang dùng với div riêng nhưng giờ không sử dụng -----------------*/
.certificate-search-wrapper {
  max-width: 480px;
  margin: 40px auto;
  padding: 30px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* Tiêu đề (nếu có) */
.certificate-search-wrapper h2 {
  text-align: center;
  font-size: 24px;
  margin-bottom: 24px;
}

/* Form */
.certificate-search-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Input */
.certificate-search-form input[type="text"] {
  padding: 12px 16px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid #ccc;
  transition: border-color 0.2s;
}

.certificate-search-form input[type="text"]:focus {
  border-color: #2d89ef;
  outline: none;
  box-shadow: 0 0 0 2px rgba(45,137,239,0.15);
}

/* Nút tra cứu */
.certificate-search-form button {
  padding: 12px 16px;
  background: #2d89ef;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.certificate-search-form button:hover {
  background: #1a65c9;
}

/*------------ Khung bao ngoài form tra cứu dùng với function tra cứu -------------*/
.certificate-search-form {
  max-width: 480px;
  margin: 40px auto;
  padding: 30px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Input */
.certificate-search-form input[type="text"] {
  padding: 12px 16px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid #ccc;
  transition: border-color 0.2s;
}

.certificate-search-form input[type="text"]:focus {
  border-color: #2d89ef;
  outline: none;
  box-shadow: 0 0 0 2px rgba(45,137,239,0.15);
}

/* Nút */
.certificate-search-form button {
  padding: 12px 16px;
  background: #2d89ef;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.certificate-search-form button:hover {
  background: #1a65c9;
}

/*--------------- Khung bao bảng giúp cuộn ngang khi cần -----------------*/
.cert-result-wrapper {
  overflow-x: auto;
  margin-top: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Bảng kết quả */
.cert-result-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px; /* bắt buộc nếu muốn cuộn ngang */
}

.cert-result-table th {
  background: #f4f6f8;
  text-align: left;
  padding: 12px;
  font-weight: 600;
  border-bottom: 1px solid #ddd;
}

.cert-result-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
}
