/* Dynamic courses-by-location widget (Brightannica Sydney page) */

/* Full-bleed gradient band; content uses standard .container width (1170px) */
.cc-courses-hero-block {
  width: 100%;
  margin-top: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-top: 48px !important;
  padding-bottom: 64px !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box;
  background: linear-gradient(to bottom, #7eb5b8 5%, #8fced1 40%);
}

.cc-courses-hero-block .cc-courses-section-inner {
  width: 100%;
  max-width: 1170px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 15px;
  padding-right: 15px;
  box-sizing: border-box;
}

.cc-courses-by-location {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font-size: 14px;
  line-height: 1.45;
}

.cc-courses-by-location h1.cc-courses-fees-heading {
  margin-top: 0;
  margin-bottom: 1rem;
}

.cc-courses-by-location .cc-courses-filters {
  width: 100%;
  margin: 0 0 1.25rem 0;
  padding: 1rem 1.1rem;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-sizing: border-box;
}

.cc-courses-by-location .cc-courses-filters__intro {
  margin: 0 0 0.75rem 0;
  font-size: inherit;
  color: #333;
  line-height: 1.45;
}

.cc-courses-by-location .cc-courses-filters__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem 1rem;
  align-items: end;
}

@media (max-width: 900px) {
  .cc-courses-by-location .cc-courses-filters__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .cc-courses-by-location .cc-courses-filters__grid {
    grid-template-columns: 1fr;
  }
}

.cc-courses-by-location .cc-courses-filters label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: inherit;
  font-weight: 600;
  color: #212529;
}

.cc-courses-by-location .cc-courses-filters input[type="text"],
.cc-courses-by-location .cc-courses-filters select {
  font-size: inherit;
  font-weight: 500;
  padding: 0.55rem 0.65rem;
  border: 1px solid #ced4da;
  border-radius: 6px;
  background: #fff;
  color: #212529;
  max-width: 100%;
  box-sizing: border-box;
}

.cc-courses-by-location .cc-courses-filters__grid--with-state {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .cc-courses-by-location .cc-courses-filters__grid--with-state {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .cc-courses-by-location .cc-courses-filters__grid--with-state {
    grid-template-columns: 1fr;
  }
}

.cc-courses-by-location .cc-courses-filters input[type="text"]::placeholder {
  color: #868e96;
  font-weight: 400;
}

.cc-courses-by-location .cc-courses-filters__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
  margin-top: 0.85rem;
}

.cc-courses-by-location .cc-courses-filters button[type="submit"] {
  padding: 0.55rem 1.25rem;
  font-size: inherit;
  font-weight: 700;
  color: #fff;
  background: #305b69;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.cc-courses-by-location .cc-courses-filters button[type="submit"]:hover {
  background: #234651;
}

.cc-courses-by-location .cc-courses-filters button[type="button"].cc-courses-filters__clear {
  padding: 0.55rem 1rem;
  font-size: inherit;
  font-weight: 600;
  color: #495057;
  background: #fff;
  border: 1px solid #ced4da;
  border-radius: 6px;
  cursor: pointer;
}

.cc-courses-by-location .cc-courses-filters button[type="button"].cc-courses-filters__clear:hover {
  background: #e9ecef;
}

.cc-courses-by-location .cc-courses-by-location-table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: inherit;
  line-height: 1.45;
  background: #fff;
}

.cc-courses-by-location .cc-courses-by-location-table thead th,
.cc-courses-by-location .cc-courses-by-location-table tbody td {
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  vertical-align: top;
  padding: 0.65rem 0.55rem;
  hyphens: auto;
  border: 1px solid #dee2e6;
}

.cc-courses-by-location .cc-courses-by-location-table thead th {
  font-size: inherit;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.01em;
  background: #305b69;
  color: #fff;
}

.cc-courses-by-location .cc-courses-by-location-table .column-1 {
  width: 22%;
}

.cc-courses-by-location .cc-courses-by-location-table .column-2 {
  width: 10%;
}

.cc-courses-by-location .cc-courses-by-location-table .column-3 {
  width: 9%;
}

.cc-courses-by-location .cc-courses-by-location-table .column-meta {
  width: auto;
}

.cc-courses-by-location .cc-courses-by-location-table td > div {
  max-width: 100%;
}

.cc-courses-by-location .cc-course-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 0.45rem;
  align-items: start;
}

.cc-courses-by-location .cc-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.cc-courses-by-location .cc-meta-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #495057;
  line-height: 1.2;
}

.cc-courses-by-location .cc-meta-value {
  font-size: inherit;
  color: #1a1a1a;
  line-height: 1.35;
  word-break: break-word;
}

.cc-courses-by-location .cc-course-name-link {
  color: #305b69;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cc-courses-by-location .cc-course-name-link:hover,
.cc-courses-by-location .cc-course-name-link:focus {
  color: #7dc1c4;
}

@media (max-width: 640px) {
  .cc-courses-by-location .cc-courses-by-location-table {
    font-size: inherit;
    border: 0;
  }

  .cc-courses-by-location .cc-courses-by-location-table thead {
    display: none;
  }

  .cc-courses-by-location .cc-courses-by-location-table tbody {
    display: block;
  }

  .cc-courses-by-location .cc-courses-by-location-table tbody tr.cc-course-row {
    display: block;
    margin-bottom: 0.85rem;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
  }

  .cc-courses-by-location .cc-courses-by-location-table tbody tr.cc-course-row td {
    display: block;
    width: 100% !important;
    box-sizing: border-box;
    border-bottom: 1px solid #e9ecef;
    padding: 0.65rem 0.75rem;
  }

  .cc-courses-by-location .cc-courses-by-location-table tbody tr.cc-course-row td:last-child {
    border-bottom: none;
  }

  .cc-courses-by-location .cc-courses-by-location-table tbody tr.cc-course-row--message td::before {
    display: none !important;
  }

  .cc-courses-by-location .cc-courses-by-location-table tbody tr.cc-course-row:not(.cc-course-row--message) .column-1::before,
  .cc-courses-by-location .cc-courses-by-location-table tbody tr.cc-course-row:not(.cc-course-row--message) .column-2::before,
  .cc-courses-by-location .cc-courses-by-location-table tbody tr.cc-course-row:not(.cc-course-row--message) .column-3::before {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6c757d;
    margin-bottom: 0.3rem;
  }

  .cc-courses-by-location .cc-courses-by-location-table tbody tr.cc-course-row:not(.cc-course-row--message) .column-1::before {
    content: 'Course';
  }

  .cc-courses-by-location .cc-courses-by-location-table tbody tr.cc-course-row:not(.cc-course-row--message) .column-2::before {
    content: 'Fee';
  }

  .cc-courses-by-location .cc-courses-by-location-table tbody tr.cc-course-row:not(.cc-course-row--message) .column-3::before {
    content: 'Duration (weeks)';
  }

  .cc-courses-by-location .cc-courses-by-location-table tbody tr.cc-course-row:not(.cc-course-row--message) .column-meta {
    background: #f8f9fa;
    padding: 0.65rem 0.75rem 0.75rem;
  }

  .cc-courses-by-location .cc-courses-by-location-table tbody tr.cc-course-row:not(.cc-course-row--message) .column-meta::before {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6c757d;
    margin-bottom: 0.45rem;
    content: 'Course type & level';
  }

  .cc-courses-by-location .cc-course-meta {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
}

.cc-courses-by-location .cc-courses-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.cc-courses-by-location .cc-courses-load-more--cta {
  display: inline-block;
  margin-top: 1rem !important;
  margin-bottom: 0.25rem;
  padding: 0.75rem 1.85rem;
  font-size: inherit;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #fff !important;
  background: linear-gradient(180deg, #7dc1c4 0%, #305b69 100%) !important;
  border: 2px solid #305b69;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(48, 91, 105, 0.35);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cc-courses-by-location .cc-courses-load-more--cta:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(48, 91, 105, 0.45);
}

.cc-courses-by-location .cc-courses-load-more--cta:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}
