/* --- Desktop Styles --- */
.navbar {
  background-color: #005B3F;
  padding: 20px;
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  font-family: 'Segoe UI', sans-serif;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropbtn {
  background-color: #ffffff;
  padding: 10px 25px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 50px;
  transition: all 0.3s ease;
  min-width: 140px;
  display: block;
  text-align: center;
}

/* Individual Outline Colors */
.tech-btn { color: #0d47a1; border: 2px solid #0d47a1; }
.design-btn { color: #880e4f; border: 2px solid #880e4f; }
.business-btn { color: #1b5e20; border: 2px solid #1b5e20; }
.life-btn { color: #e65100; border: 2px solid #e65100; }
.edu-btn { color: #4a148c; border: 2px solid #4a148c; }
.social-btn { color: #3e2723; border: 2px solid #3e2723; }

/* Hover Fill Logic */
.dropdown:hover .tech-btn, .dropdown.active .tech-btn { background: #0d47a1; color: white; }
.dropdown:hover .design-btn, .dropdown.active .design-btn { background: #880e4f; color: white; }
.dropdown:hover .business-btn, .dropdown.active .business-btn { background: #1b5e20; color: white; }
.dropdown:hover .life-btn, .dropdown.active .life-btn { background: #e65100; color: white; }
.dropdown:hover .edu-btn, .dropdown.active .edu-btn { background: #4a148c; color: white; }
.dropdown:hover .social-btn, .dropdown.active .social-btn { background: #3e2723; color: white; }

.dropdown-content {
  display: none;
  position: absolute;
  min-width: 200px;
  padding: 10px;
  z-index: 100;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 91, 63, 0.95); /* Matches navbar slightly */
  border-radius: 15px;
  box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
}

/* The Invisible Bridge */
.dropdown-content::before {
  content: "";
  position: absolute;
  top: -15px;
  left: 0;
  width: 100%;
  height: 20px;
}

.dropdown:hover .dropdown-content, .dropdown.active .dropdown-content {
  display: block;
}

.dropdown-content a {
  display: block;
  text-decoration: none;
  padding: 10px 15px;
  margin: 5px 0;
  text-align: center;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  transition: 0.2s;
  white-space: nowrap;
}

/* Submenu Colors */
.item-1 { background: #e3f2fd; color: #0d47a1; border: 2px solid #0d47a1; }
.item-2 { background: #fce4ec; color: #880e4f; border: 2px solid #880e4f; }
.item-3 { background: #e8f5e9; color: #1b5e20; border: 2px solid #1b5e20; }
.item-4 { background: #fff3e0; color: #e65100; border: 2px solid #e65100; }
.item-5 { background: #f3e5f5; color: #4a148c; border: 2px solid #4a148c; }
.item-6 { background: #efebe9; color: #3e2723; border: 2px solid #3e2723; }

/* --- MOBILE RESPONSIVENESS --- */
@media screen and (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: center;
    padding: 10px;
  }

  .dropdown {
    width: 90%; /* Buttons take up more space on mobile */
  }

  .dropbtn {
    width: 100%;
  }

  .dropdown-content {
    position: static; /* Moves menu into the flow of the page */
    transform: none;
    width: 100%;
    box-shadow: none;
    background: transparent;
    padding: 5px 0;
  }
  
  .dropdown-content a {
    white-space: normal; /* Allow text wrap on small screens */
  }
}