/*
Theme Name: News Daily
Theme URI: https://coozmoo.com
Author: Coozmoo Digital Solutions
Author URI: https://coozmoo.com
Description: A bold, high-density news & press-release theme inspired by major daily-newspaper websites. Features a red breaking-news bar, ticker, category-color badges, grid-based homepage, and full widget support. Pairs with the "News Daily Suite" plugin.
Version: 1.0.0
Requires at least: 5.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: news-daily
Tags: news, blog, grid-layout, custom-colors, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* =========================================================
   1. RESET / BASE
========================================================= */
:root{
  --nd-red:#d8232a;
  --nd-dark-red:#a8161c;
  --nd-navy:#12233d;
  --nd-ink:#1a1a1a;
  --nd-gray:#5a5a5a;
  --nd-light-gray:#f2f2f2;
  --nd-border:#e2e2e2;
  --nd-white:#ffffff;
  --nd-font-serif: Georgia, 'Times New Roman', Times, serif;
  --nd-font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

body{
  margin:0;
  font-family:var(--nd-font-sans);
  color:var(--nd-ink);
  background:var(--nd-white);
  line-height:1.5;
}

a{ color:inherit; text-decoration:none; }
a:hover{ text-decoration:underline; }
img{ max-width:100%; height:auto; display:block; }
ul{ list-style:none; margin:0; padding:0; }
h1,h2,h3,h4{ font-family:var(--nd-font-serif); line-height:1.2; margin:0 0 .4em; }

.container{
  max-width:1200px;
  margin:0 auto;
  padding:0 16px;
}

/* =========================================================
   2. TOP UTILITY BAR
========================================================= */
.nd-topbar{
  background:var(--nd-navy);
  color:#fff;
  font-size:12px;
}
.nd-topbar .container{
  display:flex;
  justify-content:space-between;
  align-items:center;
  height:34px;
}
.nd-topbar .nd-date{ opacity:.85; }
.nd-topbar-right{ display:flex; align-items:center; }
.nd-topbar-links a{ margin-left:14px; opacity:.9; }
.nd-auth-links{
  display:flex;
  align-items:center;
  margin-left:14px;
  padding-left:14px;
  border-left:1px solid rgba(255,255,255,.25);
}
.nd-auth-links a{ margin-left:14px; opacity:.9; }
.nd-auth-links a:first-child{ margin-left:0; }

/* =========================================================
   3. BREAKING NEWS TICKER (rendered by plugin shortcode/widget)
========================================================= */
.nd-breaking-bar{
  background:var(--nd-red);
  color:#fff;
  display:flex;
  align-items:center;
  overflow:hidden;
}
.nd-breaking-label{
  background:var(--nd-dark-red);
  font-weight:700;
  font-size:12px;
  letter-spacing:.5px;
  text-transform:uppercase;
  padding:8px 14px;
  white-space:nowrap;
}
.nd-breaking-track{
  overflow:hidden;
  flex:1;
  position:relative;
  height:34px;
}
.nd-breaking-track ul{
  position:absolute;
  white-space:nowrap;
  animation:nd-scroll 28s linear infinite;
  display:flex;
  align-items:center;
  height:34px;
}
.nd-breaking-track li{ padding-right:60px; font-size:13px; }
.nd-breaking-track li a{ color:#fff; }
@keyframes nd-scroll{
  0%{ transform:translateX(100%); }
  100%{ transform:translateX(-100%); }
}

/* =========================================================
   4. MASTHEAD / LOGO / NAV
========================================================= */
.nd-masthead{
  border-bottom:3px solid var(--nd-ink);
  padding:18px 0;
}
.nd-masthead .container{
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  align-items:center;
  gap:16px;
}
.nd-logo{
  font-family:var(--nd-font-serif);
  font-weight:700;
  font-size:38px;
  letter-spacing:-.5px;
}
.nd-logo span{ color:var(--nd-red); }

/* Custom logo (Customizer > Site Identity) uploads render at their
   native size by default — cap it so a large image can't blow out
   the header. */
.nd-masthead .custom-logo-link{
  display:inline-block;
  line-height:0;
}
.nd-masthead .custom-logo{
  max-height:60px;
  width:auto;
  height:auto;
}
.nd-masthead-search input{
  border:1px solid var(--nd-border);
  padding:8px 12px;
  border-radius:20px;
  width:220px;
  font-size:13px;
}

.nd-primary-nav{
  background:var(--nd-ink);
}
.nd-primary-nav ul{
  display:flex;
  flex-wrap:wrap;
}
.nd-primary-nav a{
  display:block;
  color:#fff;
  padding:12px 16px;
  font-size:13px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.4px;
}
.nd-primary-nav a:hover{
  background:var(--nd-red);
  text-decoration:none;
}
.nd-primary-nav .current-menu-item > a{ background:var(--nd-red); }

/* =========================================================
   5. CATEGORY BADGES (colors assigned by plugin)
========================================================= */
.nd-badge{
  display:inline-block;
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.4px;
  padding:3px 8px;
  border-radius:2px;
  color:#fff;
  background:var(--nd-red);
  margin-bottom:8px;
}

/* =========================================================
   6. HOMEPAGE GRID
========================================================= */
.nd-home-grid{
  display:grid;
  grid-template-columns:2fr 1fr;
  gap:28px;
  padding:28px 0;
}
.nd-lead-story{
  border-bottom:1px solid var(--nd-border);
  padding-bottom:24px;
  margin-bottom:24px;
}
.nd-lead-story h2{ font-size:34px; }
.nd-lead-story .nd-excerpt{ font-size:16px; color:var(--nd-gray); }

.nd-story-list{ display:flex; flex-direction:column; gap:18px; }
.nd-story-row{
  display:flex;
  gap:14px;
  border-bottom:1px solid var(--nd-border);
  padding-bottom:18px;
}
.nd-story-row img{ width:120px; height:80px; object-fit:cover; flex-shrink:0; }
.nd-story-row h3{ font-size:16px; }

.nd-sidebar-card{
  border:1px solid var(--nd-border);
  padding:16px;
  margin-bottom:20px;
}
.nd-sidebar-card h4{
  text-transform:uppercase;
  font-size:13px;
  border-bottom:2px solid var(--nd-red);
  padding-bottom:8px;
  margin-bottom:12px;
}
.nd-trending-item{ display:flex; gap:10px; margin-bottom:12px; align-items:flex-start; }
.nd-trending-num{
  font-family:var(--nd-font-serif);
  font-size:22px;
  font-weight:700;
  color:var(--nd-red);
  width:26px;
}

/* =========================================================
   7. CATEGORY / ARCHIVE GRID
========================================================= */
.nd-archive-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:24px;
  padding:28px 0;
}
.nd-archive-card img{ width:100%; height:170px; object-fit:cover; margin-bottom:10px; }
.nd-archive-card h3{ font-size:18px; }
.nd-meta{ font-size:12px; color:var(--nd-gray); text-transform:uppercase; letter-spacing:.3px; }

/* =========================================================
   8. SINGLE ARTICLE
========================================================= */
.nd-article{ padding:28px 0; max-width:760px; margin:0 auto; }
.nd-article h1{ font-size:36px; }
.nd-article .nd-byline{ color:var(--nd-gray); font-size:13px; margin-bottom:18px; }
.nd-article-body{ font-size:18px; line-height:1.7; }
.nd-article-body p{ margin:0 0 1.2em; }
.nd-share-bar{
  display:flex;
  gap:10px;
  border-top:1px solid var(--nd-border);
  border-bottom:1px solid var(--nd-border);
  padding:14px 0;
  margin:24px 0;
}
.nd-share-bar a{
  font-size:12px;
  font-weight:700;
  text-transform:uppercase;
  padding:6px 12px;
  border:1px solid var(--nd-ink);
  border-radius:20px;
}
.nd-share-bar a:hover{ background:var(--nd-ink); color:#fff; text-decoration:none; }

.nd-related{ margin-top:36px; }
.nd-related h3{
  text-transform:uppercase;
  font-size:14px;
  border-bottom:2px solid var(--nd-red);
  padding-bottom:8px;
}
.nd-related-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }

/* =========================================================
   9. FOOTER
========================================================= */
.nd-footer{
  background:var(--nd-navy);
  color:#fff;
  margin-top:40px;
  padding:36px 0 20px;
}
.nd-footer-cols{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:24px;
}
.nd-footer h4{ font-family:var(--nd-font-sans); text-transform:uppercase; font-size:13px; margin-bottom:12px; }
.nd-footer a{ color:#cfd6e0; display:block; font-size:13px; margin-bottom:6px; }
.nd-footer-bottom{
  text-align:center;
  border-top:1px solid rgba(255,255,255,.15);
  margin-top:24px;
  padding-top:16px;
  font-size:12px;
  color:#9aa5b3;
}

/* =========================================================
   10. MEMBER PORTAL — register / login / dashboard
   (rendered by the News Daily Suite plugin's shortcodes)
========================================================= */
.nd-auth-form{
  max-width:420px;
  margin:40px auto;
  padding:28px;
  border:1px solid var(--nd-border);
}
.nd-auth-form label{
  display:block;
  font-size:12px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.3px;
  margin-bottom:4px;
}
.nd-auth-form input[type="text"],
.nd-auth-form input[type="email"],
.nd-auth-form input[type="password"]{
  width:100%;
  padding:10px 12px;
  border:1px solid var(--nd-border);
  font-size:14px;
}
.nd-btn{
  display:inline-block;
  background:var(--nd-red);
  color:#fff;
  border:0;
  padding:10px 20px;
  font-weight:700;
  text-transform:uppercase;
  font-size:13px;
  letter-spacing:.4px;
  cursor:pointer;
  border-radius:2px;
}
.nd-btn:hover{ background:var(--nd-dark-red); text-decoration:none; color:#fff; }
.nd-btn-secondary{ background:var(--nd-ink); }
.nd-btn-secondary:hover{ background:#000; }
.nd-form-success{ background:#e6f6ea; color:#1e7a37; padding:10px 14px; font-size:14px; }
.nd-form-error{ background:#fce8e8; color:var(--nd-dark-red); padding:10px 14px; font-size:14px; }

.nd-dashboard{ padding:28px 0; }
.nd-dashboard-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  border-bottom:2px solid var(--nd-ink);
  padding-bottom:16px;
  margin-bottom:20px;
}
.nd-dashboard-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:24px;
}
@media (max-width:700px){
  .nd-dashboard-grid{ grid-template-columns:1fr; }
  .nd-dashboard-header{ flex-direction:column; align-items:flex-start; gap:10px; }
}

/* =========================================================
   11. RESPONSIVE
========================================================= */
@media (max-width:900px){
  .nd-home-grid{ grid-template-columns:1fr; }
  .nd-archive-grid{ grid-template-columns:repeat(2,1fr); }
  .nd-footer-cols{ grid-template-columns:repeat(2,1fr); }
  .nd-related-grid{ grid-template-columns:1fr; }
}
@media (max-width:600px){
  .nd-masthead .container{ flex-direction:column; gap:10px; }
  .nd-logo{ font-size:28px; }
  .nd-masthead .custom-logo{ max-height:44px; }
  .nd-archive-grid{ grid-template-columns:1fr; }
  .nd-footer-cols{ grid-template-columns:1fr; }
  .nd-primary-nav ul{ flex-direction:column; }
  .nd-topbar .container{ flex-direction:column; height:auto; padding:8px 16px; gap:4px; }
  .nd-topbar-right{ flex-wrap:wrap; justify-content:center; }
  .nd-auth-links{ margin-left:0; padding-left:0; border-left:0; }
}
