/**
 * NewsroomIN — Front Page OG Banner (Relevant News Slider & Secondary Columns)
 *
 * Features:
 * - 3-column asymmetric layout: Slider (~50%), Secondary Cards (~25%), Latest Updates (~25%).
 * - Zero-jitter height parity: All 3 columns share identical 370px desktop baseline.
 * - Deep dark gradient overlay on photo cards matching the classic OG NewsroomIN aesthetic.
 * - Clickable cobalt blue pill category badges.
 * - Text-only Latest Updates column with clickable category links.
 * - Unified "Inter" typography across all titles, eliminating font mismatch where Latin
 *   brand names ("YouTube", "Diageo", "Guinness") or numerals ("200", "40") rendered in Poppins
 *   while Cyrillic fell back to system fonts.
 * - Sleek, modern SVG chevron slider switcher styled congruently with the theme controls.
 * - Full Dark Mode & Light Mode support via CSS custom properties.
 */

/* ==========================================================================
   1. SECTION CONTAINER & GRID
   ========================================================================== */
.og-banner-section {
  width: 100%;
  margin-top: 0;
  margin-bottom: 2.25rem;
  box-sizing: border-box;
}

.og-banner-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.95fr) minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
}

/* ==========================================================================
   2. SECTION HEADER BARS (Red Accent Bar + Title + Controls)
   ========================================================================== */
.og-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border-subtle);
  height: 32px;
  box-sizing: border-box;
}

.og-header-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.og-header-bar-indicator {
  display: inline-block;
  width: 4px;
  height: 1.15rem;
  background: var(--brand-accent, #dc2626);
  border-radius: 2px;
  flex-shrink: 0;
}

.og-header-title {
  font-family: var(--font-body, "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-title);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

/* ==========================================================================
   2B. SLEEK SLIDER CONTROLS (Congruent with Theme Design)
   ========================================================================== */
.og-slider-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.og-slider-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.og-slider-arrow svg {
  display: block;
  stroke: currentColor;
  transition: transform 0.15s ease;
}

.og-slider-arrow:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
  color: var(--brand-accent, #dc2626);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.og-slider-arrow:active {
  transform: translateY(0);
  box-shadow: none;
}

.og-slider-prev:hover svg {
  transform: translateX(-1px);
}

.og-slider-next:hover svg {
  transform: translateX(1px);
}

.og-slider-arrow:focus-visible {
  outline: 2px solid var(--brand-accent, #dc2626);
  outline-offset: 1px;
}

/* ==========================================================================
   3. COLUMN 1: RELEVANT NEWS SLIDER VIEWPORT (370px Baseline)
   ========================================================================== */
.og-col-slider {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.og-slider-viewport {
  display: grid;
  grid-template-areas: "og-slide-slot";
  position: relative;
  width: 100%;
  height: 390px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.og-card--slider {
  grid-area: og-slide-slot;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease;
  width: 100%;
  height: 100%;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}

.og-card--slider.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Full Card Clickable Overlay */
.og-card-link-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  text-indent: -9999px;
}

/* Card Background Photo */
.og-card-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.4s ease;
  z-index: 0;
}

.og-card:hover .og-card-media {
  transform: scale(1.035);
}

.og-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1e293b;
  color: #ffffff;
  font-family: var(--font-body, "Inter", sans-serif);
  font-size: 1.5rem;
  font-weight: 800;
}

.og-card-placeholder .accent {
  color: var(--brand-accent, #dc2626);
}

/* Custom fallback image inside the media slot */
.og-card-placeholder-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  z-index: 0;
}

/* Card Overlay Gradient — Downward Black (Light / White Mode) */
.og-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.18) 35%, rgba(0, 0, 0, 0.72) 68%, rgba(0, 0, 0, 0.95) 100%);
  z-index: 1;
  pointer-events: none;
  transition: background 0.3s ease;
}

/* Card Content Area */
.og-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.15rem;
  color: #ffffff;
  z-index: 2;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}

/* Ensure Category Badges are Always Clickable */
.og-card-categories {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

.og-cat-pill {
  display: inline-block;
  background: #1e3a8a; /* Deep cobalt blue */
  color: #ffffff !important;
  font-family: var(--font-body, "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 4px;
  text-decoration: none;
  line-height: 1.2;
  position: relative;
  z-index: 10;
  pointer-events: auto;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.og-cat-pill:hover {
  background: #2563eb;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   3B. UNIFIED TYPOGRAPHY (Inter: Flawless Cyrillic, Latin, & Number Match)
   ========================================================================== */
.og-card-title {
  font-family: var(--font-body, "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-weight: 600;
  line-height: 1.28;
  margin: 0 0 0.4rem 0;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  position: relative;
  z-index: 5;
  pointer-events: auto;
  transition: color 0.25s ease;
}

/* Enforce uniform font-family and weight across all child nodes */
.og-card-title,
.og-card-title a,
.og-card-title strong,
.og-card-title b,
.og-text-title,
.og-text-title a,
.og-text-title strong,
.og-text-title b {
  font-family: var(--font-body, "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif) !important;
  font-weight: 600 !important;
}

.og-card--slider .og-card-title {
  font-size: 1.25rem;
  letter-spacing: -0.015em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.og-card-title a {
  color: #ffffff;
  text-decoration: none;
  transition: opacity 0.15s ease;
  position: relative;
  z-index: 5;
  pointer-events: auto;
}

.og-card:hover .og-card-title a {
  opacity: 0.9;
}

/* Card Meta (Date / Author) */
.og-card-meta {
  font-family: var(--font-body, "Inter", sans-serif);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  z-index: 5;
  pointer-events: auto;
  transition: color 0.25s ease;
}

.og-meta-sep {
  color: rgba(255, 255, 255, 0.4);
}

.og-meta-author {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  position: relative;
  z-index: 10;
  pointer-events: auto;
  cursor: pointer;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.og-meta-author:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* ==========================================================================
   4. COLUMN 2: SECONDARY NEWS (2 Stacked Cards, 370px Baseline)
   ========================================================================== */
.og-col-secondary {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.og-stack-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 390px;
  box-sizing: border-box;
}

.og-card--compact {
  flex: 1;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  min-height: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.og-card--compact .og-card-content {
  padding: 0.75rem 0.85rem;
}

.og-card--compact .og-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.og-card--compact .og-card-meta {
  font-size: 0.6875rem;
}

/* ==========================================================================
   5. COLUMN 3: LATEST UPDATES (Text-only List, 370px Baseline)
   ========================================================================== */
.og-col-latest {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Paged Stacked Container (when image_cards mode is chosen) */
.og-stack-container--paged {
  display: grid;
  grid-template-areas: "og-stack-slot";
  position: relative;
  height: 390px;
  overflow: hidden;
}

.og-stack-page {
  grid-area: og-stack-slot;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(12px);
}

.og-stack-page.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

/* Paged Text List Container */
.og-text-list-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.5rem 0.85rem 0.6rem;
  height: 390px;
  box-sizing: border-box;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: background 0.25s ease, border-color 0.25s ease;
  display: grid;
  grid-template-areas: "og-text-slot";
  position: relative;
}

.og-text-page {
  grid-area: og-text-slot;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(12px);
}

.og-text-page.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

.og-text-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
}

.og-text-item {
  flex: 1 1 0;
  min-height: 0;
  padding: 0.25rem 0.4rem;
  border-radius: 5px;
  border: 1px solid transparent;        /* Always allocated — keeps spacing identical to hover */
  border-bottom-color: var(--border-subtle); /* Only bottom visible at rest */
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: transparent;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  box-sizing: border-box;
  overflow: hidden;
}

/* Inset shadow = never clips against overflow:hidden; bottom separator hidden so all 4 sides show */
.og-text-item:hover {
  box-shadow: inset 0 0 0 1px var(--brand-accent);
  border-bottom-color: transparent;
  background: transparent;
}

.og-text-item:last-child {
  border-bottom-color: transparent; /* Hide separator, keep 1px space allocated */
}

/* Clickable Category in Column 3 */
.og-text-cats {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  overflow: hidden;
  gap: 0.35rem;
  margin-bottom: 0.15rem;
}

.og-text-cat {
  font-family: var(--font-body, "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--brand-accent, #dc2626);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.1;
  display: inline-block;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.og-text-cat:hover {
  text-decoration: underline;
  opacity: 0.85;
}

.og-text-title {
  font-family: var(--font-body, "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: 0.78125rem;
  font-weight: 600;
  line-height: 1.28;
  margin: 0 0 0.15rem 0;
}

.og-text-title a {
  color: var(--text-title);
  text-decoration: none;
  transition: color 0.15s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.og-text-title a:hover {
  color: var(--brand-accent);
}

.og-text-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.og-text-time {
  font-family: var(--font-body, "Inter", sans-serif);
  font-size: 0.65rem;
  line-height: 1.1;
  color: var(--text-muted);
}

/* ==========================================================================
   6. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1024px) {
  .og-banner-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .og-col-slider {
    grid-column: span 2;
  }

  .og-slider-viewport {
    height: 340px;
  }

  .og-stack-container,
  .og-text-list-box {
    height: 340px;
  }
}

@media (max-width: 640px) {
  .og-banner-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .og-col-slider {
    grid-column: span 1;
  }

  .og-slider-viewport {
    height: 260px;
  }

  .og-card--slider .og-card-title {
    font-size: 1.1rem;
  }

  .og-stack-container,
  .og-stack-container--paged {
    height: auto;
    gap: 12px;
  }

  .og-card--compact {
    height: 200px;
    min-height: 200px;
  }

  .og-card--compact .og-card-content {
    padding: 0.85rem 1rem;
  }

  .og-card--compact .og-card-title {
    font-size: 0.9375rem;
    line-height: 1.35;
    margin-bottom: 0.35rem;
  }

  .og-text-list-box {
    height: 340px;
  }

  .og-text-item {
    padding-bottom: 0.45rem;
  }
}

@media (max-width: 480px) {
  .og-card--compact {
    height: 185px;
    min-height: 185px;
  }

  .og-card--compact .og-card-content {
    padding: 0.75rem 0.85rem;
  }
}

/* ==========================================================================
   7. DARK MODE ADAPTATIONS ([data-theme="dark"])
   Preserves downward black gradient and white text across both themes
   ========================================================================== */
[data-theme="dark"] .og-slider-viewport,
[data-theme="dark"] .og-card--compact {
  border: 1px solid var(--border-subtle);
}

