/* Compare Quality Section - 1:1 Match Reconstruction */
.compare-quality-section {
  padding: 50px 20px;
  background-color: #000000;
  text-align: center;
  font-family: var(--font-body);
}

.compare-title {
  color: #ffffff;
  font-size: 42px;
  font-weight: 700;
  max-width: 1400px;
  margin: 0 auto 30px auto;
  line-height: 1.3;
  font-family: var(--font-heading);
  text-align: center;
}

.compare-title .text-primary,
.compare-title-sub {
  color: #54b248;
}

.compare-subtitle {
  color: #ffffff;
  max-width: 1000px;
  margin: 0px auto 35px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.6;
}

/* Outer Container (Pale Green Card) */
.calculator-card {
  max-width: 1000px;
  /* Reduced from 1400px as requested */
  margin: 0 auto;
  background-color: #eaf6e5;
  border-radius: 40px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* TOP FORM AREA (Black Card) */
.calc-form-card {
  background-color: #0d0d0d;
  border-radius: 25px;
  padding: 30px 40px;
  margin-bottom: 25px;
  /* Increased from 20px */
}

.calc-header-text {
  font-size: 28px;
  font-weight: 700;
  color: #54b248;
  text-align: left;
  margin-bottom: 15px;
  padding-left: 5px;
}

.calc-form {
  display: flex;
  gap: 15px;
  align-items: center;
}

/* Input Styles in Form */
.custom-dropdown-container {
  flex: 1;
  position: relative;
  z-index: 50;
  /* Ensuring it's above other inputs */
}

.custom-dropdown-trigger {
  background: #ffffff;
  border: 1.5px solid #54b248;
  padding: 12px 20px;
  border-radius: 50px;
  color: #aaaaaa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  height: 44px;
  /* Reduced to match submit button feel */
  box-sizing: border-box;
}

.custom-dropdown-trigger>span,
.custom-dropdown-trigger>svg {
  pointer-events: none;
}

.custom-dropdown-trigger.has-value {
  color: #000000;
}

.dropdown-chevron {
  color: #54b248;
  transition: transform 0.3s;
}

.dropdown-chevron.rotate {
  transform: rotate(180deg);
}

.calc-input-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.input-chevron {
  position: absolute;
  right: 20px;
  color: #54b248;
  pointer-events: none;
}

.calc-input {
  width: 100%;
  background: #ffffff;
  border: 1.5px solid #54b248;
  color: #000000;
  padding: 0 25px;
  /* Added left padding for better look */
  font-size: 16px;
  font-weight: 600;
  border-radius: 50px;
  outline: none;
  height: 44px;
  /* Reduced to match submit button feel */
  text-align: left;
  /* Aligned left as requested */
  box-sizing: border-box;
}

.input-chevron {
  position: absolute;
  right: 15px;
  color: #54b248;
  pointer-events: none;
}

/* Hide number arrows */
.calc-input::-webkit-inner-spin-button,
.calc-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

.calc-input {
  -moz-appearance: textfield;
  appearance: none;
}

.calc-input::placeholder {
  color: #aaaaaa;
}

/* Green Submit Button */
.calc-submit {
  flex: none;
  min-width: 150px;
  background-color: #54b248;
  color: #ffffff;
  border: none;
  padding: 0 30px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 22px;
  cursor: pointer;
  height: 44px;
  /* Set consistent height */
  box-sizing: border-box;
  transition: all 0.2s;
}

.calc-submit:hover {
  background-color: #46a13b;
  transform: translateY(-1px);
}

/* COMPARISON CARDS AREA */
.comparison-grid {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.comp-box {
  flex: 1;
  background-color: #000000;
  border-radius: 25px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

/* CSS Based Wrapping Corner Ribbon */
.comp-box.featured {
  position: relative;
  overflow: hidden;
  /* Crucial for wrapping ribbon */
}

.css-ribbon {
  position: absolute;
  top: 5px;
  right: -50px;
  width: 160px;
  height: 44px;
  background-color: #54b248;
  transform: rotate(45deg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

.css-ribbon span {
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.1;
  letter-spacing: 0.5px;
}

.comp-box-title {
  font-size: 28px;
  /* Increased from 24px */
  font-weight: 700;
  margin: 15px 0 25px 5px;
  /* Added left margin */
  color: #54b248;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

/* Inner Table (White Box) */
.comp-table {
  background-color: #ffffff;
  border-radius: 20px;
  padding: 25px;
}

.comp-row-header {
  display: flex;
  justify-content: space-between;
  padding-bottom: 20px;
  margin-bottom: 5px;
}

.roi-matrix-header {
  font-size: 24px;
  font-weight: 700;
  color: #54b248;
}

.comp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
}

.comp-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: #000000;
}

.comp-value {
  font-size: 16px;
  font-weight: 700;
  color: #000000;
  text-align: right;
}

/* Best Choice Badge (Image based for 100% match) */
.best-choice-badge {
  position: absolute;
  top: 0;
  right: 0;
  width: 130px;
  /* Adjust based on image clarity */
  height: auto;
  z-index: 10;
  user-select: none;
  pointer-events: none;
}

/* Efficiency Banner (Bottom) */
.efficiency-banner {
  background-color: #54b248;
  color: #ffffff;
  border-radius: 20px;
  padding: 15px;
  font-size: 32px;
  /* Adjusted to look like image */
  font-weight: 700;
  margin-top: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Dropdown Menu Overrides */
.custom-dropdown-menu {
  background: white;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  margin-top: 5px;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  z-index: 1000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* Smooth Open Animation */
  animation: dropdownFadeIn 0.3s ease-out;
  transform-origin: top;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scaleY(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

.custom-dropdown-option {
  color: #000;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  /* Aligned left as requested */
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: all 0.2s;
}

.custom-dropdown-option:last-child {
  border-bottom: none;
}

.custom-dropdown-option:hover {
  background: #eaf6e5;
  color: #54b248;
}

/* Responsive Adjustments for All Devices */
@media (max-width: 900px) {
  .calc-form {
    flex-direction: column;
    align-items: stretch;
  }

  .calc-submit {
    padding: 15px;
    height: auto;
  }

  .comparison-grid {
    flex-direction: column;
    gap: 15px;
  }

  .efficiency-banner {
    font-size: 24px;
    padding: 15px;
  }

  .compare-title {
    margin-bottom: 20px;
  }

  /* Reduce spacing on tablet */
  .compare-subtitle {
    margin-bottom: 50px;
  }

  .calculator-card {
    padding: 15px;
    border-radius: 20px;
  }

  .best-choice-badge {
    width: 90px;
    /* Scale down on tablets */
  }

  .comp-box-title {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .efficiency-banner {
    font-size: 18px;
    padding: 12px;
  }

  .best-choice-badge {
    width: 70px;
    /* Scale down even more on phones */
  }

  .roi-matrix-header,
  .comp-label,
  .comp-value {
    font-size: 14px;
  }

  .comp-table {
    padding: 15px;
  }

  .comp-label {
    gap: 8px;
  }

  .compare-subtitle {
    margin-bottom: 35px;
    font-size: 14px;
    padding: 0 10px;
  }
}