@import url('https://fonts.googleapis.com/css2?family=Playwrite+HU:wght@100..400&family=Roboto:ital,wght@0,100..900;1,100..900&family=Rubik:ital,wght@0,300..900;1,300..900&display=swap');
@import url('https://cdn-uicons.flaticon.com/3.0.0/uicons-regular-rounded/css/uicons-regular-rounded.css');
body {
    font-family: "Roboto";
    margin: 0;
}

.title {
  background-color: #e34b50; /* red color */
  color: black; /* text color */
  text-align: center; /* center the text */
  padding: 27px; /* some vertical padding */
  margin: 0; /* remove default margins */
  width: 100%; /* full width */
  box-sizing: border-box; /* ensure padding doesn't affect width */
}

@media (max-width: 850px) {
  .input-row {
    flex-direction: column;
  }

  .two {
    gap: 4rem;
  }
}

.form-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  box-sizing: border-box;
  justify-content: center;
  align-items: center;
  width: 700px;
}

.two {
  display: flex;
  gap: 3.5rem;
}

.input-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 670px; /* maximum width for neat layout */
}

.input-row label {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.input-row input {
  margin-top: 0.25rem;
  padding: 0.5rem;
  min-width: 40px;
}

.input-row select {
  margin-top: 0.25rem;
  padding: 0.5rem;
  min-width: 180px;
  color: black;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type=number] {
  -moz-appearance: textfield;
}

#findBtn {
    font-family: "Roboto", sans-serif;
    font-weight: bold;
    margin-top: 1rem;
    padding: 0.5rem;
    width: 100%;
    box-sizing: border-box;
    font-size: 1rem;
    background: white;
    border: 2px solid #e34b50;
    color: #e34b50;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s ease;
    border-radius: 10px;
}

#findBtn:hover {
    background: #e34b50;
    color: white;
}

@media (max-width: 850px) {
  #findBtn {
    width: 75%;
  }
}

/* Fade animations */
.fade-in {
  opacity: 0;
  animation: fadeInAnim 0.8s forwards;
}

@keyframes fadeInAnim {
  to {
    opacity: 1;
  }
}

/* 3 buttons below find button design */
@keyframes leftFadeIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0%);
    opacity: 1;
  }
}

@keyframes rightFadeIn {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }

  to {
    opacity: 1;
    transform: translateX(0%);
  }
}

/* Syllabus button + Extended/Core toggle design */
.three-button-group {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.syllabus-link-button { 
  text-decoration: none;
  color: black;
  border: 2px solid black;
  border-radius: 20px;
  padding: 8px 16px; 
  display: inline-block;
  animation: leftFadeIn 0.4s;
}

.syllabus-link-button:hover {
  background-color: black;
  color: white;
}

fieldset {
  border: 0;
  animation: rightFadeIn 0.4s;
}

.fieldset:not(:last-child) {
  padding-bottom: 13px;
}
 
legend {
  padding-bottom: 8px;
  text-transform: uppercase;
}
 
.radio-block {
  position: relative;
  display: flex;
  min-width: 280px;
  border: dashed var(--blue) 1px;
  border-radius: 20px;
  transform: translateX(-12px);
  background-color: #F7F5F3;
}
 
.selected {
  position: absolute;
  top: 1px;
  left: 1px;
  width: calc(50% - 1px);
  height: calc(100% - 2px);
  border-radius: 20px;
  transition: transform 0.2s;
  background-color: var(--blue);
}
 
.options-text {
  position: relative;
  z-index: 100;
  width: 50%;
  padding: 13px !important;
  transition: color 0.2s;
  text-align: center;
  cursor: pointer;
}
 
input[type=radio]:checked + .options-text {
  color: #FFF;
}
 
input[type=radio]:checked + .off-label + .selected {
  transform: translateX(100%);
}

:root {
  --blue: black;
}

.sr-only, input[type=radio] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  border: 0 !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

/* Table design  */
.tables-container {
  display: flex;
  justify-content: center;
  gap: 60px; /* space between tables */
  flex-wrap: wrap;
  margin-top: 20px;
}

.table-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.table-heading-paper-type {
  text-align: center;
  margin-bottom: 10px;
  font-size: 1.2rem;
  font-weight: bold;
}

table {
  border-collapse: collapse;
  min-width: 300px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

table td, table th {
  border: 1px solid #000;
  padding: 10px 15px; /* spacious */
  text-align: center;
  vertical-align: middle;
}

.year_in_table {
  writing-mode: vertical-lr;
  text-align: center;
  font-weight: bold;
  white-space: nowrap;
}

a button {
  background-color: #000;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 5px 10px;
  margin: 2px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

a button:hover {
  background-color: #444;
}

@media (max-width: 800px) {
  .tables-container {
    flex-direction: column;
    align-items: center;
  }

  table {
    width: 90%;
  }

  .input-row {
    gap: 23px;
    color: black;
  }
  
  .form-container {
    gap: 10px;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.table-group {
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
}

.tables-container .table-group:nth-child(1) {
  animation-delay: 0.2s;
}

.tables-container .table-group:nth-child(2) {
  animation-delay: 0.4s;
}

/* Footer */
footer {
  margin-top: 100px; /* space above footer */
  background-color: #000;
  color: white; /* text color */
  text-align: center; /* center the text */
  padding: 1rem; /* some vertical padding */
  position: relative; /* relative positioning for footer */
  width: 100%; /* full width */
  box-sizing: border-box; /* ensure padding doesn't affect width */
}

/* Navigation bar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #000; /* Black background */
  padding: 1rem 2rem;
  color: #fff;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  text-decoration: none; /* Remove underline from links */
}

.logo {
  width: 40px; /* adjust logo size */
  height: 40px;
  margin-right: 10px;
}

.business-name {
  font-size: 1.5rem;
  font-weight: bold;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.navbar-right a {
  color: #fff;
  text-decoration: none;
  padding: 0.5rem;
}

.navbar-right a:hover {
  background-color: #333;
  border-radius: 4px;
}

/* Dropdown styling */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropbtn {
  background-color: #000;
  color: white;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border: none;
  cursor: pointer;
}

.dropdown-content {
  position: absolute;
  right: 0;
  background-color: #fff;
  min-width: 160px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  border-radius: 4px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none; /* Prevent hover-trigger until visible */
  z-index: 1;
}

.dropdown-content a {
  color: #000;
  padding: 8px 12px;
  text-decoration: none;
  display: block;
  white-space: nowrap; /* Keep dropdown items on a single line */
  font-size: 0.9rem;
}

.dropdown-content a:hover {
  background-color: #ddd;
}

.dropdown:hover .dropdown-content {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto; /* Enable interaction once visible */
}

/* Hamburger styling */
.hamburger {
  display: none;
  cursor: pointer;
  z-index: 1001; /* Make sure it's clickable */
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  transition: all 0.3s ease-in-out;
  background-color: #fff;
}

/* Hamburger animation */
.hamburger.active .bar:nth-child(2) {
  opacity: 0;
}

.hamburger.active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .navbar-right {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    background-color: #000;
    flex-direction: column;
    gap: 0;
    text-align: center;
    transition: left 0.3s ease-in-out;
    z-index: 1000; /* On top */
  }

  .navbar-right.active {
    left: 0;
  }

  .nav-item {
    margin: 16px 0;
  }
}

/* Basic style for the buttons */
.mobile-buttons {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 5px;
}

/* Style each button */
.mobile-buttons button {
  background-color: #000;
  color: #fff;
  border: none;
  padding: 5px 10px;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
}

/* Hide buttons on larger screens */
@media (min-width: 800px) {
  .mobile-buttons {
    display: none;
  }
}