/* ---------------------------------------------
   Blog Listing (page-blogs.php)
   --------------------------------------------- */
/* Hero */
.blogs-hero {
  position: relative;
  min-height: 158px;
}
@media (min-width: 992px) {
  .blogs-hero {
    min-height: 440px;
  }
}

.flex-1 {
  flex: 1;
}

.blogs-hero__img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blogs-hero__overlay {
  position: absolute;
  inset: 0;
  background: #00000066;
}

.blogs-hero__breadcrumb {
  position: relative;
  z-index: 2;
  padding-top: 12px;
  color: #fff;
}

.blogs-hero__breadcrumb .breadcrumb li a {
  color: #fff;
}

.blogs-hero__breadcrumb .breadcrumb li.active {
  color: #B4DAC3;
}

.blogs-hero__content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding-bottom: 24px;
  color: #fff;
}
.blogs-hero__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.blogs-hero__titles {
  display: flex;
  flex-direction: column;
}

.blogs-hero__title {
  margin: 0 0 16px 0;
  font-weight: 700;
  font-family: "Manrope", sans-serif;
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.blogs-hero__subtitle {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
}
@media (min-width: 992px) {
  .blogs-hero__content {
    padding-bottom: 80px;
  }
  .blogs-hero__title {
    font-size: 72px;
  }
  .blogs-hero__subtitle {
    font-size: 16px;
    line-height: 1.4;
  }
}

/* Hero desktop search */
.blogs-hero__search {
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: row-reverse;
  gap: 8px;
}
.blogs-hero__search-btn {
  width: 50px;
  height: 50px;
  border-radius: 30px;
  background: #feca0c;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.blogs-hero__search-input {
  border: none;
  outline: none;
  height: auto;
  padding: 14px 22px;
  width: 0;
  opacity: 0;
  transition: width 220ms ease-out, opacity 150ms ease-out;
  background: transparent url("../images/searchIcon.svg") no-repeat 22px center;
  background-size: 20px 20px;
  padding-left: 52px; /* 22px left + 20 icon + 10 gap */
  font: inherit;
  color: #2e2d2c;
  /* Hide browser's native clear button */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.blogs-hero__search-input::-webkit-search-cancel-button {
  display: none;
  -webkit-appearance: none;
}

.blogs-hero__search-input::-ms-clear {
  display: none;
}
.blogs-hero__search.is-open .blogs-hero__search-input {
  width: 485px;
  opacity: 1;
}
.blogs-hero__search.is-open,
.blogs-hero__search.is-closing {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 30px;
}
.blogs-hero__close {
  display: none;
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.blogs-hero__search.is-open .blogs-hero__close {
  display: flex;
}
.blogs-hero__search.is-open .blogs-hero__search-btn {
  display: none;
}

/* closing animation: shrink input then hide container */
.blogs-hero__search.is-closing .blogs-hero__search-input {
  width: 0;
  opacity: 0;
}

.blogs-controls-section {
  padding-top: 48px !important; /* for large screen */
}
@media (max-width: 768px) { 
  .blogs-controls-section {
    padding-top: 24px !important; /* for small screen */
  }
}

/* Grid */
.blogs-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  row-gap: 48px; /* for large screen */
  column-gap: 18px;
}

.blog-card {
  width: 320px;
}

/* mobile styles */
@media (max-width: 768px) { 
  .blogs-grid {
    row-gap: 24px; /* for small screen */
    column-gap: 18px;
  }
}

/* Header theming for Blogs page (match About/Admissions) */
.blogs-page .header-main {
  background-color: #002b27 !important;
}
.blogs-page .header-main a:not(.btn) {
  color: #fff;
}
.blogs-page .header-main .logo .white-logo {
  display: block;
}
.blogs-page .header-main .logo .color-logo {
  display: none;
}
.blogs-page .header-main .menu-toggle .line {
  background-color: #fff;
}

/* Ensure content clears fixed header like other pages with inner hero */
.blogs-page main {
  padding-top: var(--header-height);
}

/* Controls */
.blogs-controls-section {
  padding-top: 24px;
  background: #fff;
}
.blogs-search {
  gap: 0;
}
.blogs-search__input {
  flex: 1;
  border: none;
  border-radius: 30px !important;
  border-width: 0 !important;
  padding: 10px 22px 10px 48px !important;
  background-color: #F1F5F4 !important;
  background-image: url("../images/searchIcon.svg");
  background-repeat: no-repeat;
  background-position: 20px center;
  background-size: 18px 18px;
  font-size: 12px !important;
}
.blogs-search__input:focus {
  outline: none;
  background-color: #E5EBE9;
}
.blogs-search__clear {
  position: absolute;
  right: 46px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 8px !important;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.blogs-search__clear img {
  width: 16px;
  height: 16px;
}
.blogs-search__btn {
  border-radius: 30px !important;
  position: absolute;
  right: 0;
  top: 0;
  padding: 0;
  width: 40px;
  height: 40px;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.blogs-search__btn img {
  width: 18px;
  height: 18px;
}
.filter-select {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.filter-select .filter-label {
  position: absolute;
  top: 50%;
  left: 24px; /* match horizontal padding */
  transform: translateY(-50%);
  color: #2e2d2c;
  pointer-events: none;
}
.filter-select .filter-label.is-hidden {
  display: none;
}
.filter-select__native.filter-empty {
  color: transparent;
  text-shadow: 0 0 0 rgba(0, 0, 0, 0);
}
.filter-select__native {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  padding: 10px 48px 10px 24px; /* extra right padding to cover dropdown icon */
  color: #2e2d2c;
}
.filter-select .filter-label { z-index: 2; }
.filter-select { position: relative; }
.filter-select__native.filter-empty { color: transparent; text-shadow: 0 0 0 rgba(0,0,0,0); }
.filter-select__icon { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); width: 12px; height: 12px; pointer-events: none; z-index: 2; }
.filter-select__native option {
  color: #2e2d2c;
}
.filter-select__native:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 152, 136, 0.15);
}

/* Icon element for select dropdown (replaces background image) */
.filter-select__icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  pointer-events: none;
}
.blogs-controls-in-list {
  margin-bottom: 48px;
}
@media (max-width: 991.98px) {
  .blogs-controls-in-list {
    margin-bottom: 24px;
  }
  .blogs-controls-in-list .blogs-filter,
  .blogs-controls-in-list .blogs-sort {
    flex: 1;
  }
}
.no-results {
  padding: 28px 0 24px 0;
  font-size: 48px;
  font-weight: 700;
  color: #2e2d2c;
}
.blogs-controls__divider {
  margin-top: 24px;
}

/* Custom Dropdown Styles */
.custom-dropdown {
  position: relative;
  display: flex;
}

.custom-dropdown__button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  background-color: #F1F5F4;
  border: none;
  padding: 10px 24px;
  min-height: 40px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 140%;
  letter-spacing: 0%;
  color: #2E2D2C;
  transition: background-color 0.2s ease;
}

.custom-dropdown__button:hover {
  background-color: #E5EBE9;
}

.custom-dropdown__label {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 140%;
  letter-spacing: 0%;
  color: #2E2D2C;
  transition: all 0.2s ease;
}

.custom-dropdown__value {
  display: none;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 140%;
  letter-spacing: 0%;
  color: #2E2D2C;
}

/* When dropdown has a value selected */
.custom-dropdown__button.has-value .custom-dropdown__label {
  font-size: 10px;
  line-height: 120%;
  color: #6B7280;
  margin-bottom: 2px;
}

.custom-dropdown__button.has-value .custom-dropdown__value {
  display: block;
}

.custom-dropdown__icon {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  transition: transform 0.2s ease;
  pointer-events: none;
}

.custom-dropdown__button[aria-expanded="true"] .custom-dropdown__icon {
  transform: translateY(-50%) rotate(180deg);
}

.custom-dropdown__button {
  padding-right: calc(24px + 12px + 8px);
}

.custom-dropdown__menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  width: max-content;
  max-width: 300px;
  max-height: 240px;
  background-color: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  overflow-y: auto;
  overflow-x: hidden;
}

.custom-dropdown__menu.is-open {
  display: block;
}

.custom-dropdown__item {
  padding: 12px 20px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 140%;
  letter-spacing: 0%;
  color: #2E2D2C;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.15s ease;
  white-space: nowrap;
  border-bottom: 1px solid #F3F4F6;
  display: flex;
  align-items: center;
  min-height: 44px;
}

.custom-dropdown__item:last-child {
  border-bottom: none;
}

.custom-dropdown__item:hover {
  background-color: #F8FAFC;
}

.custom-dropdown__item.is-selected {
  background-color: #EFF6FF;
  color: #1D4ED8;
  font-weight: 600;
}

.custom-dropdown__item.is-selected:hover {
  background-color: #DBEAFE;
}

/* Custom scrollbar for dropdown menu */
.custom-dropdown__menu::-webkit-scrollbar {
  width: 6px;
}

.custom-dropdown__menu::-webkit-scrollbar-track {
  background: #F1F5F9;
  border-radius: 3px;
}

.custom-dropdown__menu::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 3px;
}

.custom-dropdown__menu::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}


.filter-action-container {
  gap: 24px;
}

/* mobile styles */
@media (max-width: 768px) {
  .filter-action-container {
    gap: 20px;
    margin-top: 24px !important;
  }

  .custom-dropdown__button {
    padding: 12.5px 55px 12.5px 24px;
    font-size: 12px;
    line-height: 100%;
    letter-spacing: -0.02em;
    flex: 1;
  }

  .custom-dropdown {
    flex: 1;
  }
  
  .custom-dropdown__label {
    font-size: 12px;
    line-height: 100%;
    letter-spacing: -0.02em;
  }
  
  .custom-dropdown__value {
    font-size: 12px;
    line-height: 100%;
    letter-spacing: -0.02em;
  }
  
  .custom-dropdown__button.has-value .custom-dropdown__label {
    font-size: 9px;
    line-height: 110%;
  }
  
  .custom-dropdown__menu {
    max-height: 200px;
    max-width: 280px;
  }
  
  .custom-dropdown__item {
    font-size: 12px;
    line-height: 100%;
    letter-spacing: -0.02em;
    padding: 10px 16px;
    min-height: 40px;
  }
}
