/* ========================================================
   ========== Calculator Container Layout & Tabs ==========
======================================================== */

.ielts-calculator-container {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  margin: 20px auto;
  max-width: 1250px;
}

.ielts-tabs .nav-tabs {
  border-bottom: none;
  background: #e6f3ed;
}

.ielts-tabs .nav-link {
  color: #495057;
  border: none;
  padding: 1rem 1.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.ielts-tabs .nav-link.active {
  color: #198754;
  background: #fff;
  border-bottom: 3px solid #198754;
}

.ielts-tabs .nav-link:hover:not(.active) {
  color: #0d6e3f;
  background: rgba(25, 135, 84, 0.1);
}

/* ========================================================
   ========== Band Score Interpretation Table =============
======================================================== */

.band-info-container {
  padding: 20px;
  font-family: Arial, sans-serif;
}

.section-heading {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  text-align: left;
  margin-bottom: 15px;
}

.subheading-text {
  font-size: 14px;
  line-height: 1.6;
  color: #555;
  margin: 0 auto 10px;
}

.table-wrapper {
  max-width: 66.66%;
  margin: 0 auto;
  overflow-x: auto;
}

.table_bsi {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 12px;
  text-align: left;
}

.table_bsi th,
.table_bsi td {
  padding: 12px;
  border-bottom: 1px solid #fff;
}

.table_bsi th {
  background: #333;
  color: #fff;
  text-align: center;
}

[class*="band_bsi-"] {
  color: black;
}

.band_bsi-0  { background: #e0e0e0; }
.band_bsi-1  { background: #ef9a9a; }
.band_bsi-2  { background: #ffab91; }
.band_bsi-3  { background: #ffb74d; }
.band_bsi-4  { background: #ffe082; }
.band_bsi-5  { background: #fff59d; }
.band_bsi-6  { background: #e8f5e9; }
.band_bsi-7  { background: #c8e6c9; }
.band_bsi-8  { background: #a5d6a7; }
.band_bsi-9  { background: #81c784; }

/* ========================================================
   ========== Raw Score Calculator ========================
======================================================== */

.raw-score-container {
  padding: 30px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.raw-calculators {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
  justify-content: center;
  margin-bottom: 40px;
}

.calculator-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  overflow: hidden;
  flex: 1;
  min-width: 300px;
  max-width: 380px;
  border: 1px solid rgba(8, 61, 36, 0.2);
  transition: transform 0.3s ease;
}

.calculator-card:hover {
  transform: translateY(-5px);
}

.calculator-header {
  background: linear-gradient(135deg, #7ddfb2, #7ec4a6);
  padding: 20px;
  text-align: center;
  color: #fff;
}

.calculator-header i {
  font-size: 1.8rem;
  margin-bottom: 10px;
  display: block;
}

.calculator-header h3 {
  font-size: 1.1rem;
  margin: 0;
  font-weight: 600;
  color: #083d24;
}

.calculator-body {
  padding: 25px;
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #444;
  font-size: 0.95rem;
}

.form-control {
  width: 100%;
  padding: 10px 15px;
  height: 42px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #f9f9f9;
  font-size: 0.95rem;
  appearance: auto;
  transition: border-color 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: #8ae8bc;
  box-shadow: 0 0 0 3px rgba(138, 232, 188, 0.2);
}

.error-message {
  color: #e74c3c;
  font-size: 0.85rem;
  margin-top: 8px;
  display: none;
}

.result-display {
  background: #f8fdfa;
  border-radius: 8px;
  padding: 20px;
  min-height: 120px;
  border: 1px solid #d1f0e4;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
}

.result-placeholder {
  color: #7a9c8e;
  text-align: center;
}

.result-placeholder i {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.result-placeholder p,
.result-text,
.calculator-note p {
  margin: 0;
  font-size: 0.95rem;
  color: #555;
}

.result-content {
  font-size: 1rem;
  color: #333;
  width: 100%;
}

.result-score {
  font-size: 2rem;
  font-weight: 700;
  color: #2a9d8f;
  margin: 5px 0;
  line-height: 1.2;
}

.calculator-footer {
  padding: 20px;
  background: #f9f9f9;
  display: flex;
  gap: 15px;
}

.btn-calculate,
.btn-reset {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-calculate {
  background: #3c8462;
  color: #fff;
}

.btn-calculate:hover {
  background: #2e6a50; /* darker green */
}

.btn-reset {
  background: #ece1e1;
  color: #666;
}

.btn-reset:hover {
  background: #d4caca; /* slightly darker background */
  color: #444;         /* slightly darker text */
}

.calculator-note {
  background: #f0f9f5;
  border-radius: 8px;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  max-width: 100%;
  margin: 0 auto;
}

.calculator-note i {
  font-size: 1.5rem;
  color: #2a9d8f;
  margin-right: 15px;
  flex-shrink: 0;
}

/* ========================================================
   ========== Band Score Calculator =======================
======================================================== */

.band-score-container {
  padding: 30px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.band-calculators {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
  margin-bottom: 40px;
}

.overall-calculator {
  flex: 1 1 100%;
  min-width: 280px;
}

.right-column {
  flex: 1 1 100%;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.top-row {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
}

.general-calculator,
.academic-calculator,
.listening-calculator {
  flex: 1 1 45%;
  min-width: 280px;
}

.band-calculator-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  overflow: hidden;
  border: 1px solid rgba(8, 61, 36, 0.2);
  transition: transform 0.3s ease;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

/* Header/Footer reused */
.band-calculator-card .calculator-header {
  background-color: #f8f9fa;
  padding: 15px 20px;
  border-bottom: 1px solid #e9ecef;
  color: #083d24;
}

.band-calculator-card .calculator-body {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.band-calculator-card .calculator-footer {
  padding: 15px 20px;
  background-color: #f8f9fa;
  border-top: 1px solid #e9ecef;
  display: flex;
  gap: 10px;
}

/* ========================================================
   ========== Responsive Layouts ==========================
======================================================== */

/* Tablets & below */
@media (max-width: 991px) {
  .raw-calculators,
  .band-calculators,
  .top-row {
    flex-direction: column;
    align-items: center;
  }

  .calculator-card,
  .overall-calculator,
  .right-column,
  .general-calculator,
  .academic-calculator,
  .listening-calculator {
    width: 100%;
    max-width: 500px;
  }
}

/* Mobile & small screens */
@media (max-width: 768px) {
  .table-wrapper {
    max-width: 100%;
    padding: 0 10px;
  }

  .section-heading {
    font-size: 20px;
  }

  .description-text,
  .table_bsi {
    font-size: 13px;
  }
}

/* Desktop-specific refinements */
@media (min-width: 992px) {
  .band-calculators {
    flex-wrap: nowrap;
    gap: 25px;
  }

  .overall-calculator {
    flex: 0 0 40%;
    max-width: 40%;
  }

  .right-column {
    flex: 1;
    gap: 25px;
  }

  .top-row {
    flex-direction: row;
    gap: 25px;
  }

  .general-calculator,
  .academic-calculator {
    flex: 1;
  }

  .overall-calculator .form-control {
    margin-bottom: 15px;
  }
}
