/*
 * Full Protection Child - Blog/news enhancements v1.2.4
 */

/* Category filters --------------------------------------------------------- */
.fp-news__tabs {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scrollbar-color: #d1d5db transparent;
  padding-top: 2px;
}

.fp-news__tab {
  flex: 0 0 auto;
  position: relative;
  border-radius: 8px 8px 0 0;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.fp-news__tab:hover {
  color: #b91c1c;
  background: rgba(209, 26, 34, 0.05);
}

.fp-news__tab.is-active {
  color: #111827;
  background: rgba(209, 26, 34, 0.045);
  border-bottom-color: #d11a22;
  font-weight: 700;
}

.fp-news__tab:focus {
  outline: none;
}

.fp-news__tab:focus-visible {
  outline: 3px solid rgba(209, 26, 34, 0.22);
  outline-offset: -2px;
}

.fp-news__searchicon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
}

.fp-news__searchicon svg {
  width: 18px;
  height: 18px;
}

.fp-news__search input[type="search"]::-webkit-search-cancel-button {
  cursor: pointer;
}

/* AJAX state --------------------------------------------------------------- */
.fp-news [data-fp-news-grid] {
  transition: opacity 160ms ease;
}

.fp-news.is-loading [data-fp-news-grid] {
  opacity: 0.45;
  pointer-events: none;
}

.fp-news.is-loading .fp-news__meta::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 8px;
  border: 2px solid #d1d5db;
  border-top-color: #d11a22;
  border-radius: 50%;
  vertical-align: -2px;
  animation: fp-child-blog-spin 700ms linear infinite;
}

@keyframes fp-child-blog-spin {
  to { transform: rotate(360deg); }
}

.fp-news__empty {
  grid-column: 1 / -1;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  background: #fff;
  color: #475569;
  font-size: 15px;
  text-align: center;
}

/* Reading time on cards ---------------------------------------------------- */
.fp-news-card__meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.fp-news-card__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.fp-news-card__meta-item svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
}

.fp-news-card__meta-separator {
  color: #cbd5e1;
}

.fp-news-card__read-time {
  white-space: nowrap;
}

.fp-news-card__body {
  display: flex;
  flex-direction: column;
  min-height: 205px;
}

.fp-news-card__more {
  margin-top: auto;
  padding-top: 1rem;
}

/* Single article ----------------------------------------------------------- */
.fp-child-article {
  padding: 34px 0 76px;
  background: #f4f5f7;
}

.fp-child-article__container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.fp-child-article__back-nav {
  margin: 0 auto 18px;
  max-width: 980px;
}

.fp-child-article__back,
.fp-child-article__bottom-back {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #c81f26;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  text-decoration: none;
}

.fp-child-article__back:hover,
.fp-child-article__bottom-back:hover {
  color: #991b1b;
  text-decoration: none;
}

.fp-child-article__back span,
.fp-child-article__bottom-back span {
  font-size: 19px;
  line-height: 1;
  transition: transform 160ms ease;
}

.fp-child-article__back:hover span,
.fp-child-article__bottom-back:hover span {
  transform: translateX(-3px);
}

.fp-child-article__card {
  max-width: 980px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.09);
}

.fp-child-article__featured {
  margin: 24px 24px 0;
  overflow: hidden;
  border-radius: 16px;
  background: #eef2f6;
}

.fp-child-article__featured img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 580px;
  object-fit: cover;
}

.fp-child-article__inner {
  padding: 34px clamp(24px, 5vw, 64px) 46px;
}

.fp-child-article__header {
  max-width: 820px;
  margin: 0 auto 34px;
}

.fp-child-article__category {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.075em;
  line-height: 1;
  text-decoration: none;
}

.fp-child-article__category:hover {
  color: #fff;
  filter: brightness(0.94);
  text-decoration: none;
}

.fp-child-article__category.fp-badge--cert { background: #2563eb; }
.fp-child-article__category.fp-badge--event { background: #ef4444; }
.fp-child-article__category.fp-badge--news { background: #64748b; }

.fp-child-article__title {
  margin: 0;
  color: #101827;
  font-size: clamp(2rem, 4.5vw, 3.35rem);
  font-weight: 800;
  letter-spacing: 0.015em;
  line-height: 1.08;
  text-wrap: balance;
}

.fp-child-article__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 20px;
  color: #64748b;
  font-size: 14px;
}

.fp-child-article__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.fp-child-article__meta-item svg {
  width: 16px;
  height: 16px;
  color: #c81f26;
}

.fp-child-article__meta-divider {
  color: #cbd5e1;
}

.fp-child-article__body {
  max-width: 820px;
  margin: 0 auto;
  color: #334155;
  font-size: 16px;
  line-height: 1.78;
}

.fp-child-article__body > :first-child {
  margin-top: 0;
}

.fp-child-article__body > :last-child {
  margin-bottom: 0;
}

.fp-child-article__body p,
.fp-child-article__body ul,
.fp-child-article__body ol,
.fp-child-article__body blockquote,
.fp-child-article__body table,
.fp-child-article__body figure {
  margin-top: 0;
  margin-bottom: 1.35em;
}

.fp-child-article__body h2,
.fp-child-article__body h3,
.fp-child-article__body h4 {
  margin-top: 1.55em;
  margin-bottom: 0.65em;
  color: #101827;
  line-height: 1.2;
}

.fp-child-article__body h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); }
.fp-child-article__body h3 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
.fp-child-article__body h4 { font-size: 1.2rem; }

.fp-child-article__body a {
  color: #c81f26;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.fp-child-article__body img,
.fp-child-article__body figure,
.fp-child-article__body .wp-caption {
  max-width: 100%;
  border-radius: 16px;
}

.fp-child-article__body img {
  height: auto;
}

.fp-child-article__body blockquote {
  padding: 18px 22px;
  border-left: 4px solid #d11a22;
  border-radius: 0 10px 10px 0;
  background: #fff5f5;
  color: #475569;
}

.fp-child-article__body table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

.fp-child-article__body th,
.fp-child-article__body td {
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  text-align: left;
}

.fp-child-article__page-links {
  margin-top: 28px;
  font-weight: 700;
}

.fp-child-article__footer {
  max-width: 820px;
  margin: 42px auto 0;
  padding-top: 32px;
  border-top: 1px solid #e5e7eb;
}

.fp-child-article__categories {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  color: #334155;
  font-size: 14px;
}

.fp-child-article__category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fp-child-article__category-list a {
  display: inline-flex;
  padding: 6px 11px;
  border: 1px solid #fecaca;
  border-radius: 999px;
  background: #fff7f7;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.fp-child-article__category-list a:hover {
  border-color: #d11a22;
  background: #d11a22;
  color: #fff;
}

.fp-child-article__author {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #f8fafc;
}

.fp-child-article__author-avatar {
  flex: 0 0 76px;
}

.fp-child-article__avatar {
  display: block;
  width: 76px;
  height: 76px;
  border: 3px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 5px 16px rgba(15, 23, 42, 0.13);
}

.fp-child-article__author-copy {
  min-width: 0;
}

.fp-child-article__author-label {
  display: block;
  margin-bottom: 2px;
  color: #c81f26;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.fp-child-article__author-name {
  margin: 0;
  color: #101827;
  font-size: 21px;
  line-height: 1.2;
}

.fp-child-article__author-bio {
  margin: 8px 0 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.55;
}

.fp-child-article__author-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
  color: #64748b;
  font-size: 12px;
}

.fp-child-article__bottom-back {
  margin-top: 30px;
}

@media (max-width: 767px) {
  .fp-news__tabs {
    gap: 12px;
    margin-right: -1rem;
    padding-right: 1rem;
  }

  .fp-news-card__meta-separator {
    display: none;
  }

  .fp-news-card__meta-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .fp-child-article {
    padding: 24px 0 52px;
  }

  .fp-child-article__container {
    width: min(100% - 20px, 1120px);
  }

  .fp-child-article__card {
    border-radius: 15px;
  }

  .fp-child-article__featured {
    margin: 10px 10px 0;
    border-radius: 12px;
  }

  .fp-child-article__inner {
    padding: 27px 20px 34px;
  }

  .fp-child-article__header {
    margin-bottom: 27px;
  }

  .fp-child-article__title {
    font-size: clamp(1.85rem, 9vw, 2.55rem);
  }

  .fp-child-article__meta-divider {
    display: none;
  }

  .fp-child-article__meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .fp-child-article__body {
    font-size: 15.5px;
  }

  .fp-child-article__author {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
  }

  .fp-child-article__author-avatar {
    flex-basis: auto;
  }

  .fp-child-article__avatar {
    width: 64px;
    height: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fp-news [data-fp-news-grid],
  .fp-news__tab,
  .fp-child-article__back span,
  .fp-child-article__bottom-back span {
    transition: none;
  }

  .fp-news.is-loading .fp-news__meta::after {
    animation-duration: 1.4s;
  }
}
