/* ==========================================================================
   1. Base & Theme Variables
   ========================================================================== */
:root {
  --primary-color: #ff4b6e;      /* Romantic/Friendly pink-red theme */
  --primary-hover: #e03a5b;
  --text-main: #2d3748;
  --text-muted: #718096;
  --bg-main: #f8fafc;
  --bg-primary: #F1F5F9;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --container-max-width: 800px;
  --header-max-width: 1100px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.7;
  font-size: 1.1rem;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* ==========================================================================
   2. Header & Navigation
   ========================================================================== */
/* Header + Mobile Menu */
header {
    background: #f8f9fb;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.8rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

[data-theme="dark"] header {
    background: #000000;
}

.logo img {
    height: 45px;
    width: auto;
    display: block;
}

/* Desktop Nav */
#nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: #000000;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: opacity 0.2s ease;
}

.nav-link:hover {
    opacity: 0.8;
}

[data-theme="dark"] .nav-link {
    color: #fff;
}

/* Hamburger */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    cursor: pointer;
    z-index: 1002;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background: #000;
    border-radius: 3px;
    transition: all 0.3s ease;
}

[data-theme="dark"] .menu-toggle span {
    background: #fff;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(9.5px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9.5px) rotate(-45deg);
}

.menu-toggle.active span {
    background: #212529;
}

[data-theme="dark"] .menu-toggle.active span {
    background: #fff;
}

.share-text {
    text-align: center;
    opacity: 0.7; 
    margin-top: 1.5rem;
}

[data-theme="dark"] .share-text {
    color: #fff;
}


/* ==========================================================================
   3. Main Article Content Area
   ========================================================================== */
.content-box {
  max-width: var(--container-max-width);
  margin: 2rem auto;
  background: var(--bg-card);
  padding: 2.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

/* Breadcrumbs */
.breadcrumb-wrapper {
  margin-bottom: 1.5rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  padding: 0 0.5rem;
  color: var(--text-muted);
}

.breadcrumb-item a {
  color: var(--text-muted);
}

.breadcrumb-item.active {
  color: var(--text-main);
  font-weight: 500;
}

/* Typography & Headings */
.content-box h1 {
  font-size: 2.2rem;
  line-height: 1.3;
  margin-bottom: 1.5rem;
  color: #1a202c;
  font-weight: 800;
}

.content-box h2 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem 0;
  color: #2d3748;
  border-left: 4px solid var(--primary-color);
  padding-left: 0.75rem;
}

.content-box p {
  margin-bottom: 1.25rem;
  color: #4a5568;
}

/* Responsive Images inside Article */
.content-box img {
  max-width: 100% !important;
  height: auto !important;
  width: 100% !important; /* Overrides inline style="width: 500px;" */
  border-radius: var(--radius-sm);
  margin: 1rem 0 1.5rem 0;
  display: block;
  object-fit: cover;
}

/* Featured Header Image */
.content-box > img:first-of-type {
  max-height: 420px;
  box-shadow: var(--shadow-sm);
}

/* NEW: List Styling for FLAMES Breakdown */
.content-box ul {
  list-style: none;
  margin: 1.25rem 0 1.75rem 0;
  padding: 0;
}

.content-box ul li {
  padding: 0.6rem 1rem;
  margin-bottom: 0.5rem;
  background: var(--bg-main);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-size: 1.05rem;
  color: var(--text-main);
}

.content-box ul li strong {
  color: var(--primary-color);
  font-size: 1.1rem;
  margin-right: 0.5rem;
}

/* ==========================================================================
   4. NEW: Responsive Comparison Table
   ========================================================================== */
.content-box table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.95rem;
  background: #ffffff;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
  display: block; /* Enables horizontal scroll on small screens */
  overflow-x: auto;
}

.content-box th,
.content-box td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.content-box th {
  background-color: #fff0f3;
  color: var(--primary-color);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.content-box tbody tr:nth-child(even) {
  background-color: #fdfdfd;
}

.content-box tbody tr:hover {
  background-color: #fff9fa;
}

/* ==========================================================================
   5. NEW: High-Converting CTA Button Block
   ========================================================================== */
.cta-container {
  margin: 2.5rem 0;
  text-align: center;
}

.flames-cta-btn {
  display: inline-block;
  background: linear-gradient(135deg, #ff4b6e 0%, #ff6b8b 100%);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 1.1rem 2rem;
  border-radius: 50px;
  text-decoration: none !important;
  box-shadow: 0 6px 20px rgba(255, 75, 110, 0.35);
  transition: all 0.3s ease;
  line-height: 1.4;
}

.flames-cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(255, 75, 110, 0.45);
  background: linear-gradient(135deg, #e03a5b 0%, #ff4b6e 100%);
}

/* ==========================================================================
   1. H3 Heading Hierarchy
   ========================================================================== */
.content-box h3 {
  font-size: 1.25rem;
  margin: 1.75rem 0 0.75rem 0;
  color: #2d3748;
  font-weight: 700;
  line-height: 1.4;
}

/* Cleanup extra <br> tags used for spacing in content */
.content-box br {
  display: none; /* Prevents double spacing issue caused by manual <br> tags in HTML */
}

/* Restores spacing for images when <br> tags are suppressed */
.content-box img {
  margin: 1.25rem 0;
}


/* ==========================================================================
   2. Interactive Accordion / FAQ Section (<details> & <summary>)
   ========================================================================== */
.faq-section {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 2px dashed var(--border-color, #e2e8f0);
}

.faq-section h2 {
  border-left: none !important;
  padding-left: 0 !important;
  margin-bottom: 1.5rem !important;
}

/* FAQ Item Box */
.faq-section details {
  background: var(--bg-main, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--radius-sm, 8px);
  margin-bottom: 0.85rem;
  padding: 1rem 1.25rem;
  transition: all 0.2s ease;
  overflow: hidden;
}

.faq-section details[open] {
  background: #ffffff;
  border-color: var(--primary-color, #ff4b6e);
  box-shadow: 0 4px 12px rgba(255, 75, 110, 0.08);
}

/* FAQ Question Trigger */
.faq-section summary {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-main, #2d3748);
  cursor: pointer;
  list-style: none; /* Removes browser default arrow */
  position: relative;
  padding-right: 2rem;
  user-select: none;
}

/* Remove default marker in Webkit/Firefox */
.faq-section summary::-webkit-details-marker {
  display: none;
}

/* Custom + / - or Arrow icon on right side */
.faq-section summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: var(--primary-color, #ff4b6e);
  font-weight: 700;
  line-height: 1;
  transition: transform 0.2s ease;
}

/* Active state icon (-) */
.faq-section details[open] summary::after {
  content: "−";
}

/* Answer Text */
.faq-section details p {
  margin-top: 0.8rem !important;
  margin-bottom: 0 !important;
  font-size: 0.98rem;
  color: var(--text-muted, #718096);
  line-height: 1.6;
}

/* ==========================================================================
   Fix 1: Related Posts Card Layout
   ========================================================================== */
.related-posts {
  max-width: var(--container-max-width);
  margin: 2.5rem auto;
}

.related-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

/* Restrict image size inside related posts cards */
.related-container img {
  width: 100% !important;
  height: 180px !important; /* Fixes huge banner image */
  object-fit: cover !important;
  border-radius: var(--radius-sm, 8px);
  margin-bottom: 0.75rem;
  display: block;
}

.related-container a {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--primary-color, #ff4b6e);
  text-decoration: none;
}

.related-container a:hover {
  text-decoration: underline;
}


/* ==========================================================================
   Post Navigation (Complete Structure Reset & Card Wrapper)
   ========================================================================== */
.post-navigation {
  max-width: 900px;
  margin: 5rem;
  padding: 0 15px;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
}

.nav-card {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 48%;
  background: #fff;
  padding: 10px 12px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.nav-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.nav-info span {
  display: block;
  font-size: 12px;
  color: #999;
}

.nav-info a {
  font-size: 14px;
  color: #ff4b6e;
  text-decoration: none;
}

.nav-info a:hover {
  text-decoration: underline;
}

.prev-post svg {
  flex-shrink: 0;
}

.next-post svg {
  flex-shrink: 0;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .nav-card {
    flex: 1 1 100%;
  }
  .author-section{
    margin-left: 1rem;
    margin-right: 1rem;
    padding: 1rem;
  }
  .post-navigation{
    margin-left: 1rem;
    margin-right: 1rem;
    padding: 1rem;
  }
}

/* Author Section */
section.author-section {
    margin: 10%;
}

.author-card {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  background: var(--bg-card);
  padding: 1.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.author-card img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--primary-color);
}

.author-info h4 {
  font-size: 1.2rem;
  margin-bottom: 0.1rem;
}

.author-info p:nth-of-type(1) {
  color: var(--primary-color);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.about-author {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   5. Utility Components (Back to top)
   ========================================================================== */
#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--primary-color);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#backToTop:hover {
  background: var(--primary-hover);
  transform: translateY(-3px);
}

/* ==========================================================================
   6. Footer
   ========================================================================== */
footer {
  background: #1a202c;
  color: #a0aec0;
  padding: 2.5rem 1rem 1.5rem 1rem;
  margin-top: 4rem;
  text-align: center;
  font-size: 0.95rem;
}

.footer-menu {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.footer-menu a {
  color: #cbd5e0;
}

.footer-menu a:hover {
  color: #ffffff;
}

.footer-divider {
  height: 1px;
  background: #2d3748;
  max-width: 600px;
  margin: 0 auto 1.5rem auto;
}

.footer-copy {
  line-height: 1.6;
}

.footer-copy strong {
  color: #ffffff;
}

.footer-link {
  color: var(--primary-color);
}

/* ==========================================================================
   7. Responsive Design (Mobile Breakpoints)
   ========================================================================== */
@media (max-width: 768px) {
  body {
    font-size: 1rem;
  }

  .content-box {
    padding: 1.25rem;
    margin: 1rem;
    border-radius: var(--radius-sm);
  }

  .content-box h1 {
    font-size: 1.6rem;
  }

  .content-box h2 {
    font-size: 1.25rem;
  }

  /* Hamburger Navigation Toggle */
  .menu-toggle {
    display: flex;
  }

  nav#nav {
    display: none; /* Add active state in JS to toggle block */
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-card);
    flex-direction: column;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
  }

  nav#nav.active {
    display: flex;
  }

  .author-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}