/* ============================================================
   CannBus News — Universal Stylesheet
   www.cannbus.org | Updated: March 25, 2026
   ============================================================ */

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

/* ---- CSS Variables ---- */
:root {
  --teal-dark:    #0a6e6e;
  --teal:         #0d9488;
  --teal-mid:     #14b8a6;
  --teal-light:   #99f6e4;
  --teal-pale:    #e0fdf9;
  --white:        #ffffff;
  --off-white:    #f8fffe;
  --gray-50:      #f9fafb;
  --gray-100:     #f3f4f6;
  --gray-200:     #e5e7eb;
  --gray-400:     #9ca3af;
  --gray-600:     #4b5563;
  --gray-800:     #1f2937;
  --black:        #111827;
  --accent-gold:  #f59e0b;
  --accent-rose:  #f43f5e;
  --accent-blue:  #3b82f6;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.08);
  --shadow-md:    0 4px 16px rgba(13,148,136,.12);
  --shadow-lg:    0 8px 32px rgba(13,148,136,.18);
  --radius-sm:    6px;
  --radius-md:    12px;
  --radius-lg:    20px;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--off-white);
  color: var(--gray-800);
  line-height: 1.7;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a  { color: var(--teal); text-decoration: none; transition: color .2s; }
a:hover { color: var(--teal-dark); text-decoration: underline; }

/* ---- Utility ---- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.sr-only   { position: absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }

/* ---- Header / Nav ---- */
.site-header {
  background: linear-gradient(135deg, var(--teal-dark) 0%, var(--teal) 60%, var(--teal-mid) 100%);
  color: var(--white);
  box-shadow: var(--shadow-lg);
  position: sticky; top: 0; z-index: 100;
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  max-width: 1100px; margin: 0 auto;
}

.logo-wrap { display: flex; align-items: center; gap: 12px; }
.logo-icon {
  width: 44px; height: 44px;
  background: rgba(255,255,255,.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.logo-text { font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: 800; letter-spacing: -.5px; }
.logo-sub  { font-size: .68rem; font-weight: 400; opacity: .75; letter-spacing: 1px; text-transform: uppercase; }

.site-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.site-nav a {
  color: rgba(255,255,255,.85);
  font-size: .82rem; font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.site-nav a:hover, .site-nav a.active {
  background: rgba(255,255,255,.18);
  color: var(--white);
  text-decoration: none;
}

/* ---- Hero Banner ---- */
.hero {
  background: linear-gradient(160deg, var(--teal-dark) 0%, var(--teal-mid) 100%);
  color: var(--white);
  padding: 60px 24px 50px;
  text-align: center;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-tag {
  display: inline-block;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 20px;
  font-size: .75rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  padding: 4px 14px; margin-bottom: 16px;
}
.hero h1 { font-family: 'Playfair Display', serif; font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; line-height: 1.2; margin-bottom: 14px; }
.hero p  { font-size: 1.05rem; opacity: .88; max-width: 640px; margin: 0 auto 24px; }
.hero-meta { font-size: .78rem; opacity: .65; }

/* ---- Article Layout ---- */
.article-layout { display: grid; grid-template-columns: 1fr 300px; gap: 36px; padding: 40px 24px; max-width: 1100px; margin: 0 auto; }
@media (max-width: 800px) { .article-layout { grid-template-columns: 1fr; } }

/* ---- Article Body ---- */
.article-body { min-width: 0; }

.article-body h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.55rem; font-weight: 700; color: var(--teal-dark);
  margin: 36px 0 12px; padding-bottom: 8px;
  border-bottom: 2px solid var(--teal-pale);
}
.article-body h3 { font-size: 1.1rem; font-weight: 700; color: var(--gray-800); margin: 24px 0 8px; }
.article-body p  { margin-bottom: 16px; color: var(--gray-600); font-size: .97rem; }

.article-body ul { margin: 10px 0 20px 0; padding: 0; list-style: none; }
.article-body ul li {
  padding: 7px 0 7px 28px;
  position: relative;
  color: var(--gray-600); font-size: .95rem;
  border-bottom: 1px solid var(--gray-100);
}
.article-body ul li::before {
  content: '▸';
  position: absolute; left: 6px;
  color: var(--teal); font-size: .8rem;
}

/* ---- Sidebar ---- */
.sidebar { display: flex; flex-direction: column; gap: 20px; }

.sidebar-card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.sidebar-card h4 {
  font-size: .8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--teal-dark);
  margin-bottom: 14px; padding-bottom: 8px;
  border-bottom: 2px solid var(--teal-pale);
}
.sidebar-card ul { list-style: none; }
.sidebar-card ul li { padding: 7px 0; border-bottom: 1px solid var(--gray-100); font-size: .85rem; }
.sidebar-card ul li:last-child { border-bottom: none; }
.sidebar-card ul li a { color: var(--teal-dark); font-weight: 500; }
.sidebar-card ul li a:hover { color: var(--teal); }

/* ---- Info Cards ---- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; margin: 24px 0; }

.card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card-icon  { font-size: 1.8rem; margin-bottom: 10px; }
.card-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--teal); margin-bottom: 4px; }
.card-value { font-size: 1.45rem; font-weight: 800; color: var(--gray-800); }
.card-desc  { font-size: .8rem; color: var(--gray-400); margin-top: 4px; }

/* ---- Callout / Alert Box ---- */
.callout {
  border-left: 4px solid var(--teal);
  background: var(--teal-pale);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px; margin: 24px 0;
  font-size: .93rem; color: var(--teal-dark);
}
.callout strong { font-weight: 700; }

.callout-warning { border-left-color: var(--accent-gold); background: #fffbeb; color: #92400e; }
.callout-alert   { border-left-color: var(--accent-rose); background: #fff1f2; color: #9f1239; }

/* ---- Data Tables ---- */
.data-table-wrap { overflow-x: auto; margin: 24px 0; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; background: var(--white); font-size: .88rem; }
thead { background: linear-gradient(135deg, var(--teal-dark), var(--teal)); color: var(--white); }
thead th { padding: 12px 16px; text-align: left; font-weight: 600; font-size: .82rem; letter-spacing: .5px; }
tbody tr { border-bottom: 1px solid var(--gray-100); transition: background .15s; }
tbody tr:hover { background: var(--teal-pale); }
tbody td { padding: 11px 16px; color: var(--gray-600); }
tbody tr:last-child { border-bottom: none; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: .72rem; font-weight: 700; }
.tag-green  { background: #d1fae5; color: #065f46; }
.tag-red    { background: #fee2e2; color: #991b1b; }
.tag-yellow { background: #fef3c7; color: #92400e; }
.tag-blue   { background: #dbeafe; color: #1e40af; }

/* ---- Charts (CSS-only bar charts) ---- */
.bar-chart { margin: 24px 0; }
.bar-row   { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; font-size: .85rem; }
.bar-label { width: 140px; flex-shrink: 0; color: var(--gray-600); font-weight: 500; text-align: right; }
.bar-track { flex: 1; height: 22px; background: var(--gray-100); border-radius: 20px; overflow: hidden; }
.bar-fill  { height: 100%; border-radius: 20px; background: linear-gradient(90deg, var(--teal-dark), var(--teal-mid)); transition: width .6s ease; display: flex; align-items: center; padding-left: 8px; }
.bar-fill span { font-size: .72rem; font-weight: 700; color: white; white-space: nowrap; }

/* ---- Citations / References ---- */
.citations {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin-top: 40px;
}
.citations h3 { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--teal-dark); margin-bottom: 14px; }
.citations ol  { padding-left: 20px; }
.citations li  { font-size: .82rem; color: var(--gray-600); margin-bottom: 8px; line-height: 1.5; }
.citations a   { color: var(--teal); word-break: break-all; }

/* ---- Footer ---- */
.site-footer {
  background: var(--gray-800);
  color: rgba(255,255,255,.7);
  padding: 36px 24px;
  margin-top: 60px;
  text-align: center;
  font-size: .83rem;
}
.site-footer a  { color: var(--teal-light); }
.site-footer .footer-brand { font-family: 'Playfair Display', serif; font-size: 1.2rem; font-weight: 800; color: var(--white); margin-bottom: 6px; }
.update-stamp  { font-size: .76rem; color: var(--gray-400); margin-top: 10px; }

/* ---- Index Page Specific ---- */
.index-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 24px; padding: 40px 24px; max-width: 1100px; margin: 0 auto; }

.article-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .22s, box-shadow .22s;
  display: flex; flex-direction: column;
}
.article-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }

.article-card-thumb {
  height: 170px;
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem;
  background: linear-gradient(135deg, var(--teal-dark), var(--teal-mid));
}

.article-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.article-card-cat  { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--teal); margin-bottom: 8px; }
.article-card-title { font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 700; color: var(--gray-800); margin-bottom: 10px; line-height: 1.35; }
.article-card-excerpt { font-size: .85rem; color: var(--gray-600); flex: 1; line-height: 1.6; }
.article-card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--gray-100); }
.article-card-date   { font-size: .76rem; color: var(--gray-400); }
.read-more {
  font-size: .8rem; font-weight: 600; color: var(--teal-dark);
  padding: 5px 14px;
  border: 1.5px solid var(--teal);
  border-radius: 20px;
  transition: all .2s;
}
.read-more:hover { background: var(--teal); color: white; text-decoration: none; }

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .header-inner   { flex-direction: column; gap: 10px; }
  .site-nav        { justify-content: center; }
  .hero h1         { font-size: 1.6rem; }
  .bar-label       { width: 90px; font-size: .75rem; }
  .article-layout  { padding: 20px 16px; }
}
