* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f5f5f5;
  line-height: 1.6;

}
h2 {
  margin-bottom: 20px;
  color: black;
}
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: rgb(0, 0, 128);
  padding: 1rem 2rem;
  color: white;
  position: sticky;
  top: 0;
  z-index: 1000;
}


.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  width: 2.6rem; 
  height: 2.6rem;
  margin-right: 0.5rem;
  object-fit: contain;
}

.logo h1 {
  font-size: 1.9rem;
  letter-spacing: 1px;
}

.navbar ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.navbar li {
  position: relative; 
}

.navbar a {
  text-decoration: none;
  color: white;
  font-weight: bold;
  transition: color 0.3s ease;
  display: inline-block;
  padding: 0.3rem 0.5rem;
}

.arrow{
  font-size: 14px;
}
.navbar a:hover {
  color: orange;
}

/* Dropdown styles */
.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: navy;
  padding: 0.5rem 0;
  border-radius: 5px;
  z-index: 1;
  min-width: 120px;
  flex-direction: column;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.navbar li:hover > .dropdown {
  display: flex;
  flex-direction: column;
}

.dropdown ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.dropdown li {
  padding: 0;
}

.dropdown a {
  color: white;
  display: block;
  padding: 0.1rem 0.5rem;
  transition: background-color 0.3s ease, color 0.3s ease;
  white-space: nowrap;
}


.dropdown a:hover {
  color: white;
  background-color: rgb(255, 166, 0);
}
/* Style for the currently selected page link */
.navbar a:target,
.navbar a[aria-current="page"] {
    color: orange !important;
    font-weight: bold;
}

#toppers-page:hover {
    color: #f5f5f5 !important;
    font-weight: bold;
}
/* Optional: Remove outline on focus for better appearance */
.navbar a:focus {
    outline: none;
}
.dropdown a:hover {
  color: white;
  background-color: orange;
}

.image1 {
    width: 100%;
    height: 500px;
    background-position: center;
    background-size: cover;
}
.topper-images {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
.container {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: rgb(255, 255, 255);
}
#main-heading {
  margin-top: 40px;
  color: rgb(0, 0, 128);
  text-align: center;
  font-weight: bold;
  /* text-shadow:  5px 5px lightgray; */
  font-size: 3.5rem;
}
.batch-dropdown {
  position: relative;
  display: inline-block;
  margin-bottom: 30px;
  z-index: 10;
}
.dropdown-btn {
  background-color: orangered;
  display: inline-block;
  color: #f5f5f5;
  padding: 12px 20px;
  font-size: 16px;
  min-width: 200px;
  border: none;
  cursor: pointer;
  min-width: 200px;
  text-align: left;
  position: relative;
  border-radius: 4px;
  transition: transform 0.3s ease;
}
.dropdown-btn:hover {
  transform: scale(1.15);
}
.dropdown-btn::after {
  content: "▼";
  position: absolute;
  right: 15px;
  top: 50%;
  transform-origin: translateY(-50%);
  font-size: 12px;
}
/* checkbox to control dropdown */
.dropdown-toggle {
  display: none;
}
/* batches toppers - hidden - default */
.batches-toppers {
  width: 90%;
  max-width: 1200px;
  display: none;
  position: absolute;
  background-color: #f5f5f5;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1;
}
/* toppers links */
.batches-toppers a {
  color: black;
  padding: 12px 20px;
  text-decoration: none;
  display: block;
  transition: background-color 0.3s;
}
.batches-toppers a:hover {
  background-color: orange;
  color: #f5f5f5;
  font-weight: bold;
}
/* show dropdown when checkbox is checked */
.dropdown-toggle:checked ~ .batches-toppers {
  display: block;
}
.data-table, 
.data-table + h2 ,
.close-btn  {
  display: none;
}
.data-table {
  width: 90%;
  max-width: 1200px;
  margin: 20px auto;
  border-collapse: collapse;
}
.data-table th, .data-table td {
  border: 1px solid #ddd;
  padding: 12px;
  text-align: center;
}
.data-table th {
  background-color: rgb(0, 0, 128);
  font-weight: bold;
  color: #f5f5f5;
}
.data-table tr:hover {
  background-color: orange;
  color: #f5f5f5;
  font-weight: bold;
}
/* show table */
.data-table:target, 
.data-table:target + h2
.data-table:target + .close-btn {
  display: block;
}
.data-table:target + .close-btn {
  display: inline-block;
}
.data-table + h2 {
  margin-top: 20px;
  font-size: 1.5em;
  text-align: center;
  color: #333;
}
/* close */
.close-btn {
  margin-right: 0%;
  text-align: right;
  margin-bottom: 10px;
  color: black;
  font-size: 18px;
  text-decoration: none;
  border-radius: 10%;
  transition: transform 0.3s ease;
}
.close-btn:hover {
  color: #f1f1f1;
  background-color: red;
  transform: scale(1.15);
}
.sem-heading {
  display: none;
}
.sem-heading:active {
  display: inline-block;
}
footer{
  background-color: rgb(0, 0, 128);
  color: #fff;
  text-align: center;
  padding: 1rem 0;
  margin-top: 2rem;
  position: bottom;
}
/*@media (min-width: 768px) {
  .header {
    padding: 1rem 2rem;
  }
  
  .logo-text {
    font-size: 2rem;
  }
  
  .logo h1 {
    font-size: 1.5rem;
  }
  
  .navbar a {
    font-size: 1rem;
    padding: 0.3rem 0.5rem;
  }
  
  #main-heading {
    font-size: 3rem;
  }
  
  .data-table {
    display: table;
    width: 90%;
    max-width: 1200px;
  }
  
  .data-table th, .data-table td {
    padding: 12px;
  }
}

@media (min-width: 992px) {
  .navbar ul {
    gap: 1.5rem;
  }
  
  #main-heading {
    font-size: 3.5rem;
  }
}

/* For very small screens */
/*@media (max-width: 480px) {
  #main-heading {
    font-size: 1.8rem;
    text-shadow: 3px 3px lightgray;
  }
  
  .dropdown-btn {
    padding: 10px 15px;
    font-size: 14px;
  }
  
  .batches-toppers a {
    padding: 10px 15px;
    font-size: 14px;
  }
  
  .data-table th, .data-table td {
    padding: 6px;
    font-size: 0.9rem;
  }
}
  */
@media(max-width: 768px) {
  .image1 {
    height: 200px;
  }
  #main-heading {
    font-size: 2.0rem;
  }
  .data-table {
    width: 90%;
    align-items: center;
  }
  .batches-toppers {
    width: 100%;
    align-items: center;
  }
}
@media(max-width: 480px) {
  .image1 {
    height: 200px;
  }
  #main-heading {
    font-size: 2.0rem;
  }
  .data-table {
    width: 90%;
    align-items: center;
  }
  .batches-toppers {
    width: 100%;
    align-items: center;
  }
}
@media (max-width: 768px) {
  .header {
    flex-direction: column; 
    align-items: center;   
    gap: 10px;
  }

  .logo {
    margin-bottom: 0;
  }

  .navbar {
    width: 100%;
  }

  .navbar ul {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center; 
    align-items: center;
    gap: 1rem;
    flex-wrap: nowrap; 
    padding: 0;
    margin: 0;
  }

  .navbar li {
    margin-bottom:0;
  }
}