/* IELTS Listening Test UI Improvements */
body {
  background-color: #f8f9fa;
  color: #333;
}

.test-container {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  padding: 40px;
  margin-top: 20px;
  margin-bottom: 40px;
  border: 1px solid #e9ecef;
}

h3 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: #2c3e50 !important;
  margin-bottom: 1.5rem;
}

.section-header {
  color: maroon;
  font-size: large;
  font-family: Arial, Helvetica, sans-serif;
  border-bottom: 2px solid #eef0f3;
  padding-bottom: 10px;
  margin-top: 30px;
  margin-bottom: 20px;
}
.section-header:first-of-type {
  margin-top: 0;
}

.sticky-audio {
  position: sticky;
  top: 80px; /* Adjust based on navbar height */
  z-index: 100;
  background: white;
  padding: 10px 0;
  border-bottom: 1px solid #eef0f3;
  margin-bottom: 25px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  border-radius: 8px;
}

audio {
  width: 100%;
}

/* Improve question inputs */
input[type="text"] {
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: 6px 12px;
  transition: border-color 0.2s;
  font-family: 'Open Sans', sans-serif;
}

input[type="text"]:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* Improve select dropdowns */
select {
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: 6px 12px;
  font-family: 'Open Sans', sans-serif;
  min-width: 60px;
}
select:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* The Grid Layout */

.test-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;              /* Tighter gap between cards */
  padding: 5px 0;         /* Minimal padding */
}

/* Individual Test Card */
.test-card {
  background: #ffffff;
  border-radius: 15px;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  padding: 20px;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

/* The Blue Accent Bar (matching your Reading Test theme) */
.test-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: #2d6fc5;
}

.test-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
  border-color: #2d6fc5;
}

/* Icon Area */
.card-icon {
  font-size: 2rem;
  color: #2d6fc5;
  background: #eff6ff;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  margin-right: 20px;
}

/* Text & Button */
.card-body h3 {
  margin: 0 0 5px 0;
  font-size: 1.2rem;
  color: #1e293b;
}

.card-body p {
  margin: 0 0 15px 0;
  font-size: 0.85rem;
  color: #64748b;
}

.btn-start {
  display: inline-block;
  padding: 6px 18px;
  background: #2d6fc5;
  color: white;
  text-decoration: none;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s;
}

.btn-start:hover {
  background: #1e4d8c;
  color: white;
}

/* Styling for the Volume Titles (e.g., IELTS 19) */
/*.volume-title {
  font-size: 1.3rem;      /* Slightly smaller font */
  /*font-weight: 700;
  color: #1e293b;*/
  /* Reduced margins to pull the title closer to content above and below */
  /*margin-top: 10px;       /* Reduced from 40px - brings it closer to the grid above */
  /*margin-bottom: 6px;    /* Reduced from 20px - brings it closer to its own cards */
 /* padding-left: 12px;
  border-left: 5px solid #2d6fc5;*/
 /* line-height: 1.2;
}*/

/* 1. Tighten the Title Spacing */
.volume-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
    /* margin-top is what creates that gap from the grid above */
    margin-top: 5px !important;    
    margin-bottom: 10px !important;
    padding: 0;
    padding-left: 12px;
    border-left: 5px solid #2d6fc5;
}

/* 2. Tighten the Section Container */
.test-volume-section {
    margin-bottom: 0 !important; 
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

/* 3. The Grid itself often has a default bottom margin */
.test-grid {
    margin-bottom: 0 !important;
    padding-bottom: 5px !important;
}

/* 4. If you are using the Bootstrap .portfolio-details class, it has huge padding */
.portfolio-details {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

/* The Container for each group */
/*.test-volume-section {
  margin-bottom: 10px;    /* Reduced from 50px - removes the giant gap between books */
/*}*/

/* Special trick: Remove top margin from the very first title on the page */
.test-volume-section:first-of-type .volume-title {
  margin-top: 0;
}

/* Form structure */
.container-fluid {
  padding-left: 0;
  padding-right: 0;
}

.row {
  margin-left: 0;
  margin-right: 0;
}

p {
  line-height: 1.6;
}

/* Buttons */
input[type="submit"] {
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-top: 20px;
}

input[type="submit"]:hover {
  background-color: #2980b9;
}

/* Custom Modern Aesthetics for Listening Test (from nineteentest2) */
.main-listening-container {
  width: 100%;
  margin: 20px auto;
  max-height: 80vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 40px;
  background: #ffffff;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border-top: 6px solid #3498db;
  font-family: 'Open Sans', sans-serif;
}
.main-listening-container::-webkit-scrollbar {
  width: 8px;
}
.main-listening-container::-webkit-scrollbar-track {
  background: #f1f1f1; 
  border-radius: 10px;
}
.main-listening-container::-webkit-scrollbar-thumb {
  background: #c1c1c1; 
  border-radius: 10px;
}
.main-listening-container::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8; 
}
.section-title {
  color: #2c3e50 !important;
  font-family: 'Poppins', sans-serif !important;
  font-weight: 600 !important;
  font-size: 1.6rem !important;
  border-bottom: 2px solid #eaeaea;
  padding-bottom: 12px;
  margin-top: 30px;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}
.main-listening-container h3:first-child {
  margin-top: 0;
}
audio {
  width: 100%;
  max-width: 500px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  margin-bottom: 25px;
  margin-top: 15px;
  outline: none;
}
.blank-input {
  border: none !important;
  border-bottom: 2px solid #3498db !important;
  border-radius: 0 !important;
  background-color: #f8fcfd !important;
  box-shadow: none !important;
  padding: 5px 10px !important;
  font-weight: 600 !important;
  color: #2c3e50 !important;
  text-align: center;
  transition: all 0.3s ease;
  min-width: 120px;
  font-size: 1.1rem;
}
.blank-input:focus {
  border-bottom: 2px solid #e74c3c !important;
  background-color: #fff !important;
  outline: none !important;
}
input[type="radio"] {
  accent-color: #3498db;
  transform: scale(1.3);
  margin-right: 10px !important;
  cursor: pointer;
}
.submit-btn-custom {
  background: linear-gradient(135deg, #3498db, #2980b9) !important;
  border: none !important;
  padding: 12px 35px !important;
  font-size: 1.1rem !important;
  border-radius: 30px !important;
  font-weight: 600 !important;
  letter-spacing: 1px;
  color: #fff !important;
  box-shadow: 0 6px 15px rgba(52, 152, 219, 0.4) !important;
  transition: all 0.3s ease !important;
  display: block;
  margin: 40px auto 20px auto;
}
.submit-btn-custom:hover {
  box-shadow: 0 8px 25px rgba(52, 152, 219, 0.5) !important;
  transform: translateY(-2px);
}
.main-listening-container label {
  font-family: 'Open Sans', sans-serif !important;
  font-size: 1.05rem !important;
  color: #444 !important;
  line-height: 1.7 !important;
}
.main-listening-container p {
  font-family: 'Open Sans', sans-serif !important;
  font-size: 1.05rem !important;
  color: #555 !important;
  line-height: 1.7 !important;
}
.main-listening-container b {
  color: #2c3e50 !important;
}

/* Extracted Inline Styles from HTML */
.question-text {
  color: #000;
  margin-top: 1%;
}
.question-text-center {
  text-align: center;
  margin-top: 10px;
}
.question-row {
  margin-right: 4px;
  padding-right: 2px;
  font-size: medium;
  color: #000; 
  font-family: Arial, Helvetica, sans-serif;
}
.question-row-mt {
  margin-right: 4px;
  padding-right: 2px;
  font-size: medium;
  color: #000; 
  font-family: Arial, Helvetica, sans-serif;
  margin-top: 1%;
}
.radio-label {
  margin-top: 10px;
}
.radio-label-mt {
  margin-top: 1%;
}
.radio-input-15 {
  margin-left: 15px;
}
.radio-input-15-blue {
  margin-left: 15px;
  color: blue;
}
.radio-input-40 {
  margin-left: 40px;
}
.audio-player-mt {
  margin-top: 1%;
}
.feed-header-mt {
  margin-top: 5px;
}
.submit-container {
  width: 100%;
  text-align: center;
  margin-top: 30px;
}

