/*
Theme Name: DailyAdvent Ghana (News Curator)
Theme URI: https://www.ghanamma.com/
Author: Antigravity AI
Author URI: https://www.ghanamma.com/
Description: Exact Opera News / DailyAdvent layout clone. Solid crimson red header, left sidebar channels navigation, clean white cards with 96x96 thumbnails, right headlines column, and curated referral model.
Version: 2.0.0
Text Domain: dailyadvent
*/

:root {
  --primary-red: #ba1827;
  --bg-page: #eaedf1;
  --bg-card: #ffffff;
  --text-dark: #111827;
  --text-meta: #757575;
  --border-card: #dadada;
  --border-nav: #e5e7eb;
}

/* Page Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-page);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", Helvetica, Arial, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-dark);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Root Layout Container */
.da-layout-root {
  display: flex;
  min-height: 100vh;
  background-color: var(--bg-page);
}

/* 1. Left Sidebar Navigation (Width ~210px) */
.da-left-nav {
  width: 210px;
  background-color: #ffffff;
  border-right: 1px solid var(--border-nav);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
}

.da-nav-header {
  height: 44px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f0f0f0;
}

.da-brand-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.da-brand-icon {
  background: var(--primary-red);
  color: #fff;
  font-weight: 900;
  font-size: 14px;
  font-style: italic;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.da-brand-title {
  font-size: 17px;
  font-weight: 700;
  color: #111;
  letter-spacing: -0.3px;
}

.da-nav-close-btn {
  display: none;
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: #666;
}

.da-nav-menu {
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.da-nav-item {
  display: block;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: #333333;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.da-nav-item:hover {
  background-color: #f4f5f7;
  color: #111;
}

.da-nav-item.active {
  background-color: #f0f2f5;
  font-weight: 700;
  color: #111;
}

.da-nav-divider {
  height: 1px;
  background-color: #e5e7eb;
  margin: 14px 4px 10px;
}

.da-nav-section-title {
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
  padding: 0 14px 6px;
}

.da-nav-subitem {
  display: block;
  padding: 6px 14px;
  font-size: 12.5px;
  color: #6b7280;
  text-decoration: none;
}

.da-nav-subitem:hover {
  color: #111;
}

/* 2. Main Wrapper (Red Header + Content) */
.da-main-wrapper {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Solid Crimson Red Header Bar */
.da-top-bar {
  height: 44px;
  background-color: var(--primary-red);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.da-top-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.da-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}

.da-top-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
}

.da-top-icon {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-weight: 900;
  font-size: 14px;
  font-style: italic;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.da-top-text {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.da-top-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.da-search-box {
  background-color: #ffffff;
  border-radius: 14px;
  height: 26px;
  width: 150px;
  padding: 0 8px;
  display: flex;
  align-items: center;
}

.da-search-field {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 12px;
  color: #111;
  font-family: inherit;
}

.da-search-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
}

.da-country-indicator {
  display: flex;
  align-items: center;
  font-size: 15px;
}

/* 3. Page Content Grid (Main Feed + Right Sidebar) */
.da-page-body {
  padding: 14px 16px 40px;
  flex: 1;
}

.da-content-grid {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  max-width: 960px;
  margin: 0;
}

/* Main Feed Column */
.da-feed-col {
  width: 620px;
  max-width: 100%;
  flex-shrink: 0;
}

.da-feed-stream {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* The Feed Card */
.da-feed-card {
  background-color: #ffffff;
  border-radius: 6px;
  border: 1px solid var(--border-card);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.da-feed-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.da-feed-card-link {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 14px;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.da-feed-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 90px;
}

.da-feed-title {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.da-feed-meta {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-meta);
  display: flex;
  align-items: center;
  gap: 8px;
}

.da-meta-time {
  color: var(--text-meta);
}

.da-meta-domain {
  color: var(--text-meta);
}

.da-feed-thumb-box {
  flex: 0 0 96px;
  width: 96px;
  height: 96px;
  border-radius: 4px;
  overflow: hidden;
  background-color: #f2f2f2;
}

.da-feed-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Pagination */
.da-pagination-wrap {
  text-align: center;
  margin-top: 18px;
}

.da-btn-more {
  background-color: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: 6px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  transition: all 0.15s ease;
}

.da-btn-more:hover {
  background-color: #f4f5f7;
  border-color: var(--primary-red);
  color: var(--primary-red);
}

/* 4. Right Column (Ad + Headlines) */
.da-right-col {
  width: 270px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Ad Card */
.da-ad-card {
  background-color: #ffffff;
  border-radius: 6px;
  border: 1px solid var(--border-card);
  padding: 12px 14px;
  text-align: center;
}

.da-ad-header {
  font-size: 12px;
  color: #666;
  margin-bottom: 10px;
  text-align: center;
}

.da-ad-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.da-ad-btn {
  background-color: #eb7422;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
}

.da-ad-sub {
  font-size: 11px;
  color: #0284c7;
  cursor: pointer;
  border: 1px solid #bae6fd;
  padding: 4px 10px;
  border-radius: 3px;
  width: 100%;
}

/* Headlines Stack */
.da-headlines-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.da-headlines-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 700;
  color: #111;
  padding: 2px 2px;
}

.da-flame-icon {
  font-size: 15px;
}

.da-headlines-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.da-headline-card {
  background-color: #ffffff;
  border-radius: 6px;
  border: 1px solid var(--border-card);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
}

.da-headline-thumb-wrap {
  width: 100%;
  height: 120px;
  background-color: #eee;
  overflow: hidden;
}

.da-headline-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.da-headline-body {
  padding: 8px 10px;
}

.da-headline-text {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  color: #111827;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.da-headline-meta {
  font-size: 11px;
  color: #888;
  display: flex;
  gap: 6px;
}

/* 5. Single Article Page */
.da-article-box {
  background-color: #ffffff;
  border-radius: 6px;
  border: 1px solid var(--border-card);
  padding: 18px 20px 30px;
}

.da-back-link {
  display: inline-block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--primary-red);
  margin-bottom: 12px;
  text-decoration: none;
}

.da-article-title {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.3;
  color: #111827;
  margin-bottom: 10px;
}

.da-article-meta-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  color: #757575;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 16px;
}

.da-article-source-name {
  font-weight: 700;
  color: #111;
}

.da-article-img-wrap {
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 16px;
}

.da-article-img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.da-article-text {
  font-size: 16px;
  line-height: 1.7;
  color: #222;
  margin-bottom: 24px;
}

.da-article-text p {
  margin-bottom: 16px;
}

/* Outbound Referral */
.da-referral-block {
  background-color: #fff8f8;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 16px;
  margin: 20px 0;
  text-align: center;
}

.da-referral-source-row {
  font-size: 13.5px;
  color: #4b5563;
  margin-bottom: 6px;
}

.da-referral-note {
  font-size: 12.5px;
  color: #6b7280;
  margin-bottom: 14px;
}

.da-btn-continue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--primary-red);
  color: #ffffff;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.da-btn-continue:hover {
  background-color: #9e1423;
  color: #ffffff;
}

.da-related-box {
  margin-top: 24px;
  border-top: 1px solid #f0f0f0;
  padding-top: 16px;
}

.da-related-heading {
  font-size: 15px;
  font-weight: 700;
  color: #111;
  margin-bottom: 10px;
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
  .da-right-col {
    display: none;
  }

  .da-feed-col {
    width: 100%;
  }

  .da-content-grid {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .da-left-nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 240px;
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.2);
  }

  .da-left-nav.open {
    transform: translateX(0);
  }

  .da-nav-close-btn {
    display: block;
  }

  .da-nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  .da-nav-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }

  .da-page-body {
    padding: 10px 10px 30px;
  }

  .da-feed-thumb-box {
    flex: 0 0 84px;
    width: 84px;
    height: 84px;
  }

  .da-feed-card-link {
    padding: 10px 12px;
    gap: 10px;
  }

  .da-feed-content {
    min-height: 80px;
  }

  .da-feed-title {
    font-size: 14.5px;
  }
}
