/*
Theme Name: Your Daily Updates
Theme URI: https://yourdailyupdates.news
Description: Custom news theme for Your Daily Updates
Version: 1.0
Author: N.O.V.A.
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Playfair+Display:wght@700;800&display=swap');

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

:root {
  --red: #D4A017;
  --gold: #D4A017;
  --dark: #0a0a0a;
  --mid: #444444;
  --light: #888888;
  --border: #e5e5e5;
  --bg: #f5f5f5;
  --white: #ffffff;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
}

body { font-family: var(--font-sans); background: var(--white); color: var(--dark); line-height: 1.5; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ── TOP BAR ── */
.ydu-topbar {
  background: var(--dark);
  color: #aaa;
  font-size: 12px;
  padding: 6px 0;
  border-bottom: 1px solid #333;
}
.ydu-topbar .inner { max-width: 1240px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; }
.ydu-topbar .date { font-size: 11px; letter-spacing: .5px; }
.ydu-topbar .breaking { display: flex; align-items: center; gap: 10px; font-size: 11px; overflow: hidden; max-width: 60%; }
.ydu-topbar .breaking-label { background: var(--gold); color: var(--dark); padding: 2px 8px; font-weight: 700; font-size: 10px; letter-spacing: 1px; white-space: nowrap; }
.ydu-topbar .breaking-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── HEADER ── */
.ydu-header {
  background: var(--dark);
  border-bottom: 3px solid var(--gold);
  position: sticky; top: 0; z-index: 100;
}
.ydu-header .inner { max-width: 1240px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 30px; height: 64px; }
.ydu-logo { font-family: var(--font-serif); font-size: 26px; font-weight: 800; color: #fff; letter-spacing: -0.5px; white-space: nowrap; }
.ydu-logo span { color: var(--gold); }
.ydu-nav { display: flex; align-items: center; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.ydu-nav::-webkit-scrollbar { display: none; }
.ydu-nav a { padding: 6px 12px; font-size: 13px; font-weight: 500; color: rgba(255,255,255,.75); white-space: nowrap; border-radius: 4px; transition: color .15s; }
.ydu-nav a:hover, .ydu-nav a.active { color: var(--gold); }
.ydu-nav a.active { border-bottom: 2px solid var(--gold); border-radius: 0; }
.ydu-header-actions { display: flex; align-items: center; gap: 10px; }
.btn-subscribe { background: var(--gold); color: var(--dark); padding: 8px 18px; font-size: 13px; font-weight: 700; border: none; cursor: pointer; border-radius: 3px; white-space: nowrap; }
.btn-subscribe:hover { background: #c89500; }

/* ── MAIN WRAPPER ── */
.ydu-main { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* ── HERO ── */
.ydu-hero { display: grid; grid-template-columns: 1fr 340px; gap: 24px; padding: 24px 0 0; border-bottom: 1px solid var(--border); padding-bottom: 24px; }
.hero-featured { position: relative; overflow: hidden; border-radius: 4px; min-height: 420px; background: var(--dark); }
.hero-featured-img { width: 100%; height: 100%; object-fit: cover; opacity: .85; position: absolute; inset: 0; }
.hero-featured-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.3) 50%, rgba(0,0,0,.1) 100%); }
.hero-featured-content { position: absolute; bottom: 0; left: 0; right: 0; padding: 28px; color: #fff; }
.hero-cat-badge { display: inline-block; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 3px 10px; margin-bottom: 12px; border-radius: 2px; }
.hero-featured-content h1 { font-family: var(--font-serif); font-size: clamp(22px, 2.5vw, 32px); font-weight: 800; line-height: 1.2; margin-bottom: 10px; }
.hero-featured-content h1 a { color: #fff; }
.hero-featured-content h1 a:hover { text-decoration: underline; }
.hero-excerpt { font-size: 14px; color: rgba(255,255,255,.85); margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-meta { font-size: 12px; color: rgba(255,255,255,.7); }
.hero-meta .author { font-weight: 600; color: rgba(255,255,255,.9); }

/* Hero: no featured image fallback */
.hero-featured.no-img { background: var(--dark); }
.hero-featured.no-img .hero-featured-content { position: static; padding: 40px 28px; color: #fff; }

/* ── TOP STORIES SIDEBAR ── */
.top-stories h3 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--dark); border-bottom: 2px solid var(--dark); padding-bottom: 10px; margin-bottom: 16px; }
.top-story-item { display: grid; grid-template-columns: 80px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); align-items: start; }
.top-story-item:last-child { border-bottom: none; }
.top-story-thumb { width: 80px; height: 60px; object-fit: cover; border-radius: 3px; background: var(--bg); }
.top-story-thumb-placeholder { width: 80px; height: 60px; background: var(--bg); border-radius: 3px; display: flex; align-items: center; justify-content: center; }
.top-story-info .cat { font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--red); margin-bottom: 4px; }
.top-story-info h4 { font-size: 13px; font-weight: 600; line-height: 1.35; color: var(--dark); }
.top-story-info h4 a:hover { color: var(--red); }
.top-story-info .time { font-size: 11px; color: var(--light); margin-top: 4px; }

/* ── SECTION HEADERS ── */
.section-header { display: flex; align-items: center; justify-content: space-between; margin: 28px 0 16px; }
.section-header h2 { font-size: 18px; font-weight: 800; color: var(--dark); }
.section-header h2::after { content: ''; display: block; width: 40px; height: 3px; background: var(--red); margin-top: 4px; }
.view-all { font-size: 12px; font-weight: 600; color: var(--red); display: flex; align-items: center; gap: 4px; }
.view-all:hover { text-decoration: underline; }

/* ── LATEST NEWS SLIDER ── */
.slider-wrapper { position: relative; }
.slider-track {
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; padding-bottom: 4px;
  scroll-behavior: smooth;
}
.slider-track::-webkit-scrollbar { display: none; }
.slider-card {
  scroll-snap-align: start; min-width: 260px; max-width: 260px;
  flex-shrink: 0; cursor: pointer;
}
.slider-card-img { width: 100%; height: 160px; object-fit: cover; border-radius: 4px; background: var(--bg); margin-bottom: 10px; }
.slider-card-img-placeholder { width: 100%; height: 160px; background: var(--bg); border-radius: 4px; margin-bottom: 10px; display: flex; align-items: center; justify-content: center; color: var(--light); font-size: 12px; }
.slider-card .cat { font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--red); margin-bottom: 6px; }
.slider-card h3 { font-size: 14px; font-weight: 700; line-height: 1.35; color: var(--dark); margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.slider-card h3 a:hover { color: var(--red); }
.slider-card .time { font-size: 11px; color: var(--light); }
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); background: var(--white); border: 1px solid var(--border); width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 10; box-shadow: 0 2px 8px rgba(0,0,0,.1); font-size: 16px; color: var(--dark); }
.slider-btn:hover { background: var(--dark); color: #fff; }
.slider-btn.prev { left: -18px; }
.slider-btn.next { right: -18px; }

/* ── EXPLORE SECTIONS ── */
.explore-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.explore-tile { position: relative; height: 140px; overflow: hidden; border-radius: 4px; background: var(--dark); cursor: pointer; }
.explore-tile img { width: 100%; height: 100%; object-fit: cover; opacity: .65; transition: opacity .3s, transform .3s; }
.explore-tile:hover img { opacity: .5; transform: scale(1.05); }
.explore-tile-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; padding: 14px; color: #fff; }
.explore-tile-overlay span { font-size: 14px; font-weight: 700; }
.explore-tile-overlay .arrow { font-size: 16px; margin-top: 2px; }
.explore-tile-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, #333 0%, #555 100%); }

/* ── BOTTOM SECTION ── */
.ydu-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin: 32px 0; padding: 32px 0; border-top: 1px solid var(--border); }

/* Newsletter */
.newsletter-box h3 { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.newsletter-box p { font-size: 14px; color: var(--mid); margin-bottom: 18px; line-height: 1.5; }
.newsletter-form { display: flex; gap: 0; }
.newsletter-form input[type="email"] { flex: 1; padding: 11px 16px; border: 1px solid var(--border); border-right: none; font-size: 14px; font-family: var(--font-sans); outline: none; border-radius: 3px 0 0 3px; }
.newsletter-form input[type="email"]:focus { border-color: var(--dark); }
.newsletter-form button { background: var(--dark); color: #fff; border: none; padding: 11px 22px; font-size: 13px; font-weight: 700; cursor: pointer; border-radius: 0 3px 3px 0; white-space: nowrap; }
.newsletter-form button:hover { background: var(--red); }
.newsletter-success { display: none; color: var(--red); font-weight: 600; font-size: 14px; margin-top: 12px; }

/* Opinion */
.opinion-box h3 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--dark); border-bottom: 2px solid var(--dark); padding-bottom: 10px; margin-bottom: 18px; }
.opinion-item { display: flex; gap: 16px; align-items: flex-start; }
.opinion-thumb { width: 90px; height: 70px; object-fit: cover; border-radius: 3px; flex-shrink: 0; }
.opinion-thumb-placeholder { width: 90px; height: 70px; background: var(--bg); border-radius: 3px; flex-shrink: 0; }
.opinion-info .author-name { font-size: 12px; font-weight: 700; color: var(--red); margin-bottom: 5px; }
.opinion-info h4 { font-size: 16px; font-weight: 700; line-height: 1.3; margin-bottom: 6px; font-family: var(--font-serif); }
.opinion-info h4 a:hover { color: var(--red); }
.opinion-info .excerpt { font-size: 13px; color: var(--mid); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ── FOOTER ── */
.ydu-footer { background: var(--dark); color: #aaa; padding: 40px 0 24px; margin-top: 20px; }
.ydu-footer .inner { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.footer-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid #333; }
.footer-logo { font-family: var(--font-serif); font-size: 22px; font-weight: 800; color: #fff; }
.footer-logo span { color: var(--gold); }
.footer-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-nav a { font-size: 12px; color: #aaa; transition: color .15s; }
.footer-nav a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.footer-bottom .links { display: flex; gap: 16px; }
.footer-bottom .links a { color: #aaa; }
.footer-bottom .links a:hover { color: #fff; }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 60px 20px; color: var(--light); font-size: 14px; }
.empty-state strong { display: block; font-size: 18px; color: var(--mid); margin-bottom: 8px; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .ydu-hero { grid-template-columns: 1fr; }
  .top-stories { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .top-stories h3 { grid-column: 1/-1; }
  .explore-grid { grid-template-columns: repeat(3, 1fr); }
  .ydu-bottom { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .ydu-header .inner { height: 56px; }
  .ydu-logo { font-size: 20px; }
  .ydu-nav { display: none; }
  .explore-grid { grid-template-columns: repeat(2, 1fr); }
  .slider-btn { display: none; }
  .hero-featured { min-height: 300px; }
}
