/* ================================================
   KickKratom.com — Modern Recovery Theme
   Fonts: Inter (body), Playfair Display (headings)
   Colors: Warm earth tones with teal accents
   Vibe: Calm, trustworthy, modern wellness
   ================================================ */

/* === Custom Properties === */
:root {
  --color-primary: #2a7d6e;       /* teal — trust, calm */
  --color-primary-dark: #1f5f54;
  --color-primary-light: #e8f5f1;
  --color-accent: #d4763a;        /* warm amber — CTAs */
  --color-accent-dark: #b8612e;
  --color-text: #2d3436;
  --color-text-light: #636e72;
  --color-heading: #1a1a2e;
  --color-bg: #fafaf8;
  --color-surface: #ffffff;
  --color-border: #e8e6e1;
  --color-muted: #f5f4f0;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.1);
  --transition: 0.2s ease;
  --max-width: 1140px;
}

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--color-primary-dark); }

h1, h2, h3, h4, h5, h6 {
  font-family: "Playfair Display", Georgia, serif;
  line-height: 1.3;
  margin: 1.8em 0 0.6em;
  color: var(--color-heading);
  letter-spacing: -0.01em;
}
h1 { font-size: 2.5rem; font-weight: 700; }
h2 { font-size: 1.9rem; font-weight: 600; }
h3 { font-size: 1.25rem; font-family: "Inter", sans-serif; font-weight: 600; color: var(--color-text); }
h4 { font-size: 1.1rem; font-family: "Inter", sans-serif; font-weight: 600; }

p { margin: 0 0 1.3em; }

blockquote {
  border-left: 4px solid var(--color-primary);
  margin: 2em 0;
  padding: 1.2em 1.8em;
  background: var(--color-primary-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--color-text-light);
}

ul, ol { margin: 0 0 1.3em 1.5em; }
li { margin-bottom: 0.5em; }

hr { border: none; border-top: 1px solid var(--color-border); margin: 2.5em 0; }

/* === Layout === */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* === Header === */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.95);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}
.site-logo a {
  display: flex;
  align-items: center;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-heading);
  gap: 10px;
}
.site-logo a:hover { color: var(--color-primary); }
.logo-img { height: 36px; width: auto; }

/* === Navigation === */
.nav-list {
  list-style: none;
  display: flex;
  gap: 0;
  margin: 0;
  padding: 0;
}
.nav-item > a {
  display: block;
  padding: 20px 16px;
  color: var(--color-text-light);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color var(--transition);
}
.nav-item > a:hover,
.nav-item.current > a { color: var(--color-primary); }

.has-children { position: relative; }
.sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-sm);
  min-width: 260px;
  list-style: none;
  padding: 8px 0;
  margin: 0;
  z-index: 200;
  border: 1px solid var(--color-border);
}
.has-children:hover .sub-menu { display: block; }
.sub-menu li a {
  display: block;
  padding: 10px 20px;
  color: var(--color-text);
  font-size: 14px;
  transition: all var(--transition);
}
.sub-menu li a:hover { background: var(--color-muted); color: var(--color-primary); }

.menu-toggle { display: none; }

/* === Main Content === */
#content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px;
}

/* === Article Layout (two-column) === */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}
.article-content { min-width: 0; }
.article-title {
  margin-top: 0;
  font-size: 2.4rem;
  line-height: 1.2;
  margin-bottom: 0.8em;
}
.article-content p { text-align: left; }
.article-content img {
  border-radius: var(--radius-sm);
  margin: 2em 0;
}

/* Nice styling for article links */
.article-content a {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-color: rgba(42,125,110,0.3);
  text-underline-offset: 2px;
  transition: text-decoration-color var(--transition);
}
.article-content a:hover {
  text-decoration-color: var(--color-primary);
}

/* === Sidebar === */
.sidebar { position: sticky; top: 84px; }
.sidebar-widget {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.sidebar-widget h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--color-heading);
}
.sidebar-widget p {
  font-size: 14px;
  color: var(--color-text-light);
  margin-bottom: 18px;
  line-height: 1.6;
}

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  letter-spacing: 0.02em;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary {
  background: var(--color-accent);
  color: #fff;
}
.btn-primary:hover { background: var(--color-accent-dark); color: #fff; }
.btn-facebook {
  background: #1877f2;
  color: #fff;
}
.btn-facebook:hover { background: #1565c0; color: #fff; }
.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.btn-outline:hover { background: var(--color-primary); color: #fff; }

/* === Homepage Hero === */
.hero {
  background: linear-gradient(135deg, var(--color-primary-light) 0%, #f0ebe3 50%, #fdf6ee 100%);
  padding: 100px 24px 80px;
  text-align: center;
  margin: -40px -24px 48px;
  border-bottom: 1px solid var(--color-border);
}
.hero h1 {
  font-size: 3.2rem;
  color: var(--color-heading);
  margin: 0 0 0.4em;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.hero .subtitle {
  font-size: 1.2rem;
  color: var(--color-text-light);
  max-width: 560px;
  margin: 0 auto 2em;
  line-height: 1.7;
}
.hero .btn { font-size: 16px; padding: 14px 36px; }

/* === Homepage Grid === */
.topic-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin: 48px 0;
}
.topic-section h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-border);
}
.topic-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.topic-list li { margin-bottom: 6px; }
.topic-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--color-text);
  transition: all var(--transition);
}
.topic-list a:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
}
.topic-list a::before {
  content: "→";
  color: var(--color-primary);
  font-weight: 600;
  flex-shrink: 0;
}

/* === Homepage CTA section === */
.home-cta {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 56px 48px;
  text-align: center;
  margin: 48px 0;
  box-shadow: var(--shadow-sm);
}
.home-cta h2 { margin-top: 0; color: var(--color-heading); }
.home-cta p { max-width: 600px; margin: 0 auto 1em; color: var(--color-text-light); }

/* === Related Articles === */
.related-articles {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 2px solid var(--color-border);
}
.related-articles h2 {
  text-align: center;
  margin-bottom: 32px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.related-card {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  color: var(--color-text);
  transition: all var(--transition);
}
.related-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--color-primary);
}
.related-card h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--color-primary);
}
.related-card p {
  font-size: 14px;
  color: var(--color-text-light);
  margin: 0;
  line-height: 1.6;
}

/* === Blog Index === */
.blog-list { list-style: none; padding: 0; margin: 0; }
.blog-list li {
  border-bottom: 1px solid var(--color-border);
  padding: 28px 0;
}
.blog-list li:last-child { border-bottom: none; }
.blog-list a { display: block; color: var(--color-text); }
.blog-list a:hover { color: var(--color-primary); }
.blog-list h3 { margin: 0 0 8px; font-size: 1.3rem; }
.blog-list p { margin: 0; font-size: 14px; color: var(--color-text-light); }

/* === Footer === */
.site-footer {
  background: var(--color-heading);
  color: #b0b0b0;
  padding: 48px 24px;
  text-align: center;
  margin-top: 80px;
}
.footer-inner { max-width: 700px; margin: 0 auto; }
.back-to-top { margin-bottom: 24px; }
.back-to-top a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: 16px;
  transition: all var(--transition);
}
.back-to-top a:hover { background: var(--color-primary-dark); transform: translateY(-2px); }
.copyright {
  font-size: 14px;
  margin-bottom: 20px;
}
.copyright a { color: #999; }
.copyright a:hover { color: #fff; }
.disclaimer {
  font-size: 12px;
  color: #777;
  line-height: 1.6;
}

/* === Medical Disclaimer Banner === */
.disclaimer-banner {
  background: #fef9e7;
  border: 1px solid #f0dfa0;
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 2em 0;
  font-size: 13px;
  color: #7a6c3c;
  line-height: 1.6;
}

/* === Mobile === */
@media (max-width: 768px) {
  :root { --max-width: 100%; }

  body { font-size: 16px; }
  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.5rem; }

  .hero { padding: 60px 20px 50px; margin: -40px -24px 32px; }
  .hero h1 { font-size: 2.2rem; }
  .hero .subtitle { font-size: 1.05rem; }

  .article-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .article-title { font-size: 1.8rem; }
  .sidebar { position: static; }

  .topic-grid { grid-template-columns: 1fr; gap: 24px; }

  /* Mobile nav */
  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
  }
  .menu-toggle:hover { background: var(--color-muted); }
  .hamburger,
  .hamburger::before,
  .hamburger::after {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    transition: transform 0.3s;
    border-radius: 2px;
  }
  .hamburger { position: relative; }
  .hamburger::before,
  .hamburger::after {
    content: "";
    position: absolute;
    left: 0;
  }
  .hamburger::before { top: -7px; }
  .hamburger::after { top: 7px; }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    border-top: 1px solid var(--color-border);
  }
  .main-nav.is-open { display: block; }
  .nav-list { flex-direction: column; }
  .nav-item > a { padding: 14px 24px; border-bottom: 1px solid var(--color-muted); }
  .sub-menu {
    position: static;
    box-shadow: none;
    border-radius: 0;
    display: none;
    background: var(--color-muted);
    border: none;
  }
  .has-children.sub-open .sub-menu { display: block; }
  .sub-menu li a { padding: 12px 40px; }

  .home-cta { padding: 36px 24px; }
  .related-grid { grid-template-columns: 1fr; }
}

/* === Tablet tweaks === */
@media (min-width: 769px) and (max-width: 1024px) {
  .article-layout {
    grid-template-columns: 1fr 260px;
    gap: 32px;
  }
}
