body {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  background: #f4f4f4; /* light neutral background for a cleaner, official feel */
  color: #333;
  padding-top: 60px; /* to account for fixed nav */
}

/* Navbar */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 30px;
  background: #002147; /* theme color */
  color: white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  z-index: 1000;
}

nav .nav-links a:hover,
nav .dropbtn:hover {
  color: #ccc;
}

/* ensure content isn't hidden behind fixed navbar */
body {
  padding-top: 60px; /* adjust to match nav height */
}

/* logo image */
.logo img {
  max-height: 80px; /* smaller, to fit thinner nav */
  width: auto;
}

/* favicon (no CSS, placeholder comment) */

/* Dropdown menu styles */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropbtn {
  background: transparent;
  color: white;
  border: none;
  cursor: pointer;
  font: inherit;
  padding: 0;
  margin-left: 20px;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #002147; /* theme dark blue */
  min-width: 160px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.4);
  z-index: 1;
  border-radius: 4px;
}

.dropdown-content a {
  color: white;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {
  background-color: #004080; /* slightly lighter blue */
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown:hover .dropbtn {
  color: #d1d1d1;
}

.nav-links a {
  margin-left: 20px;
  text-decoration: none;
  color: white;
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
}

/* show the active page*/
.nav-links a:hover {
  color: #66b3ff;
}

.nav-links a.active {
  color: #4ea1f5;
  border-bottom: 2px solid #66b3ff;
  padding-bottom: 5px;
}

/* Hero */
.hero {
  position: relative;
  margin: 40px auto;
  width: 80%;
  height: 300px;
  background: url('Pictures/team1.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: white;
  transition: background-image 0.8s ease-in-out;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.3);
  border-radius: 12px;
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 2;
}

.hero-img {
  display: none;
}

.slider-arrow {
  position: absolute;
  font-size: 30px;
  cursor: pointer;
}

.left {
  left: 20px;
}

.right {
  right: 20px;
}

.btn {
  display: inline-block;
  margin-top: 15px;
  padding: 8px 16px;
  border: 1px solid #002147;
  background: #002147;
  text-decoration: none;
  color: white;
}

.btn:hover {
  background: white;
  color: #002147;
}

/* Container helper */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Grid Section */
.main-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin: 40px auto;
}

.achievements,
.research,
.member,
.picture {
  background: white;
  padding: 20px;
  border-radius: 12px;
  min-height: 200px;
  color: black;
}

/* Make the picture panel span three grid columns on wide screens */
@media (min-width: 1100px) {
  .main-grid .picture {
    grid-column: span 3;
  }
}

/* Picture gallery carousel */
.picture-gallery {
  display: flex;
  overflow-x: auto;
  gap: 15px;
  margin: 20px 0;
  scroll-behavior: smooth;
  padding: 10px 0;
}

.picture-gallery img {
  min-width: 250px;
  height: 200px;
  width: 250px;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.3s ease;
  cursor: pointer;
  flex-shrink: 0;
}

.picture-gallery img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Achievement cards */
.card-row {
  display: flex;
  gap: 15px;
  margin: 15px 0;
}

.card {
  flex: 1;
  min-height: 100px;
  background: #eaeaea;
  border-radius: 10px;
}

/* Members */
.member-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.toggle-mentor-btn {
  background: #002147;
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.toggle-mentor-btn:hover {
  background: #004080;
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.toggle-mentor-btn:active {
  transform: scale(0.95);
}

.member-carousel {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
  gap: 30px;
}

.member-slide {
  display: none;
  justify-content: center;
}

.member-card {
  position: relative;
  width: 200px;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 33, 71, 0.3);
  transition: all 0.3s ease;
}

.member-card:hover {
  box-shadow: 0 8px 20px rgba(0, 33, 71, 0.4);
  transform: scale(1.02);
}

.member-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.5);
  padding: 20px;
  text-align: center;
}

.member-name {
  margin: 0;
  color: white;
  font-weight: 600;
  font-size: 18px;
}

.member-carousel .member-arrow {
  position: absolute;
  font-size: 28px;
  cursor: pointer;
  color: #002147;
  transition: all 0.3s ease;
  user-select: none;
}

.member-carousel .member-arrow:hover {
  color: #004080;
  transform: scale(1.2);
}

.member-carousel .member-arrow.left {
  left: -30px; /* closer to card */
}

.member-carousel .member-arrow.right {
  right: -30px; /* closer to card */
}

.btn-outline {
  padding: 6px 12px;
  border: 1px solid #002147;
  background: transparent;
  color: #002147;
  cursor: pointer;
}

.btn-outline:hover {
  background: #002147;
  color: white;
}

/* Member viewer styles */
.member-viewer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

.member-card-view {
  background: white;
  padding: 14px;
  border-radius: 10px;
  display: flex;
  gap: 12px;
  align-items: center;
  width: 320px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: all 0.3s ease;
}

.member-card-view:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  transform: translateY(-3px);
}

.member-card-view:focus-visible {
  outline: 3px solid #005fcc;
  outline-offset: 2px;
}

/* Smooth transition for member viewer */
.member-card-view {
  transition: opacity 300ms ease, transform 300ms ease, box-shadow 300ms ease;
  will-change: opacity, transform;
}
.member-card-view.fade {
  opacity: 0;
  transform: translateY(10px);
}

.member-card-view .member-image {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.3s ease, filter 0.3s ease;
  cursor: pointer;
}

.member-card-view .member-image:hover {
  transform: scale(1.1);
  filter: brightness(1.15);
}
.member-arrow {
  background: transparent;
  border: none;
  font-size: 28px;
  color: #002147;
  cursor: pointer;
  padding: 6px 10px;
}

.member-arrow:hover {
  color: #004080;
  transform: scale(1.1);
}

/* Members list styles */
.members-list {
  list-style: none;
  padding: 0;
  margin: 15px 0 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.member-item {
  background: white;
  padding: 12px;
  border-radius: 10px;
  display: flex;
  gap: 12px;
  align-items: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.member-item img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
}

.member-meta {
  display: flex;
  flex-direction: column;
}

.member-name-small {
  font-weight: 600;
  color: #002147;
}

.member-role-small {
  font-size: 0.9em;
  color: #666;
}

.member-hint {
  text-align: center;
  color: #4f6783;
  font-size: 0.9rem;
  margin-top: 10px;
}

/* Reusable member profile page styles */
.member-page {
  padding: 80px 20px;
  min-height: 80vh;
  background: linear-gradient(130deg, #f7fbff 0%, #e9f1fb 45%, #dce7f7 100%);
}

.member-content {
  max-width: 900px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0, 33, 71, 0.12);
  border: 1px solid #e2ecf9;
}

.member-header {
  text-align: center;
  margin-bottom: 24px;
}

.member-photo {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 16px;
  display: block;
  border: 5px solid #174a8b;
}

.member-header h1 {
  color: #0a294f;
  margin: 8px 0 6px;
}

.member-header .role {
  color: #174a8b;
  font-size: 1.1rem;
  font-weight: 600;
}

.member-info {
  margin-top: 20px;
  line-height: 1.7;
}

.member-info h2 {
  color: #174a8b;
  margin-top: 20px;
  margin-bottom: 10px;
}

.back-btn {
  display: inline-block;
  margin-bottom: 20px;
  padding: 10px 16px;
  background: #174a8b;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.back-btn:hover {
  background: #0f3869;
}

@media (max-width: 700px) {
  .member-content {
    padding: 24px;
  }

  .member-photo {
    width: 190px;
    height: 190px;
  }
}

/* Research search boxes */
.search-box {
  background: white;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-left: 4px solid #007bff;
}

.search-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.search-box h3 {
  color: #007bff;
  margin-bottom: 8px;
  font-size: 1.1em;
}

.search-box p {
  color: #666;
  line-height: 1.4;
  margin: 0;
  font-size: 0.9em;
}

/* Contact form */
.contact-section {
  padding: 80px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.contact-section h1 {
  margin-bottom: 40px;
  font-size: 2.2em;
  font-weight: 700;
  letter-spacing: 1px;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.contact-form h1,
.contact-section h1 {
  text-align: center;
  color: #002147;
  margin-bottom: 30px;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.form-group label {
  margin-bottom: 5px;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  padding: 12px 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #002147;
}

.contact-form button.btn {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 10px;
}

/* Sponsors Section */
.sponsors-section {
  background: white;
  padding: 40px 0;
  margin: 40px 0;
}

.sponsors-section h2 {
  text-align: center;
  color: #002147;
  margin-bottom: 30px;
  font-size: 2em;
}

.sponsors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  align-items: center;
  justify-items: center;
}

.sponsor-card {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  border: 2px solid #eaeaea;
  transition: all 0.3s ease;
}

.sponsor-card:hover {
  border-color: #002147;
  box-shadow: 0 4px 8px rgba(0, 33, 71, 0.2);
}

.sponsor-logo {
  width: 100px;
  height: 100px;
  background: #e0e0e0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  color: #666;
  font-weight: bold;
}

.sponsor-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.sponsor-card p {
  color: #666;
  margin: 10px 0 0 0;
}

/* Footer */
.footer {
  width: 100%;
  background: #001632;
  color: white;
  padding: 20px 0;
  text-align: center;
  margin-left: 0;
  margin-right: 0;
}

.footer a {
  color: #ccc;
  text-decoration: none;
  margin: 0 10px;
}

.footer a:hover {
  color: white;
}

/* Social Media Icons */
.social-icons {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.social-link.youtube {
}

.social-link.youtube:hover {
}

.social-link.facebook {
}

.social-link.facebook:hover {
}

.social-link.instagram {
}

.social-link.instagram:hover {
}

.social-link img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: brightness(1.1);
}

/* Page Header */
.page-header {
  background: linear-gradient(135deg, #002147 0%, #004080 100%);
  color: white;
  padding: 50px 0 30px;
  text-align: center;
  margin-top: 20px;
  border-radius: 12px;
  margin: 20px auto;
  width: 90%;
}

.page-header h1 {
  margin: 0;
  font-size: 2.5em;
  font-weight: 700;
  letter-spacing: 1px;
}

.page-header p {
  margin: 10px 0 0;
  font-size: 1.2em;
  opacity: 0.9;
}

/* Main Content */
.main-content {
  margin: 40px auto;
  padding: 0 20px;
}

/* Robot Carousel */
.robot-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin: 30px auto;
  min-height: 600px;
  max-width: 1200px;
}

.robot-slides-wrapper {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.robot-slide {
  min-width: 100%;
  flex-shrink: 0;
  box-sizing: border-box;
  padding: 0 20px;
}

/* Robot Carousel Controls */
.robot-carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.robot-arrow {
  background: transparent;
  border: none;
  font-size: 30px;
  color: #002147;
  cursor: pointer;
  padding: 10px 15px;
  transition: all 0.3s ease;
}

.robot-arrow:hover {
  color: #004080;
  transform: scale(1.2);
}

.robot-dots {
  display: flex;
  gap: 10px;
}

.robot-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid #002147;
}

.robot-dot.active {
  background: #002147;
}

/* Members Carousel */
.members-carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.member-nav-btn {
  background: #002147;
  color: white;
  border: none;
  font-size: 24px;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.member-nav-btn:hover {
  background: #004080;
  transform: scale(1.1);
}

.member-carousel-content {
  flex: 0 0 180px;
}

.member-carousel-card {
  display: block;
  text-align: center;
  text-decoration: none;
  color: inherit;
  border-radius: 6px;
}

/* Image Modal */
.image-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  overflow: auto;
}

.image-modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 85vh;
  position: relative;
  top: 50%;
  transform: translateY(-50%);
  animation: zoomIn 0.3s;
}

@keyframes zoomIn {
  from {
    transform: translateY(-50%) scale(0);
  }
  to {
    transform: translateY(-50%) scale(1);
  }
}

.image-modal-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
  z-index: 10001;
}

.image-modal-close:hover,
.image-modal-close:focus {
  color: #bbb;
}

.image-modal-caption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: #ccc;
  padding: 10px 0;
  height: 50px;
}

.robot-img-clickable {
  cursor: pointer;
  transition: transform 0.3s ease;
}

.robot-img-clickable:hover {
  transform: scale(1.02);
}
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.member-carousel-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 33, 71, 0.2);
}

.member-carousel-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.member-carousel-info {
  padding: 10px;
  background: white;
}

.member-carousel-name {
  padding: 0;
  margin: 0 0 4px 0;
  font-size: 1em;
  font-weight: 600;
  color: #002147;
}

.member-carousel-role {
  padding: 0;
  margin: 0;
  font-size: 0.75em;
  color: #666;
  font-weight: 400;
  line-height: 1.2;
}

/* Robot Card */
.robot-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 33, 71, 0.15);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}

.robot-card:hover {
  box-shadow: 0 8px 25px rgba(0, 33, 71, 0.25);
  transform: translateY(-5px);
}

/* Robot Image */
.robot-image {
  width: 100%;
  height: 600px;
  overflow: hidden;
  background: #f0f0f0;
  position: relative;
  cursor: pointer;
}

.robot-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.robot-card:hover .robot-image img {
  transform: scale(1.15);
}

/* Image pop-up effect on hover */
.robot-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 33, 71, 0.1);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.robot-card:hover .robot-image::after {
  opacity: 1;
}

/* Robot Info */
.robot-info {
  padding: 25px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.robot-info h2 {
  color: #002147;
  margin: 0 0 15px;
  font-size: 1.8em;
  font-weight: 700;
}

.robot-info p {
  color: #555;
  margin: 8px 0;
  line-height: 1.6;
}

.robot-info strong {
  color: #002147;
}

.description {
  color: #666;
  font-size: 0.95em;
  line-height: 1.5;
  margin: 15px 0;
  flex-grow: 1;
}

/* Robot Specs */
.robot-specs {
  background: #f9f9f9;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #002147;
  margin-top: 15px;
}

.robot-specs p {
  margin: 8px 0;
  font-size: 0.9em;
  color: #555;
}

.robot-specs strong {
  color: #002147;
}