/* ==========================================================================
   LATASIA EDUCATION — Course List Page
   Theme: Logo Blue (matches navy-blue logo, replaces old orange accents)
   ========================================================================== */

:root {
  --la-blue: #1B4B91;        /* primary logo blue */
  --la-blue-dark: #123763;   /* darker shade for hover/text */
  --la-blue-light: #E8F0FB;  /* soft blue background */
  --la-blue-mid: #3E6FB0;    /* mid tone for chips/icons */
  --la-blue-soft: #EAF0FE;   /* borders / dividers */
  --la-gray-text: #5A6472;
  --la-heading: #16233B;
  --la-white: #ffffff;
  --la-radius: 12px;
  --la-shadow: 0 4px 18px rgba(27, 75, 145, 0.08);
  --la-shadow-hover: 0 10px 28px rgba(27, 75, 145, 0.16);
}

/* ===================== HERO ===================== */
.course-list-hero {
  background: linear-gradient(135deg, var(--la-blue) 0%, var(--la-blue-dark) 100%);
  border-radius: var(--la-radius);
  padding: 60px 40px;
  margin-bottom: 30px;
  text-align: center;
  color: var(--la-white);
}

.course-list-hero-inner h1 {
  font-size: 34px;
  font-weight: 700;
  color: var(--la-white);
  margin-bottom: 14px;
}

.course-list-hero-inner p {
  font-size: 16px;
  color: #EAF0FE;
  max-width: 640px;
  margin: 0 auto;
}

/* ===================== STATS STRIP ===================== */
.course-list-stats {
  background: var(--la-white);
  border: 1px solid var(--la-blue-soft);
  border-radius: var(--la-radius);
  box-shadow: var(--la-shadow);
  margin-bottom: 40px;
  overflow: hidden;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px 20px;
  border-right: 1px solid var(--la-blue-soft);
  border-bottom: 1px solid var(--la-blue-soft);
}

.stat-item:last-child,
.stat-item:nth-child(4) {
  border-right: none;
}

.stat-item svg {
  width: 32px;
  height: 32px;
  color: var(--la-blue);
  flex-shrink: 0;
}

.stat-item strong {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--la-heading);
  line-height: 1.2;
}

.stat-item span {
  font-size: 13px;
  color: var(--la-gray-text);
}

@media (max-width: 767px) {
  .stat-item:nth-child(odd) { border-right: 1px solid var(--la-blue-soft); }
  .stat-item:nth-child(4) { border-bottom: none; }
  .stat-item:nth-child(3) { border-bottom: none; }
}

/* ===================== INTRO + SEARCH ===================== */
.course-list-intro h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--la-heading);
  margin-bottom: 8px;
}

.course-list-intro p {
  color: var(--la-gray-text);
  font-size: 15px;
}

.course-search-box {
  display: flex;
  align-items: center;
  background: var(--la-white);
  border: 1.5px solid var(--la-blue-soft);
  border-radius: 50px;
  padding: 6px 6px 6px 20px;
  box-shadow: var(--la-shadow);
  transition: border-color 0.2s ease;
}

.course-search-box:focus-within {
  border-color: var(--la-blue);
}

.course-search-box input[type="text"] {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  color: var(--la-heading);
  background: transparent;
}

.course-search-box input[type="text"]::placeholder {
  color: #9AA6B5;
}

.course-search-box button {
  background: var(--la-blue);
  border: none;
  color: var(--la-white);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.course-search-box button:hover {
  background: var(--la-blue-dark);
}

/* ===================== COURSE CARD ===================== */
.course-card {
  background: var(--la-white);
  border: 1px solid var(--la-blue-soft);
  border-radius: var(--la-radius);
  overflow: hidden;
  margin-bottom: 30px;
  box-shadow: var(--la-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.course-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--la-shadow-hover);
}

.course-card-img-wrap {
  position: relative;
  width: 100%;
  height: 170px;
  overflow: hidden;
  background: var(--la-blue-light);
}

.course-card-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.course-card:hover .course-card-banner-img {
  transform: scale(1.06);
}

.course-card-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--la-blue);
  color: var(--la-white);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.course-card-degree {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--la-blue-dark);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 50px;
}

.course-card-icon {
  position: absolute;
  bottom: -22px;
  left: 18px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 3px solid var(--la-white);
  background: var(--la-white);
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.course-card-body {
  padding: 30px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.course-card-body h6 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.course-card-body h6 a {
  color: var(--la-heading);
  text-decoration: none;
  transition: color 0.2s ease;
}

.course-card-body h6 a:hover {
  color: var(--la-blue);
}

.course-card-university {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  margin-bottom: 10px;
}

.course-card-university svg {
  width: 15px;
  height: 15px;
  color: var(--la-blue);
  flex-shrink: 0;
}

.course-card-university a {
  color: var(--la-gray-text);
  text-decoration: none;
}

.course-card-university a:hover {
  color: var(--la-blue);
}

.course-card-desc {
  font-size: 13px;
  color: var(--la-gray-text);
  line-height: 1.5;
  margin-bottom: 14px;
}

.course-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.course-card-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--la-blue-light);
  color: var(--la-blue-dark);
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 50px;
}

.course-card-chip svg {
  width: 12px;
  height: 12px;
  color: var(--la-blue-mid);
}

.course-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-top: 1px dashed var(--la-blue-soft);
  padding-top: 14px;
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--la-gray-text);
}

.course-card-meta strong {
  display: block;
  font-size: 15px;
  color: var(--la-heading);
  font-weight: 700;
}

.course-card-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--la-blue);
  color: var(--la-white) !important;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.course-card-link:hover {
  background: var(--la-blue-dark);
}

.course-card-link svg {
  transition: transform 0.2s ease;
}

.course-card-link:hover svg {
  transform: translateX(3px);
}

/* ===================== PAGINATION ===================== */
/* Written defensively to cover Laravel's default Bootstrap-style
   pagination markup (nav > ul.pagination > li.page-item > a.page-link)
   as well as plain nav > ul > li > a markup, since both are common. */

.course-pagination-wrap {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--la-blue-soft);
}

.course-pagination-info {
  font-size: 13.5px;
  color: var(--la-gray-text);
  margin: 0;
  grid-column: 1;
  justify-self: start;
}

/* The pagination list itself always sits in the middle column so it
   stays visually centered regardless of how long the "info" text is. */
.course-pagination-wrap nav,
.course-pagination-wrap ul,
.course-pagination-wrap .pagination {
  grid-column: 2;
  justify-self: center;
}

/* Reset any nested nav/div wrapper */
.course-pagination-wrap nav {
  display: block;
}

/* Target every list inside the pagination wrap, regardless of class */
.course-pagination-wrap ul,
.course-pagination-wrap .pagination {
  display: flex !important;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.course-pagination-wrap ul li,
.course-pagination-wrap .pagination li,
.course-pagination-wrap .page-item {
  display: flex !important;
  list-style: none !important;
  margin: 0 !important;
}

.course-pagination-wrap ul li a,
.course-pagination-wrap ul li span,
.course-pagination-wrap .pagination li a,
.course-pagination-wrap .pagination li span,
.course-pagination-wrap .page-item .page-link {
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--la-blue-soft);
  background: var(--la-white);
  color: var(--la-blue-dark) !important;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none !important;
  transition: all 0.2s ease;
  cursor: pointer;
}

/* Icons (prev/next chevrons) inside pagination links must stay small */
.course-pagination-wrap ul li a svg,
.course-pagination-wrap ul li span svg,
.course-pagination-wrap .page-link svg,
.course-pagination-wrap ul li a img,
.course-pagination-wrap ul li span img {
  width: 14px !important;
  height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
}

.course-pagination-wrap ul li a:hover,
.course-pagination-wrap .page-item .page-link:hover {
  background: var(--la-blue-light);
  border-color: var(--la-blue);
  color: var(--la-blue) !important;
}

/* Active / current page */
.course-pagination-wrap ul li.active a,
.course-pagination-wrap ul li.active span,
.course-pagination-wrap ul li a.active,
.course-pagination-wrap .page-item.active .page-link {
  background: var(--la-blue) !important;
  border-color: var(--la-blue) !important;
  color: var(--la-white) !important;
}

/* Disabled prev/next */
.course-pagination-wrap ul li.disabled span,
.course-pagination-wrap ul li.disabled a,
.course-pagination-wrap .page-item.disabled .page-link {
  background: #F3F6FA !important;
  border-color: var(--la-blue-soft) !important;
  color: #B6BFCB !important;
  cursor: not-allowed;
  pointer-events: none;
}

/* If Previous/Next render as plain text without a shared row (older
   Bootstrap paginators split arrow + label into separate <li> items),
   this keeps every item inline instead of stacking vertically. */
.course-pagination-wrap * {
  box-sizing: border-box;
}

.no-course-box {
  background: var(--la-blue-light);
  border: 1px dashed var(--la-blue-soft);
  border-radius: var(--la-radius);
  padding: 40px 20px;
  text-align: center;
  color: var(--la-gray-text);
  font-size: 14.5px;
}

.no-course-box a {
  color: var(--la-blue);
  font-weight: 600;
  text-decoration: underline;
}

/* ===================== FILTER SIDEBAR ===================== */
.course-filter-box {
  background: var(--la-white);
  border: 1px solid var(--la-blue-soft);
  border-radius: var(--la-radius);
  box-shadow: var(--la-shadow);
  padding: 22px 20px;
  margin-bottom: 24px;
}

.course-filter-box h6 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--la-heading);
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--la-blue-soft);
}

.course-filter-box h6 svg {
  width: 18px;
  height: 18px;
  color: var(--la-blue);
}

.course-filter-group {
  margin-bottom: 16px;
}

.course-filter-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--la-heading);
  margin-bottom: 6px;
}

.course-filter-group input[type="text"] {
  width: 100%;
  border: 1px solid var(--la-blue-soft);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  color: var(--la-heading);
  outline: none;
  transition: border-color 0.2s ease;
}

.course-filter-group input[type="text"]:focus {
  border-color: var(--la-blue);
}

.course-select-wrap {
  position: relative;
  width: 100%;
}

/* Force-remove every browser's native dropdown arrow so only our
   custom arrow (::after below) shows — this is what was causing the
   "double arrow" look. !important overrides any theme CSS loaded
   after this file. */
.course-select-wrap select,
.course-filter-group select {
  width: 100% !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-image: none !important;
  border: 1px solid var(--la-blue-soft) !important;
  border-radius: 8px !important;
  padding: 10px 34px 10px 12px !important;
  font-size: 13px !important;
  color: var(--la-heading) !important;
  background-color: var(--la-white) !important;
  outline: none !important;
  cursor: pointer;
  transition: border-color 0.2s ease;
  line-height: normal;
}

/* Kill leftover native arrow in older IE/Edge */
.course-select-wrap select::-ms-expand {
  display: none;
}

/* This theme also loads Nice-Select / Bootstrap-Select JS plugins,
   which auto-replace every <select> with their own fake dropdown +
   arrow icon, hidden on top of our plain select. That plugin arrow
   plus our custom ::after arrow is what causes the "double arrow"
   look. Force the plugin's generated markup out of the way here and
   always show our own plain, single-arrow select instead.
   (!important beats the inline display:none the plugin adds.) */
.course-select-wrap .nice-select,
.course-select-wrap .dropdown-toggle,
.course-select-wrap .bootstrap-select,
.course-select-wrap .filter-option,
.course-select-wrap .bs-caret {
  display: none !important;
}

.course-select-wrap select {
  display: block !important;
}

.course-select-wrap select:focus,
.course-filter-group select:focus {
  border-color: var(--la-blue) !important;
}

.course-select-wrap::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--la-blue);
  border-bottom: 2px solid var(--la-blue);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.course-filter-checkbox-group {
  display: flex;
  align-items: center;
}

.course-filter-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--la-heading);
  cursor: pointer;
}

.course-filter-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--la-blue);
  cursor: pointer;
}

.course-filter-apply {
  width: 100%;
  background: var(--la-blue);
  color: var(--la-white);
  border: none;
  border-radius: 8px;
  padding: 11px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
  transition: background 0.2s ease;
}

.course-filter-apply:hover {
  background: var(--la-blue-dark);
}

.course-filter-reset {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--la-blue);
  text-decoration: none;
  font-weight: 600;
}

.course-filter-reset:hover {
  color: var(--la-blue-dark);
  text-decoration: underline;
}

/* ===================== HELP BOX ===================== */
.course-help-box {
  background: linear-gradient(135deg, var(--la-blue) 0%, var(--la-blue-dark) 100%);
  border-radius: var(--la-radius);
  padding: 26px 20px;
  text-align: center;
  color: var(--la-white);
}

.course-help-box h6 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--la-white);
}

.course-help-box p {
  font-size: 13px;
  color: #EAF0FE;
  margin-bottom: 18px;
  line-height: 1.5;
}

.course-help-box .btn-free,
.course-help-box .btn-wa {
  display: block;
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 10px;
  transition: all 0.2s ease;
}

.course-help-box .btn-free {
  background: var(--la-white);
  color: var(--la-blue-dark);
}

.course-help-box .btn-free:hover {
  background: var(--la-blue-light);
}

.course-help-box .btn-wa {
  background: #25D366;
  color: var(--la-white);
  margin-bottom: 0;
}

.course-help-box .btn-wa:hover {
  background: #1EBE5A;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 991px) {
  .course-list-hero { padding: 40px 24px; }
  .course-list-hero-inner h1 { font-size: 26px; }
  .course-search-box { margin-top: 16px; }
}

@media (max-width: 767px) {
  /* Stack "Showing X to Y" above the pagination and center everything,
     instead of the 3-column desktop grid. */
  .course-pagination-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 12px;
  }

  .course-pagination-info {
    grid-column: unset;
    justify-self: unset;
    text-align: center;
  }

  .course-pagination-wrap nav,
  .course-pagination-wrap ul,
  .course-pagination-wrap .pagination {
    grid-column: unset;
    justify-self: unset;
    justify-content: center;
    width: 100%;
  }

  /* Slightly smaller tap targets so 6-7 page links (prev, 1-4, next)
     fit on one row without wrapping awkwardly on narrow phones. */
  .course-pagination-wrap ul li a,
  .course-pagination-wrap ul li span,
  .course-pagination-wrap .pagination li a,
  .course-pagination-wrap .pagination li span,
  .course-pagination-wrap .page-item .page-link {
    min-width: 32px;
    height: 32px;
    padding: 0 9px;
    font-size: 12.5px;
  }
}

@media (max-width: 400px) {
  /* Very narrow phones: let the pagination list wrap onto a second
     row instead of overflowing the screen width. */
  .course-pagination-wrap ul,
  .course-pagination-wrap .pagination {
    flex-wrap: wrap;
    row-gap: 8px;
  }
}
