/* ═══════════════════════════════════════════
   PawDex — Blog Standalone Stylesheet
   Ensures pre-rendered static HTML articles
   render beautifully with 100% lighthouse speeds.
   ═══════════════════════════════════════════ */

:root {
  --primary: #FFB444;
  --primary-dark: #B58130;
  
  --bg-color: #FFF2E6;
  --bg-gradient: radial-gradient(circle at 10% 20%, #FFF2E6 0%, #FFDFB8 90%);
  --surface-color: rgba(255, 255, 255, 0.9);
  --text-color: #2D2318;
  --text-muted: #8A7B6E;
  
  --border-color: rgba(243, 239, 233, 0.5);
  --nav-bg: rgba(255, 255, 255, 0.6);
  --card-bg: #FFFFFF;
  
  --hero-gradient: linear-gradient(135deg, #FFB444, #FF9100, #FF3D00);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme='dark'] {
  --primary: #FFB444;
  --primary-dark: #E09F3D;
  
  --bg-color: #0A0A0A;
  --bg-gradient: radial-gradient(circle at 10% 20%, #0A0A0A 0%, #141414 90%);
  --surface-color: rgba(20, 20, 20, 0.8);
  --text-color: #FFFFFF;
  --text-muted: #B3A495;
  
  --border-color: rgba(60, 50, 40, 0.5);
  --nav-bg: rgba(30, 30, 30, 0.6);
  --card-bg: #1A1A1A;
  
  --hero-gradient: linear-gradient(135deg, #FFB444, #FF9100, #FF3D00);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-gradient);
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* ─── NAVIGATION BAR ─── */
.navbar {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 3rem);
  max-width: 1200px;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  z-index: 1000;
  padding: 0.75rem 2rem;
  transition: var(--transition);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-color);
}

.nav-logo-img {
  width: 28px;
  height: 28px;
  border-radius: 25%;
  object-fit: contain;
}

.nav-brand-text {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-item {
  color: var(--text-color);
  opacity: 0.8;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
}

.nav-item:hover, .nav-item.active {
  opacity: 1;
  color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.icon-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: var(--transition);
}

.icon-btn:hover {
  background: rgba(0,0,0,0.05);
}

[data-theme='dark'] .icon-btn:hover {
  background: rgba(255,255,255,0.05);
}

/* Hide sun/moon depending on theme */
[data-theme='dark'] .sun-icon { display: block; }
[data-theme='dark'] .moon-icon { display: none; }
.sun-icon { display: none; }
.moon-icon { display: block; }

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-color);
  cursor: pointer;
}

/* ─── BUTTON UTILITIES ─── */
.btn-primary {
  background: var(--primary);
  color: #2D251E;
  font-weight: 800;
  border-radius: 9999px;
  border: 3px solid #2D251E;
  padding: 0.6rem 1.5rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 4px 4px 0px #2D251E;
  display: inline-block;
  text-align: center;
}

.btn-primary:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px #2D251E;
}

/* ─── MOBILE DRAWER MENU ─── */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 100%;
  background: var(--bg-color);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2.5rem;
  box-shadow: -10px 0 40px rgba(0,0,0,0.1);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-drawer.open {
  transform: translateX(0);
}

.close-drawer-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: transparent;
  border: none;
  color: var(--text-color);
  cursor: pointer;
}

.drawer-link {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition);
}

.drawer-link:hover, .drawer-link.active {
  color: var(--primary);
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* ─── BLOG READER CONTAINER ─── */
.blog-reader-container {
  max-width: 900px;
  margin: 8rem auto 4rem;
  padding: 0 1.5rem;
}

.back-link-wrapper {
  margin-bottom: 2rem;
}

.back-to-blogs {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  opacity: 0.8;
  transition: var(--transition);
}

.back-to-blogs:hover {
  opacity: 1;
  color: var(--primary);
  transform: translateX(-3px);
}

/* ─── ARTICLE DETAILS ─── */
.blog-hero-img {
  width: 100%;
  height: 55vh;
  min-height: 400px;
  max-height: 600px;
  border-radius: 1.5rem;
  overflow: hidden;
  margin-bottom: 2.5rem;
  box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

.blog-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-article-meta {
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 2.5rem;
  border-radius: 1.5rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 15px 35px rgba(0,0,0,0.05);
  margin-bottom: 3rem;
  text-align: center;
}

.blog-categories {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.cat-chip {
  padding: 0.25rem 0.75rem;
  background: rgba(255, 180, 68, 0.15);
  color: #D97706;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.blog-article-title {
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.blog-article-byline {
  font-size: 0.9rem;
  opacity: 0.6;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.blog-article-description {
  margin-top: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.6;
  opacity: 0.8;
}

/* ─── MARKDOWN CONTENT STYLING ─── */
.blog-article-body {
  background: var(--card-bg);
  padding: clamp(2rem, 6vw, 4rem);
  border-radius: 1.5rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 30px rgba(0,0,0,0.03);
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 3rem;
}

.blog-article-body p {
  margin-bottom: 1.75rem;
}

.blog-article-body strong {
  font-weight: 700;
}

.blog-article-body h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 3.5rem 0 1.5rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.blog-article-body h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  line-height: 1.3;
}

.blog-article-body hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 2.5rem 0;
}

/* Blockquotes */
.blog-article-body blockquote {
  background: var(--bg-color);
  padding: 1.5rem 2rem;
  border-radius: 0.75rem;
  border-left: 4px solid var(--primary);
  font-style: italic;
  margin: 2.5rem 0;
  opacity: 0.9;
}

/* Lists */
.blog-article-body ul, .blog-article-body ol {
  margin-bottom: 2rem;
  padding-left: 1.5rem;
}

.blog-article-body li {
  margin-bottom: 0.75rem;
}

/* GFM Markdown Tables */
.table-wrapper {
  overflow-x: auto;
  margin: 2.5rem 0;
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
}

.blog-article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  text-align: left;
}

.blog-article-body th {
  background: var(--bg-color);
  padding: 1rem;
  font-weight: 700;
  border-bottom: 2px solid var(--border-color);
}

.blog-article-body td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.blog-article-body tr:last-child td {
  border-bottom: none;
}

/* Call to Action Centered Block */
.blog-cta-block {
  text-align: center;
  margin: 3.5rem 0 1.5rem;
}

/* ─── FAQ ACCORDIONS ─── */
.faq-section {
  background: var(--card-bg);
  padding: clamp(2rem, 5vw, 3rem);
  border-radius: 1.5rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

.faq-section h2 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 2rem;
  letter-spacing: -0.01em;
}

.faq-item {
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: var(--transition);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  color: var(--text-color);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 1.25rem 1.5rem;
  transition: var(--transition);
}

.faq-icon {
  flex-shrink: 0;
  transition: transform 0.3s ease;
  opacity: 0.7;
}

.faq-question[aria-expanded="true"] .faq-icon {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-answer {
  padding: 0 1.5rem 1.5rem;
  color: var(--text-color);
  opacity: 0.85;
  border-top: 1px solid var(--border-color);
  padding-top: 1.25rem;
}

/* ─── FOOTER SECTION ─── */
.footer {
  background: var(--surface-color);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem 0;
  margin-top: 6rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  justify-content: space-between;
}

.footer-brand {
  flex: 2 1 300px;
  min-width: 250px;
}

.footer-brand .nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
  text-decoration: none;
}

.footer-brand .nav-brand-text {
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--primary);
  letter-spacing: normal;
}

.footer-tagline {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 1rem;
  max-width: 400px;
  line-height: 1.6;
}

.footer-support {
  font-size: 0.9rem;
  font-weight: 600;
}

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

.footer-links-col {
  flex: 1 1 150px;
  min-width: 150px;
}

.footer-links-col h4 {
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--text-color);
  text-transform: none;
  letter-spacing: normal;
}

.footer-links-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links-col li {
  margin-bottom: 0;
}

.footer-links-col a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition);
}

.footer-links-col a:hover {
  color: var(--primary);
  opacity: 1;
}

.footer-bottom {
  max-width: 1200px;
  margin: 3rem auto 0;
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ─── RESPONSIVE OVERRIDES ─── */
@media (max-width: 768px) {
  .navbar {
    top: 1rem;
    width: calc(100% - 2rem);
    padding: 0.6rem 1.25rem;
  }
  
  .hide-on-mobile {
    display: none !important;
  }
  
  .mobile-menu-btn {
    display: flex;
  }

  .blog-reader-container {
    margin-top: 6.5rem;
  }
  
  .blog-hero-img {
    height: 35vh;
    min-height: 280px;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
  }

  .blog-article-meta {
    padding: 1.5rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
    text-align: left;
  }

  .blog-categories {
    justify-content: flex-start;
  }

  .blog-article-byline {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .blog-article-body {
    padding: 1.5rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
  }
  
  .faq-section {
    padding: 1.5rem;
    border-radius: 1rem;
  }

  .faq-question {
    font-size: 0.95rem;
    padding: 1rem;
  }

  .faq-answer {
    padding: 0 1rem 1rem;
    padding-top: 1rem;
  }

  .footer {
    padding-top: 3rem;
  }
  
  .footer-container {
    gap: 2.5rem;
  }
}
