/* =========================
   1) BASIC RESET & BODY
========================= */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: #f9f9f9;
  color: #333;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* =========================
   2) HEADER
========================= */
.header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  background-color: #2d6c5d;
  padding: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  max-width: 1000px;
  margin: 10px auto;
}

.header .logo {
  display: flex;
  align-items: flex-end;
}

.header .logo img {
  width: 150px;
  height: auto;
}

.header a {
  color: white;
  text-align: center;
  padding: 12px;
  text-decoration: none;
  font-size: 18px;
  line-height: 25px;
  border-radius: 4px;
  transition: background-color 0.3s, color 0.3s;
}

.header a:hover {
  background-color: #ddd;
  color: black;
}

.header a.active {
  background-color: dodgerblue;
  color: white;
}

/* =========================
   3) MAIN CONTAINER
========================= */
.container {
  max-width: 1000px;
  margin: 10px auto;
  padding: 20px;
  background-color: white;
  border: 1px solid #2d6c5d;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

header {
  text-align: center;
  padding: 20px 0;
}

h1 {
  font-size: 2.5rem;
  color: #2d6c5d;
  margin-bottom: 10px;
}

h2 {
  font-size: 1.8rem;
  color: #2d6c5d;
  margin-bottom: 15px;
}

p {
  margin-bottom: 15px;
  color: #555;
}

/* =========================
   4) NAVIGATION (inside .container)
========================= */
.main-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background-color: #fff9e6;
  border: 1px solid #ffecb3;
  border-radius: 12px;
  margin: 2rem auto;
  max-width: 900px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.main-nav a {
  color: #d35400;
  background-color: #fff;
  padding: 0.6rem 1.3rem;
  border: 2px solid #f6b800;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 2px 4px rgba(246, 184, 0, 0.15);
}

.main-nav a:hover {
  background-color: #f6b800;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(246, 184, 0, 0.3);
}

/* =========================
   5) CALCULATOR SECTIONS
========================= */
.category-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.category-list li {
  margin-bottom: 1rem;
}

.category-header {
  font-weight: bold;
  cursor: pointer;
  position: relative;
  padding-left: 20px;
  color: #2d6c5d;
}

.category-header .arrow {
  position: absolute;
  left: 0;
  top: 0;
  font-size: 1rem;
  color: #333;
}

.category-header.expanded {
  background-color: #f1f1f1;
}

.category-body {
  display: none;
  margin-left: 20px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 1rem;
}

.category-total {
  float: right;
  font-weight: normal;
  font-size: 1rem;
  color: #555;
  margin-left: 1rem;
}

#grandTotal {
  color: #234c40;
  font-weight: bold;
}

.calculator {
  padding: 15px;
  text-align: center;
  margin-bottom: 44px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: #f9f9f9;
}

/* Universal Calculator Input Styling */
.calculator input[type="number"],
.calculator select {
  width: 100% !important;
  padding: 10px !important;
  border: 1px solid #ddd !important;
  border-radius: 5px !important;
  font-size: 1rem !important;
  transition: border-color 0.3s !important;
  text-align: center !important;
  box-sizing: border-box !important;
  background-color: #fff;
  color: #333;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.calculator input[type="number"]:focus,
.calculator select:focus {
  border-color: #2d6c5d !important;
  outline: none;
}

/* Form Styling */
input,
textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
}

textarea {
  resize: none;
}

.input-row,
.input-group {
  margin-bottom: 1rem;
  text-align: center;
}

.input-row label,
.input-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #234c40;
  text-align: center;
}

.battery-form {
  max-width: 500px;
  margin: 0 auto;
}

.short-input {
  max-width: 90px;
  width: 100%;
}

#systemVoltage {
  display: block !important;
  margin: 0 auto !important;
  text-align: center !important;
}

/* Advanced Sections */
.advanced-section.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

.advanced-section.show {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  overflow: visible !important;
}

/* Tooltip Styling */
.tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.tooltip-icon {
  margin-left: 5px;
  cursor: help;
  color: #2d6c5d;
  font-size: 0.9em;
  vertical-align: middle;
}

/* Ensure tooltiptext is hidden by default and has transition */
.tooltip .tooltiptext {
  visibility: hidden;
  opacity: 0;
  width: 220px;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 10px;
  position: absolute;
  z-index: 1000; /* Increased z-index to ensure it's on top */
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  transition: opacity 0.3s, visibility 0.3s; /* Added visibility to transition */
}

/* Rule to show tooltip when .tooltip-active class is present (for mobile tap) */
.tooltip.tooltip-active .tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* Keep existing hover/focus rules for desktop */
.tooltip:hover .tooltiptext,
.tooltip .tooltip-icon:focus + .tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* =========================
   6) BUTTONS
========================= */
button {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  margin-right: 0.5rem;
  margin-top: 1rem;
  font-size: 1rem;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #234c40;
}

.reset-btn,
.secondary,
button.secondary {
  background-color: #6c757d;
  color: #fff;
}

.reset-btn:hover,
.secondary:hover,
button.secondary:hover {
  background-color: #5a6268;
}

.coffee-btn,
.feedback-btn {
  display: inline-block;
  padding: 10px 20px;
  font-size: 16px;
  line-height: 1.5;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}

.coffee-btn {
  background-color: #b27223 !important;
  color: #fff !important;
}

.feedback-btn {
  background-color: #159909;
  color: #fff;
}

/* CTA Button Styling */
.cta-button {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 5px;
  font-weight: bold;
  text-decoration: none;
  font-size: 1rem;
  color: white;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}

.cta-button:hover {
  opacity: 0.9;
  transform: scale(1.05);
}

.cta-green {
  background-color: #2d6c5d;
}

.cta-green:hover {
  background-color: #1f4a3e;
}

.cta-yellow {
  background-color: #FF9900;
}

.cta-yellow:hover {
  background-color: #cc7a00;
}

.back-to-top-btn {
  display: inline-block;
  text-decoration: none;
  color: #fff;
  background-color: #007bff;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.2s;
}

.back-to-top-btn:hover {
  background-color: #0056b3;
}

.share-button {
  border: none;
  padding: 10px 20px;
  margin: 5px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  color: white;
  border-radius: 5px;
  text-decoration: none;
  display: inline-block;
}

.share-button.share-email {
  background-color: #6c757d;
  color: #fff;
}

/* =========================
   7) ACCORDION & EXPANDABLE CONTENT
========================= */
.accordion-header {
  background-color: #0aae0a;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  font-weight: bold;
  text-align: left;
  position: relative;
  width: 100%;
  outline: none;
  margin-bottom: 5px;
  border-radius: 4px;
}

.accordion-header.expanded {
  background-color: #047704;
}

.accordion-header .arrow {
  display: inline-block;
  margin-right: 8px;
  font-size: 1rem;
}

.accordion-content {
  display: none;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 10px;
  text-align: left;
}

/* Quick Sizing Guide */
.qs-details {
  margin: 1.75rem 0 0;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  padding: 0.75rem 1.1rem;
  background: #fafcfd;
}

.qs-details summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  color: #2d6c5d;
  background-color: #f0f5f4;
  padding: 8px 12px;
  border-radius: 6px;
  list-style: none;
  transition: background 0.2s ease;
}

.qs-details summary:hover {
  background-color: #e3f0ec;
}

.qs-details summary::marker,
.qs-details summary::-webkit-details-marker {
  display: none;
}

.qs-details[open] summary {
  margin-bottom: 0.75rem;
}

.qs-item + .qs-item {
  margin-top: 1.25rem;
}

.qs-note {
  margin: 0.9rem 0 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #555;
}

/* =========================
   8) RESULTS & TABLES
========================= */
.result {
  margin-top: 20px;
  padding: 15px;
  background-color: #e0f7fa;
  border: 1px solid #ddd;
  border-radius: 5px;
  display: none;
  font-weight: bold;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.result.visible {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

.result-card {
  background: #e0f7fa;
  border: 1px solid #c0e0e2;
  border-radius: 6px;
  padding: 18px 14px;
  max-width: 380px;
  margin: 18px auto;
}

.result-table {
  width: 100%;
  border-collapse: collapse;
}

.result-table th {
  text-align: left;
  font-weight: 600;
  padding: 4px 0;
}

.result-table td {
  text-align: right;
  padding: 4px 0;
}

.result-note {
  text-align: center;
  margin-top: 14px;
  font-weight: 600;
}

.mini-result {
  width: 100%;
  border-collapse: collapse;
  margin: .3rem 0;
  font-size: .95rem;
}

.mini-result th {
  text-align: left;
  padding: 4px 6px;
  color: #234c40;
  font-weight: 600;
}

.mini-result td {
  text-align: right;
  padding: 4px 6px;
}

.appliance-table {
  margin: 0 auto;
  text-align: center;
}

.appliance-table th,
.appliance-table td {
  text-align: center;
}

.badge {
  display: inline-block;
  background: #004d40;
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .9rem;
  white-space: nowrap;
  min-width: 68px;
  text-align: center;
}

.rating {
  color: #f39c12;
  font-weight: bold;
}

.price-highlight {
  color: #d35400;
  font-weight: bold;
}

.conversion-block {
  margin-bottom: 25px;
}

/* =========================
   9) CARDS & CONTENT SECTIONS
========================= */
.bottom-section,
.faq,
.references-section,
#feedback,
.quick-guide {
  padding: 30px;
  background-color: #f9f9f9;
  margin-top: 10px;
  border-radius: 8px;
  text-align: center;
}

.quick-guide ul {
  display: inline-block;
  text-align: left;
  margin: 0 auto;
}

.faq h3,
.references-section h3 {
  margin-top: 10px;
  color: #234c40;
}

.references-section ul,
.bottom-section ul {
  list-style: disc;
  margin-left: 20px;
}

.about-container,
.contact-container {
  text-align: center;
}

.contact-container form {
  margin: 0 auto;
  max-width: 500px;
  text-align: left;
}

.disclaimer {
  background-color: #fff;
  padding: 1rem;
  margin-top: 2rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 0.9rem;
  color: #777;
  max-width: 500px;
  margin: 2rem auto 0;
  text-align: center;
}

.disclaimer a:hover {
  color: #2d6c5d;
  text-decoration: underline;
}

/* Book Card */
.book-card {
  background: #f9f9f9;
  border: 1px solid #ccc;
  border-radius: 8px;
  max-width: 280px;
  width: 100%;
  margin: 30px auto;
  padding: 16px;
  text-align: center;
  font-family: inherit;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.book-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(-4px);
}

.book-card img {
  width: 85%;
  max-width: 220px;
  border-radius: 6px;
  margin-bottom: 12px;
  transition: transform 0.3s ease;
}

.book-title {
  margin: 0 0 6px;
  font-size: 15px;
}

.book-author {
  margin: 0 0 10px;
  font-size: 13px;
  color: #555;
}

.book-reviews {
  margin: 0 0 14px;
  font-size: 14px;
}

/* Native Affiliate Section */
.native-affiliate {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 24px auto;
  flex-wrap: wrap;
  max-width: 100%;
}

.native-affiliate img {
  width: 100px;
  border-radius: 4px;
  flex: 0 0 auto;
}

.native-info {
  flex: 1;
}

.native-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px;
}

.native-meta {
  color: #666;
  margin: 0 0 8px;
  font-size: 13px;
}

/* Affiliate Cards */
.affiliate-highlight-card {
  background: #fff8e1;
  border: 1px solid #ffecb3;
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin: 2rem auto;
  text-align: center;
  max-width: 480px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  font-size: 0.95rem;
}

.affiliate-highlight-card .cta-button {
  margin-top: 0.8rem;
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: #f6b800;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
}

.affiliate-highlight-card .cta-button:hover {
  background-color: #e0a700;
}

.affiliate-card {
  background: linear-gradient(135deg, #fff9e6 0%, #fff3d4 100%);
  border: 2px solid #f0c14b;
  border-radius: 12px;
  padding: 24px;
  max-width: 600px;
  margin: 2rem auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.warning-header {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.warning-icon {
  font-size: 18px;
}

.warning-text {
  font-size: 14px;
  color: #856404;
  font-weight: 500;
}

.main-headline {
  font-size: 22px;
  font-weight: 700;
  color: #2c3e50;
  text-align: center;
  margin-bottom: 16px;
  line-height: 1.3;
}

.product-name {
  color: #e67e22;
  font-size: 24px;
}

.description {
  font-size: 16px;
  color: #34495e;
  line-height: 1.5;
  text-align: center;
  margin-bottom: 20px;
}

.benefits-list {
  margin: 20px 0;
}

.benefit-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  color: #2c3e50;
}

.checkmark {
  color: #27ae60;
  font-weight: bold;
}

.social-proof {
  text-align: center;
  margin: 20px 0;
}

.reviews-text {
  font-size: 14px;
  color: #7f8c8d;
}

.urgency-badges {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 16px 0;
  flex-wrap: wrap;
}

.price-info {
  text-align: center;
  margin: 16px 0;
  font-size: 16px;
  color: #2c3e50;
}

.price {
  font-weight: bold;
  color: #e74c3c;
}

.value-prop {
  background: #f8f9fa;
  border-left: 4px solid #3498db;
  padding: 12px;
  margin: 16px 0;
  border-radius: 4px;
  font-size: 14px;
  color: #2c3e50;
  font-style: italic;
}

/* =========================
   10) FEEDBACK & ACTIONS
========================= */
.feedback-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 1rem;
}

.feedback-actions a {
  background-color: #28a745;
  color: white;
  padding: 12px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
}

.feedback-actions a:hover {
  background-color: #234c40;
}

.back-to-top {
  text-align: center;
  margin: 20px 0;
}

.share-section {
  text-align: center;
  margin: 20px 0;
}

.share-section p {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
}

/* =========================
   11) FOOTER & MODAL
========================= */
footer {
  background-color: #2d6c5d;
  color: white;
  padding: 10px;
  text-align: center;
  font-size: 14px;
}

.footer-container {
  max-width: 1000px;
  margin: 0 auto;
}

footer p {
  color: #f1f1f1;
  margin: 3px 0;
}

footer a {
  color: white;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.999);
  padding-top: 60px;
}

.modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 600px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0);
  position: relative;
}

.modal-content h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.close {
  background-color: #dc3545;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  width: 30px;
  height: 30px;
  text-align: center;
  line-height: 30px;
  float: right;
}

.close:hover,
.close:focus {
  background-color: #a71d2a;
  outline: none;
}

/* =========================
   12) RESPONSIVE DESIGN
========================= */
@media (min-width: 768px) {
  .native-affiliate {
    max-width: 620px;
    margin: 24px auto;
  }

  .native-affiliate img {
    width: 80px;
  }
}

@media (max-width: 768px) {
  .header {
    flex-direction: column;
    align-items: center;
  }

  .header .logo {
    justify-content: center;
  }

  .header .logo img {
    width: 120px;
  }

  nav a {
    display: block;
    margin: 8px 0;
  }

  .container {
    margin: 5px;
    padding: 15px;
  }

  header {
    padding: 15px 0;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  p {
    font-size: 1rem;
  }

  .calculator {
    padding: 10px;
  }

  input,
  textarea,
  .calculator input[type="number"],
  .calculator select {
    font-size: 1rem;
  }

  .feedback-actions {
    flex-direction: column;
    gap: 10px;
  }

  .share-button {
    padding: 10px;
    width: 100%;
    margin: 5px 0;
  }

  footer {
    font-size: 12px;
  }

  .accordion-header {
    font-size: 1rem;
  }
}

@media (max-width: 640px) {
  .main-nav {
    flex-direction: column;
    align-items: center;
  }

  .main-nav a {
    width: 90%;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .appliance-table th:nth-child(4),
  .appliance-table td:nth-child(4) {
    display: none;
  }

  .urgency-badges {
    flex-direction: column;
    align-items: center;
  }

  .main-headline {
    font-size: 20px;
  }

  .product-name {
    font-size: 22px;
  }
}

@media (max-width: 450px) {
  .appliance-table,
  .appliance-table thead,
  .appliance-table tbody {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
.cj-banner-ad {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 30px auto;
  padding: 20px;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  max-width: 720px;
}

.cj-banner-ad img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
}
.blog-list { max-width: 800px; margin: auto; padding: 20px; }
.blog-card {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 20px;
  background: #fff;
}
.blog-card h2 { margin-top: 0; }
.blog-card a { text-decoration: none; color: #007BFF; }
.blog-card a:hover { text-decoration: underline; }

