/*
Theme Name: WellWire
Theme URI: https://example.com/wellwire
Author: Your Name
Author URI: https://example.com
Description: A clean, editorial health & wellness news theme with a featured story layout, trending ticker, and colour-coded category sidebar. Modeled after the WellWire design.
Version: 1.0
Requires at least: 5.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: wellwire
*/

:root{
  --ww-green: #2f7a5f;
  --ww-green-dark: #24614a;
  --ww-text: #1c1f1e;
  --ww-muted: #6b7370;
  --ww-border: #e7e9e8;
  --ww-bg: #ffffff;
  --ww-bg-soft: #f7f8f7;
  --ww-red: #e0654f;
  --ww-purple: #7c5cbf;
  --ww-orange: #d99a2b;
  --ww-blue: #3d7fc4;
}

*{ box-sizing: border-box; }

body{
  margin:0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ww-text);
  background: var(--ww-bg);
  -webkit-font-smoothing: antialiased;
}

a{ color: inherit; text-decoration: none; }
img{ max-width:100%; display:block; }
ul{ list-style:none; margin:0; padding:0; }

.container{
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header{
  border-bottom: 1px solid var(--ww-border);
}
.site-header .header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 18px 24px;
  gap: 24px;
}
.site-branding{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:800;
  font-size:22px;
}
.site-branding .logo-dot{
  width:34px;height:34px;border-radius:50%;
  background: var(--ww-green);
  display:flex;align-items:center;justify-content:center;
}
.site-branding .logo-dot svg{ width:18px;height:18px; }
.site-branding a{ display:flex; align-items:center; gap:10px; color:var(--ww-text); }

.header-search{
  flex: 1;
  max-width: 380px;
}
.header-search form{
  display:flex;
  align-items:center;
  background: var(--ww-bg-soft);
  border:1px solid var(--ww-border);
  border-radius: 999px;
  padding: 9px 16px;
  gap:8px;
}
.header-search input[type="search"]{
  border:0;background:transparent;outline:none;width:100%;font-size:14px;color:var(--ww-text);
}
.header-search svg{ width:16px;height:16px; color: var(--ww-muted); flex-shrink:0; }

.subscribe-btn{
  background: var(--ww-green);
  color:#fff;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight:600;
  font-size:14px;
  white-space:nowrap;
  border:0;
  cursor:pointer;
}
.subscribe-btn:hover{ background: var(--ww-green-dark); color:#fff; }

/* ---------- Primary nav ---------- */
.primary-nav{
  background: var(--ww-bg-soft);
  border-bottom:1px solid var(--ww-border);
}
.primary-nav .container{ display:flex; }
.primary-nav ul{ display:flex; gap:28px; }
.primary-nav a{
  display:block;
  padding:16px 0;
  font-weight:600;
  font-size:15px;
  color: var(--ww-text);
  border-bottom:2px solid transparent;
}
.primary-nav li.current-menu-item a,
.primary-nav a:hover{
  color: var(--ww-green);
  border-bottom-color: var(--ww-green);
}

/* ---------- Trending ticker ---------- */
.trending-bar{
  border-bottom:1px solid var(--ww-border);
}
.trending-bar .container{
  display:flex;
  align-items:center;
  gap:18px;
  padding:12px 24px;
  overflow:hidden;
}
.trending-label{
  display:flex;
  align-items:center;
  gap:6px;
  color: var(--ww-red);
  font-weight:700;
  font-size:14px;
  flex-shrink:0;
}
.trending-label svg{ width:14px;height:14px; }
.trending-track{
  display:flex;
  gap:32px;
  overflow-x:auto;
  scrollbar-width:none;
  white-space:nowrap;
  font-size:14px;
  color: var(--ww-text);
}
.trending-track::-webkit-scrollbar{ display:none; }
.trending-track a{ opacity:.85; }
.trending-track a:hover{ opacity:1; color:var(--ww-green); }

/* ---------- Main layout ---------- */
.site-main .container{
  padding-top: 40px;
  padding-bottom: 60px;
}
.home-layout{
  display:grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items:start;
}
@media (max-width: 860px){
  .home-layout{ grid-template-columns: 1fr; }
}

/* Featured post */
.featured-post .featured-thumb{
  position:relative;
  border-radius:14px;
  overflow:hidden;
  background: linear-gradient(135deg, #2f7a5f 0%, #1d5c46 100%);
  aspect-ratio: 16/9;
  margin-bottom:22px;
}
.featured-post .featured-thumb img{
  width:100%;height:100%;object-fit:cover;
}
.category-badge{
  position:absolute;
  left:16px; bottom:16px;
  background: rgba(0,0,0,.55);
  color:#fff;
  font-size:11px;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
  padding:6px 10px;
  border-radius:5px;
}
.featured-post h1,
.featured-post h2.entry-title{
  font-size: 30px;
  line-height:1.25;
  margin: 0 0 14px;
  font-weight:800;
}
.featured-post .entry-excerpt{
  color: var(--ww-muted);
  font-size:16px;
  line-height:1.6;
  margin-bottom:16px;
}
.entry-meta{
  display:flex;
  align-items:center;
  gap:8px;
  color: var(--ww-muted);
  font-size:14px;
}
.entry-meta .author-dot{
  width:10px;height:10px;border-radius:50%;
  background: var(--ww-green);
  display:inline-block;
}
.entry-meta .sep{ opacity:.5; }

/* Sidebar list */
.sidebar-list{ display:flex; flex-direction:column; gap:22px; }
.sidebar-item{ display:flex; gap:14px; }
.sidebar-thumb{
  position:relative;
  width:96px; height:96px;
  border-radius:10px;
  overflow:hidden;
  flex-shrink:0;
  background: var(--ww-red);
}
.sidebar-thumb img{ width:100%;height:100%;object-fit:cover; }
.sidebar-thumb .category-badge{
  left:8px; bottom:8px; font-size:9px; padding:4px 6px; border-radius:4px;
  background: rgba(0,0,0,.45);
}
.sidebar-item h3{
  font-size:16px;
  line-height:1.35;
  margin:0 0 6px;
  font-weight:700;
}
.sidebar-item .entry-meta{ font-size:13px; }

/* category colour cycling */
.cat-color-0 .sidebar-thumb, .cat-color-0 .featured-thumb{ background: var(--ww-red); }
.cat-color-1 .sidebar-thumb, .cat-color-1 .featured-thumb{ background: var(--ww-purple); }
.cat-color-2 .sidebar-thumb, .cat-color-2 .featured-thumb{ background: var(--ww-orange); }
.cat-color-3 .sidebar-thumb, .cat-color-3 .featured-thumb{ background: var(--ww-green); }
.cat-color-4 .sidebar-thumb, .cat-color-4 .featured-thumb{ background: var(--ww-blue); }

/* ---------- Archive / blog grid (index beyond featured) ---------- */
.post-grid{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap:32px;
  margin-top:48px;
}
@media (max-width:700px){ .post-grid{ grid-template-columns:1fr; } }
.post-card .card-thumb{
  position:relative;
  border-radius:12px;
  overflow:hidden;
  aspect-ratio:16/10;
  margin-bottom:14px;
}
.post-card .card-thumb img{ width:100%;height:100%;object-fit:cover; }
.post-card h2{ font-size:19px; margin:0 0 8px; font-weight:700; line-height:1.35; }
.post-card .entry-excerpt{ color:var(--ww-muted); font-size:14px; margin-bottom:10px; }

/* ---------- Single post ---------- */
.single-post-header{ max-width:760px; margin: 0 auto 28px; }
.single-post-header h1{ font-size:34px; line-height:1.25; margin:0 0 14px; font-weight:800; }
.single-post-thumb{ max-width:900px; margin:0 auto 32px; border-radius:14px; overflow:hidden; }
.entry-content{ max-width:760px; margin:0 auto; font-size:18px; line-height:1.75; }
.entry-content p{ margin:0 0 22px; }
.entry-content h2{ font-size:24px; margin:36px 0 16px; font-weight:800; }
.entry-content img{ border-radius:10px; margin:24px 0; }

/* ---------- Widgets / footer ---------- */
.site-footer{
  border-top:1px solid var(--ww-border);
  background: var(--ww-bg-soft);
  padding: 40px 0;
  margin-top:60px;
}
.site-footer .container{
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:16px;
  font-size:14px;
  color: var(--ww-muted);
}
.footer-nav ul{ display:flex; gap:20px; flex-wrap:wrap; }
.footer-nav a:hover{ color: var(--ww-green); }

.pagination{ margin-top:40px; display:flex; gap:10px; justify-content:center; }
.pagination a, .pagination span{
  padding:8px 14px; border:1px solid var(--ww-border); border-radius:8px; font-size:14px;
}
.pagination .current{ background: var(--ww-green); color:#fff; border-color:var(--ww-green); }

/* mobile nav toggle */
.menu-toggle{ display:none; background:none;border:0;font-size:22px;cursor:pointer; }
@media (max-width:860px){
  .header-search{ display:none; }
  .menu-toggle{ display:block; }
  .primary-nav ul{ flex-direction:column; gap:0; display:none; }
  .primary-nav.open ul{ display:flex; }
  .primary-nav a{ padding:12px 0; }
}
