/* Base styles */
:root {
  --primary-color: #0F75BD;
  --primary-dark: #095089;
  --primary-light: #E3F2FD;
  --secondary-color: #4A90E2;
  --accent-color: #FF9800;
  --background-color: #F5F7FA;
  --text-color: #333333;
  --text-light: #666666;
  --text-lighter: #888888;
  --border-color: #E0E0E0;
  --white: #FFFFFF;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --border-radius: 0.5rem;
  --transition: all 0.3s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

button, .btn {
  cursor: pointer;
  font-family: inherit;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  font-weight: 500;
  text-align: center;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--white);
  border: none;
}

.btn-secondary:hover {
  opacity: 0.9;
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-light);
}

.full-width {
  width: 100%;
}

/* Header */
.header {
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
}

.header-logo a {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.mobile-menu-button {
  display: block;
  background: none;
  border: none;
  font-size: 1.5rem;
}

.main-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--white);
  box-shadow: var(--shadow-md);
  padding: 1rem;
}

.main-nav.active {
  display: block;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.nav-link {
  color: var(--text-color);
  font-weight: 500;
  padding: 0.5rem 0;
  display: block;
}

.nav-link.active, .nav-link:hover {
  color: var(--primary-color);
}

.header-actions {
  display: none;
}


/* --- Search and Filter Controls --- */

/* Container for the search input */
.search-box {
  margin: 1rem auto; /* Center and add margin above/below */
  max-width: 500px; /* Limit the maximum width */
  padding: 0 1rem; /* Add padding on the sides for smaller screens */
}

/* Container for the filter dropdown */
.filter-dropdown {
  margin: 1rem auto; /* Center and add margin above/below */
  max-width: 200px; /* Limit the maximum width */
  padding: 0 1rem; /* Add padding on the sides for smaller screens */
}

/* Style for both the search input and the select dropdown */
.search-input,
.filter-select {
  width: 100%; /* Make them take the full width of their container */
  padding: 0.75rem 1rem; /* Add padding inside the fields */
  border: 1px solid var(--border-color); /* Use your defined border color */
  border-radius: var(--border-radius); /* Apply your defined border radius */
  font-size: 1rem; /* Standard font size */
  color: var(--text-color); /* Use your defined text color */
  background-color: var(--white); /* White background */
  box-shadow: var(--shadow-sm); /* Apply a small shadow */
  transition: border-color 0.3s ease, box-shadow 0.3s ease; /* Smooth transition on focus */
  appearance: none; /* Remove default browser styling for select */
  -webkit-appearance: none; /* For Safari */
  background-position: right 0.75rem top 50%;
  background-size: 0.65rem auto;
}

/* Style when the input or select is focused */
.search-input:focus,
.filter-select:focus {
  outline: none; /* Remove default outline */
  border-color: var(--primary-color); /* Highlight border with primary color */
  box-shadow: 0 0 0 0.2rem rgba(var(--primary-color), 0.25); /* Add a subtle glow effect */
}

/* Container for both search and filter, using flexbox for layout */
.filter-controls {
    display: flex; /* Arrange children in a row */
    flex-direction: column; /* Stack children vertically by default */
    align-items: center; /* Center items horizontally when stacked */
    gap: 1rem; /* Add space between the search box and filter dropdown */
    margin-bottom: 2rem; /* Add space below the controls */
}

/* This is the main container for all subject groups on the BECE/WASSCE pages */
.subjects-section {
  padding: 3rem 1rem; /* Keep existing padding */
  background-color: var(--background-color); /* Keep existing background */
}

/* Style for the Subject headings (h2) within the subjects-section */
.subjects-section h2 {
    font-size: 1.75rem; /* Keep existing font size */
    color: var(--text-color); /* Keep existing text color */
    border-bottom: 2px solid var(--primary-light); /* Keep existing border */
    padding-bottom: 0.5rem; /* Keep existing padding */

    /* --- Add or modify these lines for spacing --- */
    margin-top: 2.5rem; /* Add space *above* each subject heading */
    margin-bottom: 1rem; /* Add space *below* each subject heading */
}

.subjects-section .card-grid {
  display: grid; /* Keep existing display */
  grid-template-columns: 1fr; /* Keep existing grid columns */
  gap: 1.5rem; /* Keep existing gap */

  /* --- Add or modify this line for spacing --- */
  margin-bottom: 2rem; /* Add space *below* each card grid */
}

.quiz-button {
  background: none;
  border: none;
}

.quiz-button {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  font-weight: 500;
}

/* <<<<-----------The section B part ---------->>>>>>*/

.subjectives {
  text-align: center;
  text-decoration: underline;
  font-weight: bold;
  margin-bottom: 4%;
}

.subinstructions {
  text-align: center;
  text-decoration: underline;
  font-style: italic;
  margin-bottom: 4%;
}

/* Hero Section */
.hero {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 3rem 1rem;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero p {
  font-size: 0.8rem;
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  max-width: 50%;
  margin: 0 auto;
}

/* Featured Sections */
.featured-section {
  padding: 3rem 1rem;
  background-color: var(--white);
}

.section-header {
  margin-bottom: 2rem;
  text-align: center;
}

.section-header h2 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.section-header p {
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

/* Question Cards - Enhanced */
.question-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.question-card.hover-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.card-content {
  padding: 1.5rem 1.5rem 1rem;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-color);
}

.card-meta {
  display: flex;
  justify-content: space-between;
  color: var(--text-light);
  font-size: 0.875rem;
}

.card-footer {
  padding: 0 1.5rem 1.5rem;
}

/* Enhanced Question List Styling */
.questions-list-section {
  padding: 2rem 1rem;
}

.questions-container {
  background-color: var(--white);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.questions-container h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-color);
}

.questions-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.question-item {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.25rem;
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease;
}

.question-item:hover {
  box-shadow: var(--shadow-md);
}

.question-text {
  margin-bottom: 1rem;
  font-size: 1.05rem;
  color: var(--text-color);
}

.question-number {
  font-weight: 700;
  margin-right: 0.5rem;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.option-item {
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
}

.option-item:hover {
  background-color: var(--background-color);
}

.option-item.selected {
  border-color: var(--primary-color);
  background-color: var(--primary-light);
}

.option-marker {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  border: 2px solid var(--text-lighter);
  margin-right: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.option-item.selected .option-marker {
  border-color: var(--primary-color);
  background-color: var(--primary-color);
  color: var(--white);
  position: relative;
}

.option-item.selected .option-marker::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  background-color: white;
  border-radius: 50%;
  position: absolute;
}

/* <<<--------------------footer--------------------->> */
.footer-info h2 {
  color: var(--primary-color);
  font-size: 1.2rem;
}

.option-text {
  color: var(--text-color);
}

/* Enhanced Show Answer Button */
.button-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.show-answer-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--border-color);
  background-color: var(--white);
  color: var(--text-color);
  border-radius: var(--border-radius);
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.show-answer-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.show-answer-btn.active {
  background-color: var(--primary-light);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.show-answer-btn svg {
  margin-right: 0.5rem;
  width: 1.25rem;
  height: 1.25rem;
}

.answer-container {
  margin-top: 0.5rem;
  padding: 1.25rem;
  background-color: var(--primary-light);
  border-left: 4px solid var(--primary-color);
  border-radius: 0.25rem;
  display: none;
  animation: fadeIn 0.3s ease;
}

.answer-container.visible {
  display: block;
}

.correct-answer {
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.answer-highlight {
  color: var(--primary-color);
}

.answer-explanation {
  margin-top: 0.75rem;
  color: var(--text-color);
  font-size: 0.95rem;
  line-height: 1.5;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------------footer-------------- */
.footer-copyright {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-lighter);
  font-size: 0.875rem;
}

/* Media Queries */
@media (min-width: 640px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  .subjects-section .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .filter-controls {
    flex-direction: row; /* Arrange children in a row on wider screens */
    justify-content: center; /* Center the items horizontally in the row */
    align-items: center; /* Align items vertically in the row */
}

.search-box {
    margin: 1rem 0.5rem; /* Adjust margin for horizontal layout */
    padding: 0; /* Remove side padding as container handles it */
}

 .filter-dropdown {
    margin: 1rem 0.5rem; /* Adjust margin for horizontal layout */
    padding: 0; /* Remove side padding */
 }

  .hero-buttons {
    flex-direction: row;
  }
  
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* .filter-controls {
    flex-direction: row;
  } */
  
  .question-title-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

@media (min-width: 768px) {
  .mobile-menu-button {
    display: none;
  }
  
  .main-nav {
    display: block;
    position: static;
    box-shadow: none;
    padding: 0;
  }
  
  .filter-controls {
    justify-content: flex-end; /* Align controls to the right */
}

.search-box {
     margin-right: auto; /* Push search to the left, creating space */
     margin-left: 0; /* Remove left margin */
     max-width: 300px; /* Adjust width */
}

 .filter-dropdown {
    margin-left: 0.5rem; /* Add a small margin between search and filter */
    margin-right: 0; /* Remove right margin */
 }


  .nav-list {
    flex-direction: row;
    gap: 1.5rem;
  }
  
  .header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
  }
  
  .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
  
  /* -----------footer section-------------- */
  .footer {
    border-top: 1px solid var(--border-color);
    padding: 2rem 1rem 1rem;
  }
 
  .footer-content {
    display: grid;
        grid-template-columns: 1fr;
  }

  .footer-links a {
    color: var(--text-light);
  transition: var(--transition);
  }

  .footer-links h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
  }

  .footer-links :hover {
    color: var(--secondary-color);
  }
  
  .footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-info h2 {
  color: var(--primary-color);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }

  .subjects-section .card-grid {
    grid-template-columns: repeat(4, 1fr);
}
  
  .filter-controls {
    justify-content: flex-start; /* Align controls to the left */
}

 .search-box {
    margin-right: 1rem; /* Add more space between search and filter */
    max-width: 400px; /* Increase max width */
 }
 .filter-dropdown {
      margin-left: 0; /* Remove left margin */
 }

  .card-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .footer-content {
    grid-template-columns: 2fr 1fr;
  }
}
}


 
/* ---------------- SECTION B PART--------------- 

/* Style for the subjective block container */
.subjective-block {
    /* Add some padding or margin around the block if needed */
    
    border: 1px solid #ddd; 
    /* background-color: #f9f9f9;  */
}

/* Style for the question text within the block */
.subjective-block .question-text {
    margin-bottom: 10px; /* Space below question text */
    margin-left: 5%;
}

/* styles for the questions paragraph */

.subjective-block  p {
  margin: 5%;
}




/* Style for the solution button within the subjective block */
.subjective-block .solution-button {
    display: inline-block; 
    display: inline-block;
    background-color: #4CAF50;
    color: white;
    padding: 0.6rem 1.2rem;
    margin: 5%;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s ease;
    box-shadow: 3px 3px 3px 3px rgb(236, 236, 236);
}

.subjective-block .solution-button:hover {
    background-color: #45a049; /* Darker green on hover */
}

/* Style for the solution explanation within the subjective block */
.subjective-block .solution-explanation {
    /* Hide the solution by default */
    display: none;

    /* Optional: Add styling for the solution text itself */
    margin-top: 10px; /* Space above the solution */
    padding: 10px; /* Padding inside the solution box */
    background-color: #e9e9e9; /* Slightly darker gray background for the solution */
    border-left: 4px solid #4CAF50; /* Green left border */
    color: #333; /* Dark gray text for readability */
}

/* Optional: Add styles for paragraphs inside the solution explanation */
.subjective-block .solution-explanation p , li, ul {
    margin: 3%; /* Adjust margins for paragraphs within solution */
    line-height: 1.5; /* Improve readability */
} 


/* table {
  margin: 7%;
  text-align: center;
} */

table {
    border-collapse: collapse;
    margin: 20px auto; /* Centers the table horizontally */
    font-size: 16px;
    width: 80%; /* Takes 80% of parent container width */
    max-width: 600px; /* But never wider than 600px */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    background-color: white;
}

th, td {
    border: 1px solid #e0e0e0;
    padding: 12px 15px;
    text-align: center;
}

th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #333;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr:hover {
    background-color: #f1f1f1;
}

/* Header specific styling */
thead th {
    background-color: #f1f3f5;
    position: sticky;
    top: 0;
}

/* For the multi-row header */
thead tr:first-child th {
    background-color: #e9ecef;
    font-size: 1.1em;
}


  img {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
