/* ============================================================
   Education programme tabs (shared MEP / MPH)
   Default: centered compact bar (.custom-tabs--centered)
   Optional: full-width bar (.custom-tabs--full-width)
   ============================================================ */

.custom-tabs-wrapper {
  z-index: 1000;
}

.custom-tabs-desktop,
.custom-tabs-mobile {
  display: none;
}

@media (min-width: 1200px) {
  .custom-tabs-desktop {
    display: block;
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
  }

  .custom-tabs {
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    margin: 0;
    padding: 0;
    border: 0;
    list-style: none;
  }

  .custom-tabs.nav-tabs {
    border-bottom: 0;
  }

  .custom-tabs .nav-item {
    margin: 0;
    display: flex;
    align-items: stretch;
  }

  .custom-tabs .nav-link {
    border: none;
    color: #f16522;
    padding: 13px 0;
    font-weight: 600;
    position: relative;
    border-radius: 0;
    font-size: 14px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
  }

  .custom-tabs .nav-link:hover,
  .custom-tabs .nav-link:focus {
    color: #f16522;
    border-color: transparent;
    isolation: auto;
  }

  .custom-tabs .nav-link span {
    padding: 5px 50px;
    display: block;
    white-space: nowrap;
  }

  .custom-tabs .nav-link.active {
    color: #f16522;
    background: #fff;
    border-bottom: 2px solid #f16522;
  }

  .custom-tabs .nav-link.active::after {
    content: "";
    position: absolute;
    bottom: -7px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 7px solid #f16522;
  }

  /* MEP — centered compact bar */
  .custom-tabs-desktop--centered {
    width: auto;
  }

  .custom-tabs--centered .nav-item {
    flex: 0 0 auto;
  }

  .custom-tabs--centered .nav-link span {
    border-right: 1px solid #e5e7eb;
  }

  .custom-tabs--centered .nav-item:last-child .nav-link span {
    border-right: none;
  }

  /* MPH — full-width bar with equal columns */
  .custom-tabs-desktop--full-width {
    width: calc(100% - 56px);
    max-width: 1920px;
  }

  .custom-tabs--full-width {
    width: 100%;
  }

  .custom-tabs--full-width .nav-item {
    flex: 1 1 0;
  }

  .custom-tabs--full-width .nav-link {
    width: 100%;
  }

  .custom-tabs--full-width .nav-link span {
    width: 100%;
    text-align: center;
  }

  .custom-tabs--full-width .nav-item:not(:last-child) .nav-link {
    border-right: 1px solid #e5e7eb;
  }
}

@media (max-width: 1199px) {
  .custom-tabs-mobile {
    display: block;
    position: relative;
    width: 100%;
    max-width: 300px;
    margin: 20px auto 0;
  }

  .custom-tabs-desktop {
    display: none;
  }
}

.program-dropdown {
  background-color: #fff;
  border: 2px solid #f16522;
  color: #f16522;
  font-weight: 600;
  padding: 12px 16px;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23f16522' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  transition: all 0.2s ease;
}

.program-dropdown:hover {
  border-color: #d4561a;
  background-color: #faf9f7;
}

.program-dropdown:focus {
  outline: none;
  border-color: #d4561a;
  box-shadow: 0 0 0 3px rgba(241, 101, 34, 0.1);
}

@media (max-width: 768px) {
  .custom-tabs-mobile {
    max-width: 100%;
    margin-top: 16px;
    padding: 0 16px;
  }

  .program-dropdown {
    width: 100%;
    font-size: 13px;
    padding: 10px 36px 10px 12px;
  }
}
