/*
Theme Name: DayLive News
Theme URI: https://example.com/daylive-news
Author: Copilot
Description: A modern news-style WordPress theme inspired by fast news portals.
Version: 1.0.0
Text Domain: daylive-news
*/

:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #0ea5e9;
  --accent-2: #111827;
  --border: #e2e8f0;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  background: linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}
.topbar {
  background: linear-gradient(90deg, #0f172a, #1e293b);
  color: #e2e8f0;
  font-size: 0.9rem;
  padding: 10px 0;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.site-header {
  background: rgba(255,255,255,0.95);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.04);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #2563eb);
  color: white;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
}
.brand span {
  display: block;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.85rem;
}

.custom-logo-link img {
  max-height: 42px;
  width: auto;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.main-nav .menu {
  display: flex;
  align-items: center;
  gap: 18px;
  list-style: none;
  padding: 0;
  margin: 0;
  font-weight: 600;
}
.main-nav a:hover { color: var(--accent); }

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--surface-2);
}

.search-box input {
  border: 0;
  outline: none;
  background: transparent;
  min-width: 140px;
}

.menu-toggle {
  display: none;
  border: 0;
  background: var(--accent);
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.menu-toggle:hover { transform: scale(1.04); }
.site-main { padding: 28px 0 48px; }
.hero {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.hero-spotlight {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 20px;
  margin-bottom: 24px;
}

.hero-spotlight .hero-card {
  min-height: 470px;
}

.hero-spotlight .sidebar-card {
  min-height: 470px;
}
.hero-card,
.sidebar-card,
.post-card,
.highlight-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.hero-card {
  overflow: hidden;
  min-height: 420px;
  position: relative;
}
.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2,6,23,0.9) 0%, rgba(2,6,23,0.35) 100%);
  display: flex;
  align-items: end;
  padding: 24px;
}
.hero-content { max-width: 580px; color: #fff; }
.hero-content .tag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 10px;
  background: rgba(14,165,233,0.18);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.hero-content h1 {
  font-size: clamp(1.6rem, 2.4vw, 2.3rem);
  margin: 0 0 10px;
  line-height: 1.2;
}
.hero-content p { margin: 0; color: #cbd5e1; }

.ticker {
  overflow: hidden;
  background: #0f172a;
  color: #fff;
  padding: 10px 0;
  font-size: 0.93rem;
}

.ticker span {
  display: inline-block;
  padding-left: 100%;
  animation: ticker 18s linear infinite;
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
.trending-list {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.trending-list h3,
.sidebar-card h3,
.section-head h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-2);
}
.trending-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.trending-item:last-child { border-bottom: none; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.section-head a {
  color: var(--accent);
  font-weight: 600;
}
.highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.category-section {
  margin: 28px 0 18px;
  padding: 20px;
  background: linear-gradient(90deg, #111827, #1f2937);
  color: #fff;
  border-radius: 20px;
}

.category-section .section-head h3 {
  color: #fff;
}

.category-section .section-head a {
  color: #7dd3fc;
}
.highlight-card { overflow: hidden; }
.highlight-card img { height: 180px; width: 100%; object-fit: cover; }
.highlight-card .post-body { padding: 16px 18px 18px; }
.posts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}
.content-column { display: flex; flex-direction: column; gap: 16px; }
.post-card { overflow: hidden; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.post-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12); }
.post-card img { width: 100%; height: 220px; object-fit: cover; }
.post-body { padding: 18px 20px 22px; }
.post-meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.category-badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 10px;
  background: #eff6ff;
  color: #2563eb;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.featured-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: #dc2626;
  color: #fff;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  z-index: 2;
}
.post-card h2, .highlight-card h2 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  line-height: 1.35;
}
.post-card p, .highlight-card p { margin: 0; color: var(--muted); }
.sidebar { display: flex; flex-direction: column; gap: 16px; }

.sticky-sidebar {
  position: sticky;
  top: 92px;
}
.sidebar-card { padding: 20px; }
.sidebar-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-card li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.sidebar-card li:last-child { border-bottom: none; }
.pagination { display: flex; gap: 10px; margin-top: 16px; }
.pagination a,
.pagination span {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
}
.site-footer {
  padding: 28px 0 40px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: #f8fafc;
}

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.footer-widgets .widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
}

.newsletter {
  margin: 24px 0 30px;
  padding: 24px;
  border-radius: 20px;
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.newsletter form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.newsletter input {
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  min-width: 220px;
}

.newsletter button {
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  background: #0ea5e9;
  color: #fff;
  cursor: pointer;
}

.author-box {
  display: flex;
  gap: 16px;
  align-items: center;
  margin: 24px 0;
  padding: 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 18px;
}

.author-box img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.entry-content {
  font-size: 1.02rem;
  color: #334155;
}

.entry-content p {
  margin-bottom: 16px;
}

.entry-content h2,
.entry-content h3 {
  margin-top: 24px;
  margin-bottom: 10px;
}

.entry-content blockquote {
  border-left: 4px solid var(--accent);
  padding-left: 16px;
  color: #475569;
  font-style: italic;
}

.comments-area {
  margin-top: 24px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.comment {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
}

.comment-form input[type="submit"] {
  width: auto;
  background: var(--accent);
  color: #fff;
  border: 0;
  cursor: pointer;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
body.dark-mode {
  background: linear-gradient(180deg, #020617 0%, #111827 100%);
  color: #f8fafc;
}

body.dark-mode .topbar {
  background: linear-gradient(90deg, #020617, #111827);
}

body.dark-mode .site-header,
body.dark-mode .hero-card,
body.dark-mode .sidebar-card,
body.dark-mode .post-card,
body.dark-mode .highlight-card,
body.dark-mode .site-footer {
  background: #0f172a;
  color: #f8fafc;
  border-color: #1f2937;
}

body.dark-mode .post-meta,
body.dark-mode .sidebar-card li,
body.dark-mode .post-card p,
body.dark-mode .highlight-card p,
body.dark-mode .hero-content p,
body.dark-mode .site-footer {
  color: #cbd5e1;
}

body.dark-mode .pagination a,
body.dark-mode .pagination span {
  background: #111827;
  color: #fff;
  border-color: #334155;
}

body.dark-mode .ticker {
  background: #020617;
}

body.dark-mode .category-badge {
  background: #1e3a8a;
  color: #dbeafe;
}

@media (max-width: 900px) {
  .hero, .hero-spotlight, .posts-grid { grid-template-columns: 1fr; }
  .highlight-grid { grid-template-columns: 1fr; }
  .footer-widgets { grid-template-columns: 1fr; }
  .newsletter { flex-direction: column; align-items: flex-start; }
  .menu-toggle { display: inline-block; }
  .main-nav { flex-wrap: wrap; justify-content: flex-end; }
  .main-nav .menu {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 10px;
    padding: 10px 0;
  }
  .main-nav.open .menu {
    display: flex;
    animation: fadeIn 0.2s ease;
  }
  .search-box { margin-top: 6px; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 640px) {
  .header-inner { flex-direction: column; align-items: flex-start; }
  .main-nav .menu { flex-wrap: wrap; gap: 10px; }
  .topbar .container { flex-direction: column; align-items: flex-start; }
}
