/* ==========================================================================
   CATEGORY SECTION HEADER
   ========================================================================== */

.category-header {
  max-width: 1300px;
  margin: 0 auto;
  padding: 48px 40px 36px;
  text-align: center;
  border-bottom: 4px solid #2f2f2f;
}

.category-header.arts      { border-bottom-color: #a37c7c; }
.category-header.nations   { border-bottom-color: #7c8ba3; }
.category-header.stem      { border-bottom-color: #7ca38a; }
.category-header.culture   { border-bottom-color: #937ca3; }
.category-header.industry  { border-bottom-color: #a3917c; }
.category-header.opinion   { border-bottom-color: #888888; }
.category-header.local     { border-bottom-color: #6d7a71; }
.category-header.sports    { border-bottom-color: #b38b6d; }

.category-header-title {
  font-family: "Montserrat", sans-serif;
  font-size: 72px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1;
  color: #2f2f2f;
  margin: 0 0 14px;
  text-transform: uppercase;
}

.category-tagline {
  font-family: "Montserrat", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #8c7355;
  margin: 0 0 20px;
}

.category-description {
  font-family: "Droid Serif", serif;
  font-size: 17px;
  line-height: 1.75;
  color: #555;
  max-width: 780px;
  margin: 0 auto;
}

/* ==========================================================================
   LAYOUT - INDEX PAGE (SLEEK MAGAZINE GRID)
   ========================================================================== */

.magazine-layout {
  max-width: 1300px;
  margin: 0 auto;
  padding: 40px 20px;
}

.hero-section {
  margin-bottom: 50px;
  padding: 50px;
  background: linear-gradient(#f5f0eb, #f3ebe2);
  border: 1px solid #ddd;
  text-align: center;
  border-top: 5px solid #2f2f2f;
}

.hero-section:has(.arts) {
  border-top-color: #a37c7c;
}
.hero-section:has(.nations) {
  border-top-color: #7c8ba3;
}
.hero-section:has(.stem) {
  border-top-color: #7ca38a;
}
.hero-section:has(.culture) {
  border-top-color: #937ca3;
}
.hero-section:has(.industry) {
  border-top-color: #a3917c;
}
.hero-section:has(.opinion) {
  border-top-color: #888888;
}
.hero-section:has(.local) {
  border-top-color: #6d7a71;
}
.hero-section:has(.sports) {
  border-top-color: #b38b6d;
}

.tag {
  background-color: #2f2f2f;
  color: #fff;
  padding: 4px 12px;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 1px;
  font-weight: 700;
  display: inline-block;
  margin-bottom: 15px;
}

.hero-card h2 {
  font-family: "Montserrat", sans-serif;
  font-size: 48px;
  font-style: normal;
  line-height: 1.1;
  margin: 10px 0 20px 0;
  overflow-wrap: break-word;
}

.hero-link {
  text-decoration: none;
  color: #2f2f2f;
}

.hero-excerpt {
  font-size: 18px;
  line-height: 1.6;
  color: #555;
  margin-bottom: 25px;
  font-family: "Droid Serif", serif;
}

.read-more-btn {
  display: inline-block;
  background: transparent;
  border: 2px solid #2f2f2f;
  color: #2f2f2f;
  padding: 10px 25px;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.read-more-btn:hover {
  background: #2f2f2f;
  color: #fff;
}

.cards-container {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
  gap: 35px;
  width: 100%;
}

/* --- CATEGORY PILLS --- */

.category-pill {
  display: inline-block;
  font-family: "Montserrat", sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 15px;
  padding: 4px 10px;
  border-radius: 3px;
  color: #ffffff !important;
  align-self: flex-start;
}

.category-pill.arts {
  background-color: #a37c7c !important;
}
.category-pill.nations {
  background-color: #7c8ba3 !important;
}
.category-pill.stem {
  background-color: #7ca38a !important;
}
.category-pill.culture {
  background-color: #937ca3 !important;
}
.category-pill.industry {
  background-color: #a3917c !important;
}
.category-pill.opinion {
  background-color: #888888 !important;
}
.category-pill.local {
  background-color: #6d7a71 !important;
}
.category-pill.sports {
  background-color: #b38b6d !important;
}

/* --- GRID CARDS --- */

.news-card {
  background: linear-gradient(#f5f0eb, #f3ebe2);
  padding: 30px;
  border: 1px solid #ddd;
  border-top: 5px solid #2f2f2f;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
}

.news-card:has(.arts) {
  border-top-color: #a37c7c;
}
.news-card:has(.nations) {
  border-top-color: #7c8ba3;
}
.news-card:has(.stem) {
  border-top-color: #7ca38a;
}
.news-card:has(.culture) {
  border-top-color: #937ca3;
}
.news-card:has(.industry) {
  border-top-color: #a3917c;
}
.news-card:has(.opinion) {
  border-top-color: #888888;
}
.news-card:has(.local) {
  border-top-color: #6d7a71;
}
.news-card:has(.sports) {
  border-top-color: #b38b6d;
}

.news-card:hover {
  transform: translateY(-6px);
  background: linear-gradient(#faf7f4, #f8f1e9);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.news-card h3 {
  font-family: "Montserrat", sans-serif;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 15px;
  color: #1a1a1a;
  text-align: center;
}

.card-link {
  text-decoration: none;
  color: #2f2f2f;
}

.card-link:hover {
  text-decoration: underline;
}

.source-label {
  display: block;
  text-align: center;
  font-size: 12px;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8c7355;
  margin-bottom: 14px;
}

.card-excerpt {
  font-size: 15px;
  color: #4a4a4a;
  line-height: 1.6;
  margin-bottom: 25px;
  font-family: "Droid Serif", serif;
  flex-grow: 1;
}

.text-link {
  color: #2f2f2f;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  border-bottom: 2px solid #ddd;
  align-self: flex-start;
}

.text-link:hover {
  border-bottom-color: #2f2f2f;
}

/* ==========================================================================
   NEWSPAPER COLUMN LAYOUT
   ========================================================================== */

.newspaper-columns {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.col-primary {
  flex: 6;
  padding-right: 44px;
  border-right: 1px solid #cfccc3;
}

.col-secondary {
  flex: 4;
  padding-left: 44px;
}

.primary-story {
  padding: 24px;
  background: linear-gradient(#f5f0eb, #f3ebe2);
  border: 1px solid #ddd;
  border-top: 5px solid #2f2f2f;
  border-radius: 4px;
  margin-bottom: 20px;
}

.primary-story:has(.arts)     { border-top-color: #a37c7c; }
.primary-story:has(.nations)  { border-top-color: #7c8ba3; }
.primary-story:has(.stem)     { border-top-color: #7ca38a; }
.primary-story:has(.culture)  { border-top-color: #937ca3; }
.primary-story:has(.industry) { border-top-color: #a3917c; }
.primary-story:has(.opinion)  { border-top-color: #888888; }
.primary-story:has(.local)    { border-top-color: #6d7a71; }
.primary-story:has(.sports)   { border-top-color: #b38b6d; }

.primary-story h3 {
  font-family: "Montserrat", sans-serif;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
  margin: 8px 0 10px;
  text-align: left;
  color: #1a1a1a;
}

.story-excerpt {
  font-family: "Droid Serif", serif;
  font-size: 15px;
  line-height: 1.65;
  color: #4a4a4a;
  margin-bottom: 14px;
}

.secondary-story {
  padding: 16px;
  background: linear-gradient(#f5f0eb, #f3ebe2);
  border: 1px solid #ddd;
  border-top: 5px solid #2f2f2f;
  border-radius: 4px;
  margin-bottom: 14px;
}

.secondary-story:has(.arts)     { border-top-color: #a37c7c; }
.secondary-story:has(.nations)  { border-top-color: #7c8ba3; }
.secondary-story:has(.stem)     { border-top-color: #7ca38a; }
.secondary-story:has(.culture)  { border-top-color: #937ca3; }
.secondary-story:has(.industry) { border-top-color: #a3917c; }
.secondary-story:has(.opinion)  { border-top-color: #888888; }
.secondary-story:has(.local)    { border-top-color: #6d7a71; }
.secondary-story:has(.sports)   { border-top-color: #b38b6d; }

.secondary-story h4 {
  font-family: "Montserrat", sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  margin: 6px 0 6px;
  color: #1a1a1a;
}

.col-primary .source-label,
.col-secondary .source-label {
  text-align: left;
}

/* ============================================================
   RSS feed + subcategory hub (category.html.erb / homepage feed)
   ============================================================ */
.section-label {
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #2f2f2f;
  margin: 0;
}

.featured-section,
.feed-section {
  max-width: 1300px;
  margin: 0 auto;
  padding: 28px 40px;
}

.featured-section {
  border-bottom: 1px solid #e0dccf;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 18px;
}

.featured-card {
  padding: 20px;
  background: linear-gradient(#f5f0eb, #f3ebe2);
  border: 1px solid #ddd;
  border-top: 4px solid #2f2f2f;
  border-radius: 4px;
}

.featured-card:has(.arts)     { border-top-color: #a37c7c; }
.featured-card:has(.nations)  { border-top-color: #7c8ba3; }
.featured-card:has(.stem)     { border-top-color: #7ca38a; }
.featured-card:has(.culture)  { border-top-color: #937ca3; }
.featured-card:has(.industry) { border-top-color: #a3917c; }
.featured-card:has(.opinion)  { border-top-color: #888888; }
.featured-card:has(.local)    { border-top-color: #6d7a71; }
.featured-card:has(.sports)   { border-top-color: #b38b6d; }

.featured-card h3 {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.35;
  margin: 8px 0 6px;
}

.featured-card .card-link {
  color: #2f2f2f;
  text-decoration: none;
}

.featured-card .card-link:hover {
  text-decoration: underline;
}

/* --- feed header + live count --- */
.feed-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.feed-count {
  font-family: "Montserrat", sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #8c7355;
}

/* --- subcategory multi-select chips --- */
.subcat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.subcat-chip {
  display: inline-block;
  font-family: "Montserrat", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #2f2f2f;
  background: transparent;
  border: 1px solid #2f2f2f;
  border-radius: 999px;
  padding: 6px 16px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.subcat-chip:hover {
  background: #ece8dd;
}

.subcat-chip.is-active {
  background: #2f2f2f;
  color: #f9f7f1;
}

/* --- feed cards --- */
/* Multi-select subcategory filter hides non-matching column cards. */
.primary-story[hidden],
.secondary-story[hidden] {
  display: none;
}

/* --- breadcrumbs (article + subcategory pages) --- */
.breadcrumbs {
  max-width: 1300px;
  margin: 0 auto;
  padding: 18px 40px 0;
  font-family: "Montserrat", sans-serif;
  font-size: 12px;
  letter-spacing: 0.5px;
  color: #777;
}

.breadcrumb-link {
  color: #8c7355;
  text-decoration: none;
}

.breadcrumb-link:hover {
  text-decoration: underline;
}

.breadcrumb-sep {
  margin: 0 8px;
  color: #bbb;
}

.breadcrumb-current {
  color: #2f2f2f;
  font-weight: 600;
}

/* --- homepage / category: latest feed on top, featured below --- */
.homepage-featured-label {
  max-width: 1300px;
  margin: 0 auto;
  padding: 32px 40px 0;
}

.featured-section.featured-below {
  border-bottom: none;
  border-top: 1px solid #e0dccf;
  margin-top: 4px;
}

