/* Reading Test Index (Menu) Styles */
.speaking-tests-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  padding: 20px 0;
}

.speaking-test-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  padding: 24px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid #eef0f3;
  height: 100%;
}

.speaking-test-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.1);
  border-color: #3498db;
}

.speaking-test-card .test-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 12px;
  border-bottom: 2px solid #3498db;
  padding-bottom: 8px;
  display: inline-block;
}

.speaking-test-card .test-desc {
  font-family: 'Open Sans', sans-serif;
  font-size: 0.95rem;
  color: #5a6b7c;
  line-height: 1.6;
}

/* Reading Test Page Styles */
body {
  background-color: #f8f9fa;
  color: #333;
}

h3 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: #2c3e50 !important;
  /* Override inline styles */
  margin-bottom: 1.5rem;
}

h2 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  color: #2c3e50;
}

/* Split Layout for Reading Test */
.split-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  height: calc(100vh - 140px);
  /* Adjust based on header/footer */
  min-height: 600px;
}

.reading-pane,
.questions-pane {
  flex: 1;
  min-width: 300px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  padding: 30px;
  overflow-y: auto;
  height: 100%;
  border: 1px solid #e9ecef;
}

/* Custom Scrollbar */
.reading-pane::-webkit-scrollbar,
.questions-pane::-webkit-scrollbar {
  width: 8px;
}

.reading-pane::-webkit-scrollbar-track,
.questions-pane::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.reading-pane::-webkit-scrollbar-thumb,
.questions-pane::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 4px;
}

.reading-pane::-webkit-scrollbar-thumb:hover,
.questions-pane::-webkit-scrollbar-thumb:hover {
  background: #a0aec0;
}

/* Typography Improvements within Panes */
.reading-pane p,
.questions-pane p,
.questions-pane label {
  font-family: 'Open Sans', sans-serif;
  line-height: 1.8;
  color: #444;
  margin-bottom: 16px;
}

.reading-pane p {
  text-align: justify;
}

/* Form Elements */
select {
  display: block;
  width: 100%;
  max-width: 400px;
  padding: 10px 15px;
  font-size: 0.95rem;
  font-family: 'Open Sans', sans-serif;
  color: #495057;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  appearance: none;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  margin-top: 8px;
  margin-bottom: 20px;
}

select:focus {
  border-color: #80bdff;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Question Labels */
label {
  font-weight: 500;
  display: block;
  margin-top: 20px;
  color: #2c3e50 !important;
}

/* Images in Reading Pane */
.reading-pane img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 15px 0;
}

/* Section Separators */
hr {
  margin: 2rem 0;
  opacity: 0.1;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .split-container {
    flex-direction: column;
    height: auto;
  }

  .reading-pane,
  .questions-pane {
    height: 600px;
    /* specific height on mobile or auto */
    width: 100%;
  }
}