/* client/src/pages/news.css */
/* Base responsive and utility */
/* SECTION 1: Hero */
.scc-news-hero {
  background-color: var(--scc-primary);
  color: white;
  text-align: center;
  padding: clamp(2.5rem, 6vw, 5rem) 1rem;
  padding-top: calc(80px + clamp(2.5rem, 6vw, 5rem));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 25vh;
}
@media (min-width: 768px) {
  .scc-news-hero { padding-top: calc(120px + clamp(2.5rem, 6vw, 5rem)); }
}
@media (min-width: 992px) {
  .scc-news-hero { min-height: 30vh; }
}
.scc-news-hero h1 {
  font-family: var(--scc-font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: var(--scc-weight-bold);
  margin-bottom: 1rem;
}
.scc-news-hero p {
  opacity: 0.85;
  max-width: 600px;
  font-size: var(--scc-text-lg);
}

/* SECTION 2: Featured */
.scc-news-featured {
  background-color: var(--scc-surface-warm);
  padding: clamp(2.5rem, 6vw, 5rem) 1rem;
}
.scc-news-featured-card {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.3s ease;
}
.scc-news-featured-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
}
.scc-news-featured-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background-color: var(--scc-border-light);
  max-height: 220px;
}
.scc-news-featured-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
@media (min-width: 992px) {
  .scc-news-featured-card {
    flex-direction: row;
  }
  .scc-news-featured-image {
    width: 45%;
    max-height: none;
    border-radius: 12px 0 0 12px;
  }
  .scc-news-featured-content {
    width: 55%;
    padding: 2.5rem;
    justify-content: center;
  }
}
.scc-news-badge {
  font-size: var(--scc-text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  background: var(--scc-accent);
  color: white;
  font-weight: var(--scc-weight-semibold);
  display: inline-block;
  align-self: flex-start;
}
.scc-news-featured-title {
  font-family: var(--scc-font-heading);
  color: var(--scc-primary);
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: var(--scc-weight-bold);
}
.scc-news-meta {
  color: var(--scc-muted-text);
  font-size: var(--scc-text-sm);
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.scc-news-featured-excerpt {
  color: var(--scc-foreground);
  font-size: var(--scc-text-base);
  line-height: var(--scc-leading-relaxed);
}
.scc-news-read-more {
  color: var(--scc-success);
  font-size: var(--scc-text-sm);
  font-weight: var(--scc-weight-semibold);
  margin-top: 0.5rem;
}

/* SECTION 3: Filters */
.scc-news-filters-section {
  background: white;
  padding: 1.5rem 1rem;
  border-bottom: 1px solid var(--scc-border-light);
  box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}
@media (min-width: 768px) {
  .scc-news-filters-section {
    position: sticky;
    top: 0;
    z-index: 100;
  }
}
.scc-news-filters-container {
  max-width: 1200px;
  margin: 0 auto;
}
.scc-news-filters-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}
@media (min-width: 992px) {
  .scc-news-filters-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.scc-news-categories {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.5rem;
}
.scc-news-categories::-webkit-scrollbar {
  display: none;
}
.scc-news-filter-btn {
  font-size: var(--scc-text-sm);
  padding: 0.375rem 1rem;
  border-radius: 20px;
  border: 1px solid var(--scc-border-input);
  background: white;
  color: var(--scc-foreground);
  cursor: pointer;
  transition: all 0.2s;
}
.scc-news-filter-btn:hover {
  background: var(--scc-divider);
}
.scc-news-filter-btn.active {
  color: white;
  border-color: transparent;
}
.scc-news-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
@media (min-width: 576px) {
  .scc-news-controls {
    flex-direction: row;
    align-items: center;
  }
}
.scc-news-toggle {
  display: flex;
  background: var(--scc-divider);
  border-radius: 6px;
  padding: 2px;
}
.scc-news-toggle-btn {
  padding: 0.375rem 0.75rem;
  font-size: var(--scc-text-sm);
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--scc-foreground);
  cursor: pointer;
}
.scc-news-toggle-btn.active {
  background: var(--scc-primary);
  color: white;
}
.scc-news-search {
  position: relative;
  display: flex;
  align-items: center;
}
.scc-news-search input {
  height: 40px;
  border-radius: 20px;
  border: 1px solid var(--scc-border-input);
  padding: 0 1rem 0 2.5rem;
  font-size: var(--scc-text-sm);
  width: 100%;
}
@media (min-width: 992px) {
  .scc-news-search input {
    width: 200px;
  }
}
.scc-news-search input:focus {
  outline: none;
  border-color: var(--scc-success);
  box-shadow: 0 0 0 2px rgba(62, 112, 56, 0.2);
}
.scc-news-search-icon {
  position: absolute;
  left: 0.75rem;
  color: var(--scc-muted-text);
}
.scc-news-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--scc-text-sm);
  color: var(--scc-muted-text);
}
.scc-news-clear-btn {
  color: var(--scc-success);
  background: none;
  border: none;
  cursor: pointer;
}

/* SECTION 4: Grid */
.scc-news-grid-section {
  padding: clamp(2.5rem, 6vw, 5rem) 1rem;
  max-width: 1200px;
  margin: 0 auto;
}
/* Desktop: 2-col layout — cards on the left, sidebar in the right gutter. */
@media (min-width: 992px) {
  .scc-news-grid-section {
    display: grid;
    grid-template-columns: 1fr clamp(280px, 24vw, 340px);
    gap: clamp(1.5rem, 3vw, 2.5rem);
    align-items: start;
  }
}

/* View switching — show only the layout matching data-news-view on the
   section. Default is by-year (set in grid.php); flipping the toggle
   swaps to the flat timeline. */
.scc-news-grid-section[data-news-view="year"] .scc-news-view--timeline,
.scc-news-grid-section[data-news-view="timeline"] .scc-news-view--year {
  display: none;
}
.scc-news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 577px) {
  .scc-news-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}
@media (min-width: 992px) {
  .scc-news-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}
.scc-news-card {
  background: white;
  border: 1px solid var(--scc-border-light);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  position: relative;
}
.scc-news-card:hover {
  border-color: var(--scc-secondary);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transform: translateY(-2px);
}
.scc-news-card-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--scc-border-light);
}
.scc-news-card-image-wrap--placeholder {
  background: var(--scc-primary);
}
/* Desktop: pin a fixed image height so every card thumbnail matches in
   size regardless of column width. */
@media (min-width: 992px) {
  .scc-news-card-image-wrap {
    aspect-ratio: auto;
    height: 180px;
  }
}
.scc-news-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.scc-news-card-badge {
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
  font-size: var(--scc-text-xs);
  padding: 0.2rem 0.5rem;
}
.scc-news-card-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}
.scc-news-card-title {
  font-family: var(--scc-font-heading);
  color: var(--scc-primary);
  font-size: var(--scc-text-base);
  font-weight: var(--scc-weight-bold);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.scc-news-card-excerpt {
  color: var(--scc-foreground);
  font-size: var(--scc-text-sm);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: auto;
}
.scc-news-card-doc-header {
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
}
.scc-news-source {
  color: var(--scc-accent);
  font-size: var(--scc-text-xs);
  font-style: italic;
  margin-top: 0.25rem;
}
.scc-news-year-group {
  margin-bottom: 3rem;
}
.scc-news-year-heading {
  font-family: var(--scc-font-heading);
  color: var(--scc-primary);
  font-size: var(--scc-text-xl);
  font-weight: var(--scc-weight-bold);
  margin: 2rem 0 1rem;
  border-bottom: 2px solid var(--scc-secondary);
  padding-bottom: 0.5rem;
  display: inline-block;
}
@media (min-width: 992px) {
  .scc-news-year-heading { font-size: var(--scc-text-2xl); }
}
.scc-news-load-more {
  display: block;
  margin: 3rem auto 0;
  border: 1px solid var(--scc-success);
  background: transparent;
  color: var(--scc-success);
  border-radius: 6px;
  padding: 0.75rem 2rem;
  font-weight: var(--scc-weight-semibold);
  cursor: pointer;
  transition: all 0.2s;
}
.scc-news-load-more:hover {
  background: var(--scc-success);
  color: white;
}
.scc-news-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--scc-foreground);
}
.scc-news-empty button {
  color: var(--scc-success);
  background: none;
  border: none;
  margin-top: 1rem;
  font-weight: var(--scc-weight-semibold);
  cursor: pointer;
  text-decoration: underline;
}

/* SECTION 5: Shared Stories */
.scc-news-shared-stories {
  background: var(--scc-surface-warm);
  padding: clamp(2.5rem, 6vw, 5rem) 1rem;
}
.scc-news-stories-container {
  max-width: 1200px;
  margin: 0 auto;
}
.scc-news-stories-header {
  margin-bottom: 2rem;
}
.scc-news-stories-header h2 {
  font-family: var(--scc-font-heading);
  color: var(--scc-primary);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: var(--scc-weight-bold);
  margin-bottom: 0.5rem;
}
.scc-news-stories-header p {
  color: var(--scc-foreground);
  font-size: var(--scc-text-base);
}
.scc-news-carousel-wrap {
  position: relative;
}
.scc-video-carousel {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--scc-secondary) transparent;
}
.scc-video-card {
  flex: 0 0 240px;
  scroll-snap-align: start;
  text-decoration: none;
  display: block;
}
@media (min-width: 577px) {
  .scc-video-card { flex: 0 0 280px; }
}
.scc-video-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0.75rem;
  background: var(--scc-border-light);
}
.scc-video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.scc-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  background: rgba(0,0,0,0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: background 0.3s;
}
.scc-video-card:hover .scc-video-thumb {
  transform: scale(1.03);
}
.scc-video-card:hover .scc-video-play {
  background: rgba(0,0,0,0.7);
}
.scc-video-title {
  color: var(--scc-primary);
  font-weight: var(--scc-weight-bold);
  font-size: var(--scc-text-sm);
  margin-bottom: 0.25rem;
}
.scc-video-loc {
  color: var(--scc-muted-text);
  font-size: var(--scc-text-sm);
}
.scc-news-yt-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--scc-success);
  font-size: var(--scc-text-sm);
  font-weight: var(--scc-weight-semibold);
  margin-top: 1rem;
  text-decoration: none;
}
.scc-news-yt-link:hover { text-decoration: underline; }

/* SECTION 6: Sidebar (reusable) */
.scc-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2rem;
}
@media (min-width: 992px) {
  .scc-sidebar {
    margin-top: 0;
  }
}

.scc-sidebar-card {
  background: white;
  border: 1px solid var(--scc-border-light);
  border-radius: 8px;
  padding: 1.25rem;
}

.scc-sidebar-card__heading {
  font-family: var(--scc-font-heading);
  font-size: var(--scc-text-lg);
  font-weight: var(--scc-weight-bold);
  color: var(--scc-primary);
  margin: 0 0 0.75rem;
  line-height: var(--scc-leading-tight);
}

/* Announcement card */
.scc-sidebar-announcement__media {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--scc-border-light);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 0.85rem;
}
.scc-sidebar-announcement__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.scc-sidebar-announcement__title {
  font-family: var(--scc-font-heading);
  font-size: var(--scc-text-lg);
  font-weight: var(--scc-weight-bold);
  color: var(--scc-primary);
  margin: 0 0 0.5rem;
  line-height: var(--scc-leading-tight);
}
.scc-sidebar-announcement__desc {
  font-family: var(--scc-font-sans);
  font-size: var(--scc-text-sm);
  line-height: var(--scc-leading-relaxed);
  color: var(--scc-foreground);
  margin: 0 0 1rem;
}
.scc-sidebar-announcement__cta {
  display: inline-block;
  padding: 0.55rem 1.25rem;
  border-radius: 6px;
  background: var(--scc-success);
  color: white;
  font-family: var(--scc-font-sans);
  font-size: var(--scc-text-sm);
  font-weight: var(--scc-weight-bold);
  text-decoration: none;
  transition: background 0.2s ease;
}
.scc-sidebar-announcement__cta:hover,
.scc-sidebar-announcement__cta:focus {
  background: var(--scc-success-dark);
  color: white;
}

/* Doc list (Annual Reports / Financial Statements) */
.scc-sidebar-doc-list__items {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.scc-sidebar-doc-link {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-family: var(--scc-font-sans);
  font-size: var(--scc-text-sm);
  line-height: var(--scc-leading-snug);
  color: var(--scc-success);
  text-decoration: none;
}
.scc-sidebar-doc-link:hover,
.scc-sidebar-doc-link:focus {
  text-decoration: underline;
}
.scc-sidebar-doc-link svg {
  color: var(--scc-muted-foreground);
  flex-shrink: 0;
  margin-top: 0.15rem;
}

/* SECTION 7: Newsletter */
.scc-news-newsletter {
  background: var(--scc-surface-warm);
  padding: clamp(3rem, 8vw, 5rem) 1rem;
  text-align: center;
}
.scc-news-newsletter-inner {
  max-width: 550px;
  margin: 0 auto;
}
.scc-news-newsletter h2 {
  font-family: var(--scc-font-heading);
  color: var(--scc-primary);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: var(--scc-weight-bold);
  margin-bottom: 0.5rem;
}
.scc-news-newsletter p {
  color: var(--scc-foreground);
  font-size: var(--scc-text-base);
  margin-bottom: 1.5rem;
}
.scc-news-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
@media (min-width: 576px) {
  .scc-news-form {
    flex-direction: row;
    gap: 0;
  }
}
.scc-news-form input {
  height: 48px;
  border: 1px solid var(--scc-border-input);
  padding: 0 1rem;
  border-radius: 6px;
  flex: 1;
}
@media (min-width: 576px) {
  .scc-news-form input {
    border-radius: 6px 0 0 6px;
  }
}
.scc-news-form button {
  height: 48px;
  background: var(--scc-success);
  color: white;
  font-weight: var(--scc-weight-bold);
  border: none;
  padding: 0 1.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}
@media (min-width: 576px) {
  .scc-news-form button {
    border-radius: 0 6px 6px 0;
  }
}
.scc-news-form button:hover {
  background: var(--scc-success-dark);
}
.scc-news-privacy {
  color: var(--scc-muted-text);
  font-size: var(--scc-text-sm);
  font-style: italic;
}

/* SECTION 8: CTA */
.scc-news-cta {
  background: var(--scc-primary);
  color: white;
  text-align: center;
  padding: clamp(3rem, 8vw, 5rem) 1rem;
}
.scc-news-cta h2 {
  font-family: var(--scc-font-heading);
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: var(--scc-weight-bold);
  margin-bottom: 2rem;
}
.scc-news-cta-btns {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  max-width: 400px;
  margin: 0 auto;
}
@media (min-width: 576px) {
  .scc-news-cta-btns {
    flex-direction: row;
    max-width: none;
  }
}

/* SECTION 9: Mobile order
   On viewports below the desktop breakpoint, move the Shared Stories
   carousel between the hero and the featured/announcement post. Above
   992px the rules don't apply and natural DOM order is preserved. */
@media (max-width: 991px) {
  .scc-news-page__main {
    display: flex;
    flex-direction: column;
  }
  .scc-news-page__main > .scc-news-hero            { order: 1; }
  .scc-news-page__main > .scc-news-shared-stories  { order: 2; }
  .scc-news-page__main > .scc-news-featured        { order: 3; }
  .scc-news-page__main > .scc-news-filters-section { order: 4; }
  .scc-news-page__main > .scc-news-grid-section    { order: 5; }
  .scc-news-page__main > .scc-news-cta             { order: 6; }
}
