/* Global Styles */
:root {
  --primary-color: #c41e3a; /* Rich red for primary color */
  --primary-dark: #8c0f24; /* Darker red for hover states */
  --primary-light: #f0d0d5; /* Light red for backgrounds */
  --secondary-color: #333333; /* Dark gray for text */
  --light-gray: #f5f5f5; /* Light gray for sections */
  --white: #ffffff;
  --shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Montserrat', sans-serif;
}

/*--------------- Header & Logo Area --------------------*/
.topmost {
  background-color: var(--white);
  display: flex;
  align-items: center;
  padding-left: 30px;
  padding-top: 10px;
  padding-bottom: 10px;
  height: 120px;
}

.IITD_LOGO {
  width: auto;
  height: 100px;
  margin-right: 20px;
  transition: var(--transition);
}

.IITD_LOGO:hover {
  transform: scale(1.05);
}

.text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: black;
  text-decoration: none;
}

.text h1 {
  font-size: 30px;
  font-weight: 600;
  margin: 0 0 6px 0;
  line-height: 1.2;
}

.text h2 {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 6px 0;
  line-height: 1.2;
  text-decoration: none;
}

.text h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  line-height: 1.2;
}

.text a {
  text-decoration: none;
  color: inherit;
}

/* ----------------------Navigation Bar---------------------*/
.navbar {
  background-color: var(--primary-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.navlist {
  list-style: none;
  display: flex;
  justify-content: center;
  padding: 0;
}

.navitem {
  position: relative;
}

.dropdown-button {
  background-color: transparent;
  color: var(--white);
  padding: 15px 20px;
  border: none;
  font-size: 16px;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  transition: var(--transition);
}

.dropdown-button::after {
  content: "▼";
  margin-left: 3px;
  font-size: 0.8em;
}

.no-dropdown-sign::after {
  content: none; /* Hide the dropdown arrow */
}

.dropdown-button:hover {
  background-color: #ECCA9C;
  color: black;
  font-weight: 700;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: var(--white);
  min-width: 200px;
  box-shadow: var(--shadow);
  z-index: 1;
}

.dropdown-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  transition: var(--transition);
}

.dropdown-content a:hover {
  background-color: #DDDD;
  color: black;
}

.dropdown-container:hover,
.dropdown-container:hover .dropdown-content {
  display: block;
}

.dropdown-container:hover .dropdown-button {
  background-color: #ECCA9C;
  color: black;
  font-weight: 700;
}

/* ----------------------Sub-dropdown Styling--------------------- */
.dropdown-subcontainer {
  position: relative;
}

.dropdown-subcontent {
  display: none;
  position: absolute;
  background-color: white;
  min-width: 160px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  z-index: 1;
  transition: all 0.3s ease-in-out;
  left: 100%;
  top: 0;
}

.dropdown-subcontainer:hover .dropdown-subcontent {
  display: block;
  visibility: visible;
  transition-delay: 0s;
}

/* Sub-dropdown links */
.dropdown-subcontent a {
  color: black;
  padding: 8px 12px;
  text-decoration: none;
  display: block;
  white-space: nowrap; /* Prevent wrapping */
  transition: background-color 0.3s ease;
}

.dropdown-subcontent a:hover {
  background-color: #DDDD;
  color: black;
}

/* Sub-dropdown button styling */
.dropdown-subbutton {
  background: none;
  border: none;
  color: black;
  padding: 8px 12px;
  text-align: left;
  width: 100%;
  display: block;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  transition: background-color 0.3s ease;
}

.dropdown-subbutton:hover {
  background-color: #DDDD;
  color: black;
  font-weight: 600;
}

/* Sub-dropdown arrow for button */
.dropdown-subbutton::after {
  content: "▶";
  font-size: 0.6em;
  margin-left: 5px;
  float: right;
}

/* -----------------------Footer -------------------------*/
footer {
  background-color: var(--secondary-color);
  color: var(--white);
  padding: 40px 0 0;
  margin-top: 50px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  padding: 0 20px;
}

.footer-column h3 {
  font-size: 18px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-color);
}

.footer-column p {
  margin-bottom: 15px;
  font-size: 14px;
}

.social-icons {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.social-icon {
  width: 40px;
  height: 40px;
  color: white;
  border-radius: 70%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-size: 28px;
}

.social-icon:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--white);
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  text-align: center;
  padding: 20px;
  margin-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
}
