/* ---------------------------
   Base Styles
--------------------------- */
html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  font-family: Arial, sans-serif;
  color: #2B2B2B;
  min-width: 320px; /* Changed from 1024px for mobile */
}


/* ---------------------------
   Smooth Scrolling
--------------------------- */
html {
  scroll-behavior: smooth;
}


/* Main grows to fill space and pushes footer down */
main {
  flex: 1;
  max-width: 900px;
  margin: 40px auto;
  padding: 0 24px;
  width: 100%;
  box-sizing: border-box;
}

/* ---------------------------
   Background (fixed parallax style)
--------------------------- */
.bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("images/BG.webp");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  z-index: -1;
}

/* ---------------------------
   Header
--------------------------- */
header {
  height: auto; /* Changed from 120px for mobile */
  min-height: 80px; /* Minimum height */
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  position: relative;
  
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap; /* Allow wrapping on mobile */
  z-index: 1000;
}

header .icon {
  height: 40px; /* Smaller for mobile */
  width: auto;
  flex-shrink: 0;
}

header .logo {
  width: 130px; /* Smaller for mobile */
  height: auto;
  flex-shrink: 0;
}

/* ---------------------------
   Header Navigation (to the right of logo/title)
--------------------------- */
.main-nav {
  display: flex;
  gap: 8px; /* Smaller gap for mobile */
  margin-left: 12px; /* Smaller margin for mobile */
  justify-content: flex-start;
  flex-wrap: wrap; /* Allow wrapping on mobile */
}

.main-nav a {
  margin: 0 5px; /* Smaller margin for mobile */
  text-decoration: none;
  color: #fff;
  font-weight: bold;
  padding: 6px 8px; /* Smaller padding for mobile */
  border-radius: 6px;
  transition: color 0.25s ease, background 0.3s ease;
  text-shadow:
    0 0 4px rgba(0, 0, 0, 0.8),
    0 0 8px rgba(0, 0, 0, 0.6),
    1px 1px 2px rgba(0, 0, 0, 0.9);
  font-size: 14px; /* Smaller font for mobile */
}

.main-nav a:hover {
  color: #D8B788;
}

/* ---------------------------
   Shared Block Style - UPDATED to match insights
--------------------------- */
.bordered-block {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 30px;
  margin-bottom: 40px;
  overflow-x: auto;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bordered-block:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* ---------------------------
   Calculator Content Styling to match insights
--------------------------- */
.calculator-content {
  padding: 0; /* Remove padding since we have it on bordered-block */
}

.calculator-content h2 {
  color: #8B4513;
  margin: 0 0 20px 0;
  font-size: 1.4em;
  line-height: 1.3;
  border-bottom: 2px solid #D8B788;
  padding-bottom: 12px;
}

.calculator-content p {
  line-height: 1.6;
  margin-bottom: 20px;
  color: #333;
}

/* ---------------------------
   Updated Tables to match insights styling
--------------------------- */
.ingredient-header,
.ingredient-row,
.calc-header,
.calc-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 0.6fr;
  gap: 12px;
  padding: 12px 0;
  min-width: 600px;
  color: #333;
}

.ingredient-header,
.calc-header {
  font-weight: bold;
  border-bottom: 2px solid #D8B788;
  color: #8B4513;
}

.ingredient-row,
.calc-row {
  border-bottom: 1px solid #e0e0e0;
  align-items: center;
}

/* ---------------------------
   Updated Inputs & Buttons to match insights
--------------------------- */
.ingredient-row input,
.ingredient-row select,
.calc-row input,
.calc-row select {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  width: 100%;
  background: #fff;
  min-width: 0;
  overflow-wrap: break-word;
  font-size: 14px;
  color: #333;
  transition: border-color 0.3s ease;
}

.ingredient-row input:focus,
.ingredient-row select:focus,
.calc-row input:focus,
.calc-row select:focus {
  outline: none;
  border-color: #8B4513;
  box-shadow: 0 0 0 2px rgba(139, 69, 19, 0.1);
}

.add-btn {
  margin-top: 20px;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  background: #8B4513;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.1s ease;
  font-size: 16px;
}

.add-btn:hover {
  background: #6B3410;
}

.add-btn:active {
  transform: translateY(1px);
}

.delete-btn {
  background: #e74c3c;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.1s ease;
  font-size: 14px;
}

.delete-btn:hover {
  background: #c0392b;
}

.delete-btn:active {
  transform: translateY(1px);
}

/* ---------------------------
   Updated Totals Section to match insights
--------------------------- */
.totals {
  margin-top: 24px;
  padding: 20px;
  background: #f8f4f0;
  border-radius: 8px;
  border-left: 4px solid #D8B788;
}

.totals h3 {
  color: #8B4513;
  margin: 0 0 12px 0;
  font-size: 1.2em;
}

.totals p {
  margin: 8px 0;
  color: #333;
  font-size: 1.1em;
}

.totals strong {
  color: #8B4513;
}

/* ---------------------------
   Section headings consistency
--------------------------- */
.bordered-block h1,
.bordered-block h2,
.bordered-block h3 {
  color: #8B4513;
  margin-bottom: 20px;
  line-height: 1.3;
}

.bordered-block h2 {
  font-size: 1.4em;
  border-bottom: 2px solid #D8B788;
  padding-bottom: 12px;
}

.bordered-block h3 {
  font-size: 1.2em;
  border-bottom: 1px solid #D8B788;
  padding-bottom: 8px;
}

/* ---------------------------
   Intro Block with EXACT Insights Style
--------------------------- */
.intro.bordered-block {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 40px; /* Match insights spacing */
}

.intro.bordered-block:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.intro-content {
  padding: 30px; /* Exact same as .article-content */
}

.intro-content h1 {
  color: #8B4513; /* Match insights h3 color */
  margin: 0 0 16px 0; /* Match insights h3 margin */
  font-size: 1.4em; /* Match insights h3 size */
  line-height: 1.3; /* Match insights h3 line-height */
}

.intro-content p {
  line-height: 1.6; /* Match insights p line-height */
  margin-bottom: 20px; /* Match insights p margin */
  color: #333; /* Match insights p color */
}

.intro-content strong {
  color: #8B4513; /* Match your strong color */
}

/* EXACT same as .key-points from insights */
.intro-key-points {
  background: #f8f4f0;
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
  border-left: 4px solid #D8B788;
}

.intro-key-points h4 {
  color: #8B4513;
  margin: 0 0 12px 0;
}

.intro-key-points ul {
  margin: 0;
  padding-left: 20px;
}

.intro-key-points li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.intro-key-points strong {
  color: #8B4513;
}

/* EXACT same as .pro-tip from insights */
.intro-pro-tip {
  background: #fff8e1;
  border: 1px solid #ffd54f;
  border-radius: 8px;
  padding: 16px;
  margin: 20px 0;
}

.intro-pro-tip h4 {
  color: #8B4513;
  margin: 0 0 8px 0;
  font-size: 1em;
}

.intro-pro-tip p {
  margin: 0;
  font-size: 0.95em;
}

/* Match insights responsive design exactly */
@media (max-width: 768px) {
  .intro-content {
    padding: 20px;
  }
  
  .intro-content h1 {
    font-size: 1.2em;
  }
}

@media (max-width: 480px) {
  .intro-content {
    padding: 16px;
  }
}

/* ---------------------------
   Ingredients Table
--------------------------- */
.ingredient-header,
.ingredient-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 0.6fr;
  gap: 8px; /* Smaller gap for mobile */
  padding: 8px 0;
  min-width: 600px; /* Minimum width to prevent column stacking */
}

.ingredient-header {
  font-weight: bold;
  border-bottom: 2px solid #aaa;
}

.ingredient-row {
  border-bottom: 1px solid #ddd;
  align-items: center;
}

/* ---------------------------
   Calculator Table
--------------------------- */
.calc-header,
.calc-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 0.6fr;
  gap: 8px; /* Smaller gap for mobile */
  padding: 8px 0;
  min-width: 600px; /* Minimum width to prevent column stacking */
}

.calc-header {
  font-weight: bold;
  border-bottom: 2px solid #aaa;
}

.calc-row {
  border-bottom: 1px solid #ddd;
  align-items: center;
}

/* ---------------------------
   Inputs & Buttons
--------------------------- */
.ingredient-row input,
.ingredient-row select,
.calc-row input,
.calc-row select {
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 6px;
  width: 100%;
  background: #fff;
  min-width: 0;
  overflow-wrap: break-word;
  font-size: 14px; /* Smaller font for mobile */
}

.add-btn {
  margin-top: 16px;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: #D8B788;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.05s ease;
  font-size: 14px; /* Smaller font for mobile */
}

.add-btn:hover {
  background: #b68a5c;
}

.add-btn:active {
  transform: translateY(1px);
}

.delete-btn {
  background: #e74c3c;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.05s ease;
  font-size: 14px; /* Smaller font for mobile */
}

.delete-btn:hover {
  background: #c0392b;
}

.delete-btn:active {
  transform: translateY(1px);
}

/* ---------------------------
   Totals Section
--------------------------- */
.totals {
  margin-top: 24px;
  padding: 16px;
  background: #f9f9f9;
  border-radius: 12px;
}

/* ---------------------------
   Footer
--------------------------- */
.site-footer {
  background: transparent;
  border-top: none;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 12px rgba(0,0,0,0);
  padding: 20px;
  text-align: center;
  font-size: 1.1rem; /* Smaller font for mobile */
  margin-top: auto;
}

.site-footer p,
.site-footer .footer-links a {
  color: #fff;
  text-shadow:
    0 0 4px rgba(0, 0, 0, 0.8),
    0 0 8px rgba(0, 0, 0, 0.6),
    1px 1px 2px rgba(0, 0, 0, 0.9);
}

.site-footer .footer-links a {
  margin: 0 8px; /* Smaller margin for mobile */
  text-decoration: none;
  transition: color 0.25s ease;
  font-size: 14px; /* Smaller font for mobile */
}

.site-footer .footer-links a:hover {
  color: #D8B788;
}

/* ---------------------------
   Social Icons
--------------------------- */
.social-icons {
  display: flex;
  justify-content: center;
  gap: 15px; /* Smaller gap for mobile */
  margin: 20px 0;
}

.social-icons img {
  width: 35px; /* Smaller for mobile */
  height: auto;
  transition: transform 0.3s ease;
}

.social-icons img:hover {
  transform: scale(1.2);
}

/* ---------------------------
   Disclaimer Note Styles
--------------------------- */
.disclaimer-note {
  margin: 30px auto 40px auto;
  max-width: 900px;
  padding: 0 20px; /* Smaller padding for mobile */
}

.disclaimer-content {
  background: #fff8e1;
  border: 2px solid #ffd54f;
  border-radius: 12px;
  padding: 16px 20px; /* Smaller padding for mobile */
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.disclaimer-content h3 {
  color: #8B4513;
  margin: 0 0 12px 0;
  font-size: 1.1em;
  border-bottom: 1px solid #ffd54f;
  padding-bottom: 8px;
}

.disclaimer-content p {
  margin: 0 0 12px 0;
  line-height: 1.5;
  font-size: 0.9em;
}

.disclaimer-content p:last-child {
  margin-bottom: 0;
}

.disclaimer-content strong {
  color: #8B4513;
}

/* ---------------------------
   Cookie Banner Styles
--------------------------- */
#cookie-banner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #222222;
  color: #ffffff;
  text-shadow: 2px 2px 4px #000000;
  padding: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  font-family: Arial, sans-serif;
  font-size: 14px;
  z-index: 10001;
  text-align: center;
  transition: all 0.4s ease-in-out;
  transform: translateY(0);
}

body.banner-visible {
  padding-top: 60px;
}

header {
  position: relative;
  z-index: 10000;
  transition: margin-top 0.4s ease-in-out;
}

#cookie-banner p {
  margin: 0 0 6px 0;
  line-height: 1.2; /* Better line height for mobile */
}

#cookie-banner a {
  color: #ffcc00;
  text-decoration: underline;
  text-shadow: 1px 1px 3px #000000;
}

#cookie-banner .cookie-btn {
  color: #ffffff;
  background-color: #444444;
  text-shadow: 1px 1px 2px #000000;
  border: none;
  border-radius: 4px;
  padding: 5px 14px;
  margin: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  display: inline-block;
}

#cookie-banner .cookie-btn:hover {
  background-color: #666666;
  transform: scale(1.05);
}

#accept-cookies {
  background-color: #28a745;
}

#reject-cookies {
  background-color: #dc3545;
}

#manage-cookies {
  background-color: #007bff;
}

#cookie-banner.hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

body:not(.banner-visible) {
  padding-top: 0 !important;
  transition: padding-top 0.4s ease-in-out;
}

/* Modal Styles */
.cookie-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
  transition: opacity 0.3s ease-in-out;
}

.cookie-modal-content {
  background-color: #fff;
  margin: 15% auto;
  padding: 20px;
  border-radius: 6px;
  width: 90%; /* Responsive width */
  max-width: 400px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.cookie-option {
  margin: 10px 0;
}

.cookie-modal-actions {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap; /* Allow wrapping on mobile */
  gap: 10px;
}

#cookie-modal[style*="display: none"] {
  opacity: 0;
}

#cookie-modal[style*="display: block"] {
  opacity: 1;
}

/* Fix for index page footer - only affects calculator */
.bordered-block {
  min-height: 550px;
}

/* ---------------------------
   Responsive Media Queries
--------------------------- */

/* Tablet and larger mobile devices */
@media (min-width: 768px) {
  header {
    height: 120px;
    flex-wrap: nowrap;
  }
  
  header .icon {
    height: 60px;
  }
  
  header .logo {
    width: 130px;
  }
  
  .main-nav {
    gap: 16px;
    margin-left: 24px;
    flex-wrap: nowrap;
  }
  
  .main-nav a {
    margin: 0 10px;
    padding: 6px 10px;
    font-size: 16px;
  }
  
  .bordered-block {
    padding: 24px;
    margin-bottom: 40px;
  }
  
  .ingredient-header,
  .ingredient-row,
  .calc-header,
  .calc-row {
    gap: 12px;
    min-width: 700px;
  }
  
  .ingredient-row input,
  .ingredient-row select,
  .calc-row input,
  .calc-row select {
    font-size: 16px;
  }
  
  .add-btn,
  .delete-btn {
    font-size: 16px;
  }
  
  .site-footer {
    font-size: 1.3rem;
  }
  
  .site-footer .footer-links a {
    margin: 0 10px;
    font-size: 16px;
  }
  
  .social-icons {
    gap: 20px;
  }
  
  .social-icons img {
    width: 45px;
  }
  
  .disclaimer-note {
    padding: 0 24px;
  }
  
  .disclaimer-content {
    padding: 20px 24px;
  }
}

/* Desktop devices */
@media (min-width: 1024px) {
  html, body {
    min-width: 1024px;
  }
  
  .ingredient-header,
  .ingredient-row,
  .calc-header,
  .calc-row {
    min-width: 800px;
  }
}

/* Small mobile devices */
@media (max-width: 480px) {
  header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    padding: 8px 10px 6px;
    height: auto;
    min-height: auto;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    gap: 2px 0;
  }

  .main-nav {
    display: flex;
    gap: 6px;
    margin-left: 12px;
    justify-content: center;
    flex-wrap: wrap;
    flex: 1 1 100%;
    order: 1;
    margin-top: 2px;
    padding-top: 2px;
  }

  .icon {
    height: 40px;
    margin-right: 8px;
    margin-top: 0;
  }

  .logo {
    height: 40px;
    margin-right: auto;
    margin-top: 0;
  }

  .main-nav a {
    margin: 0 3px;
    padding: 6px 8px;
    font-size: 12px;
    line-height: normal;
  }
}

  
  .bordered-block {
  padding: 20px;
  margin-bottom: 30px;
}
  
  .ingredient-header,
  .ingredient-row,
  .calc-header,
  .calc-row {
    gap: 6px;
    min-width: 550px;
    font-size: 12px;
  }
  
  .ingredient-row input,
  .ingredient-row select,
  .calc-row input,
  .calc-row select {
    font-size: 12px;
    padding: 4px;
  }
  
  .add-btn,
  .delete-btn {
    font-size: 12px;
    padding: 8px 12px;
  }
  
  .site-footer {
    padding: 15px;
    font-size: 1rem;
  }
  
  .site-footer .footer-links a {
    margin: 0 5px;
    font-size: 12px;
  }
  
  .social-icons {
    gap: 10px;
  }
  
  .social-icons img {
    width: 30px;
  }
  
  .disclaimer-note {
    padding: 0 15px;
  }
  
  .disclaimer-content {
    padding: 12px 16px;
  }
  
  .disclaimer-content h3 {
    font-size: 1em;
  }
  
  .disclaimer-content p {
    font-size: 0.8em;
  }
  
  #cookie-banner p {
    font-size: 12px;
  }
  
  #cookie-banner .cookie-btn {
    font-size: 11px;
    padding: 4px 10px;
  }

/* ---------------------------
   How to Use Guide Styles
--------------------------- */
.guide-section {
  margin-bottom: 30px;
}

.guide-section h3 {
  color: #8B4513;
  border-bottom: 2px solid #D8B788;
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.step {
  display: flex;
  margin-bottom: 20px;
  align-items: flex-start;
}

.step-number {
  background: #D8B788;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-right: 16px;
  flex-shrink: 0;
}

.step-content {
  flex: 1;
}

.step-content h4 {
  color: #8B4513;
  margin: 0 0 8px 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.feature-card {
  background: #f8f4f0;
  border: 1px solid #D8B788;
  border-radius: 12px;
  padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.feature-card h4 {
  color: #8B4513;
  margin-top: 0;
  border-bottom: 1px solid #D8B788;
  padding-bottom: 8px;
}

.troubleshooting-item {
  margin-bottom: 20px;
}

.troubleshooting-item h4 {
  color: #8B4513;
  margin-bottom: 8px;
}

/* Lists styling for guide */
.guide-section ul {
  margin: 8px 0;
  padding-left: 20px;
}

.guide-section li {
  margin-bottom: 4px;
  line-height: 1.4;
}

/* ---------------------------
   Disclaimer Page Styles
--------------------------- */
.disclaimer-section {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.disclaimer-section:last-of-type {
  border-bottom: none;
}

.disclaimer-section h3 {
  color: #8B4513;
  border-bottom: 2px solid #D8B788;
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.disclaimer-section ul {
  margin: 12px 0;
  padding-left: 24px;
}

.disclaimer-section li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.disclaimer-section li strong {
  color: #8B4513;
}

.notice-box {
  background: #fff8e1;
  border: 2px solid #ffd54f;
  border-radius: 8px;
  padding: 16px 20px;
  margin: 20px 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.notice-box p {
  margin: 0;
  color: #5d4037;
  font-style: italic;
}

.last-updated {
  text-align: center;
  font-style: italic;
  color: #666;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

/* Responsive adjustments for disclaimer content */
@media (max-width: 768px) {
  .disclaimer-section {
    margin-bottom: 25px;
    padding-bottom: 15px;
  }
  
  .disclaimer-section ul {
    padding-left: 20px;
  }
}

/* ---------------------------
   Privacy Policy Page Styles
--------------------------- */
.privacy-section {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.privacy-section:last-of-type {
  border-bottom: none;
}

.privacy-section h3 {
  color: #8B4513;
  border-bottom: 2px solid #D8B788;
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.privacy-section ul {
  margin: 12px 0;
  padding-left: 24px;
}

.privacy-section li {
  margin-bottom: 10px;
  line-height: 1.5;
}

.privacy-section li strong {
  color: #8B4513;
  font-weight: 600;
}

.privacy-section a {
  color: #8B4513;
  text-decoration: none;
  transition: color 0.25s ease;
}

.privacy-section a:hover {
  color: #D8B788;
  text-decoration: underline;
}

/* Responsive adjustments for privacy policy content */
@media (max-width: 768px) {
  .privacy-section {
    margin-bottom: 25px;
    padding-bottom: 15px;
  }
  
  .privacy-section ul {
    padding-left: 20px;
  }
}

/* ---------------------------
   Terms of Use Page Styles
--------------------------- */
.terms-section {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.terms-section:last-of-type {
  border-bottom: none;
}

.terms-section h3 {
  color: #8B4513;
  border-bottom: 2px solid #D8B788;
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.terms-section ul {
  margin: 12px 0;
  padding-left: 24px;
}

.terms-section li {
  margin-bottom: 10px;
  line-height: 1.5;
}

.terms-section li strong {
  color: #8B4513;
  font-weight: 600;
}

.terms-section a {
  color: #8B4513;
  text-decoration: none;
  transition: color 0.25s ease;
}

.terms-section a:hover {
  color: #D8B788;
  text-decoration: underline;
}

/* Responsive adjustments for terms of use content */
@media (max-width: 768px) {
  .terms-section {
    margin-bottom: 25px;
    padding-bottom: 15px;
  }
  
  .terms-section ul {
    padding-left: 20px;
  }
}

/* ---------------------------
   Contact & Testimonials Page Styles
--------------------------- */

/* Contact Form Styles */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #8B4513;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #D8B788;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background: #fff;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #8B4513;
  box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

.form-group small {
  display: block;
  margin-top: 4px;
  color: #666;
  font-size: 12px;
}

.char-counter {
  text-align: right;
  font-size: 12px;
  margin-top: 4px;
  color: #666;
}

/* Checkbox Styles */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
  margin-top: 2px;
  transform: scale(1.2);
}

/* Submit Button */
.submit-btn {
  background: #8B4513;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.1s ease;
  width: 100%;
  max-width: 200px;
  display: block;
  margin: 0 auto;
}

.submit-btn:hover {
  background: #6B3410;
}

.submit-btn:active {
  transform: translateY(1px);
}

/* Form Messages */
.form-message {
  margin-top: 24px;
}

.message {
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.message.success {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.message.error {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.message h4 {
  margin: 0 0 8px 0;
  color: inherit;
}

/* Testimonials Container */
.testimonials-container {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.testimonial-item {
  background: #f8f4f0;
  border: 1px solid #D8B788;
  border-radius: 12px;
  padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.testimonial-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.testimonial-text {
  font-style: italic;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  margin-bottom: 12px;
}

.testimonial-author {
  font-weight: bold;
  color: #8B4513;
  margin-bottom: 4px;
}

.testimonial-date {
  font-size: 12px;
  color: #666;
}

/* Contact Information */
.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.contact-item {
  text-align: center;
  padding: 20px;
  background: #f8f4f0;
  border-radius: 8px;
}

.contact-item h3 {
  color: #8B4513;
  margin-bottom: 8px;
}

.contact-item p {
  margin: 0;
  color: #333;
}

/* Responsive Design */
@media (max-width: 768px) {
  .contact-form {
    max-width: 100%;
  }
  
  .contact-info {
    grid-template-columns: 1fr;
  }
  
  .testimonials-container {
    grid-template-columns: 1fr;
  }
  
  .submit-btn {
    width: 100%;
    max-width: none;
  }
}

/* ---------------------------
   About Page Styles
--------------------------- */
.about-section {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid #e0e0e0;
}

.about-section:last-of-type {
  border-bottom: none;
  margin-bottom: 20px;
}

.about-section h3 {
  color: #8B4513;
  border-bottom: 2px solid #D8B788;
  padding-bottom: 8px;
  margin-bottom: 20px;
  font-size: 1.4em;
}

.about-section h4 {
  color: #8B4513;
  margin: 16px 0 8px 0;
}

.about-section p {
  line-height: 1.6;
  margin-bottom: 12px;
}

.about-section ul {
  margin: 12px 0;
  padding-left: 24px;
}

.about-section li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.about-section li strong {
  color: #8B4513;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin: 20px 0;
}

.feature-card {
  background: #f8f4f0;
  border: 1px solid #D8B788;
  border-radius: 12px;
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.feature-card h4 {
  color: #8B4513;
  margin-top: 0;
  border-bottom: 1px solid #D8B788;
  padding-bottom: 8px;
  font-size: 1.1em;
}

/* Workflow Steps */
.workflow {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 24px 0;
}

.workflow-step {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 20px;
  background: #f8f4f0;
  border-radius: 12px;
  border-left: 4px solid #D8B788;
}

.workflow-step .step-number {
  background: #8B4513;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.1em;
  flex-shrink: 0;
}

.workflow-step .step-content {
  flex: 1;
}

.workflow-step h4 {
  margin: 0 0 8px 0;
  color: #8B4513;
}

.workflow-step p {
  margin: 0;
  line-height: 1.5;
}

/* Ingredient Categories */
.ingredient-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.category {
  background: #f8f4f0;
  border: 1px solid #D8B788;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}

.category h4 {
  color: #8B4513;
  margin: 0 0 12px 0;
  font-size: 1.1em;
}

.category p {
  margin: 0;
  font-size: 0.9em;
  line-height: 1.4;
}

/* User Types */
.user-types {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.user-card {
  background: #f8f4f0;
  border: 1px solid #D8B788;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  transition: transform 0.2s ease;
}

.user-card:hover {
  transform: translateY(-2px);
}

.user-card h4 {
  color: #8B4513;
  margin: 0 0 12px 0;
  font-size: 1.1em;
}

.user-card p {
  margin: 0;
  font-size: 0.9em;
  line-height: 1.4;
}

/* Notice Box */
.notice-box {
  background: #fff8e1;
  border: 2px solid #ffd54f;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.notice-box p {
  margin: 0;
  color: #5d4037;
  font-style: italic;
  line-height: 1.5;
}

/* Links in about page */
.about-section a {
  color: #8B4513;
  text-decoration: none;
  transition: color 0.25s ease;
}

.about-section a:hover {
  color: #D8B788;
  text-decoration: underline;
}

.last-updated {
  text-align: center;
  font-style: italic;
  color: #666;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
  font-size: 1.1em;
}

/* Responsive Design */
@media (max-width: 768px) {
  .about-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
  }
  
  .feature-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .workflow-step {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  
  .ingredient-categories,
  .user-types {
    grid-template-columns: 1fr;
  }
  
  .workflow-step .step-number {
    align-self: center;
  }
}

@media (max-width: 480px) {
  .about-section h3 {
    font-size: 1.2em;
  }
  
  .feature-card,
  .category,
  .user-card {
    padding: 16px;
  }
}

/* ---------------------------
   Disclaimer Note Styles
--------------------------- */
.disclaimer-note {
  margin: 30px auto 40px auto;
  max-width: 900px;
  padding: 0 24px;
}

.disclaimer-content {
  background: #fff8e1;
  border: 2px solid #ffd54f;
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.disclaimer-content h3 {
  color: #8B4513;
  margin: 0 0 12px 0;
  font-size: 1.1em;
  border-bottom: 1px solid #ffd54f;
  padding-bottom: 8px;
}

.disclaimer-content p {
  margin: 0 0 12px 0;
  line-height: 1.5;
  font-size: 0.9em;
  color: #5d4037;
}

.disclaimer-content p:last-child {
  margin-bottom: 0;
}

.disclaimer-content strong {
  color: #8B4513;
}

/* Responsive adjustments for disclaimer */
@media (max-width: 768px) {
  .disclaimer-note {
    margin: 20px auto 30px auto;
    padding: 0 16px;
  }
  
  .disclaimer-content {
    padding: 16px 20px;
  }
  
  .disclaimer-content h3 {
    font-size: 1em;
  }
  
  .disclaimer-content p {
    font-size: 0.85em;
  }
}

@media (max-width: 480px) {
  .disclaimer-content {
    padding: 12px 16px;
  }
  
  .disclaimer-content h3 {
    font-size: 0.95em;
  }
  
  .disclaimer-content p {
    font-size: 0.8em;
  }
}

/* ---------------------------
   Methodology Page Styles
--------------------------- */
.methodology-section {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid #e0e0e0;
}

.methodology-section:last-of-type {
  border-bottom: none;
  margin-bottom: 20px;
}

.methodology-section h3 {
  color: #8B4513;
  border-bottom: 2px solid #D8B788;
  padding-bottom: 8px;
  margin-bottom: 20px;
  font-size: 1.4em;
}

.methodology-section h4 {
  color: #8B4513;
  margin: 16px 0 8px 0;
  font-size: 1.1em;
}

.methodology-section h5 {
  color: #8B4513;
  margin: 12px 0 6px 0;
  font-size: 1em;
}

/* Calculation Steps */
.calculation-steps {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 20px 0;
}

.calc-step {
  background: #f8f4f0;
  border: 1px solid #D8B788;
  border-radius: 12px;
  padding: 24px;
  border-left: 4px solid #8B4513;
}

.calc-step h4 {
  margin-top: 0;
  color: #8B4513;
}

.calc-step ul {
  margin: 12px 0;
  padding-left: 20px;
}

.calc-step li {
  margin-bottom: 4px;
  line-height: 1.4;
}

/* Code Example */
.code-example {
  background: #2c3e50;
  color: #ecf0f1;
  padding: 16px;
  border-radius: 8px;
  margin: 12px 0;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  border-left: 4px solid #D8B788;
}

.code-example pre {
  margin: 0;
  white-space: pre-wrap;
}

/* Unit Conversion */
.unit-conversion {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin: 16px 0;
}

.conversion-group {
  background: white;
  border: 1px solid #D8B788;
  border-radius: 8px;
  padding: 16px;
}

.conversion-group h5 {
  margin-top: 0;
  text-align: center;
  border-bottom: 1px solid #D8B788;
  padding-bottom: 8px;
}

.conversion-group ul {
  margin: 0;
  padding-left: 16px;
}

.conversion-group li {
  margin-bottom: 4px;
  font-family: monospace;
  font-size: 0.9em;
}

/* Formula */
.formula {
  background: #2c3e50;
  color: #ecf0f1;
  padding: 16px;
  border-radius: 8px;
  margin: 12px 0;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  text-align: center;
  border-left: 4px solid #D8B788;
}

.formula code {
  display: block;
  margin: 8px 0;
}

.calculation-example {
  background: #34495e;
  color: #ecf0f1;
  padding: 12px;
  border-radius: 6px;
  margin: 8px 0;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  text-align: center;
}

/* Density Sample */
.density-sample {
  margin: 20px 0;
}

.density-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 16px 0;
}

.density-category {
  background: white;
  border: 1px solid #D8B788;
  border-radius: 8px;
  padding: 16px;
}

.density-category h5 {
  margin-top: 0;
  text-align: center;
  border-bottom: 1px solid #D8B788;
  padding-bottom: 8px;
  color: #8B4513;
}

.density-item {
  padding: 8px;
  border-bottom: 1px solid #f0f0f0;
  font-family: monospace;
  font-size: 0.9em;
}

.density-item:last-child {
  border-bottom: none;
}

/* Limitations Grid */
.limitations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.limitation-item {
  background: #f8f4f0;
  border: 1px solid #D8B788;
  border-radius: 8px;
  padding: 20px;
}

.limitation-item h4 {
  margin-top: 0;
  color: #8B4513;
  border-bottom: 1px solid #D8B788;
  padding-bottom: 8px;
}

.limitation-item ul {
  margin: 12px 0 0 0;
  padding-left: 18px;
}

.limitation-item li {
  margin-bottom: 6px;
  font-size: 0.9em;
  line-height: 1.4;
}

/* Accuracy Expectations */
.accuracy-expectations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.accuracy-level {
  border-radius: 8px;
  padding: 20px;
  border-left: 4px solid;
}

.accuracy-level h4 {
  margin-top: 0;
}

.accuracy-level:nth-child(1) {
  background: #f0f9f0;
  border-left-color: #27ae60;
}

.accuracy-level:nth-child(1) h4 {
  color: #27ae60;
}

.accuracy-level:nth-child(2) {
  background: #fff9e6;
  border-left-color: #f39c12;
}

.accuracy-level:nth-child(2) h4 {
  color: #f39c12;
}

.accuracy-level:nth-child(3) {
  background: #fef0f0;
  border-left-color: #e74c3c;
}

.accuracy-level:nth-child(3) h4 {
  color: #e74c3c;
}

.accuracy-level ul {
  margin: 12px 0 0 0;
  padding-left: 18px;
}

.accuracy-level li {
  margin-bottom: 4px;
  font-size: 0.9em;
}

/* Best Practices */
.best-practices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.practice-item {
  background: #f8f4f0;
  border: 1px solid #D8B788;
  border-radius: 8px;
  padding: 20px;
}

.practice-item h4 {
  margin-top: 0;
  color: #8B4513;
  border-bottom: 1px solid #D8B788;
  padding-bottom: 8px;
}

.practice-item ul {
  margin: 12px 0 0 0;
  padding-left: 18px;
}

.practice-item li {
  margin-bottom: 8px;
  line-height: 1.4;
}

.practice-item li strong {
  color: #8B4513;
}

/* Important Note */
.important-note {
  background: #fff8e1;
  border: 2px solid #ffd54f;
  border-radius: 8px;
  padding: 20px;
  margin: 24px 0;
}

.important-note h4 {
  color: #8B4513;
  margin-top: 0;
}

.important-note p {
  margin: 0 0 12px 0;
  line-height: 1.5;
}

.important-note ul {
  margin: 12px 0 0 0;
  padding-left: 20px;
}

.important-note li {
  margin-bottom: 6px;
  line-height: 1.4;
}

/* Technical Details */
.technical-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.tech-item {
  background: #f0f8ff;
  border: 1px solid #87ceeb;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}

.tech-item h4 {
  color: #2c5aa0;
  margin-top: 0;
}

.tech-item p {
  margin: 12px 0 0 0;
  font-size: 0.9em;
  line-height: 1.4;
}

/* Bottom Line */
.bottom-line {
  background: #f8f4f0;
  border: 2px solid #D8B788;
  border-radius: 8px;
  padding: 24px;
  text-align: center;
}

.bottom-line p {
  margin: 0 0 16px 0;
  line-height: 1.6;
  font-size: 1.1em;
}

.bottom-line p:last-child {
  margin-bottom: 0;
}

.bottom-line strong {
  color: #8B4513;
}

/* Responsive Design */
@media (max-width: 768px) {
  .methodology-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
  }
  
  .unit-conversion,
  .density-grid,
  .limitations-grid,
  .accuracy-expectations,
  .best-practices,
  .technical-details {
    grid-template-columns: 1fr;
  }
  
  .calc-step {
    padding: 16px;
  }
  
  .formula,
  .code-example {
    font-size: 0.8em;
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .methodology-section h3 {
    font-size: 1.2em;
  }
  
  .methodology-section h4 {
    font-size: 1em;
  }
  
  .calc-step,
  .limitation-item,
  .practice-item {
    padding: 12px;
  }
  
  .density-item {
    padding: 6px;
    font-size: 0.8em;
  }
}

/* ---------------------------
   FAQ Page Styles
--------------------------- */
.faq-search {
  margin: 20px 0 30px 0;
  text-align: center;
}

#faq-search {
  width: 100%;
  max-width: 400px;
  padding: 12px 16px;
  border: 2px solid #D8B788;
  border-radius: 8px;
  font-size: 16px;
  background: white;
}

#faq-search:focus {
  outline: none;
  border-color: #8B4513;
  box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

.faq-categories {
  margin-bottom: 30px;
  text-align: center;
}

.faq-categories h3 {
  color: #8B4513;
  margin-bottom: 16px;
  font-size: 1.2em;
}

.category-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 10px;
}

.category-btn {
  background: #f8f4f0;
  border: 2px solid #D8B788;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 0.9em;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #8B4513;
}

.category-btn:hover {
  background: #D8B788;
  color: white;
}

.category-btn.active {
  background: #8B4513;
  border-color: #8B4513;
  color: white;
}

.faq-section {
  margin-bottom: 40px;
}

.faq-section h3 {
  color: #8B4513;
  border-bottom: 2px solid #D8B788;
  padding-bottom: 8px;
  margin-bottom: 20px;
  font-size: 1.3em;
}

.faq-item {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 12px;
  background: white;
  transition: border-color 0.3s ease;
}

.faq-item:hover {
  border-color: #D8B788;
}

.faq-question {
  padding: 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f4f0;
  border-radius: 8px 8px 0 0;
}

.faq-question h4 {
  margin: 0;
  color: #8B4513;
  font-size: 1.1em;
  flex: 1;
}

.faq-toggle {
  font-size: 1.2em;
  font-weight: bold;
  color: #8B4513;
  margin-left: 16px;
  transition: transform 0.3s ease;
}

.faq-answer {
  padding: 0 20px;
  display: none;
  background: white;
  border-radius: 0 0 8px 8px;
}

.faq-answer p {
  margin: 16px 0;
  line-height: 1.6;
}

.faq-answer ul, .faq-answer ol {
  margin: 12px 0;
  padding-left: 24px;
}

.faq-answer li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.faq-answer strong {
  color: #8B4513;
}

/* Formula in FAQ */
.faq-answer .formula {
  background: #2c3e50;
  color: #ecf0f1;
  padding: 12px;
  border-radius: 6px;
  margin: 12px 0;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  text-align: center;
  border-left: 4px solid #D8B788;
}

/* Contact CTA */
.contact-cta {
  text-align: center;
  background: #f8f4f0;
  border: 2px solid #D8B788;
  border-radius: 12px;
  padding: 30px;
  margin: 30px 0;
}

.contact-cta p {
  margin: 0 0 16px 0;
  font-size: 1.1em;
  color: #8B4513;
}

.contact-btn {
  display: inline-block;
  background: #8B4513;
  color: white;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: bold;
  transition: background 0.3s ease;
  margin-bottom: 12px;
}

.contact-btn:hover {
  background: #6B3410;
}

.response-time {
  font-size: 0.9em !important;
  color: #666 !important;
  font-style: italic;
  margin: 0 !important;
}

/* Links in FAQ */
.faq-answer a {
  color: #8B4513;
  text-decoration: none;
  font-weight: bold;
}

.faq-answer a:hover {
  color: #D8B788;
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  .faq-search {
    margin: 15px 0 25px 0;
  }
  
  .category-buttons {
    gap: 8px;
  }
  
  .category-btn {
    padding: 6px 12px;
    font-size: 0.8em;
  }
  
  .faq-question {
    padding: 16px;
  }
  
  .faq-question h4 {
    font-size: 1em;
  }
  
  .faq-answer {
    padding: 0 16px;
  }
  
  .contact-cta {
    padding: 20px;
    margin: 20px 0;
  }
}

@media (max-width: 480px) {
  .category-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .category-btn {
    width: 200px;
  }
  
  .faq-question {
    padding: 12px;
  }
  
  .faq-question h4 {
    font-size: 0.95em;
  }
  
  .faq-toggle {
    margin-left: 12px;
    font-size: 1.1em;
  }
  
  .faq-answer {
    padding: 0 12px;
  }
  
  .faq-answer p, .faq-answer li {
    font-size: 0.9em;
  }
}

/* Animation for FAQ toggle */
.faq-answer {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------------------------
   Baking Insights Page Styles
--------------------------- */
.page-intro {
  text-align: center;
  font-size: 1.1em;
  color: #666;
  margin-bottom: 40px;
  line-height: 1.6;
}

.articles-grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.insight-article {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.insight-article:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.article-image {
  width: 100%;
  aspect-ratio: 16/9;
  background: #f8f4f0;
  overflow: hidden;
  position: relative;
  border-radius: 8px;
  display: block;
}

/* Target the image-placeholder div */
.article-image > .image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Target the image inside image-placeholder */
.article-image > .image-placeholder > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Keep the text placeholder style separate */
.text-placeholder {
  color: #D8B788;
  font-size: 1.1em;
  font-weight: bold;
}
.article-content {
  padding: 30px;
}

.article-content h3 {
  color: #8B4513;
  margin: 0 0 16px 0;
  font-size: 1.4em;
  line-height: 1.3;
}

.article-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  font-size: 0.9em;
}

.read-time {
  color: #666;
}

.category {
  background: #D8B788;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8em;
}

.article-content p {
  line-height: 1.6;
  margin-bottom: 20px;
  color: #333;
}

/* Key Points */
.key-points {
  background: #f8f4f0;
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
  border-left: 4px solid #D8B788;
}

.key-points h4 {
  color: #8B4513;
  margin: 0 0 12px 0;
}

.key-points ul {
  margin: 0;
  padding-left: 20px;
}

.key-points li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.key-points strong {
  color: #8B4513;
}

/* Calculator Tip */
.calculator-tip {
  background: #f8f4f0;
  border: 1px solid #f8f4f0;
  border-radius: 8px;
  padding: 16px;
  margin: 20px 0;
}

.calculator-tip h4 {
  color: #2c5aa0;
  margin: 0 0 8px 0;
  font-size: 1em;
}

.calculator-tip p {
  margin: 0;
  font-size: 0.95em;
}

/* Pro Tip */
.pro-tip {
  background: #fff8e1;
  border: 1px solid #ffd54f;
  border-radius: 8px;
  padding: 16px;
  margin: 20px 0;
}

.pro-tip h4 {
  color: #8B4513;
  margin: 0 0 8px 0;
  font-size: 1em;
}

.pro-tip p {
  margin: 0;
  font-size: 0.95em;
}

/* Substitution Table */
.substitution-table {
  margin: 25px 0;
}

.substitution-table h4 {
  color: #8B4513;
  margin-bottom: 16px;
}

.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

th {
  background: #8B4513;
  color: white;
  padding: 12px;
  text-align: left;
  font-weight: 600;
}

td {
  padding: 12px;
  border-bottom: 1px solid #e0e0e0;
}

tr:nth-child(even) {
  background: #f8f4f0;
}

/* Error Analysis */
.error-analysis {
  margin: 25px 0;
}

.error-analysis h4 {
  color: #8B4513;
  margin-bottom: 16px;
}

.error-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.error-item {
  background: #f8f4f0;
  padding: 16px;
  border-radius: 8px;
  border-left: 4px solid #e74c3c;
}

.error-item h5 {
  color: #8B4513;
  margin: 0 0 8px 0;
  font-size: 1em;
}

.error-item p {
  margin: 4px 0;
  font-size: 0.9em;
}

/* Accuracy Tips */
.accuracy-tips {
  background: #f0f9f0;
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
  border-left: 4px solid #27ae60;
}

.accuracy-tips h4 {
  color: #27ae60;
  margin: 0 0 12px 0;
}

.accuracy-tips ul {
  margin: 0;
  padding-left: 20px;
}

.accuracy-tips li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.accuracy-tips strong {
  color: #27ae60;
}

/* Bulk Analysis */
.bulk-analysis {
  margin: 25px 0;
}

.bulk-analysis h4 {
  color: #8B4513;
  margin-bottom: 16px;
}

.consideration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.consideration-item {
  background: #f8f4f0;
  padding: 16px;
  border-radius: 8px;
  text-align: center;
}

.consideration-item h5 {
  color: #8B4513;
  margin: 0 0 8px 0;
  font-size: 1em;
}

.consideration-item p {
  margin: 0;
  font-size: 0.9em;
}

/* Cost Comparison */
.breakdown-example {
  margin: 25px 0;
}

.breakdown-example h4 {
  color: #8B4513;
  margin-bottom: 16px;
}

.cost-comparison {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.cost-option {
  background: #f8f4f0;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  position: relative;
}

.cost-option.best-value {
  background: #e8f6f3;
  border: 2px solid #27ae60;
}

.cost-option h5 {
  color: #8B4513;
  margin: 0 0 12px 0;
  font-size: 1.1em;
}

.cost-option p {
  margin: 8px 0;
  font-size: 0.95em;
}

.unit-cost {
  font-weight: bold;
  color: #8B4513;
  font-size: 1.1em;
}

.savings-badge {
  background: #27ae60;
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: bold;
  margin-top: 8px;
  display: inline-block;
}

.analysis-note {
  font-style: italic;
  color: #666;
  text-align: center;
  margin: 16px 0 0 0;
  font-size: 0.9em;
}

/* Newsletter CTA */
.newsletter-cta {
  background: linear-gradient(135deg, #8B4513 0%, #D8B788 100%);
  border-radius: 12px;
  padding: 40px;
  margin: 50px 0 30px 0;
  text-align: center;
  color: white;
}

.newsletter-content h3 {
  color: white;
  margin: 0 0 16px 0;
  font-size: 1.5em;
}

.newsletter-content p {
  margin: 0 0 24px 0;
  font-size: 1.1em;
  opacity: 0.9;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 400px;
  margin: 0 auto 16px auto;
}

.newsletter-form input {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 6px;
  font-size: 1em;
}

.newsletter-form button {
  background: #2c3e50;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

.newsletter-form button:hover {
  background: #34495e;
}

.privacy-note {
  font-size: 0.8em;
  opacity: 0.7;
  margin: 0;
}

/* Related Resources */
.related-resources {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 2px solid #e0e0e0;
}

.related-resources h3 {
  color: #8B4513;
  text-align: center;
  margin-bottom: 30px;
}

.resource-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.resource-link {
  background: #f8f4f0;
  border: 1px solid #D8B788;
  border-radius: 8px;
  padding: 24px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.resource-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  text-decoration: none;
}

.resource-link h4 {
  color: #8B4513;
  margin: 0 0 8px 0;
  font-size: 1.1em;
}

.resource-link p {
  margin: 0;
  color: #666;
  font-size: 0.9em;
  line-height: 1.4;
}

/* Responsive Design */
@media (max-width: 768px) {
  .article-content {
    padding: 20px;
  }
  
  .article-content h3 {
    font-size: 1.2em;
  }
  
  .error-grid,
  .consideration-grid,
  .cost-comparison,
  .resource-links {
    grid-template-columns: 1fr;
  }
  
  .newsletter-cta {
    padding: 30px 20px;
    margin: 40px 0 20px 0;
  }
  
  .newsletter-form {
    flex-direction: column;
  }
  
  table {
    font-size: 0.8em;
  }
  
  th, td {
    padding: 8px;
  }
}

@media (max-width: 768px) {
  .article-image {
    aspect-ratio: 4/3; /* More square on mobile */
  }
}

@media (max-width: 480px) {
  .article-image {
    aspect-ratio: 1/1;
    
  }
  
  .article-content {
    padding: 16px;
  }
  
  .article-meta {
    flex-direction: column;
    gap: 8px;
  }
  
  .key-points,
  .calculator-tip,
  .pro-tip {
    padding: 12px;
  }
}

.social-icons {
  display: flex;
  justify-content: center;   /* centers horizontally */
  gap: 20px;                 /* spacing between icons */
  margin: 20px 0;            /* space above/below */
}

.social-icons img {
  width: 45px;               /* size of icons */
  height: auto;
  transition: transform 0.3s ease;
}

.social-icons img:hover {
  transform: scale(1.2);     /* hover effect */
}

/* Contact Form Styles */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
  color: #333;
}

.form-input {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  background-color: #fff;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.form-input:focus {
  outline: none;
  border-color: #8B4513;
  box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

.form-input::placeholder {
  color: #999;
}

.form-group small {
  display: block;
  margin-top: 0.25rem;
  color: #666;
  font-size: 0.875rem;
}

.char-counter {
  text-align: right;
  font-size: 0.75rem;
  margin-top: 0.25rem;
  color: #666;
}

.submit-btn {
  background-color: #8B4513;
  color: white;
  padding: 12px 30px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.submit-btn:hover {
  background-color: #654321;
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Form Messages */
.form-message {
  margin-top: 1.5rem;
}

.message {
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
}

.message.success {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.message.info {
  background-color: #d1ecf1;
  border: 1px solid #bee5eb;
  color: #0c5460;
}

.message.error {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

/* Contact Info */
.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.contact-item h3 {
  color: #8B4513;
  margin-bottom: 0.5rem;
}

.contact-item p {
  color: #666;
  margin: 0;
}

/* Support Hub & Resource Links Styles */
.support-hub {
  line-height: 1.6;
}

.support-step {
  margin-bottom: 2rem;
}

.support-step h3 {
  color: #333;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

/* Resource Links Grid - Updated for card layout */
.resource-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
  list-style: none;
  padding-left: 0;
}

/* For list items within resource links (if any remain) */
.resource-links li {
  margin-bottom: 0.5rem;
  padding-left: 0;
}

/* Card-style resource links */
.resource-link {
  display: block;
  padding: 1.5rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  background: white;
}

.resource-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #ccc;
  text-decoration: none;
}

.resource-link h4 {
  margin: 0 0 0.5rem 0;
  color: #333;
  font-size: 1.1rem;
}

.resource-link p {
  margin: 0;
  color: #666;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* General link styles */
.resource-links a {
  color: #333;
  text-decoration: none;
}

.resource-links a:hover {
  text-decoration: none;
}

/* Contact note styling */
.contact-note {
  margin: 2rem 0 1.5rem 0;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #ddd;
}

.contact-note h3 {
  margin: 0 0 0.5rem 0;
  color: #333;
}

.contact-note p {
  margin: 0;
  color: #666;
}

/* Legal links styling */
.legal-links {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e0e0e0;
  text-align: center;
}

.legal-links a {
  color: #666;
  text-decoration: none;
}

.legal-links a:hover {
  text-decoration: underline;
  color: #333;
}
/* ======================== */
/* COOKIE BANNER STYLES - FINAL COORDINATION FIX */
/* ======================== */

/* Cookie Banner Container */
#cookie-banner {
  position: fixed;
  top: 0; /* Default position is 0 */
  left: 0;
  width: 100%;
  background-color: #222222;
  color: #ffffff;
  text-shadow: 2px 2px 4px #000000;
  padding: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  font-family: Arial, sans-serif;
  font-size: 14px;
  text-align: center;
  
  /* CRITICAL FIX 1: Set to Absolute Maximum Z-Index for reliability */
  z-index: 2147483647 !important; 
  
  /* Smooth transition for sliding up/down/repositioning */
  transition: top 0.3s ease-in-out, transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
  transform: translateY(0);
}

/* Paragraph text inside banner */
#cookie-banner p {
  margin: 0 0 6px 0;
  line-height: 1;
}

/* Links inside banner */
#cookie-banner a {
  color: #ffcc00;
  text-decoration: underline;
  text-shadow: 1px 1px 3px #000000;
}

/* Button styling */
#cookie-banner .cookie-btn {
  color: #ffffff;
  background-color: #444444;
  text-shadow: 1px 1px 2px #000000;
  border: none;
  border-radius: 4px;
  padding: 5px 14px;
  margin: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  display: inline-block;
}

/* Hover effect for buttons */
#cookie-banner .cookie-btn:hover {
  background-color: #666666;
  transform: scale(1.05);
}

/* Button colors */
#accept-cookies { background-color: #28a745; }
#reject-cookies { background-color: #dc3545; }
#manage-cookies { background-color: #007bff; }

/* ======================== */
/* BANNER HIDING ANIMATION */
/* ======================== */

/* When hidden class is added - slides up and fades out */
#cookie-banner.hidden {
  transform: translateY(-100%); /* Slides up out of view */
  opacity: 0;
  pointer-events: none;
}

/* Remove body padding when both banners are hidden */
body:not(.cookie-banner-visible):not(.in-app-warning-visible) {
  padding-top: 0 !important;
  transition: padding-top 0.4s ease-in-out;
}

/* ======================== */
/* COOKIE & IN-APP BANNER COORDINATION - FIXED */
/* ======================== */

/* 1. When In-App Warning is VISIBLE -> Push Cookie Banner Down */
body.in-app-warning-visible #cookie-banner:not(.hidden) {
    top: 40px !important; /* Push down exactly height of warning */
    transition: top 0.3s ease-in-out;
}

/* 2. When In-App Warning is GONE (Class removed) -> Snap Back Up */
body:not(.in-app-warning-visible) #cookie-banner {
    top: 0 !important;
    transition: top 0.3s ease-in-out;
}

/* In-App Browser Warning */
#in-app-browser-warning {
    z-index: 2147483647 !important; /* Highest Priority */
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: auto;
    min-height: 40px;
}

/* Cookie Banner */
#cookie-banner {
    /* One index lower than warning, so warning overlays it if they crash */
    z-index: 2147483646 !important; 
}

/* Body Padding Coordination */
body.cookie-banner-visible {
    padding-top: 60px !important;
    transition: padding-top 0.4s ease-in-out;
}

body.in-app-warning-visible {
    padding-top: 40px !important;
    transition: padding-top 0.4s ease-in-out;
}

body.cookie-banner-visible.in-app-warning-visible {
    padding-top: 100px !important; /* Combine both heights */
}



/* ======================== */
/* MODAL STYLES */
/* ======================== */

/* Modal overlay */
.cookie-modal {
  display: none;
  position: fixed;
  z-index: 2147483648 !important; /* Re-set to max Z-index for safety */
  left: 0;
  top: 0; 
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
  transition: opacity 0.3s ease-in-out;
}

/* Modal content box */
.cookie-modal-content {
  background-color: #fff;
  margin: 15% auto;
  padding: 20px;
  border-radius: 6px;
  width: 400px;
  max-width: 90%;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Options inside modal */
.cookie-option {
  margin: 10px 0;
}

/* Modal actions */
.cookie-modal-actions {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
}

/* Modal transitions */
#cookie-modal[style*="display: none"] {
  opacity: 0;
}

#cookie-modal[style*="display: block"] {
  opacity: 1;
}

/* Calculator specific styling */
.calculator.bordered-block {
  min-height: 550px;
}

/* Mobile override for calculator block */
@media (max-width: 768px) {
  .calculator.bordered-block {
    min-height: auto;       /* NEW: remove rigid height on mobile */
    overflow-x: auto;       /* NEW: allow horizontal scroll */
  }

  .ingredient-header,
  .ingredient-row,
  .calc-header,
  .calc-row {
    min-width: 600px;       /* NEW: keep columns side by side */
  }
}


/* Scrollable container for bordered-block tables */
.scroll-container {
  overflow-x: auto;       /* enables horizontal scroll */
  -webkit-overflow-scrolling: touch; /* smooth scrolling on iOS */
}

.scroll-container > div {
  min-width: 600px;       /* force grid to keep columns side by side */
}

/* Tablet / mid-size devices */
@media (min-width: 481px) and (max-width: 767px) {
  header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;        /* prevent wrapping */
    padding: 8px 16px;
  }

  .logo {
    margin-right: auto;       /* push nav to the right */
  }

  .main-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    margin-left: 0;
    overflow-x: auto;         /* allow scroll if links overflow */
  }

  .main-nav a {
    white-space: nowrap;      /* keep each link on one line */
    font-size: 14px;
    line-height: normal;
  }
}

/* Sitemap Styles */
.sitemap-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.sitemap-category h3 {
  color: #8B4513;
  border-bottom: 2px solid #D2B48C;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.sitemap-category ul {
  list-style: none;
  padding: 0;
}

.sitemap-category li {
  margin-bottom: 1rem;
  padding-left: 1rem;
  border-left: 3px solid #D2B48C;
}

.sitemap-category a {
  color: #8B4513;
  font-weight: bold;
  text-decoration: none;
}

.sitemap-category a:hover {
  text-decoration: underline;
}

.sitemap-category li::before {
  content: "•";
  color: #D2B48C;
  font-weight: bold;
  display: inline-block;
  width: 1em;
  margin-left: -1em;
}

/* ---------------------------
   Sitemap Page Styles
--------------------------- */

/* Main sitemap container */
.sitemap-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* Category headings */
.sitemap-category h3 {
  color: #8B4513;
  border-bottom: 2px solid #D8B48C; /* Changed to match your brown theme */
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  font-family: Arial, sans-serif; /* Match your site font */
  font-size: 1.3em; /* Match your h3 sizes */
}

/* Category lists */
.sitemap-category ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* List items with custom bullet */
.sitemap-category li {
  margin-bottom: 1rem;
  padding-left: 1rem;
  border-left: 3px solid #D8B48C; /* Match your accent color */
  line-height: 1.5; /* Match your site line height */
  font-family: Arial, sans-serif; /* Match your body font */
  color: #2B2B2B; /* Match your text color */
}

/* Links styling */
.sitemap-category a {
  color: #8B4513; /* Match your link color */
  font-weight: bold;
  text-decoration: none;
  transition: color 0.25s ease; /* Match your hover transitions */
  font-family: Arial, sans-serif; /* Consistent font */
}

.sitemap-category a:hover {
  color: #D8B788; /* Match your hover color */
  text-decoration: underline;
}

/* Custom bullet points */
.sitemap-category li::before {
  content: "•";
  color: #D8B48C; /* Match your accent color */
  font-weight: bold;
  display: inline-block;
  width: 1em;
  margin-left: -1em;
}

/* Description text */
.sitemap-category li {
  font-size: 0.95em; /* Match your body text size */
  color: #333; /* Slightly lighter than headings */
}

/* Responsive design */
@media (max-width: 768px) {
  .sitemap-categories {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
  }
  
  .sitemap-category h3 {
    font-size: 1.2em;
  }
  
  .sitemap-category li {
    margin-bottom: 0.8rem;
    padding-left: 0.8rem;
    font-size: 0.9em;
  }
}

@media (max-width: 480px) {
  .sitemap-categories {
    gap: 1rem;
  }
  
  .sitemap-category h3 {
    font-size: 1.1em;
  }
  
  .sitemap-category li {
    margin-bottom: 0.6rem;
    padding-left: 0.6rem;
    font-size: 0.85em;
  }
}

/* =========================================
   NEW CONTACT PAGE STYLES (Add to style.css)
   ========================================= */

/* --- Section A: Help Grid --- */
.help-hero {
  text-align: center;
}

.quick-help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 25px;
}

.help-card {
  background: #fff;
  border: 1px solid #D8B788;
  border-radius: 12px;
  padding: 24px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.help-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(139, 69, 19, 0.15);
  border-color: #8B4513;
}

.help-icon {
  font-size: 2em;
  margin-bottom: 12px;
  display: block;
}

.help-card h3 {
  margin: 0 0 8px 0;
  color: #8B4513;
  font-size: 1.1em;
}

.help-card p {
  margin: 0;
  font-size: 0.9em;
  color: #666;
}

/* --- Section B: Direct Email --- */
.email-section {
  background: #fff;
}

.email-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.main-email-icon {
  width: 64px;
  height: auto;
}

.email-content h2 {
  color: #8B4513;
  margin-bottom: 8px;
}

.email-box {
  background: #f8f4f0;
  border: 2px dashed #D8B788;
  padding: 15px 25px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 15px;
  margin: 20px 0;
  flex-wrap: wrap;
  justify-content: center;
}

.email-box code {
  font-family: monospace;
  font-size: 1.2em;
  color: #333;
  font-weight: bold;
}

.copy-btn {
  background: #8B4513;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.9em;
  transition: background 0.2s;
}

.copy-btn:hover {
  background: #6B3410;
}

.response-expectations {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 0.9em;
  color: #555;
}

.expectation-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.expectation-item strong {
  color: #8B4513;
}

/* --- Section C: Social Hub --- */
.social-hub {
  text-align: center;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 25px;
}

.platform-card {
  background: #f8f4f0;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s ease;
}

.platform-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

/* Platform specific accent colors on hover */
.fb-card:hover { border-color: #1877F2; }
.insta-card:hover { border-color: #E4405F; }
.tiktok-card:hover { border-color: #000000; }

.platform-icon {
  width: 40px;
  height: auto;
  margin-bottom: 12px;
}

.platform-card h3 {
  margin: 0 0 8px 0;
  color: #333;
}

.platform-link {
  display: inline-block;
  margin-top: 12px;
  color: #8B4513;
  font-weight: bold;
  text-decoration: none;
  font-size: 0.9em;
}

.platform-link:hover {
  text-decoration: underline;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
  .email-box {
    flex-direction: column;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
  }
  
  .response-expectations {
    flex-direction: column;
    gap: 15px;
  }
}

/* ---------------------------
   Article Navigation Styles
--------------------------- */
.article-navigation {
  background: #f8f4f0;
  border: 1px solid #D8B788;
  border-radius: 12px;
  padding: 24px;
  margin: 30px 0;
  text-align: center;
}

.article-navigation h3 {
  color: #8B4513;
  margin: 0 0 16px 0;
  font-size: 1.3em;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.nav-link {
  background: white;
  border: 2px solid #D8B788;
  border-radius: 25px;
  padding: 10px 20px;
  color: #8B4513;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  font-size: 0.95em;
}

.nav-link:hover {
  background: #8B4513;
  color: white;
  border-color: #8B4513;
  transform: translateY(-2px);
}

/* Mobile responsive navigation */
@media (max-width: 768px) {
  .article-navigation {
    padding: 20px;
    margin: 20px 0;
  }
  
  .nav-links {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
  
  .nav-link {
    width: 200px;
    padding: 8px 16px;
  }
}

/* ---------------------------
   Back to Top Styles - Option 3 (Both)
--------------------------- */
/* Back to Top Floating Button */
.back-to-top-sticky {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #8B4513;
  color: white;
  padding: 12px 20px;
  border-radius: 50px;
  box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 1000;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  border: 2px solid #8B4513;
}

.back-to-top-sticky.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top-sticky:hover {
  background-color: #7a3a10;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(139, 69, 19, 0.4);
}

.back-to-top-sticky:active {
  transform: translateY(0);
}

/* Simple Back to Top Link (non-floating version) */
.back-to-top-simple {
  text-align: center;
  margin: 40px 0 20px 0;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.back-to-top-simple a {
  color: #8B4513;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: all 0.3s ease;
  display: inline-block;
  padding: 10px 20px;
  border: 2px solid #D8B788;
  border-radius: 25px;
  background: #f8f4f0;
}

.back-to-top-simple a:hover {
  background: #8B4513;
  color: white;
  border-color: #8B4513;
  transform: translateY(-2px);
}

/* Tablet adjustments */
@media (max-width: 768px) {
  .back-to-top-sticky {
    bottom: 20px;
    right: 20px;
    padding: 10px 16px;  /* Changed from width/height to padding */
    font-size: 0.85rem;  /* Changed from 1.3em to 0.85rem */
    width: auto;         /* Allow button to adjust to content */
    height: auto;        /* Allow button to adjust to content */
    z-index: 9999;
  }

  .back-to-top-simple {
    margin: 30px 0 15px 0;
  }

  .back-to-top-simple a {
    padding: 8px 16px;
    font-size: 1em;
  }

  .example-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .action-buttons {
    flex-direction: column;
    align-items: center;
  }
}




/* Responsive adjustments */
@media (max-width: 768px) {
  .back-to-top-sticky {
    bottom: 20px;
    right: 20px;
    padding: 10px 16px;
    font-size: 0.85rem;
  }
}





/* Mobile adjustments */
@media (max-width: 480px) {
  .back-to-top-sticky {
    bottom: 15px;
    right: 15px;
    padding: 8px 14px;
    font-size: 0.8rem;
  }

  .counter-badge {
    padding: 15px;
  }

  .counter-text {
    font-size: 14px;
  }
}

/* Print Styles */
@media print {
  .video-container,
  .action-buttons,
  .quick-nav,
  .back-to-top-sticky {
    display: none !important;
  }

  .faq-answer {
    max-height: none !important;
    display: block !important;
    page-break-inside: avoid;
  }
}
/* ---------------------------
   NEW STYLES: Costing Dashboard
--------------------------- */

/* Recipe Meta (Servings) */
.recipe-meta-grid {
  display: flex;
  margin-bottom: 20px;
  background: #fdfbf7;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #eee;
}
.meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.meta-item label { font-weight: bold; color: #555; }
.meta-item input { width: 80px; text-align: center; }


/* Dashboard Grid */
.costing-dashboard {
  margin-top: 30px;
  border-top: 2px dashed #ddd;
  padding-top: 20px;
}

.costing-dashboard h3 {
  color: #666;
  font-size: 1.1em;
  margin-bottom: 15px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.dashboard-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.labor-card { border-top: 3px solid #3498db; }
.overhead-card { border-top: 3px solid #f1c40f; }
.profit-card { border-top: 3px solid #27ae60; background: #f0f9f0; }

.dashboard-card h4 {
  margin: 0 0 15px 0;
  color: #444;
  font-size: 1em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-group {
  margin-bottom: 10px;
}

.input-group label {
  display: block;
  font-size: 0.85em;
  color: #777;
  margin-bottom: 4px;
}

.card-result {
  margin-top: 15px;
  padding-top: 10px;
  border-top: 1px solid #eee;
  text-align: right;
  font-weight: bold;
  color: #555;
}

.card-result span {
  color: #333;
  font-size: 1.1em;
}

.card-result.highlight span {
  color: #27ae60;
  font-size: 1.3em;
}

/* ---------------------------
   NEW STYLES: Final Totals
--------------------------- */
.totals {
  margin-top: 30px;
  background: #f8f4f0;
  border-radius: 12px;
  padding: 25px;
  border-left: 5px solid #8B4513;
}

.totals-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  font-size: 1em;
  color: #555;
}

.total-row.separator {
  height: 1px;
  background: #ddd;
  margin: 10px 0;
}

.total-row.main-total {
  font-size: 1.3em;
  color: #8B4513;
  margin-top: 5px;
}

.total-row.sub-total {
  font-size: 0.9em;
  font-style: italic;
  color: #777;
}

.pricing-box {
  background: #fff;
  border: 2px solid #27ae60;
  border-radius: 8px;
  padding: 15px;
  margin-top: 15px;
}

.pricing-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.pricing-row:last-child { margin-bottom: 0; }

.big-price {
  font-size: 1.5em;
  color: #27ae60;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 15px;
  margin-top: 25px;
}

.primary-action {
  flex: 2;
  background: #8B4513;
}

.secondary-action {
  flex: 1;
  background: #7f8c8d;
}
.secondary-action:hover { background: #606d6e; }


.cta-section {
  text-align: center;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 8px;
  padding: 2rem;
  margin: 2rem 0;
  border-left: 4px solid #8B4513;
}

.cta-button {
  display: inline-block;
  background-color: #8B4513; /* Solid brown background */
  color: white; /* White text */
  padding: 12px 24px;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  margin-top: 1rem;
  transition: all 0.3s ease;
  border: 2px solid #8B4513;
  font-size: 16px;
}

.cta-button:hover {
  background-color: #6B3410; /* Darker brown on hover */
  color: white;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 69, 19, 0.4);
}




/* ---------------------------
   Methodology Page Missing Styles
--------------------------- */

/* Costing Pillars - NEW */
.costing-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.pillar {
  background: #f8f4f0;
  border: 1px solid #D8B788;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}

.pillar h4 {
  color: #8B4513;
  margin: 0 0 12px 0;
  border-bottom: 1px solid #D8B788;
  padding-bottom: 8px;
}

.pillar p {
  margin: 0;
  font-size: 0.9em;
  line-height: 1.4;
}

/* Enhanced formula styling - ENHANCEMENT of existing */
.formula {
  background: #2c3e50;
  color: #ecf0f1;
  padding: 16px;
  border-radius: 8px;
  margin: 12px 0;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  text-align: center;
  border-left: 4px solid #D8B788;
}

.formula code {
  display: block;
  margin: 8px 0;
  font-size: 1em;
}

/* Enhanced calculation example - ENHANCEMENT of existing */
.calculation-example {
  background: #34495e;
  color: #ecf0f1;
  padding: 12px;
  border-radius: 6px;
  margin: 8px 0;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  text-align: center;
  border-left: 3px solid #D8B788;
}

/* Call to action section - NEW */
.cta-section {
  text-align: center;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 8px;
  padding: 2rem;
  margin: 2rem 0;
  border-left: 4px solid #8B4513;
}

.cta-button {
  display: inline-block;
  background-color: #8B4513;
  color: white;
  padding: 12px 24px;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  margin-top: 1rem;
  transition: all 0.3s ease;
  border: 2px solid #8B4513;
  font-size: 16px;
}

.cta-button:hover {
  background-color: #6B3410;
  color: white;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 69, 19, 0.4);
}

/* Article navigation - NEW */
.article-navigation {
  background: #f8f4f0;
  border: 1px solid #D8B788;
  border-radius: 12px;
  padding: 24px;
  margin: 30px 0;
  text-align: center;
}

.article-navigation h3 {
  color: #8B4513;
  margin: 0 0 16px 0;
  font-size: 1.3em;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.nav-link {
  background: white;
  border: 2px solid #D8B788;
  border-radius: 25px;
  padding: 10px 20px;
  color: #8B4513;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  font-size: 0.95em;
}

.nav-link:hover {
  background: #8B4513;
  color: white;
  border-color: #8B4513;
  transform: translateY(-2px);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .costing-pillars {
    grid-template-columns: 1fr;
  }
  
  .article-navigation {
    padding: 20px;
    margin: 20px 0;
  }
  
  .nav-links {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
  
  .nav-link {
    width: 200px;
    padding: 8px 16px;
  }
  
  .cta-section {
    padding: 1.5rem;
  }
}

/* ---------------------------
   In-App Browser Warning Styles - FIXED
--------------------------- */

/* In-app warning specific styles */
#in-app-browser-warning button {
    background: none !important;
    border: none !important;
    font-size: 16px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    color: #856404 !important;
    padding: 2px 6px !important;
    border-radius: 3px !important;
    flex-shrink: 0 !important;
    min-width: 20px !important;
    height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#in-app-browser-warning button:hover {
    background: rgba(0, 0, 0, 0.1) !important;
}

/* Animation for in-app warning */
#in-app-browser-warning {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

#in-app-browser-warning.hidden {
    display: none !important;
}


/* Data Source Section Styling */
.data-sources {
  margin-top: 30px;
  background-color: #f9f9f9;
  border-left: 5px solid #8B4513; /* Matches brand color */
  padding: 20px;
}

.source-content h3 {
  margin-top: 0;
  color: #5d4037;
  font-size: 1.2rem;
}

.source-list {
  list-style: none;
  padding: 0;
  margin: 15px 0;
}

.source-list li {
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.source-list li a {
  color: #8B4513;
  text-decoration: underline;
  margin-left: 5px;
}

.source-note {
  font-size: 0.85rem;
  color: #666;
  border-top: 1px solid #ddd;
  padding-top: 10px;
  margin-top: 10px;
}

.source-comparison {
  display: flex;
  gap: 2rem;
  margin: 2rem 0;
}

.source-column {
  flex: 1;
  padding: 1.5rem;
  background: #f9f5f0;
  border-radius: 8px;
  border: 1px solid #e6d5c3;
}

.source-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: bold;
  margin-right: 0.5rem;
}

.source-badge.government {
  background: #2e5a8d;
  color: white;
}

.source-badge.professional {
  background: #8b4513;
  color: white;
}

.source-attributes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.source-attributes .attribute {
  background: white;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  border: 1px solid #ddd;
}

.integration-note {
  background: #fff8e1;
  padding: 1rem;
  border-left: 4px solid #ffb300;
  margin-top: 2rem;
  font-size: 0.9rem;
}


/* ===== ACTION BUTTONS LAYOUT ===== */

.action-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
  margin: 30px auto;
  width: 100%;
}

.button-row {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.button-row button {
  min-width: 180px;
  flex: 1;
  max-width: 250px;
}

.download-counter-container {
  width: 100%;
  max-width: 500px;
  margin-top: 10px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .button-row {
    flex-direction: column;
    align-items: center;
  }
  
  .button-row button {
    width: 100%;
    max-width: 300px;
  }
}

/* ===== UNIT CONVERTER STYLES ===== */
.converter-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 1.5rem;
  padding: 1rem;
}

.converter-inputs {
  flex: 1;
  min-width: 300px;
  padding: 1.5rem;
  background: #f9f5f0;
  border-radius: 10px;
  border: 1px solid #e6d5c1;
  box-shadow: 0 2px 8px rgba(139, 69, 19, 0.1);
}

.converter-results {
  flex: 1;
  min-width: 300px;
  padding: 1.5rem;
  background: linear-gradient(135deg, #fffaf0 0%, #fff5e6 100%);
  border-radius: 10px;
  border: 2px dashed #d4b896;
  box-shadow: 0 2px 8px rgba(139, 69, 19, 0.1);
}

.converter-results h4 {
  color: #2e7d32;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e6d5c1;
}

.input-group {
  margin-bottom: 1.2rem;
}

.input-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #5d4037;
  font-size: 0.95rem;
}

.input-group input,
.input-group select {
  width: 100%;
  padding: 0.85rem;
  border: 1px solid #d4b896;
  border-radius: 6px;
  font-size: 1rem;
  background: white;
  transition: all 0.3s;
}

.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: #8B4513;
  box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.2);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.result-card {
  background: white;
  padding: 1.2rem 0.8rem;
  border-radius: 8px;
  border: 1px solid #e6d5c1;
  text-align: center;
  transition: all 0.3s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.result-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(139, 69, 19, 0.15);
  border-color: #8B4513;
}

.result-value {
  font-size: 1.6rem;
  font-weight: bold;
  color: #8B4513;
  margin: 0.5rem 0;
  font-family: 'Courier New', monospace;
}

.result-unit {
  font-size: 0.85rem;
  color: #7d6b5f;
  font-weight: 500;
}

#convert-btn {
  width: 100%;
  margin-top: 0.5rem;
  padding: 1rem;
  font-size: 1.1rem;
  background: linear-gradient(to bottom, #8B4513, #6b3410);
  border: none;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

#convert-btn.converting {
  background: linear-gradient(to bottom, #7a4218, #5a3212) !important;
  pointer-events: none;
}

#convert-btn.converted {
  background: linear-gradient(to bottom, #2e7d32, #1b5e20) !important;
  box-shadow: 0 4px 12px rgba(46, 125, 50, 0.4) !important;
  transform: none !important; /* Added this line */
}

#convert-btn:hover:not(.converted) { /* Changed this line */
  background: linear-gradient(to bottom, #9c5523, #7a4218);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(139, 69, 19, 0.3);
}

#convert-btn:active {
  transform: translateY(0);
}

.conversion-error {
  background: #ffe6e6;
  border: 1px solid #ff9999;
  border-radius: 8px;
  padding: 1rem;
  color: #cc0000;
  font-weight: 500;
  text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .converter-container {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .converter-inputs,
  .converter-results {
    min-width: 100%;
  }
  
  .results-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

/* Floating Table of Contents Button */
.floating-toc-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #8B4513;
  color: white;
  padding: 12px 20px;
  border-radius: 50px;
  box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 1000;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  border: 2px solid #8B4513;
}

.floating-toc-btn.show {
  opacity: 1;
  transform: translateY(0);
}

.floating-toc-btn:hover {
  background-color: #7a3a10;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(139, 69, 19, 0.4);
}

.floating-toc-btn:active {
  transform: translateY(0);
}

.floating-toc-btn .toc-icon {
  font-size: 1.1em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .floating-toc-btn {
    bottom: 20px;
    right: 20px;
    padding: 10px 16px;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .floating-toc-btn {
    bottom: 15px;
    right: 15px;
    padding: 8px 14px;
    font-size: 0.8rem;
  }
}

/* New CSS for How-to Page */
.video-tutorial {
  background: linear-gradient(135deg, #f9f3e9 0%, #f5ebdd 100%);
  border: 2px solid #e0d0b8;
  border-radius: 12px;
  padding: 25px;
  margin: 30px 0;
}

.video-tutorial h2 {
  color: #5a3921;
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.inline-link {
  display: inline-block;
  color: #8B4513;
  font-weight: 600;
  text-decoration: none;
  margin-top: 10px;
  padding: 5px 10px;
  border-radius: 4px;
  background: rgba(139, 69, 19, 0.1);
}

.inline-link:hover {
  background: rgba(139, 69, 19, 0.2);
  text-decoration: underline;
}

.conversion-example {
  border-left: 4px solid #8B4513;
}

.example-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 25px 0;
}

.example-card {
  background: #f9f3e9;
  border: 1px solid #e0d0b8;
  border-radius: 8px;
  padding: 20px;
}

.example-card h4 {
  color: #5a3921;
  margin-top: 0;
  border-bottom: 2px solid #e0d0b8;
  padding-bottom: 10px;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 25px 0;
}

.faq-item {
  background: #f9f3e9;
  border: 1px solid #e0d0b8;
  border-radius: 8px;
  padding: 20px;
}

.faq-item h4 {
  color: #5a3921;
  margin-top: 0;
}

.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin: 25px 0;
}





/* How to Use Page Specific Styles */

/* Download Counter Styles */
.download-counter-container {
  text-align: center;
  margin: 40px 0;
  padding: 30px;
  background: linear-gradient(135deg, #f9f3e9 0%, #f5ebdd 100%);
  border-radius: 12px;
  border: 2px solid #e0d0b8;
}

.counter-badge {
  display: inline-flex;
  align-items: center;
  background: #fff;
  padding: 15px 25px;
  border-radius: 50px;
  border: 2px solid #8B4513;
  box-shadow: 0 4px 12px rgba(139, 69, 19, 0.1);
}

.counter-icon {
  font-size: 24px;
  margin-right: 15px;
  color: #8B4513;
}

.counter-text {
  font-size: 16px;
  color: #5a3921;
}

.counter-note {
  margin-top: 10px;
  font-size: 12px;
  color: #7a5a3b;
}

/* FAQ Section */
.faq-section {
  margin-top: 40px;
}

.faq-content {
  margin-top: 20px;
}

.faq-item {
  margin-bottom: 10px;
}

/* Video Container */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 100%;
  margin: 20px auto;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

/* Feature Cards */
.feature-card {
  background: #f9f3e9;
  border: 1px solid #e0d0b8;
  border-radius: 8px;
  padding: 25px;
  margin: 20px 0;
}

.feature-card h3 {
  margin-top: 0;
  color: #5a3921;
  border-bottom: 2px solid #e0d0b8;
  padding-bottom: 10px;
}

.conversion-example {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid #8B4513;
  margin: 20px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.example-formula {
  background: #f5ebdd;
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
  font-family: monospace;
  font-size: 1.1em;
}

/* Quick Navigation */
.quick-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.nav-btn {
  display: inline-block;
  padding: 12px 24px;
  background: #8B4513;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.nav-btn:hover {
  background: #5a3921;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 69, 19, 0.2);
}

/* Action Buttons */
.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin: 30px 0;
}

.cta-button {
  padding: 15px 30px;
  background: #8B4513;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.cta-button:hover {
  background: #5a3921;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(139, 69, 19, 0.2);
}

/* Resource Links */
.resource-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.resource-link {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: #f9f3e9;
  border: 1px solid #e0d0b8;
  border-radius: 8px;
  text-decoration: none;
  color: #5a3921;
  transition: all 0.3s ease;
}

.resource-link:hover {
  background: #f5ebdd;
  transform: translateX(5px);
  border-color: #8B4513;
}

.resource-link span {
  font-size: 1.5em;
}

.resource-link strong {
  display: block;
  margin-bottom: 5px;
}

.resource-link small {
  font-size: 0.85em;
  color: #7a5a3b;
}





/* Responsive Design */
@media (max-width: 768px) {
  .action-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .cta-button {
    width: 100%;
    text-align: center;
  }
  
  .quick-nav {
    flex-direction: column;
    gap: 8px;
  }
  
  .nav-btn {
    width: 100%;
    text-align: center;
    padding: 12px 15px;
    font-size: 0.9rem;
  }
  
  
/* ======================== */
/* HOW-TO PAGE MOBILE OPTIMIZATION */
/* ======================== */



/* 2. IMPROVE VIDEO CONTAINER RESPONSIVENESS */
@media (max-width: 768px) {
  .video-container {
    margin: 15px 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }
}

/* 3. FIX FEATURE GRID FOR MOBILE */
@media (max-width: 768px) {
  .feature-grid {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
    margin: 20px 0 !important;
  }
  
  .feature-card {
    padding: 20px !important;
    margin: 0 !important;
  }
  
  .feature-card h3 {
    font-size: 1.1em !important;
    margin-top: 0 !important;
  }
}

/* 4. FIX QUICK NAVIGATION BUTTONS */
@media (max-width: 768px) {
  .quick-nav {
    flex-direction: column !important;
    gap: 8px !important;
    align-items: center !important;
  }
  
  .nav-btn {
    width: 100% !important;
    max-width: 280px !important;
    padding: 12px 20px !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }
}

/* 5. FIX TABLES IN MOBILE VIEW */
@media (max-width: 768px) {
  .example-table {
    overflow-x: auto !important;
    margin: 15px 0 !important;
  }
  
  .example-table table {
    min-width: 500px !important;
    font-size: 14px !important;
  }
  
  .example-table th,
  .example-table td {
    padding: 8px !important;
    font-size: 13px !important;
  }
}

/* 6. FIX FAQ SECTION MOBILE LAYOUT */
@media (max-width: 768px) {
  .faq-content {
    padding: 0 !important;
  }
  
  .faq-item {
    margin-bottom: 20px !important;
    padding: 15px !important;
    border-radius: 8px !important;
    background: #f9f3e9 !important;
  }
  
  .faq-item h3 {
    font-size: 1.1em !important;
    margin-bottom: 10px !important;
  }
}

/* 7. FIX ACTION BUTTONS STACKING */
@media (max-width: 768px) {
  .action-buttons {
    flex-direction: column !important;
    gap: 12px !important;
    align-items: center !important;
  }
  
  .cta-button {
    width: 100% !important;
    max-width: 280px !important;
    padding: 15px 20px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
}

/* 8. FIX RESOURCE LINKS GRID */
@media (max-width: 768px) {
  .resource-links {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  
  .resource-link {
    padding: 15px !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 15px !important;
  }
  
  .resource-link span {
    font-size: 1.5em !important;
  }
}

/* 9. FIX DOWNLOAD COUNTER ON MOBILE */
@media (max-width: 768px) {
  .download-counter-container {
    padding: 20px 15px !important;
    margin: 25px 0 !important;
  }
  
  .counter-badge {
    flex-direction: column !important;
    padding: 15px !important;
    text-align: center !important;
    gap: 10px !important;
  }
  
  .counter-icon {
    margin-right: 0 !important;
    margin-bottom: 5px !important;
    font-size: 1.8em !important;
  }
  
  .counter-text {
    font-size: 14px !important;
  }
}

/* 10. FIX EXAMPLE FORMULA CONTAINERS */
@media (max-width: 768px) {
  .example-formula,
  .conversion-example,
  .pdf-preview {
    padding: 15px !important;
    margin: 15px 0 !important;
    font-size: 0.9em !important;
  }
}

/* 11. FIX GET STARTED SECTION PADDING */
@media (max-width: 768px) {
  .guide-section[style*="text-align: center"] {
    padding: 30px 15px !important;
    margin: 25px 0 !important;
  }
}

/* 12. IMPROVE TEXT READABILITY ON MOBILE */
@media (max-width: 768px) {
  .guide-section h2 {
    font-size: 1.4em !important;
    line-height: 1.3 !important;
    margin-bottom: 15px !important;
  }
  
  .guide-section p {
    font-size: 1em !important;
    line-height: 1.5 !important;
    margin-bottom: 15px !important;
  }
  
  .page-intro {
    font-size: 1em !important;
    line-height: 1.5 !important;
  }
}

/* 13. FIX QUICK NAVIGATION CONTAINER */
@media (max-width: 768px) {
  .guide-section[style*="background: #f5ebdd"] {
    padding: 20px 15px !important;
    margin: 20px 0 !important;
  }
}

/* 14. PREVENT HORIZONTAL SCROLLING */
@media (max-width: 768px) {
  .guide-section {
    overflow-x: hidden !important;
    word-wrap: break-word !important;
  }
  
  .guide-section ol,
  .guide-section ul {
    padding-left: 20px !important;
    margin: 10px 0 !important;
  }
  
  .guide-section li {
    margin-bottom: 8px !important;
    font-size: 0.95em !important;
  }
}

/* 15. FIX INLINE LINK STYLES */
@media (max-width: 768px) {
  .inline-link {
    padding: 6px 12px !important;
    font-size: 0.9em !important;
    display: inline-block !important;
    margin: 5px 0 !important;
  }
}

/* 16. ADD TOUCH-FRIENDLY TARGET SIZES */
@media (max-width: 768px) {
  a, button {
    min-height: 44px !important;
    min-width: 44px !important;
  }
  
  .cta-button,
  .nav-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}
.quick-nav-section {
  background: #f5ebdd;
  padding: 25px;
  border-radius: 8px;
  margin: 30px 0;
}

@media (max-width: 768px) {
  .quick-nav-section {
    padding: 20px 15px;
    margin: 20px 0;
  }
}
/* ======================== */
/* HOW-TO PAGE FAQ COLLAPSIBLE (NO CUTOFF) */
/* ======================== */

/* FAQ container */
#baking-faq {
    margin: 30px 0;
}

/* FAQ item */
#baking-faq .faq-item {
    border: 1px solid #e0d0b8;
    border-radius: 8px;
    margin-bottom: 15px;
    background: #f9f3e9;
    overflow: hidden; /* Keep overflow hidden on parent */
}

/* Question */
#baking-faq .faq-question {
    padding: 16px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9f3e9;
    transition: background 0.2s ease;
}

#baking-faq .faq-question:hover {
    background: #f0e6d6;
}

#baking-faq .faq-question.active {
    background: #f5ebdd;
    border-bottom: 1px solid #e0d0b8;
}

#baking-faq .faq-question h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #5a3921;
    flex: 1;
}

#baking-faq .faq-toggle {
    color: #8B4513;
    font-size: 12px;
    margin-left: 10px;
    transition: transform 0.2s ease;
}

#baking-faq .faq-question.active .faq-toggle {
    transform: rotate(180deg);
}

/* ANSWER FIX: Use height instead of max-height for smoother animation */
#baking-faq .faq-answer {
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease;
    background: white;
}

#baking-faq .faq-answer.open {
    height: auto; /* Let it grow naturally */
    overflow: visible; /* Don't hide overflow */
}

#baking-faq .faq-answer-content {
    padding: 15px 20px;
}

#baking-faq .faq-answer p {
    margin: 0 0 15px 0;
    line-height: 1.6;
    color: #333;
}

#baking-faq .faq-answer ul,
#baking-faq .faq-answer ol {
    margin: 15px 0;
    padding-left: 25px;
}

#baking-faq .faq-answer li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Fix for tables and wide content */
#baking-faq .faq-answer table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    overflow-x: auto;
    display: block;
}

#baking-faq .faq-answer table td,
#baking-faq .faq-answer table th {
    padding: 8px 12px;
    text-align: left;
    border: 1px solid #ddd;
}

/* Mobile fixes */
@media (max-width: 768px) {
    #baking-faq .faq-item {
        margin-bottom: 12px;
    }
    
    #baking-faq .faq-question {
        padding: 12px 16px;
    }
    
    #baking-faq .faq-question h3 {
        font-size: 0.95em;
    }
    
    #baking-faq .faq-answer-content {
        padding: 12px 16px;
    }
    
    #baking-faq .faq-answer p {
        font-size: 0.95em;
        line-height: 1.5;
    }
    
    #baking-faq .faq-answer table {
        font-size: 14px;
    }
    
    #baking-faq .faq-answer table td,
    #baking-faq .faq-answer table th {
        padding: 6px 8px;
        font-size: 13px;
    }
}

/* NEW STYLES FOR OPTIMIZED PAGE */

/* Quick Answer Box */
.quick-answer-box {
  background-color: #f8f9fa;
  border-left: 4px solid #f8f4f0;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 8px 8px 0;
}

.quick-answer-box strong {
  color: #2c3e50;
  font-weight: 700;
}

/* Quick Navigation */
.quick-nav {
  background-color: #f8f4f0;
  border-radius: 8px;
  padding: 1.25rem;
  margin: 2rem 0;
  border: 1px solid #e1e5eb;
}

.quick-nav h3 {
  margin-top: 0;
  color: #8B4513;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.quick-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.5rem;
}

.quick-nav li {
  margin: 0;
}

.quick-nav a {
  color: #4a90e2;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  display: block;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.quick-nav a:hover {
  background-color: #e8f0fe;
  color: #2c6bb0;
}

/* Cost Tables */
.cost-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.cost-table th {
  background-color: #8B4513;
  color: white;
  font-weight: 600;
  text-align: left;
  padding: 1rem;
}

.cost-table td {
  padding: 1rem;
  border: 1px solid #e1e5eb;
  vertical-align: top;
}

.cost-table tr:nth-child(even) {
  background-color: #f8f9fa;
}

.cost-table .unit-cost {
  font-size: 1.1rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 2px solid #e1e5eb;
}

.cost-table .savings-badge {
  display: inline-block;
  background-color: #2ecc71;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* FAQ Items */
.faq-item {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid #e1e5eb;
}

.faq-item h3 {
  color: #2c3e50;
  margin-top: 0;
  font-size: 1.1rem;
}

.faq-item p {
  margin-bottom: 0;
  color: #5a6c7d;
}

/* Current Navigation Link */
.nav-link.current {
  font-weight: 700;
  color: #4a90e2;
  background-color: #e8f0fe;
  border-radius: 4px;
}



/* Responsive Tables */
@media (max-width: 768px) {
  .cost-table {
    display: block;
    overflow-x: auto;
  }
  
  .quick-nav ul {
    grid-template-columns: 1fr;
  }
  
  .cost-table th,
  .cost-table td {
    min-width: 200px;
  }
}


