/**
 * ARA Blog theme – news listing and content styles.
 * Loaded after vendor Bootstrap, Font Awesome, and site custom CSS.
 */

/* Active nav item on blog */
.navbar-nav .nav-link.active {
  color: var(--ara-blue);
  font-weight: 600;
}

.navigation-menu-container[hidden],
.site-search-container[hidden] {
  display: none !important;
}

.navigation-menu-container.is-open {
  display: block;
}

.site-search-container.is-open {
  display: block;
}

/* Announcement ticker (matches primary site) */
.announcement-bar {
  background-color: #ffeb3b;
}

.announcement-container {
  padding: 5px 0;
  position: relative;
}

.announcement-container .close {
  position: absolute;
  right: 14px;
  top: 5px;
  padding: 0;
  font-size: 30px;
  opacity: 1;
  background: none;
  border: none;
  line-height: 1;
  cursor: pointer;
}

.announcement-container .close:hover {
  color: #00529b;
}

.announcement-container .banner-announcement-list {
  list-style: none;
  padding: 0 40px 0 0;
  margin: 5px 0;
}

.announcement-container .banner-announcement-list li {
  padding: 5px;
}

.announcement-container .announcement-link {
  margin-left: 14px;
  font-size: 16px;
  color: #000;
  text-decoration: none;
}

.announcement-container .announcement-link:hover {
  color: #00529b;
  text-decoration: underline;
}

.announcement-container .announcement-link::before {
  font-weight: 900;
  display: inline-block;
  content: '\f06a';
  font-family: 'FontAwesome';
  font-size: 25px;
  padding-right: 5px;
}

/* Blog main content */
.ara-blog-main {
  background: var(--ara-bg, #f8fafc);
  min-height: 50vh;
}

.ara-blog-container {
  padding: 2.5rem 15px 4rem;
}

.ara-page-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  box-shadow: none;
}

.ara-page-header .page-title {
  font-size: 2rem;
  font-weight: 600;
  color: var(--ara-navy, #1a3a5c);
  margin: 0 0 0.5rem;
}

.ara-page-header .page-subtitle {
  color: var(--ara-text-muted, #64748b);
  margin: 0;
  font-size: 1.1rem;
}

.ara-page-search-form .input-group {
  max-width: 320px;
  margin: 0;
  margin-left: auto;
}

/* News index: title left, search right */
.ara-page-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 2rem;
}

.ara-page-header-row .ara-page-header {
  margin-bottom: 0;
  padding-bottom: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.ara-page-header-row .ara-page-header .page-title {
  margin-bottom: 0;
}

.ara-page-header-row .ara-news-search-section {
  flex: 0 1 auto;
  min-width: min(100%, 20rem);
}

.ara-page-header-row .ara-news-search {
  justify-content: flex-end;
  margin-bottom: 0;
}

.ara-page-header-row .ara-page-search-form {
  width: 100%;
  max-width: 24rem;
}

.ara-page-header-row .ara-page-search-form .input-group {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.ara-page-header-row .ara-page-search-form .form-control {
  font-size: 1rem;
  padding: 0.5rem 0.875rem;
}

.ara-page-header-row .ara-page-search-form .btn {
  font-size: 1rem;
  padding: 0.5rem 1.125rem;
}

/* Post cards */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* News index: lead + three secondary (page 1) + three-column grid */
.post-list--news {
  gap: 2rem;
}

.post-list--archive {
  gap: 0;
}

.post-list__home-teasers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.post-card--teaser {
  padding: 1.25rem 1.35rem;
}

.post-card--teaser .post-card__title {
  font-size: 1.3rem;
  margin: 0 0 0.4rem;
  line-height: 1.35;
}

.post-card--teaser .post-card__meta {
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
}

.post-card--teaser .post-card__excerpt {
  font-size: 0.9rem;
  margin-bottom: 0;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ara-news-view-all__btn {
  background-color: var(--ara-blue, #007cad);
  border-color: var(--ara-blue, #007cad);
  padding: 0.6rem 1.75rem;
  font-weight: 600;
}

.ara-news-view-all__btn:hover,
.ara-news-view-all__btn:focus {
  background-color: var(--ara-blue-dark, #005f85);
  border-color: var(--ara-blue-dark, #005f85);
}

.post-list__featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

.post-list__featured-primary .post-card {
  height: 100%;
}

.post-list__featured-secondary {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.post-list__featured-secondary .post-card {
  flex: 1;
}

.post-list__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.post-card--featured .post-card__title {
  font-size: 1.65rem;
}

.post-card--featured .post-card__thumbnail {
  display: block;
  margin: -0.25rem -0.25rem 1rem;
  border-radius: calc(var(--ara-radius, 0.625rem) - 2px) calc(var(--ara-radius, 0.625rem) - 2px) 0 0;
  overflow: hidden;
}

.post-card--featured .post-card__thumbnail img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.post-card--compact .post-card__media-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.post-card--compact .post-card__thumbnail {
  flex: 0 0 8rem;
  width: 8rem;
  height: 8rem;
  min-height: 8rem;
  max-height: 8rem;
  display: flex;
  margin: 0;
  border-radius: 0.35rem;
  overflow: hidden;
}

.post-card--compact .post-card__thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card--compact .post-card__thumbnail-placeholder {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 100%;
  aspect-ratio: unset;
}

.post-card--compact .post-card__body {
  flex: 1;
  min-width: 0;
}

.post-card__thumbnail-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: linear-gradient(145deg, #e8f4f8 0%, #d4e8f0 50%, #c5dde8 100%);
}

.post-card--featured .post-card__thumbnail-placeholder {
  aspect-ratio: 16 / 9;
}

.post-card__thumbnail-placeholder img {
  width: auto;
  height: auto;
  max-width: 38%;
  max-height: 42%;
  object-fit: contain;
  opacity: 0.85;
}

.post-card--compact .post-card__thumbnail-placeholder img {
  max-width: 70%;
  max-height: 70%;
}

.post-card--compact {
  padding: 1rem 1.15rem;
}

.post-card--compact .post-card__title {
  font-size: 1.2rem;
  margin: 0 0 0.35rem;
  line-height: 1.3;
}

.post-card--compact .post-card__meta {
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
}

.post-card--compact .post-card__excerpt {
  font-size: 0.9rem;
  margin-bottom: 0;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card {
  background: #fff;
  border: 1px solid var(--ara-border, #e2e8f0);
  border-radius: var(--ara-radius, 0.625rem);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--ara-shadow-sm);
  transition: var(--ara-transition);
}

.post-card:hover {
  box-shadow: var(--ara-shadow-md);
}

.post-card__title {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  line-height: 1.35;
}

.post-card__title a {
  color: var(--ara-navy, #1a3a5c);
  text-decoration: none;
}

.post-card__title a:hover {
  color: var(--ara-blue, #007cad);
  text-decoration: underline;
}

.post-card__meta {
  font-size: 0.9rem;
  color: var(--ara-text-muted, #64748b);
  margin-bottom: 0.75rem;
}

.post-card__meta-sep {
  margin: 0 0.5rem;
}

.post-card__category {
  color: var(--ara-blue, #007cad);
  text-decoration: none;
}

.post-card__category:hover {
  text-decoration: underline;
}

.post-card__excerpt {
  color: var(--ara-text, #1e293b);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.post-card__excerpt p {
  margin: 0;
}

.post-card__read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 500;
  color: var(--ara-blue, #007cad);
  text-decoration: none;
}

.post-card__read-more:hover {
  color: var(--ara-blue-dark, #005a8e);
  text-decoration: underline;
}

/* Single post */
@media (min-width: 992px) {
  .single-post-layout {
    --bs-gutter-x: 2.5rem;
  }
}

@media (max-width: 991.98px) {
  .single-post-layout .ara-blog-sidebar {
    margin-top: 2rem;
  }
}

.single-post__title {
  font-size: 2rem;
  font-weight: 600;
  color: var(--ara-navy, #1a3a5c);
  margin: 0 0 0.75rem;
  line-height: 1.25;
}

.single-post__thumbnail {
  margin: 1.5rem 0;
}

.single-post__thumbnail img {
  max-width: 100%;
  height: auto;
  border-radius: var(--ara-radius, 0.625rem);
}

.single-post__content {
  line-height: 1.7;
  color: var(--ara-text, #1e293b);
}

.single-post__content h2,
.single-post__content h3 {
  color: var(--ara-navy, #1a3a5c);
  margin-top: 1.5rem;
}

.single-post__content a {
  color: var(--ara-blue, #007cad);
}

.single-post__content img {
  max-width: 100%;
  height: auto;
}

.single-post__footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ara-border, #e2e8f0);
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ara-blue, #007cad);
  font-weight: 500;
  text-decoration: none;
}

.btn-back:hover {
  color: var(--ara-blue-dark, #005a8e);
  text-decoration: underline;
}

/* Sidebar */
.ara-blog-sidebar .widget {
  background: #fff;
  border: 1px solid var(--ara-border, #e2e8f0);
  border-radius: var(--ara-radius, 0.625rem);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--ara-shadow-sm);
}

.ara-blog-sidebar .widget-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ara-navy, #1a3a5c);
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--ara-green, #00a651);
}

.ara-blog-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ara-blog-sidebar li {
  margin-bottom: 0.4rem;
}

.ara-blog-sidebar a {
  color: var(--ara-blue, #007cad);
  text-decoration: none;
}

.ara-blog-sidebar a:hover {
  text-decoration: underline;
}

/* Latest News sidebar (BBC Top Stories–style promos) */
.ara-blog-sidebar .widget-top-stories {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.ara-blog-sidebar .widget-top-stories .widget-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ara-navy, #1a3a5c);
  margin: 0 0 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--ara-border, #e2e8f0);
}

.ara-blog-sidebar .widget-top-stories .top-stories-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ara-blog-sidebar .widget-top-stories .top-stories-list__item {
  margin: 0;
  border-bottom: 1px solid var(--ara-border, #e2e8f0);
}

.ara-blog-sidebar .widget-top-stories .top-stories-list__item:last-child {
  border-bottom: none;
}

.ara-blog-sidebar .widget-top-stories .top-stories-list__link {
  display: block;
  padding: 1rem 0;
  text-decoration: none;
  color: inherit;
}

.ara-blog-sidebar .widget-top-stories .top-stories-list__link:hover {
  text-decoration: none;
}

.ara-blog-sidebar .widget-top-stories .top-stories-list__link:hover .top-stories-list__headline {
  text-decoration: underline;
}

.ara-blog-sidebar .widget-top-stories .top-stories-list__headline {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ara-navy, #1a3a5c);
  margin-bottom: 0.35rem;
}

.ara-blog-sidebar .widget-top-stories .top-stories-list__date {
  display: block;
  font-size: 0.8125rem;
  color: var(--ara-text-muted, #64748b);
}

/* Pagination */
.navigation.pagination {
  margin-top: 2rem;
}

.navigation.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.navigation.pagination a,
.navigation.pagination span {
  display: inline-block;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--ara-border, #e2e8f0);
  border-radius: var(--ara-radius, 0.625rem);
  background: #fff;
  color: var(--ara-navy, #1a3a5c);
  text-decoration: none;
}

.navigation.pagination a:hover {
  background: var(--ara-blue, #007cad);
  border-color: var(--ara-blue, #007cad);
  color: #fff;
}

.navigation.pagination .current {
  background: var(--ara-blue, #007cad);
  border-color: var(--ara-blue, #007cad);
  color: #fff;
}

/* Site search panel in header */
.site-search-panel {
  padding: 1.5rem 0;
}

.site-search-panel .gsc-control-cse {
  max-width: 600px;
  margin: 0 auto;
  padding: 0;
  border: none;
  background: transparent;
}

.site-search-panel .gsc-search-box {
  margin: 0;
}

/* Footer link contrast */
.footer .footer-link {
  color: #fff;
}

@media (max-width: 991px) {
  .ara-blog-container {
    padding-top: 1.5rem;
  }

  .post-list__featured {
    grid-template-columns: 1fr;
  }

  .post-list__grid,
  .post-list__home-teasers {
    grid-template-columns: repeat(2, 1fr);
  }

  .ara-page-header .page-title {
    font-size: 1.5rem;
  }

  .ara-page-header-row {
    flex-direction: column;
    align-items: stretch;
  }

  .ara-page-header-row .ara-news-search {
    justify-content: stretch;
  }

  .ara-page-header-row .ara-page-search-form {
    max-width: none;
  }
}

@media (max-width: 575px) {
  .post-list__grid,
  .post-list__home-teasers {
    grid-template-columns: 1fr;
  }
}
