html, body {
  min-height: 100vh !important;
  width: 100%;
  margin: 0;
  padding: 0;
  background-image: url('Nisargamitra Website bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: scroll; /* or fixed on desktop */
  font-family: Arial, sans-serif;
}

/* Mobile fix */
@media (max-width: 600px) {
  html, body {
    background-attachment: scroll;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }
}

/* --- Begin 5thscience.css Navbar Effects --- */
.navbar {
  background-color: #f1f7d1;
  border: 1px solid #cfcfcf;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  position: relative;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.left-section {
  display: flex;
  align-items: center;
  gap: 10px;
}
.site-logo {
  height: 45px;
  width: auto;
  transition: transform 0.3s ease;
}
.site-logo:hover {
  transform: scale(1.05);
}
.side-logo {
  height: 40px;
  width: auto;
  margin-left: 10px;
  transition: transform 0.3s ease;
}
.side-logo:hover {
  transform: scale(1.05);
}
.nav-links {
  display: flex;
  gap: 20px;
  font-weight: bold;
  color: #1e4c0d;
  align-items: center;
  flex-wrap: wrap;
}
.nav-links a {
  text-decoration: none;
  color: #1e4c0d;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 8px 12px;
  border-radius: 6px;
}
.nav-links a:hover {
  background: #e6f7c1;
  color: #7a1b1b;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(30,76,13,0.15);
}
.right-section {
  display: flex;
  align-items: center;
  gap: 15px;
}
.register-btn {
  background-color: #4caf50;
  color: white;
  padding: 10px 24px;
  font-size: 1.1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.register-btn:hover {
  background-color: #45a049;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.register-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.dropdown {
  position: relative;
}
.dropbtn {
  background: none;
  border: none;
  font-weight: bold;
  color: #1e4c0d;
  cursor: pointer;
  font-size: 14px;
  padding: 8px 12px;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  border-radius: 6px;
}
.dropbtn:hover {
  background: #e6f7c1;
  color: #7a1b1b;
  transform: translateY(-2px);
}
.dropdown-content {
  display: none;
  position: absolute;
  background-color: #ffffff;
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
  border: 1px solid #ccc;
  min-width: 180px;
  z-index: 10000;
  top: 40px;
  left: 0;
  border-radius: 8px;
  animation: dropdownFadeIn 0.3s ease;
}
@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.dropdown.open .dropdown-content {
  display: block;
}
.dropdown-content a {
  display: block;
  padding: 12px 16px;
  color: #1e4c0d;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.2s ease;
  border-radius: 0;
}
.dropdown-content a:first-child {
  border-radius: 8px 8px 0 0;
}
.dropdown-content a:last-child {
  border-radius: 0 0 8px 8px;
}
.dropdown-content a:not(:last-child) {
  border-bottom: 1px solid #e0e0e0;
}
.dropdown-content a:hover {
  background-color: #e6f7c1;
  color: #7a1b1b;
  transform: translateX(4px);
}
.hamburger {
  display: none;
  font-size: 24px;
  cursor: pointer;
  margin-left: auto;
  transition: transform 0.3s ease;
}
.hamburger:hover {
  transform: scale(1.1);
}
.menu-toggle {
  display: none;
}
@media (max-width: 768px) {
  .navbar {
    padding: 8px 16px;
  }
  .hamburger {
    display: block;
  }
  .nav-links,
  .right-section {
    width: 100%;
    flex-direction: column;
    display: none;
    gap: 8px;
    margin-top: 8px;
  }
  .menu-toggle:checked ~ .nav-links,
  .menu-toggle:checked ~ .right-section {
    display: flex;
  }
  .navbar {
    align-items: flex-start;
  }
  .nav-links {
    align-items: flex-start;
  }
  .right-section {
    align-items: flex-start;
  }
  .dropdown-content {
    position: static;
    box-shadow: none;
    border: none;
    background: #f1f7d1;
    padding-left: 20px;
    display: none;
    border-radius: 0;
  }
}
/* Enhanced hover effects for all interactive elements */
button:hover, .register-btn:hover, .dropbtn:hover, .nav-links a:hover, .dropdown-content a:hover {
  background: #e6f7c1;
  color: #7a1b1b;
  box-shadow: 0 4px 12px rgba(30,76,13,0.15);
  transform: translateY(-2px) scale(1.02);
}
button:active, .register-btn:active, .dropbtn:active, .nav-links a:active, .dropdown-content a:active {
  background: #d1e7a7;
  color: #7a1b1b;
  transform: scale(0.98);
}
button:focus, .register-btn:focus, .dropbtn:focus, .nav-links a:focus, .dropdown-content a:focus {
  outline: 2px solid #1e4c0d;
  outline-offset: 2px;
}
/* --- End 5thscience.css Navbar Effects --- */

.background-wrapper {
  background: url("Nisargamitra\ Website\ bg.jpg") no-repeat center top;
  background-size: cover;
  background-attachment: fixed;
}


/* Background section */
.background-section {
  background: url('your-background.jpg') no-repeat center center;
  background-size: cover;
  padding: 40px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Foreground image (on top of background) */

/* Responsive */
@media (max-width: 768px) {
  .foreground-image {
    max-width: 90%;
  }
}

@media (max-width: 480px) {
  .foreground-image {
    max-width: 100%;
  }
}


@media (max-width: 768px) {

  .register-btn {
    padding: 8px 16px;
    font-size: 0.95rem;
  }
}

.card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10), 0 1.5px 6px rgba(0,0,0,0.08);
  padding: 24px 18px 18px 18px;
  margin: 18px;
  width: 320px;
  max-width: 90vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.18s cubic-bezier(.4,2,.6,1), box-shadow 0.18s cubic-bezier(.4,2,.6,1), background 0.18s;
  cursor: pointer;
  height: 500px; /* Fixed height for all cards */
  min-height: 500px; /* Ensure minimum height */
  box-sizing: border-box;
}

.card:hover, .card:focus {
  transform: scale(1.035);
  box-shadow: 0 6px 24px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.10);
  background: #f7faff;
  z-index: 2;
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 14px;
}

.card h3 {
  font-size: 1.2rem;
  margin: 10px 0 10px 0;
  text-align: center;
  color: #1a3a4a;
}

.author {
  text-align: center;
  display: block;
  margin: 0 auto 6px auto;
  width: 100%;
  word-break: break-word;
  color: #3a3a3a;
  font-weight: 500;
  font-size: 1rem;
  margin-top: 0;
}

.prize {
  background: #e3f6e8;
  color: #1a7f37;
  border-radius: 8px;
  padding: 4px 12px;
  margin: 6px 0 12px 0;
  font-weight: 600;
  font-size: 0.98rem;
  display: inline-block;
}

.view-more-btn {
  background: linear-gradient(90deg, #1a7f37 0%, #3bb78f 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 22px;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 10px;
  margin-bottom: 0;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  transition: background 0.18s, transform 0.18s;
}

.view-more-btn:hover, .view-more-btn:focus {
  background: linear-gradient(90deg, #3bb78f 0%, #1a7f37 100%);
  transform: scale(1.07);
}

.card .description {
  margin-top: 12px;
  font-size: 0.98rem;
  color: #444;
  text-align: center;
}

.card-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-bottom: 32px;
}

@media (max-width: 600px) {
  body {
    overflow-x: hidden;
  }
  .card-image-slider {
    height: 110px;
    min-height: 80px;
    max-height: 140px;
  }
  .card h3 {
    font-size: 1rem;
  }
  .author {
    font-size: 0.92rem;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    text-align: center;
    width: 100%;
    display: block;
  }
  .prize {
    font-size: 0.92rem;
    padding: 3px 10px;
  }
  .view-more-btn {
    font-size: 0.98rem;
    padding: 7px 16px;
  }
  .main-project-heading {
    font-size: 1.3rem;
    margin-top: 12px;
    margin-bottom: 10px;
    padding: 0 4px;
    letter-spacing: 0.5px;
  }
  .group-heading {
    font-size: 1.1rem;
    margin: 16px 0 8px 0;
    padding: 0 4px;
    letter-spacing: 0.2px;
  }
}

@media (max-width: 900px) {
  .card-container {
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 0 8px;
  }
  .card {
    width: 100%;
    max-width: 400px;
    height: 480px; /* Medium height for tablets */
    min-height: 480px;
  }
}

@media (max-width: 500px) {
  .card {
    width: 100%;
    max-width: 98vw;
    padding: 0 0 16px 0;
  }
  .modal-content {
    max-width: 98vw;
    padding: 12px 4vw 8px 4vw;
  }
}

.modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 1000;
  left: 0; top: 0; width: 100vw; height: 100vh;
  overflow: auto;
  background: rgba(44, 36, 36, 0.7);
}

.modal-content {
  max-width: 500px;
  width: 95vw;
  max-height: 95vh;
  padding: 24px 24px 16px 24px;
  border-radius: 16px;
  background: #fff !important;
  margin: 40px auto;
  position: relative;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden; /* Prevent scrollbars */
}

.close-btn {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 2rem;
  color: #888;
  cursor: pointer;
  font-weight: bold;
  transition: color 0.2s;
}

.group-heading {
  text-align: center;
  font-size: 2.2rem;
  font-weight: bold;
  margin: 32px 0 16px 0;
  color: #00695c;
  letter-spacing: 1px;
}

.card .view-more-btn {
  margin-top: auto;
  margin-bottom: 0;
  align-self: center;
}

.card-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.prize {
  margin-top: 12px;
  margin-bottom: 0;
}

.main-project-heading {
  text-align: center;
  font-size: 2.4rem;
  font-weight: 800;
  color: #1a7f37;
  margin-top: 36px;
  margin-bottom: 28px;
  letter-spacing: 1.5px;
  transition: color 0.2s, transform 0.2s;
  cursor: pointer;
  user-select: none;
}

.main-project-heading:hover, .main-project-heading:focus {
  color: #3bb78f;
  transform: scale(1.04) rotate(-1deg);
  text-shadow: 0 2px 12px rgba(59,183,143,0.10);
}

#modal-author, .modal-content p {
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: pre-line; /* preserves line breaks if you add them in JS */
  max-width: 100%;
}

.card-image-slider {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-image-slider img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  position: absolute;
  left: 0; top: 0;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1;
  background: #fff;
}

.card-image-slider img.active {
  opacity: 1;
  z-index: 2;
}

.slider-prev, .slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(30, 76, 13, 0.7);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 3;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.slider-prev { left: 8px; }
.slider-next { right: 8px; }

.slider-prev:hover, .slider-next:hover {
  opacity: 1;
  background: rgba(30, 76, 13, 0.8);
  color: #fff;
  transform: translateY(-50%);
  box-shadow: none;
}

.slider-prev:active, .slider-next:active {
  background: rgba(30, 76, 13, 0.9);
  color: #fff;
  transform: translateY(-50%);
  box-shadow: none;
}

.slider-prev:focus, .slider-next:focus {
  background: rgba(30, 76, 13, 0.8);
  color: #fff;
  transform: translateY(-50%);
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
  box-shadow: none;
}

/* Image Gallery Modal */
#image-gallery-modal .slider-prev,
#image-gallery-modal .slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(30, 76, 13, 0.7);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 3;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}
#image-gallery-modal .slider-prev { left: 16px; }
#image-gallery-modal .slider-next { right: 16px; }
#image-gallery-modal .slider-prev:hover,
#image-gallery-modal .slider-next:hover { 
  opacity: 1; 
  background: rgba(30, 76, 13, 0.8);
  color: #fff;
  transform: translateY(-50%);
  box-shadow: none;
}
#image-gallery-modal .slider-prev:active,
#image-gallery-modal .slider-next:active {
  background: rgba(30, 76, 13, 0.9);
  color: #fff;
  transform: translateY(-50%);
  box-shadow: none;
}
#image-gallery-modal .slider-prev:focus,
#image-gallery-modal .slider-next:focus {
  background: rgba(30, 76, 13, 0.8);
  color: #fff;
  transform: translateY(-50%);
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
  box-shadow: none;
}

@media (max-width: 600px) {
  .card-image-slider {
    height: 140px;
    min-height: 100px;
    max-height: 180px;
  }
  .card-image-slider img {
    height: 100%;
    width: 100%;
    object-fit: contain;
    position: absolute;
    left: 0;
    top: 0;
    border-radius: 12px;
    background: #fff;
    margin-top: 10px;
  }
  
  /* Mobile-specific slider button fixes */
  .slider-prev, .slider-next {
    background: rgba(30, 76, 13, 0.7) !important;
    color: #fff !important;
    transform: translateY(-50%) !important;
    box-shadow: none !important;
  }
  
  .slider-prev:hover, .slider-next:hover {
    background: rgba(30, 76, 13, 0.8) !important;
    color: #fff !important;
    transform: translateY(-50%) !important;
    box-shadow: none !important;
  }
  
  .slider-prev:active, .slider-next:active {
    background: rgba(30, 76, 13, 0.9) !important;
    color: #fff !important;
    transform: translateY(-50%) !important;
    box-shadow: none !important;
  }
  
  .slider-prev:focus, .slider-next:focus {
    background: rgba(30, 76, 13, 0.8) !important;
    color: #fff !important;
    transform: translateY(-50%) !important;
    outline: 2px solid rgba(255, 255, 255, 0.5) !important;
    outline-offset: 2px !important;
    box-shadow: none !important;
  }
}

@media (max-width: 600px) {
  .main-project-heading {
    font-size: 1.05rem;
    margin-top: 12px;
    margin-bottom: 10px;
    padding: 0 2px;
    letter-spacing: 0.1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .group-heading {
    font-size: 0.92rem;
    margin: 12px 0 6px 0;
    padding: 0 2px;
    letter-spacing: 0.1px;
  }
  
  /* Mobile-specific gallery modal slider button fixes */
  #image-gallery-modal .slider-prev,
  #image-gallery-modal .slider-next {
    background: rgba(30, 76, 13, 0.7) !important;
    color: #fff !important;
    transform: translateY(-50%) !important;
    box-shadow: none !important;
  }
  
  #image-gallery-modal .slider-prev:hover,
  #image-gallery-modal .slider-next:hover {
    background: rgba(30, 76, 13, 0.8) !important;
    color: #fff !important;
    transform: translateY(-50%) !important;
    box-shadow: none !important;
  }
  
  #image-gallery-modal .slider-prev:active,
  #image-gallery-modal .slider-next:active {
    background: rgba(30, 76, 13, 0.9) !important;
    color: #fff !important;
    transform: translateY(-50%) !important;
    box-shadow: none !important;
  }
  
  #image-gallery-modal .slider-prev:focus,
  #image-gallery-modal .slider-next:focus {
    background: rgba(30, 76, 13, 0.8) !important;
    color: #fff !important;
    transform: translateY(-50%) !important;
    outline: 2px solid rgba(255, 255, 255, 0.5) !important;
    outline-offset: 2px !important;
    box-shadow: none !important;
  }
}

@media (max-width: 600px) {
  .card-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
  }
  .card {
    width: 300px;
    max-width: 100%;
    margin: 10px 0;
    padding: 24px 18px 18px 18px;
    box-sizing: border-box;
    height: 450px; /* Slightly smaller height for mobile */
    min-height: 450px;
  }
  .card-image-slider {
    height: 140px;
    min-height: 100px;
    max-height: 180px;
  }
  .main-project-heading {
    font-size: 1.05rem;
    margin-top: 12px;
    margin-bottom: 10px;
    padding: 0 2px;
    letter-spacing: 0.1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .group-heading {
    font-size: 0.92rem;
    margin: 12px 0 6px 0;
    padding: 0 2px;
    letter-spacing: 0.1px;
  }
  .card h3 {
    font-size: 1rem;
  }
  .author  {
    font-size: 0.92rem;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    text-align: center;
    width: 100%;
    display: block;
  }
  .prize {
    font-size: 0.92rem;
    padding: 3px 10px;
  }
  .view-more-btn {
    font-size: 0.98rem;
    padding: 7px 16px;
  }
}

/* For desktop/big screens */
.view-more-btn {
  margin-top: 18px;
}

/* For mobile (already present, but make sure it's there) */
@media (max-width: 600px) {
  .view-more-btn {
    margin-top: 10px;
  }
}

.prize {
  margin-bottom: 10px; /* or adjust as needed */
}

/* Only limit modal image height, revert modal-content and text styles to previous */
#modal-img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin-bottom: 16px;
  display: block;
  object-fit: contain;
  background: #fff;
}

#modal-title {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

#modal-desc, #modal-author {
  font-size: 0.98rem;
  margin-bottom: 6px;
  word-break: break-word;
}

@media (max-width: 500px) {
  .modal-content {
    max-width: 98vw;
    padding: 8px 2vw 6px 2vw;
  }
  #modal-img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 16px;
    display: none;
  }
}

#gallery-modal-img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 16px;
  display: block;
}

/* --- CHATBOT LABEL STYLING --- */
.chat-label {
  position: fixed;
  bottom: 35px;
  right: 90px;
  background-color: #1e4c0d;
  color: white;
  padding: 8px 16px;
  border-radius: 20px 20px 0px 20px;
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 9999;
  pointer-events: none;
  white-space: nowrap;
}


