/* Registration form section width adjustment */
.reg-section {
  max-width: 500px;
  margin: 2rem auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  padding: 2.5rem 2rem;
}
.reg-form-2col .reg-form-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
}

@media (max-width: 700px) {
  .reg-form-2col .reg-form-grid {
    flex-direction: column;
    gap: 1.1rem;
  }
  .reg-form-2col .reg-form-grid > * {
    min-width: 0;
    width: 100%;
  }
}
/* Disabled submit button style for registration form */
#submitBtn:disabled {
  background: #cccccc !important;
  color: #888 !important;
  cursor: not-allowed;
  border: none;
}
/* ===== Events More Info Link Hover ===== */
a[href="https://sites.google.com/view/isdrcjuphysics/"]:hover {
  color: #FFD600 !important;
}
.gallery-thumbnails {
  display: flex;
  width: 100%;
  gap: 2.5%;
  justify-content: center;
  flex-wrap: wrap;
}

.gallery-category {
  cursor: pointer;
  text-align: center;
  width: clamp(180px, 20vw, 280px);
}

.gallery-category img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.gallery-category:hover img {
  transform: scale(1.05);
}

/* Popup Styles */
    .popup-gallery {
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      background: rgba(0,0,0,0.45);
      display: flex;
      justify-content: center;
      align-items: center;
      z-index: 9999;
    }

    .popup-gallery.hidden {
      display: none;
    }

    .popup-content {
      background: transparent;
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
      padding: 20px;
      border-radius: 10px;
      max-width: 90vw;
      max-height: 80vh;
      overflow-y: auto;
      position: relative;
      box-shadow: 0 0 30px rgba(0,0,0,0.5);
    }

#popup-close {
      position: absolute;
      top: 10px;
      right: 15px;
      font-size: 28px;
      font-weight: bold;
      cursor: pointer;
      color: #fff;
      transition: color 0.3s ease;
    }

    #popup-close:hover {
      color: #000;
    }

    #popup-images {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 15px;
      margin-top: 40px;
    }
    
    #popup-images img {
      max-width: clamp(220px, 30vw, 280px);
      max-height: auto;
      border-radius: 8px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.3);
      cursor: pointer;
      transition: transform 0.3s ease;
      object-fit: cover;
      aspect-ratio: 4 / 3;
    }

    #popup-images img:hover {
      transform: scale(1.1);
    }


/* ===== Reset and Base Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  background-color: #ffffff; /* White background */
  color: #000000; /* Black text */
  font-weight: normal;
}

/* Helper: prevent scrolling when mobile sidebar is open */
.no-scroll {
  overflow: hidden !important;
  height: 100vh !important;
}

/* Smooth transitions for theme changes */
body,
.navbar,
section,
.card,
.notice-board li,
footer,
.popup-content,
.nav-links,
.hero,
.download-btn,
.theme-toggle {
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

a {
  text-decoration: none;
  color: inherit;
  font-weight: normal;
}

/* ===== Navbar ===== */
.navbar {
  position: relative;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  background-color: #ffffff; /* white header */
  padding: 0.5rem 1rem;
  color: #000000;
  border-bottom: 1px solid #e6e6e6;
  width: 100%;
  box-sizing: border-box;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #b80404; /* brand color */
  cursor: pointer;
}

.hamburger {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #b80404; /* brand color for contrast on white header */
  background: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  z-index: 1001;
}

/* Theme switch (professional slider) */
.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: 0.5rem;
}
.theme-switch input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 40px;
  height: 22px;
  background: #e6e6e6;
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  outline: none;
  transition: background-color 0.25s ease;
}
.theme-switch input[type="checkbox"]::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  transition: transform 0.25s ease, background 0.25s ease;
}
.theme-switch input[type="checkbox"]:checked {
  background: #b80404; /* brand red when enabled */
}
.theme-switch input[type="checkbox"]:checked::after {
  transform: translateX(18px);
  background: #fff;
}
.theme-switch .theme-text {
  font-size: 0.86rem;
  color: #333;
  user-select: none;
}
.theme-switch input[type="checkbox"]:focus {
  box-shadow: 0 0 0 3px rgba(184,4,4,0.08);
}

/* Push the theme switch to the right on wide layouts */
/* Place switch at end of header only on wider screens */
@media (min-width: 769px) {
  /* Push nav links (and following controls) to the right on desktop */
  .nav-links {
    margin-left: auto;
  }
}

/* Smaller compact switch on narrow screens */
@media (max-width: 420px) {
  .theme-switch .theme-text {
    display: none; /* hide text on very small screens */
  }
  .theme-switch input[type="checkbox"] {
    width: 34px;
    height: 18px;
  }
  .theme-switch input[type="checkbox"]::after {
    width: 14px;
    height: 14px;
    top: 2px;
    left: 2px;
  }
  .theme-switch input[type="checkbox"]:checked::after {
    transform: translateX(16px);
  }
}

/* Dark mode overrides (apply by adding class 'dark' to <body>) */
body.dark {
  background-color: #0f1720; /* dark background */
  color: #e6eef6; /* light text */
}
body.dark .navbar {
  background-color: #0b1220;
  border-bottom-color: rgba(255,255,255,0.04);
  color: #e6eef6;
}
body.dark .logo,
body.dark .nav-links a,
body.dark .hamburger,
body.dark .theme-switch .theme-text,
body.dark .theme-switch input[type="checkbox"] {
  color: #f0b2b2; /* softer brand on dark */
}

/* Ensure main content and small blocks use readable light text */
body.dark section,
body.dark .card,
body.dark .notice-board li,
body.dark p,
body.dark li,
body.dark h1,
body.dark h2,
body.dark h3,
body.dark .hero,
body.dark .gallery-category p {
  background-color: transparent !important;
  color: #e6eef6 !important;
}

/* Override common inline white backgrounds and text colors used across pages */
body.dark .card,
body.dark .card-container .card,
body.dark .reg-section,
body.dark .speakers-list,
body.dark .contact-info,
body.dark .gallery-thumbnails,
body.dark .gallery-category {
  background-color: transparent !important;
  color: #e6eef6 !important;
}

/* Inputs, selects, textareas in dark mode */
body.dark input,
body.dark textarea,
body.dark select {
  background-color: #0b1620 !important;
  color: #e6eef6 !important;
  border-color: rgba(255,255,255,0.12) !important;
}

/* Headings that had inline color will be forced to readable color in dark */
body.dark h1,
body.dark h2,
body.dark h3,
body.dark h4,
body.dark h5 {
  color: #e6eef6 !important;
}

/* Links color tweak for darker backgrounds */
body.dark a {
  color: #ffd54d !important;
}

/* Buttons and accent elements */
body.dark .download-btn {
  background-color: #7a0b0b;
  color: #fff;
}
body.dark .download-btn.online-registration {
  background: #ffd54d;
  color: #7a0b0b;
}

body.dark .red-divider {
  background-color: #7a0b0b;
}

body.dark footer {
  background-color: #071018;
  color: #bdbdbd;
}

/* Ensure popup overlay and content look good in dark mode */
body.dark .popup-gallery {
  background: rgba(0,0,0,0.75);
}
body.dark #popup-close {
  color: #e6eef6;
}

/* Links in dark mode should be visible and distinct */
body.dark a,
body.dark .notice-board a {
  color: #ffd54d;
}

/* Make hr/dividers visible on dark */
body.dark .red-divider {
  background-color: #b85a5a;
}

/* Strong overrides for event page: ensure inline-styled headings and speaker blocks are readable */
body.dark .card,
body.dark .card *,
body.dark .speakers-list,
body.dark .speakers-list *,
body.dark .speakers-list h4,
body.dark .speakers-list div {
  background-color: transparent !important;
  color: #e6eef6 !important;
  border-color: rgba(255,255,255,0.06) !important;
}

/* Specific: ensure emphasized in-speaker text is readable */
body.dark .speakers-list span,
body.dark .speakers-list p {
  color: #dbeaf6 !important;
}

/* Noticeboard - dark mode color calibration */
body.dark .notice-list {
  /* keep the list container transparent to blend with page */
  background: transparent !important;
}

body.dark .notice-item {
  background: #07121a; /* very dark card background */
  border-color: rgba(255,255,255,0.04);
  color: #e6eef6;
  box-shadow: none;
}

body.dark .notice-header-line {
  color: #9fb3c8; /* muted cyan for meta line */
}

body.dark .notice-title strong {
  color: #ffffff !important;
}

body.dark .notice-summary {
  color: #cfeaf7;
}

body.dark .notice-full {
  color: #e6f7ff;
}

body.dark .notice-pinned {
  border-left-color: rgba(255,90,90,0.5);
}
body.dark .notice-pinned .notice-header-line::before {
  background: rgba(255,90,90,0.06);
  color: #ffb3b3;
  border-color: rgba(255,90,90,0.12);
}

body.dark .notice-download {
  background: #114e3f; /* deep desaturated green */
  color: #e6eef6 !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.6);
}
body.dark .notice-download:hover {
  filter: brightness(1.04);
}

body.dark .notice-readmore {
  color: #8fbffd; /* gentle blue for interactive text */
}
body.dark .notice-readmore:focus { outline: 3px solid rgba(143,191,253,0.12); border-radius: 6px; }


@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
    position: relative;
  }

  .hamburger {
    display: block;
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 1001;
    transition: color 0.3s ease;
  }

  .hamburger.active {
    color: #111 !important;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    background-color: #fff; /* White sidebar */
    height: 100vh;
    width: 220px;
    flex-direction: column;
    gap: 2rem;
    padding-top: 4rem;
    padding-left: 2rem;
    transition: right 0.3s ease-in-out;
    z-index: 1000;
    box-shadow: -2px 0 12px rgba(0,0,0,0.08);
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links a {
    color: #b80404;
  }

  .nav-links a:hover,
  .nav-links a.active {
    color: #FFD600;
  }

  /* When the switch is moved into the nav menu, style it as a menu item */
  .nav-links .theme-switch {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-left: 0;
    padding: 0.6rem 0;
  }
  .nav-links .theme-switch .theme-text {
    color: #b80404;
    font-size: 0.95rem;
  }
  .nav-links .theme-switch input[type="checkbox"] {
    width: 36px;
    height: 20px;
  }
}
.hero {
  background: #ffffff; /* White hero */
  color: #000000; /* Black text */
  text-align: center;
  padding: 1rem 1rem 0 1rem;
  margin-bottom: 0;
  padding-bottom: 0;
}

.hero-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.hero-logo {
  height: 70px;
  object-fit: contain;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
}

.nav-links {

  list-style: none;
  display: flex;
  gap: 1.5rem;
}

/* Desktop nav links: brand red */
.nav-links a {
  color: #b80404;
  font-weight: bold;
  transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #FFD600; /* Yellow for active/hover */
}

@media (max-width: 768px) {
  /* Mobile nav links: red */
  .nav-links a {
    color: #b80404;
  }

  .nav-links a:hover,
  .nav-links a.active {
    color: #FFD600;
  }
}

  /* When sidebar is open, active link is black */
  .nav-links.active li a.active {
    color: #111 !important;
 /*   text-decoration: underline !important; */
    text-underline-offset: 6px;
    text-decoration-thickness: 2px;
  }
.red-divider-wrapper {
  width: 100%;
  margin: 0;
  padding: 0;
  line-height: 0; /* eliminates extra vertical spacing */
}

.red-divider {
  border: 0;
  height: 2px;
  background-color: #b80404;
  margin: 0;
  width: 100%;
}

/* ===== Section ===== */
section {
  padding: 3rem 2rem;
  max-width: 90%;
  margin: auto;
  background-color: #ffffff; /* White background */
  color: #000000;
}

h1, h2, h3 {
  margin-bottom: 1rem;
  color: #000000;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-weight: bold;
}

p {
  margin-bottom: 1rem;
  color: #000000;
  font-weight: normal;
}

/* ===== Cards (Vision, Mission, Projects) ===== */
.vision-mission,
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.card {
  background: #ffffff;
  flex: 1;
  padding: 2rem;
  min-width: 250px;
  max-width: 900px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-left: 5px solid #b80404; /* Red accent border */
  color: #000000;
  font-weight: normal;
}

/* ===== Notice Board, About, Forms ===== */
.notice-board ul {
  list-style: none;
  padding-left: 0;
}

.notice-board li {
  background: #ffffff;
  padding: 1rem;
  margin-bottom: 1rem;
  border-left: 5px solid #b80404; /* Red */
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  border-radius: 4px;
  font-size: 0.95rem;
  color: #000000;
  font-weight: normal;
}

.notice-board a {
  color: #b80404;  /* Red */
  font-weight: normal;
}

/* ===== Gallery ===== */
.gallery-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.gallery-images img {
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
}

/* ===== Join Us Button ===== */

.download-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.8rem 1.5rem;
  background-color: #b80404; /* Red button */
  color: white;
  border-radius: 5px;
  font-weight: normal;
  transition: background 0.3s ease, color 0.3s ease;
}

.download-btn:hover {
  background-color: #8b0303; /* Darker red on hover */
}

/* Special style for Online Registration button */
.download-btn.online-registration {
  background: #FFD600;
  color: #b80404;
  font-weight: bold;
  transition: background 0.3s, color 0.3s;
}
.download-btn.online-registration:hover {
  background: #b80404;
  color: #FFD600;
}

/* ===== Contact Form ===== */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.contact-form input,
.contact-form textarea {
  padding: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-weight: normal;
}

.contact-form button {
  background-color: #b80404; /* Red */
  color: white;
  padding: 1rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: normal;
}

/* ===== Map Container ===== */
.map-container {
  margin-top: 2rem;
  overflow: hidden;
  border-radius: 8px;
}

/* ===== Footer ===== */
footer {
  background-color: #e0e0e0; /* Light grey background */
  color: #b80404; /* Red text */
  text-align: center;
  padding: 1.5rem 2rem;
  margin-top: 3rem;
  font-size: 0.9rem;
  font-weight: normal;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links {
    flex-direction: column;
    gap: 0.5rem;
  }
@media (max-width: 600px) {
  .navbar {
    flex-direction: column;         /* Stack items vertically on very small screens */
    align-items: flex-start;        /* Align left */
  }
}
  .card-container, .vision-mission {
    flex-direction: column;
    align-items: center;
  }

  .hero h1 {
    font-size: 2rem;
  }
}


/* ===== Members page: responsive grid & cards ===== */
.members-container {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 0.25rem;
  max-width: 90%;
  margin: 1.5rem auto 2rem auto;
  padding: 0 0.25rem;
}

.member-card {
  display: flex;
  gap: 1rem;
  align-items: center;
  background: #ffffff;
  padding: 0.25rem;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.04);
}

.member-avatar {
  width: 100px;
  height: 100px;
  border-radius: 100%;
  object-fit: cover;
  flex: 0 0 100px;
  border: 3px solid rgba(0, 33, 164, 0.08);
}

.member-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.member-name {
  font-weight: 700;
  color: #00027d;
}

.member-role {
  font-size: 0.95rem;
  color: #003f90;
}

.member-interests {
  font-size: 0.88rem;
  color: #444;
}

.member-email {
  font-size: 0.88rem;
  color: #444;
}

.social-icons {
  margin-top: 0.35rem;
}

.social-link {
  color: #032c8a;
  display: inline-flex;
  align-items: center;
}
.social-link svg { display: block; }
.social-link:hover { color: #8b0303; }

@media (max-width: 768px) {
  .members-container {
    grid-template-columns: 1fr;
    gap: 0.25rem;
    padding: 0 0.25rem;
  }

  .member-avatar {
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
  }
}

/* Dark mode for members */
body.dark .member-card {
  background: transparent !important;
  border-color: rgba(0, 35, 139, 0.04) !important;
  box-shadow: none !important;
  color: #002d5a !important;
}

/* ===== Notice Board - Polished Institutional Styles ===== */
.notice-list {
  list-style: none;
  margin: 0 auto;
  padding: 0 0.1rem;
  max-width: 90%;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.notice-item {
  background: #fff;
  border: 1px solid #e8e8e8;
  padding: 1rem 1rem;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.04);
  color: #222;
}

.notice-pinned {
  /* Subtle left accent replaced with slimmer, less saturated line */
  border-left: 4px solid rgba(184,4,4,0.9);
  padding-left: 0.85rem; /* keep content away from the accent */
  position: relative;
}

/* Add a small 'Pinned' badge instead of a dominating vertical bar */
.notice-pinned .notice-header-line::before {
  content: "Pinned";
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #b80404;
  background: rgba(184,4,4,0.08);
  border: 1px solid rgba(184,4,4,0.12);
  padding: 0.08rem 0.4rem;
  margin-right: 0.6rem;
  border-radius: 4px;
  vertical-align: middle;
}

.notice-header-line {
  font-size: 0.92rem;
  color: #666;
  display: block;
  margin-bottom: 0.35rem;
}

.notice-title strong {
  font-size: 1.03rem;
  color: #111;
}

.notice-summary {
  margin-top: 0.45rem;
  color: #333;
  line-height: 1.45;
}

.notice-full {
  margin-top: 0.6rem;
  color: #222;
  line-height: 1.6;
}

.notice-actions {
  margin-top: 0.65rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.notice-download {
  background: #f1dfd8;
  color: #02a86b !important;
  /* Compact button */
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  min-width: auto;
  max-width: 240px;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(184,4,4,0.08);
  overflow: hidden;
  text-overflow: ellipsis;
}

.notice-download:hover { filter: brightness(0.96); transform: translateY(-1px); }
.notice-download:active { transform: translateY(0); }
.notice-download:focus { outline: 3px solid rgba(184,4,4,0.15); }

/* Inline SVG icon inside the download link - more flexible and accessible */
.notice-download {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem; /* gap between icon and label */
  color: #02a86b !important;
  text-decoration: none;
  font-weight: 700;
}
.notice-download-icon {
  width: 18px; /* slightly larger for better visibility */
  height: 18px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  transform: translateY(0.5px) scale(1.06); /* subtle scale to appear bolder */
}
.notice-download-label {
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
  font-weight: 700;
}

.notice-readmore {
  background: transparent;
  border: none;
  color: #032c8a;
  cursor: pointer;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.25rem;
}
.notice-readmore svg { display: inline-block; vertical-align: middle; }

/* small accessibility focus style */
.notice-readmore:focus { outline: 3px solid rgba(3,44,138,0.12); border-radius: 6px; }

@media (max-width: 700px) {
  .notice-item { padding: 0.9rem; }
  .notice-download { padding: 0.4rem 0.6rem; font-size: 0.9rem; }
}

body.dark .member-name { color: #e6eef6 !important; }
body.dark .member-role, body.dark .member-interests, body.dark .member-email { color: #cbdff0 !important; }
body.dark .social-link { color: #ffd54d !important; }

.container {
            text-align: center;
            padding: 20px;
            max-width: 600px;
            width: 90%;
            background: white;
            border-radius: 15px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.1); /* Subtle shadow for depth */
        }

        /* Image Styling */
        .construction-img {
            width: 100%; /* Responsive width */
            max-width: 400px; /* Maximum size so it doesn't get huge */
            height: auto; /* Maintain aspect ratio */
            margin-bottom: 20px;
        }

/* ===== Projects Page Styles ===== */
.projects-container {
  display: grid;
  gap: 2.5rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem;
}

/* Search Bar Styling */
.search-bar-container {
  position: relative;
  max-width: 500px;
  margin: 1.5rem auto 2rem;
  display: flex;
  align-items: center;
}

.project-search-input {
  width: 100%;
  padding: 0.9rem 1rem 0.9rem 2.5rem;
  font-size: 0.95rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background: #ffffff;
  color: #333;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.project-search-input:focus {
  outline: none;
  border-color: #032c8a;
  box-shadow: 0 4px 12px rgba(3, 44, 138, 0.15);
}

.project-search-input::placeholder {
  color: #999;
}

body.dark .project-search-input {
  background: #2a2a2a;
  border-color: #444;
  color: #e0e0e0;
}

body.dark .project-search-input:focus {
  border-color: #ffd54d;
  box-shadow: 0 4px 12px rgba(255, 213, 77, 0.2);
}

body.dark .project-search-input::placeholder {
  color: #666;
}

.search-icon {
  position: absolute;
  left: 0.8rem;
  font-size: 1.1rem;
  pointer-events: none;
  color: #999;
}

body.dark .search-icon {
  color: #666;
}

.search-results-info {
  text-align: center;
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1.5rem;
  padding: 0.7rem 1rem;
  background: #f0f4ff;
  border-radius: 6px;
  border-left: 4px solid #032c8a;
}

body.dark .search-results-info {
  background: rgba(255, 213, 77, 0.1);
  color: #ffd54d;
  border-left-color: #ffd54d;
}

.project-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  padding: 2rem;
  border-left: 5px solid #ffffff;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.project-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

body.dark .project-card {
  background: #1e1e1e;
  border-left-color: #1e1e1e;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

body.dark .project-card:hover {
  box-shadow: 0 8px 20px rgba(255, 213, 77, 0.2);
}

.project-header {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.project-date {
  margin: 0;
  font-size: 0.85rem;
  color: #032c8a;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

body.dark .project-date {
  color: #ffd54d;
}

.project-download-btn {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #024a62;
  background: #fefefe;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin: 0;
}

.project-download-btn:hover {
  background: #d7ff6a;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(3, 44, 138, 0.25);
}

.project-download-btn:active {
  transform: translateY(0);
}

body.dark .project-download-btn {
  background: #000000;
  color: #e1ff00;
}

body.dark .project-download-btn:hover {
  background: #4f3b00;
  box-shadow: 0 4px 8px rgba(255, 213, 77, 0.3);
}

.project-header h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.6rem;
  color: #032c8a;
  line-height: 1.3;
}

body.dark .project-header h2 {
  color: #ffd54d;
}

.project-metadata {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.project-authors {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  font-style: italic;
  color: #b90a0a;
  letter-spacing: 0.3px;
  line-height: 1.5;
}

body.dark .project-authors {
  color: #ff6b6b;
}

.author-index {
  font-size: 0.7rem;
  font-weight: 700;
  color: #032c8a;
  vertical-align: super;
  margin: 0 2px;
}

body.dark .author-index {
  color: #ffd54d;
}

.project-affiliations {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.project-affiliation {
  margin: 0;
  font-size: 0.85rem;
  color: #666;
  line-height: 1.4;
}

body.dark .project-affiliation {
  color: #b3b3b3;
}

.affiliation-index {
  font-size: 0.7rem;
  font-weight: 700;
  color: #032c8a;
  vertical-align: super;
  margin-right: 3px;
}

body.dark .affiliation-index {
  color: #ffd54d;
}

.corresponding-author {
  margin: 0.05rem 0 0 0;
  font-size: 0.85rem;
  color: #666;
  font-style: italic;
}

body.dark .corresponding-author {
  color: #b3b3b3;
}

.corresponding-author a {
  color: #032c8a;
  text-decoration: none;
  font-weight: 600;
  word-break: break-all;
}

.corresponding-author a:hover {
  text-decoration: underline;
  color: #0244c9;
}

body.dark .corresponding-author a {
  color: #ffd54d;
}

body.dark .corresponding-author a:hover {
  color: #ffe082;
}

.project-body {
  line-height: 1.7;
  color: #333;
  margin-bottom: 1.5rem;
}

body.dark .project-body {
  color: #e0e0e0;
}

.project-body p {
  margin: 1rem 0;
  text-align: justify;
}

.project-body p:first-child {
  margin-top: 0;
}

.project-body p:last-child {
  margin-bottom: 0;
}

/* MathJax equation styling */
.project-body .MathJax {
  font-size: 1.05em;
}

.project-images {
  margin: 2rem 0;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.project-figure {
  margin: 0;
  background: #f9f9f9;
  border-radius: 8px;
  overflow: hidden;
}

body.dark .project-figure {
  background: #2a2a2a;
}

.project-figure img {
  width: 100%;
  height: auto;
  display: block;
}

.project-figure figcaption {
  padding: 1rem;
  font-size: 0.95rem;
  color: #666;
  font-style: italic;
  border-top: 1px solid #e0e0e0;
  text-align: center;
}

body.dark .project-figure figcaption {
  color: #aaa;
  border-top-color: #444;
}

.project-footer {
  display: flex;
  justify-content: flex-start;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e0e0e0;
}

body.dark .project-footer {
  border-top-color: #444;
}

.more-details-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  background: #032c8a;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.more-details-link:hover {
  background: #0244c9;
  transform: translateX(4px);
}

body.dark .more-details-link {
  background: #322701;
  color: #1a1a1a;
}

body.dark .more-details-link:hover {
  background: #03852e;
}

@media (max-width: 768px) {
  .projects-container {
    gap: 1.5rem;
  }
  
  .project-card {
    padding: 1.5rem;
  }
  
  .project-header h2 {
    font-size: 1.35rem;
  }
  
  .project-images {
    grid-template-columns: 1fr;
  }
  
  .project-metadata {
    font-size: 0.9rem;
  }
  
  .search-bar-container {
    margin: 1rem 0.5rem 1.5rem;
  }
  
  .project-search-input {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 0.8rem 0.8rem 0.8rem 2.3rem;
  }
  
  .search-results-info {
    font-size: 0.85rem;
    margin: 1rem 0.5rem 1.5rem;
  }
}



