/* ============================================
   PawfullyHonest.com — Main Stylesheet
   Mobile-first responsive design
   ============================================ */

/* === RESET & BASE === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #1a5f7a;
  --accent: #f2994a;
  --bg: #ffffff;
  --text: #333333;
  --text-light: #666666;
  --border: #e0e0e0;
  --bg-light: #f8f9fa;
  --bg-dark: #1a1a2e;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
}

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

a:hover {
  color: var(--accent);
}

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

h1 { font-size: 2rem; line-height: 1.3; margin-bottom: 16px; }
h2 { font-size: 1.556rem; line-height: 1.3; margin-bottom: 12px; }
h3 { font-size: 1.222rem; line-height: 1.4; margin-bottom: 10px; }

/* === LAYOUT === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.content-wrapper {
  display: block;
}

.main-content {
  width: 100%;
}

.sidebar {
  width: 100%;
  margin-top: 40px;
}

/* === HEADER === */
.site-header {
  background: var(--bg);
  border-bottom: 2px solid var(--primary);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 12px 0;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo:hover {
  color: var(--accent);
}

.logo-img {
  height: 40px;
  width: auto;
  border-radius: 4px;
}

.nav-toggle {
  display: block;
  background: none;
  border: 2px solid var(--primary);
  color: var(--primary);
  font-size: 1.4rem;
  padding: 4px 10px;
  cursor: pointer;
  border-radius: 4px;
}

.nav-links {
  display: none;
  width: 100%;
  flex-direction: column;
  gap: 0;
  margin-top: 12px;
}

.nav-links.active {
  display: flex;
}

.nav-links a {
  display: block;
  padding: 10px 0;
  font-size: 0.95em;
  color: var(--text);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

.nav-links a:hover {
  color: var(--accent);
}

/* === HERO SECTION (Homepage) === */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #2d8ba4 100%);
  color: #fff;
  padding: 60px 20px;
  text-align: center;
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 16px;
  color: #fff;
}

.hero p {
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto 24px;
  opacity: 0.95;
}

.hero .btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 14px 32px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1rem;
  transition: background 0.2s;
}

.hero .btn-primary:hover {
  background: #e08530;
  color: #fff;
}

/* === PILLAR CARDS (Homepage) === */
.pillar-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 40px 0;
}

.pillar-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px 24px;
  transition: box-shadow 0.2s, transform 0.2s;
}

.pillar-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.pillar-card h3 {
  color: var(--primary);
  margin-bottom: 8px;
}

.pillar-card p {
  color: var(--text-light);
  margin-bottom: 16px;
}

.pillar-card .card-link {
  display: inline-block;
  color: var(--accent);
  font-weight: 700;
}

.pillar-card .card-link:hover {
  color: var(--primary);
}

/* === KEY TAKEAWAY BOX === */
.key-takeaway {
  background: #e8f4f8;
  border-left: 4px solid var(--primary);
  border-radius: 0 8px 8px 0;
  padding: 20px 24px;
  margin: 24px 0;
}

.key-takeaway h4 {
  color: var(--primary);
  font-size: 1rem;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.key-takeaway p {
  margin: 0;
  color: var(--text);
}

/* === TABLE OF CONTENTS === */
.toc {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
  margin: 24px 0;
}

.toc h2 {
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 12px;
  border-bottom: none;
  padding-bottom: 0;
}

.toc ol {
  padding-left: 20px;
  margin: 0;
}

.toc li {
  padding: 4px 0;
  line-height: 1.6;
}

.toc a {
  color: var(--text);
  text-decoration: none;
}

.toc a:hover {
  text-decoration: underline;
  color: var(--accent);
}

/* === ARTICLE CONTENT === */
.article-content h2 {
  color: var(--primary);
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
}

.article-content h3 {
  color: var(--text);
  margin: 30px 0 12px;
}

.article-content p {
  margin: 16px 0;
}

.article-content ul,
.article-content ol {
  margin: 16px 0 16px 24px;
}

.article-content li {
  margin: 8px 0;
}

.article-content img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 24px 0;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.9rem;
}

.article-content th {
  background: var(--primary);
  color: #fff;
  padding: 12px;
  text-align: left;
}

.article-content td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.article-content tr:nth-child(even) {
  background: var(--bg-light);
}

.article-content blockquote {
  border-left: 4px solid var(--accent);
  padding: 12px 20px;
  margin: 20px 0;
  background: var(--bg-light);
  font-style: italic;
  color: var(--text-light);
}

/* === AD SLOTS === */
.ad-slot {
  text-align: center;
  margin: 24px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  max-width: 100%;
}

#ad-top-banner,
#ad-bottom-banner {
  min-height: 90px;
}

#ad-in-content {
  min-height: 250px;
}

#ad-sidebar {
  min-height: 600px;
}

@media (min-width: 1024px) {
  #ad-sidebar {
    position: sticky;
    top: 20px;
  }
}

/* === SIDEBAR === */
.sidebar-widget {
  background: var(--bg-light);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
}

.sidebar-widget h3 {
  color: var(--primary);
  margin-bottom: 12px;
  font-size: 1rem;
}

.sidebar-widget ul {
  list-style: none;
  padding: 0;
}

.sidebar-widget li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.sidebar-widget li:last-child {
  border-bottom: none;
}

.sidebar-widget a {
  color: var(--text);
  text-decoration: none;
}

.sidebar-widget a:hover {
  color: var(--accent);
}

/* === BREADCRUMBS === */
.breadcrumbs {
  padding: 12px 0;
  font-size: 0.8rem;
  color: var(--text-light);
}

.breadcrumbs a {
  color: var(--primary);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--accent);
}

.breadcrumbs span {
  margin: 0 8px;
}

/* === FOOTER === */
.site-footer {
  background: var(--bg-dark);
  color: #ccc;
  padding: 40px 0 20px;
  margin-top: 60px;
}

.footer-logo {
  margin-bottom: 20px;
}

.footer-logo a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-size: 1.3rem;
  font-weight: 700;
}

.footer-logo a:hover {
  color: var(--accent);
}

.footer-logo-img {
  height: 36px;
  width: auto;
  border-radius: 4px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.footer-links a {
  color: var(--accent);
  text-decoration: none;
}

.footer-links a:hover {
  color: #fff;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-legal a {
  color: #888;
  font-size: 0.8rem;
  text-decoration: none;
}

.footer-legal a:hover {
  color: #fff;
}

.footer-copyright {
  margin-top: 20px;
  font-size: 0.8rem;
  color: #888;
}

/* === FAQ === */
.faq-section {
  margin: 24px 0 40px;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item h3 {
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 8px;
}

.faq-item p {
  color: #555;
  margin: 0;
}

/* === 404 PAGE === */
.error-page {
  text-align: center;
  padding: 80px 20px;
}

.error-page h1 {
  font-size: 4rem;
  color: var(--accent);
  margin-bottom: 8px;
}

.error-page h2 {
  color: var(--primary);
  border-bottom: none;
  margin-bottom: 16px;
}

.error-page p {
  color: var(--text-light);
  margin-bottom: 12px;
}

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 12px 28px;
  border-radius: 6px;
  font-weight: 700;
  transition: background 0.2s;
  text-decoration: none;
}

.btn-primary:hover {
  background: #e08530;
  color: #fff;
}

/* === ABOUT SECTION (Homepage) === */
.about-section {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.about-section h2 {
  color: var(--primary);
  margin-bottom: 16px;
}

/* === LATEST ARTICLES (Homepage) === */
.latest-section {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.latest-section h2 {
  color: var(--primary);
  margin-bottom: 24px;
}

/* ============================================
   RESPONSIVE — Tablet (768px+)
   ============================================ */
@media (min-width: 768px) {
  html { font-size: 18px; }
  h1 { font-size: 2rem; }

  .pillar-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero h1 {
    font-size: 2.4rem;
  }
}

/* ============================================
   RESPONSIVE — Desktop (1024px+)
   ============================================ */
@media (min-width: 1024px) {
  .nav-toggle {
    display: none;
  }

  .nav-links {
    display: flex;
    width: auto;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 0;
  }

  .nav-links a {
    border-bottom: none;
    padding: 0;
  }

  .content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
  }

  .sidebar {
    margin-top: 0;
  }

  .pillar-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero h1 {
    font-size: 2.8rem;
  }
}
