/* ---------------------------
   Base Styles
--------------------------- */
html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  font-family: Arial, sans-serif;
  color: #2B2B2B;
  min-width: 1024px;
}

/* Main grows to fill space and pushes footer down */
main {
  flex: 1;
  max-width: 900px;
  margin: 40px auto;
  padding: 0 24px;
}

/* ---------------------------
   Background (fixed parallax style)
--------------------------- */
.bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("images/BG.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  z-index: -1;
}

/* ---------------------------
   Header
--------------------------- */
header {
  height: 80px;                     /* give header enough height */
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;      /* keep everything aligned left */
  gap: 12px;
}

header .icon {
  height: 60px;                     /* fixed size for icon */
  width: auto;                      /* keep aspect ratio */
  flex-shrink: 0;                   /* prevent stretching */
}

header .logo {
  width: 130px;
  height: auto;                     /* keep aspect ratio */
  flex-shrink: 0;
}

/* ---------------------------
   Header Navigation (to the right of logo/title)
--------------------------- */
.main-nav {
  display: flex;
  gap: 16px;
  margin-left: 24px;                /* space between logo/title and links */
  justify-content: flex-start;      /* keep links aligned right after logo/title */
}

.main-nav a {
  margin: 0 10px;
  text-decoration: none;
  color: #fff;
  font-weight: bold;
  padding: 6px 10px;
  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);
}

.main-nav a:hover {
  color: #D8B788;
  
}


/* ---------------------------
   Shared Block Style
--------------------------- */
.bordered-block {
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid #D8B788;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  padding: 24px;
  margin-bottom: 40px;
}

/* ---------------------------
   Ingredients Table
--------------------------- */
.ingredient-header,
.ingredient-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 0.6fr;
  gap: 12px;
  padding: 8px 0;
}

.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: 12px;
  padding: 8px 0;
}

.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;
}

.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;
}

.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;
}

.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.3rem;
  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 10px;
  text-decoration: none;
  transition: color 0.25s ease;
}

.site-footer .footer-links a:hover {
  color: #D8B788;
}

/* ---------------------------
   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: 850px;
  height: 400px;
  background: #f8f4f0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.article-image img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  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: #e8f4f8;
  border: 1px solid #87ceeb;
  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: 480px) {
  .article-image {
    height: 150px;
    
  }
  
  .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;
}