/* ==========================================================================
   BAXEX NEWS - EDITORIAL 3-COLUMN CLASSIC LAYOUT (STYLES.CSS)
   Inspired by classic newspaper layout: Red underlines, Yellow badge logo,
   Serif headlines, 3-column editorial grid (Latest | Main | Popular).
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,700;0,800;1,600&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Color Tokens */
  --bg-page: #f8f9fa;
  --bg-card: #ffffff;
  --text-main: #111827;
  --text-muted: #6b7280;
  --text-light: #9ca3af;

  --accent-red: #c82333;
  --accent-red-hover: #a71d2a;
  --accent-yellow: #facc15;
  --border-light: #e5e7eb;
  --border-red: #c82333;

  /* Typography */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Shadows & Layout */
  --radius-sm: 4px;
  --radius-md: 8px;
  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.08);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 1. Top Ecosystem Nav */
.ecosystem-bar {
  background: #111827;
  color: #9ca3af;
  font-size: 0.82rem;
  padding: 8px 0;
}

.ecosystem-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ecosystem-nav {
  display: flex;
  gap: 20px;
  list-style: none;
}

.ecosystem-nav a {
  color: #d1d5db;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.ecosystem-nav a:hover,
.ecosystem-nav a.active {
  color: #ffffff;
}

.ecosystem-nav a.active {
  color: var(--accent-yellow);
  font-weight: 700;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-yellow);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background-color: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 8px #ef4444;
}

/* 2. Main Site Header */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.yellow-badge-logo {
  width: 52px;
  height: 52px;
  background: var(--accent-yellow);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 1.15rem;
  color: #111827;
  letter-spacing: -0.5px;
  box-shadow: 0 2px 8px rgba(250, 204, 21, 0.4);
}

.logo-text-group {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 800;
  color: #111827;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.brand-subtitle {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-red);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

/* Main Nav Links */
.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.nav-link {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  cursor: pointer;
  background: transparent;
  border: none;
}

.nav-link:hover,
.nav-link.active {
  background: var(--accent-red);
  color: #ffffff;
}

/* Search Box */
.header-search {
  position: relative;
  width: 220px;
}

.search-input {
  width: 100%;
  padding: 8px 14px 8px 36px;
  border: 1px solid var(--border-light);
  border-radius: 20px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  outline: none;
  background: #f3f4f6;
  transition: all 0.2s ease;
}

.search-input:focus {
  background: #ffffff;
  border-color: var(--accent-red);
  box-shadow: 0 0 0 3px rgba(200, 35, 51, 0.1);
}

.search-icon-svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* Section Underline Headers */
.column-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-main);
  padding-bottom: 8px;
  margin-bottom: 20px;
  border-bottom: 3px solid var(--border-red);
  letter-spacing: 0.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 3-Column Editorial Grid Layout */
.editorial-wrapper {
  padding: 30px 0 60px;
  display: grid;
  grid-template-columns: 280px 1fr 300px;
  gap: 30px;
}

/* LEFT COLUMN */
.left-col {
  border-right: 1px solid var(--border-light);
  padding-right: 20px;
}

.latest-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.latest-item {
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--border-light);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.latest-item:hover .latest-headline {
  color: var(--accent-red);
}

.latest-headline {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--text-main);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.latest-time {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* CENTER COLUMN */
.center-col {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.lead-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
  cursor: pointer;
  transition: box-shadow 0.2s ease;
}

.lead-card:hover {
  box-shadow: var(--shadow-hover);
}

.lead-img-wrap {
  width: 100%;
  height: 360px;
  overflow: hidden;
  position: relative;
}

.lead-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.lead-card:hover .lead-img {
  transform: scale(1.03);
}

.lead-content {
  padding: 24px;
}

.author-tag {
  color: var(--accent-red);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: inline-block;
}

.lead-title {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-main);
  margin-bottom: 12px;
}

.lead-card:hover .lead-title {
  color: var(--accent-red);
}

.lead-excerpt {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.sub-stories-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.sub-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.2s ease;
}

.sub-card:hover {
  box-shadow: var(--shadow-hover);
}

.sub-img-wrap {
  height: 180px;
  overflow: hidden;
}

.sub-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.sub-card:hover .sub-img {
  transform: scale(1.04);
}

.sub-content {
  padding: 16px;
}

.sub-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--text-main);
}

.sub-card:hover .sub-title {
  color: var(--accent-red);
}

.sub-excerpt {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.banner-story-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
}

.banner-img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.banner-content {
  padding: 20px;
}

/* RIGHT COLUMN */
.right-col {
  border-left: 1px solid var(--border-light);
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.tags-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tag-pill {
  background: #ffffff;
  border: 1px solid var(--border-light);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.tag-pill:hover,
.tag-pill.active {
  background: var(--accent-red);
  color: #ffffff;
  border-color: var(--accent-red);
}

.trending-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.trending-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
}

.trending-item:hover .trending-name {
  color: var(--accent-red);
}

.trending-name {
  font-weight: 700;
  color: var(--text-main);
}

.trending-count {
  font-size: 0.78rem;
  color: var(--accent-red);
  font-weight: 700;
}

.eco-widget-card {
  background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
  color: #ffffff;
  padding: 20px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.eco-widget-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--accent-yellow);
}

.eco-widget-desc {
  font-size: 0.85rem;
  color: #9ca3af;
}

.eco-widget-btn {
  background: var(--accent-red);
  color: #ffffff;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.8rem;
  text-align: center;
  margin-top: 6px;
  display: block;
}

/* Reader Modal Popup & Social Sharing Bar */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-sm);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #f3f4f6;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.modal-close:hover {
  background: var(--accent-red);
  color: #ffffff;
}

.modal-hero-img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}

.modal-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.meta-pill {
  background: #f3f4f6;
  color: var(--text-main);
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: uppercase;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.28;
  margin-bottom: 16px;
  color: var(--text-main);
}

/* Social Share Bar Component */
.social-share-sec {
  margin: 20px 0 24px;
  padding: 16px;
  background: #f9fafb;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
}

.share-label {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.share-btns-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  color: #ffffff;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.share-btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.btn-share-x { background: #000000; }
.btn-share-fb { background: #1877f2; }
.btn-share-tg { background: #229ed9; }
.btn-share-wa { background: #25d366; }
.btn-share-copy { background: #4b5563; }

/* Footer */
.site-footer {
  background: #111827;
  color: #9ca3af;
  padding: 30px 0;
  border-top: 4px solid var(--accent-red);
  font-size: 0.85rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 16px;
  list-style: none;
}

.footer-links a {
  color: #d1d5db;
  text-decoration: none;
}

@media (max-width: 1080px) {
  .editorial-wrapper { grid-template-columns: 1fr 300px; }
  .left-col { display: none; }
}

@media (max-width: 768px) {
  .editorial-wrapper { grid-template-columns: 1fr; }
  .right-col { border-left: none; padding-left: 0; }
  .sub-stories-grid { grid-template-columns: 1fr; }
}
