/**
 * News and Insights Template Styles
 *
 * Refactored to remove !important and match theme standards.
 * Uses mobile-first responsive design and theme variables.
 */

/* ============================================
   Section Layout
   ============================================ */

.news-insights-section {
  width: 100%;
}

.news-insights-section.section-base {
  padding-top: 0;
}
/* ============================================
   Filter Section
   ============================================ */

.news-filter-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-9); /* 20px */
  margin-bottom: var(--space-17); /* 40px base */
}

.news-filter-label {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-base);
  text-transform: uppercase;
  margin: 0;
  font-weight: var(--font-weight-normal);
}

.news-filter-buttons {
  display: flex;
  gap: var(--space-7); /* 16px */
  flex-wrap: wrap;
  justify-content: center;
}

/* Filter Buttons - Standard .btn component overrides */
.news-insights-section .filter-btn {
  min-width: 9rem;
}

/* ============================================
   Post Listing Grid
   ============================================ */

.news-post-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-17); /* 40px base */
}

.news-post-card {
  --bs-gutter-y: 2rem;
  --bs-gutter-x: 2rem;
}
/* Post Item Wrapper */
.news-post-item {
  width: 100%;
}
.news-post-image-wrap {
  display: flex;
}
.news-post-image-wrap a {
  height: 100%;
  width: 100%;
}
/* Post Image Area */

.news-post-image {
  width: 100%;
  height: 100%;
  min-height: 11.75rem;
  object-fit: cover;
  border-radius: var(--radius-2xl);
  display: block;
  aspect-ratio: 200 / 234;
}

/* Tablet & Desktop Adjustments */
@media (min-width: 768px) {
  .news-post-card {
    align-items: stretch;
  }
  .news-post-image {
    max-width: 100%; /* Let Bootstrap column control size on tablet+ */
  }
}

/* Post Content Area */
.news-post-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-9);
}

/* Header (Category + Title) */
.news-post-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-5); /* 12px */
}

.news-post-category {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-base);
  text-transform: uppercase;
  margin: 0;
  line-height: var(--line-height-tight);
}

.news-post-title {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-24);
  margin: 0;
  padding: 0;
  line-height: 1.4;
  font-weight: var(--font-weight-normal);
}

.news-post-title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-base);
}

.news-post-title a:hover {
  color: var(--bs-primary-300);
}

/* Footer (Date + Arrow) */
.news-post-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: auto;
  padding-bottom: var(--space-9);
  border-bottom: 0.0625rem solid rgba(var(--bs-primary-50-rgb), 0.3);
}

.news-post-date {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-14);
  text-transform: uppercase;
  margin: 0;
  line-height: 1.4;
}

.news-post-arrow {
  display: flex;
  transition: transform var(--transition-base);
}

.news-post-arrow:hover {
  transform: translateX(0.375rem);
}

.news-post-arrow svg {
  fill: currentColor;
}

/* ============================================
   RESPONSIVE DESIGN (Desktop First -> Mobile First)
   ============================================ */

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
  .news-filter-wrap {
    margin-bottom: var(--space-21); /* 64px */
  }

  .news-post-list {
    gap: var(--space-21); /* 64px */
  }

  .news-post-content {
    gap: var(--space-14);
  }

  .news-post-title {
    font-size: var(--font-size-30);
    line-height: 1.25;
    max-width: 37.125rem;
  }

  .news-post-date {
    font-size: var(--font-size-16);
    line-height: 1.2;
  }

  .news-post-footer {
    padding-bottom: var(--space-11);
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  .news-filter-wrap {
    margin-bottom: var(--space-22); /* 80px */
  }

  .news-post-list {
    gap: var(--space-22); /* 80px */
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .news-insights-section * {
    transition: none;
    animation: none;
  }
}
