/* Styles moved out of blogs.html so the CSP can drop style-src 'unsafe-inline'. */

.newsletter-input.invalid {
  border: 1px solid #d33;
  outline: none;
}
.error-message {
  display: block;
  color: #d33;
  font-size: 0.85rem;
  min-height: 1em;
}

/* ============================================================
   Blogs listing — search + category filter toolbar
   ============================================================ */
.blog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

/* --- Search box --- */
.blog-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 280px;
  max-width: 420px;
}
.blog-search__icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--teal-600);
  pointer-events: none;
}
.blog-search__input {
  flex: 1;
  width: 100%;
  padding: 11px 16px 11px 42px;
  border: 1.5px solid var(--teal-100);
  border-radius: 999px;
  background: var(--white);
  color: var(--teal-900);
  font-size: 0.9rem;
  transition: var(--t);
}
.blog-search__input::placeholder {
  color: #9bb3b3;
}
.blog-search__input:focus {
  outline: none;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 4px rgba(42, 122, 122, 0.12);
}
.blog-search__btn {
  flex: none;
  padding: 10px 22px;
  border: none;
  border-radius: 999px;
  background: var(--teal-900);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--t);
}
.blog-search__btn:hover {
  background: var(--teal-700);
}

/* --- Filter form (search + sort + date) --- */
.blog-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  flex: 1 1 auto;
}

/* --- Sort / date fields: modern icon-led custom dropdowns --- */
.blog-field {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: none;
}
.blog-field__icon {
  position: absolute;
  left: 15px;
  color: var(--teal-700);
  pointer-events: none;
  opacity: 0.85;
}
.blog-select {
  flex: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 11px 40px 11px 40px;
  border: 1.5px solid var(--teal-100);
  border-radius: 999px;
  background-color: var(--white);
  /* custom chevron (teal-700) replaces the dated native select arrow */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%231e6060' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 15px;
  color: var(--teal-900);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(13, 59, 59, 0.05);
  transition: var(--t);
}
.blog-select:hover {
  border-color: var(--teal-400);
  box-shadow: 0 4px 12px rgba(13, 59, 59, 0.08);
}
.blog-select:focus-visible {
  outline: none;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 4px rgba(42, 122, 122, 0.12);
}
.blog-select option {
  color: var(--teal-900);
}

/* Cohesive depth across the whole filter bar */
.blog-search__input {
  box-shadow: 0 1px 2px rgba(13, 59, 59, 0.05);
}
.blog-search__btn {
  box-shadow: 0 2px 8px rgba(13, 59, 59, 0.12);
}
.blog-search__btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(13, 59, 59, 0.18);
}

/* --- Category chips --- */
.blog-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.blog-cat {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--teal-100);
  background: var(--white);
  color: var(--teal-700);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--t);
}
.blog-cat:hover {
  border-color: var(--teal-400);
  background: var(--teal-50);
  color: var(--teal-900);
}
.blog-cat.is-active {
  background: var(--teal-900);
  border-color: var(--teal-900);
  color: var(--white);
}

/* --- Result count / clear --- */
.blog-result-count {
  font-size: 0.85rem;
  color: #607878;
  margin-bottom: 20px;
}
.blog-clear {
  color: var(--teal-600);
  font-weight: 600;
  text-decoration: none;
}
.blog-clear:hover {
  text-decoration: underline;
}

/* --- Pagination --- */
.blog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 48px;
}
.blog-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1.5px solid var(--teal-100);
  background: var(--white);
  color: var(--teal-700);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--t);
}
.blog-page:hover {
  border-color: var(--teal-400);
  background: var(--teal-50);
  color: var(--teal-900);
}
.blog-page.is-active {
  background: var(--teal-900);
  border-color: var(--teal-900);
  color: var(--white);
  cursor: default;
}
.blog-page--nav {
  color: var(--teal-900);
}
.blog-page.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}
.blog-page-ellipsis {
  min-width: 24px;
  text-align: center;
  color: #9bb3b3;
  font-weight: 600;
}

/* --- Empty state --- */
.blog-empty {
  text-align: center;
  padding: 56px 20px;
  border: 1.5px dashed var(--teal-100);
  border-radius: 18px;
  background: var(--teal-50);
}
.blog-empty i {
  font-size: 2rem;
  color: var(--teal-400);
  display: block;
  margin-bottom: 10px;
}

@media (max-width: 575px) {
  .blog-toolbar {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }
  .blog-search {
    /* In the column layout, flex-grow would stretch the search box vertically and
       open a big gap before the chips — pin it to its content height. */
    flex: 0 0 auto;
    max-width: none;
  }
}
