/* ========================================
   MyNewsNow — NewsNow.co.uk Clone Styles
   ======================================== */

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

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f4f4;
  color: #333;
  font-size: 14px;
  line-height: 1.4;
}

/* --- HEADER --- */
.header {
  background: #1a237e;
  color: white;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.logo {
  font-size: 1.4rem;
  font-weight: bold;
  color: white;
  text-decoration: none;
  white-space: nowrap;
}
.search-container { flex: 1; max-width: 500px; }
.header-meta { font-size: 0.75rem; color: #b0bec5; white-space: nowrap; }

/* Override Pagefind UI in header */
.search-container .pagefind-ui {
  --pagefind-ui-scale: 0.8;
  --pagefind-ui-primary: #ff6f00;
  --pagefind-ui-text: #333;
  --pagefind-ui-background: #fff;
  --pagefind-ui-border: #ddd;
  --pagefind-ui-border-width: 1px;
  --pagefind-ui-border-radius: 4px;
}
.search-container .pagefind-ui__search-input {
  height: 36px !important;
}
.search-container .pagefind-ui__results-area {
  position: absolute;
  background: white;
  z-index: 999;
  border: 1px solid #ddd;
  border-radius: 0 0 4px 4px;
  max-height: 400px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* --- LAYOUT --- */
.container {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  min-height: calc(100vh - 52px);
}

/* --- SIDEBAR --- */
.sidebar {
  width: 200px;
  min-width: 200px;
  background: #fff;
  border-right: 1px solid #ddd;
  padding: 12px 0;
  position: sticky;
  top: 52px;
  height: calc(100vh - 52px);
  overflow-y: auto;
}
.sidebar-title {
  font-weight: bold;
  font-size: 0.85rem;
  color: #1a237e;
  padding: 8px 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sidebar a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 16px;
  color: #1a237e;
  text-decoration: none;
  font-size: 0.85rem;
  border-left: 3px solid transparent;
  transition: all 0.15s;
}
.sidebar a:hover,
.sidebar a.active {
  background: #e8eaf6;
  border-left-color: #ff6f00;
}
.sidebar .count {
  font-size: 0.7rem;
  color: #999;
  background: #f0f0f0;
  padding: 1px 6px;
  border-radius: 10px;
}

/* --- MAIN FEED --- */
.feed {
  flex: 1;
  padding: 12px 16px;
  background: #fff;
}
.feed-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 10px;
  border-bottom: 2px solid #1a237e;
  margin-bottom: 8px;
}
.feed-header h1 {
  font-size: 1.1rem;
  color: #1a237e;
}
.article-count {
  font-size: 0.75rem;
  color: #888;
}

/* --- ARTICLE ROW --- */
.article {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid #f0f0f0;
}
.article:hover { background: #fafafa; }
.bullet { color: #ff6f00; font-weight: bold; margin-top: 2px; }
.article-content { flex: 1; }
.article-link {
  color: #1a1a1a;
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.3;
}
.article-link:hover {
  color: #1a237e;
  text-decoration: underline;
}
.article-link:visited { color: #6a6a6a; }

.meta { display: flex; gap: 8px; margin-top: 3px; align-items: center; flex-wrap: wrap; }
.source {
  font-size: 0.72rem;
  color: #1a237e;
  font-weight: 600;
}
.time {
  font-size: 0.7rem;
  color: #999;
}
.category-tag {
  font-size: 0.65rem;
  color: #fff;
  background: #546e7a;
  padding: 1px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* --- AD SLOTS --- */
.ad-slot {
  padding: 10px 0;
  margin: 8px 0;
  text-align: center;
  min-height: 50px;
}
.ad-slot ins { display: block; }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .header { flex-wrap: wrap; gap: 10px; }
  .search-container { max-width: 100%; order: 3; width: 100%; }
  .sidebar { display: none; }
  .container { flex-direction: column; }
  .feed { padding: 8px; }
  .article-link { font-size: 0.85rem; }
}
