.ignou-programme-search .form-row {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.ignou-programme-search .form-item {
  margin: 0;
  flex: 1 1 180px;
  min-width: 0;
}

.ignou-programme-search .form-item-keyword {
  flex: 2 1 240px;
}

.ignou-programme-search .form-actions {
  margin: 0;
  flex: 0 0 auto;
}

.ignou-programme-search input[type="text"],
.ignou-programme-search select {
  width: 100%;
  box-sizing: border-box;
}

.ignou-programme-search .form-actions input {
  margin: 0;
}

@media (max-width: 650px) {
  .ignou-programme-search .form-row {
    flex-direction: column;
    align-items: stretch;
  }

  .ignou-programme-search .form-item,
  .ignou-programme-search .form-actions {
    width: 100%;
    flex-basis: auto;
  }
}

/* Shared programme table styling */
.path-programmes table,
.ignou-programme-search table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 13px;
  line-height: 1.5;
  margin: 12px 0 20px;
}

.path-programmes table thead th,
.ignou-programme-search table thead th {
  background: #f1f5f9;
  color: #183b56;
  font-weight: 600;
  text-align: left;
  padding: 11px 12px;
  border-bottom: 2px solid #d6e0e8;
  vertical-align: middle;
}

.path-programmes table tbody td,
.ignou-programme-search table tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid #e5eaf0;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.path-programmes table tbody tr:nth-child(even),
.ignou-programme-search table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.path-programmes table tbody tr:hover,
.ignou-programme-search table tbody tr:hover {
  background: #eef6fb;
}

.path-programmes details {
  margin-bottom: 14px;
  border: 1px solid #dce5ec;
  border-radius: 5px;
  overflow: hidden;
}

.path-programmes details > summary {
  padding: 12px 15px;
  background: #f3f6f8;
  color: #183b56;
  font-weight: 600;
  cursor: pointer;
}

.path-programmes details > .ignou-accordion-panel {
  padding: 8px 12px;
}

.path-programmes table th:first-child,
.path-programmes table td:first-child {
  width: 18%;
}

.path-programmes table th:last-child,
.path-programmes table td:last-child {
  width: 18%;
}

.ignou-programme-search table th:first-child,
.ignou-programme-search table td:first-child {
  width: 17%;
}

@media (max-width: 650px) {
  .path-programmes table,
  .ignou-programme-search table {
    font-size: 12px;
  }

  .path-programmes table thead th,
  .ignou-programme-search table thead th,
  .path-programmes table tbody td,
  .ignou-programme-search table tbody td {
    padding: 7px 6px;
  }

  .path-programmes details > .ignou-accordion-panel {
    padding: 5px;
  }
}

/* Fix spacing between accordion arrow and category title */
.path-programmes details > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px 12px 30px;
  line-height: 1.5;
  list-style: none;
}

.path-programmes details > summary::-webkit-details-marker {
  display: none;
}

.path-programmes details > summary::before {
  content: "";
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 220ms ease;
  margin-right: 2px;
}

.path-programmes details[open] > summary::before {
  transform: rotate(45deg);
}

.path-programmes details > summary:focus-visible {
  outline: 2px solid #1683b5;
  outline-offset: -2px;
}

/* Correct accordion chevron alignment and direction */
.path-programmes details > summary {
  display: flex;
  align-items: center;
  gap: 10px;
}

.path-programmes details > summary::before {
  content: "";
  display: inline-block;
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border: 0;
  border-right: 2px solid #17466b;
  border-bottom: 2px solid #17466b;
  transform: rotate(-45deg);
  transform-origin: center;
  transition: transform 220ms ease;
  margin: 0 2px 0 0;
}

.path-programmes details[open] > summary::before {
  transform: rotate(45deg);
}

/* Accordion arrow: right when closed, down when open */
.path-programmes details > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  box-sizing: border-box;
}

.path-programmes details > summary::before {
  content: "";
  display: block;
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  box-sizing: border-box;
  border: 0;
  border-right: 2px solid #17466b;
  border-bottom: 2px solid #17466b;
  transform: rotate(-45deg);
  transform-origin: center;
  transition: transform 220ms ease;
  margin: 0 2px 2px 0;
}

.path-programmes details[open] > summary::before {
  transform: rotate(45deg);
  margin-bottom: 0;
}

/* Final accordion arrow direction and vertical alignment */
.path-programmes details > summary {
  display: flex !important;
  align-items: center !important;
  gap: 8px;
}

.path-programmes details > summary::before {
  content: "" !important;
  position: static !important;
  display: inline-block !important;
  flex: 0 0 7px !important;
  width: 7px !important;
  height: 7px !important;
  border: 0 !important;
  border-right: 2px solid #17466b !important;
  border-bottom: 2px solid #17466b !important;
  transform: rotate(-45deg) !important;
  transition: transform 220ms ease !important;
  margin: -3px 2px 0 0 !important;
}

.path-programmes details[open] > summary::before {
  transform: rotate(45deg) scaleY(-1) !important;
  margin: 0 2px 0 0 !important;
}

/* Reliable accordion chevron states */
.path-programmes details > summary::before {
  transform: rotate(45deg) !important;
  margin: -3px 2px 0 0 !important;
}

.path-programmes details[open] > summary::before {
  transform: rotate(45deg) !important;
  margin: 0 2px 0 0 !important;
}

/* Explicit arrow direction for both accordion states */
.path-programmes details > summary::before {
  transform: rotate(-45deg) !important;
  transition: transform 220ms ease !important;
}

.path-programmes details[open] > summary::before {
  transform: rotate(45deg) !important;
}

/* Programme detail navigation tabs */
.programme-detail-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 24px 0 30px;
  padding: 12px;
  background: #f3f7fb;
  border: 1px solid #dce7f1;
  border-radius: 12px;
}

.programme-detail-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #fff;
  color: #07569b;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease,
    border-color 0.2s ease, box-shadow 0.2s ease;
}

.programme-detail-tabs a:hover {
  background: #e4effa;
  border-color: #b8d2eb;
  color: #034477;
  text-decoration: none;
}

.programme-detail-tabs a:focus-visible {
  outline: 3px solid #80bdf0;
  outline-offset: 2px;
}

.programme-detail-tabs a.is-active {
  background: #07569b;
  border-color: #07569b;
  color: #fff;
  box-shadow: 0 2px 5px rgb(7 86 155 / 18%);
}

.programme-detail-tabs a.is-active:hover {
  background: #034477;
  border-color: #034477;
  color: #fff;
}

@media (max-width: 640px) {
  .programme-detail-tabs {
    gap: 6px;
    padding: 8px;
    margin: 18px 0 24px;
  }

  .programme-detail-tabs a {
    flex: 1 1 auto;
    min-height: 40px;
    padding: 9px 12px;
    font-size: 13px;
    text-align: center;
  }
}


/* Study Centre table - IGNOU professional theme */
.programme-detail-content .study-centres-table {
  width: 100%;
  margin: 20px 0;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #d9e4ef;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  color: #263746;
  font-size: 14px;
  line-height: 1.6;
}

.programme-detail-content .study-centres-table thead th {
  padding: 14px 16px;
  background: #07569b;
  color: #fff;
  font-weight: 600;
  text-align: left;
  vertical-align: top;
  border: 0;
  border-right: 1px solid rgb(255 255 255 / 18%);
}

.programme-detail-content .study-centres-table thead th:last-child {
  border-right: 0;
}

.programme-detail-content .study-centres-table tbody td {
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid #e6edf4;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.programme-detail-content .study-centres-table tbody tr:nth-child(even) {
  background: #f4f8fc;
}

.programme-detail-content .study-centres-table tbody tr:nth-child(odd) {
  background: #fff;
}

.programme-detail-content .study-centres-table tbody tr:hover {
  background: #eaf3fc;
}

.programme-detail-content .study-centres-table tbody tr:last-child td {
  border-bottom: 0;
}

.programme-detail-content .study-centres-table a {
  color: #07569b;
  font-weight: 500;
  text-decoration: none;
}

.programme-detail-content .study-centres-table a:hover {
  color: #034477;
  text-decoration: underline;
}

.programme-detail-content .study-centres-table a:focus-visible {
  outline: 2px solid #247fca;
  outline-offset: 3px;
}

@media (max-width: 768px) {
  .programme-detail-content {
    overflow-x: auto;
  }

  .programme-detail-content .study-centres-table {
    min-width: 760px;
    font-size: 13px;
  }

  .programme-detail-content .study-centres-table thead th,
  .programme-detail-content .study-centres-table tbody td {
    padding: 11px 12px;
  }
}

