/* === Global Reset === */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background-color: #f8f9fb;
  color: #222;
  scroll-behavior: smooth;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 3rem;
  background: linear-gradient(90deg, white, #d3e4ff);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#logo img {
  height: 80px;
  width: auto;
  transition: transform 0.3s ease;
}

#logo img:hover {
  transform: scale(1.1);
}

.header h2 {
  flex: 1;
  text-align: center;
  font-size: 25px;
  color: blue;
  font-family: "Tektur", sans-serif;
  font-weight: 500;
  letter-spacing: 1px;
}

/* === Navigation Links === */
.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  text-decoration: none;
  color: blue;
  font-weight: bold;
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover {
  color: red;
  border-bottom: 2px solid rgb(160, 0, 0);
  transform: scale(1.1);
}


@media (max-width: 768px) {
  .header {
    flex-direction: column;
    padding: 1rem 1.5rem;
    text-align: center;
  }

  .header h2 {
    margin-top: 0.5rem;
    font-size: 1.1rem;
  }

  .nav-links {
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
  }
}
.image-slider {
  position: relative;
  width: 100%;
  max-width: 1300px;
  height: 700px;
  margin: 3rem auto;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.image-slider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slide {
  position: absolute;
  inset: 0;              /* top/right/bottom/left: 0 */
  opacity: 0;
  will-change: opacity, transform;
  animation-name: fadeSequence;
  animation-duration: 95s;        /* 19 slides × 5s each = 95s loop */
  animation-timing-function: cubic-bezier(.4,0,.2,1); /* smooth */
  animation-iteration-count: infinite;
  animation-fill-mode: both;      /* keeps the end state between iterations */
}

@keyframes fadeSequence {
  /* 1s fade-in  =>  (1/95)*100 = 1.0526% */
  0%      { opacity: 0; transform: scale(1); }
  1.0526% { opacity: 1; transform: scale(1.02); }  /* fade in + subtle zoom */
  /* visible until 4s => (4/95)*100 = 4.2105% */
  4.2105% { opacity: 1; transform: scale(1.03); }  /* hold with slow zoom */
  /* 5s mark fade-out => (5/95)*100 = 5.2632% */
  5.2632% { opacity: 0; transform: scale(1.04); }
  /* rest of the animation cycle remains hidden until the next cycle */
  100%    { opacity: 0; transform: scale(1.04); }
}

/* Assign delays for each image to play one after another */
.slide:nth-child(1) { animation-delay: 0s; }
.slide:nth-child(2) { animation-delay: 5s; }
.slide:nth-child(3) { animation-delay: 10s; }
.slide:nth-child(4) { animation-delay: 15s; }
.slide:nth-child(5) { animation-delay: 20s; }
.slide:nth-child(6) { animation-delay: 25s; }
.slide:nth-child(7) { animation-delay: 30s; }
.slide:nth-child(8) { animation-delay: 35s; }
.slide:nth-child(9) { animation-delay: 40s; }
.slide:nth-child(10) { animation-delay: 45s; }
.slide:nth-child(11) { animation-delay: 50s; }
.slide:nth-child(12) { animation-delay: 55s; }
.slide:nth-child(13) { animation-delay: 60s; }
.slide:nth-child(14) { animation-delay: 65s; }
.slide:nth-child(15) { animation-delay: 70s; }
.slide:nth-child(16) { animation-delay: 75s; }
.slide:nth-child(17) { animation-delay: 80s; }


#Message {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 3rem;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, #6de978, #e0f7fa);
  border-radius: 15px;
  margin: 4rem auto;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

#Text_Msg {
  flex: 1;
  text-align: left;
}

#Text_Msg h1 {
  font-size: 2rem;
  color: #00695c;
  margin-bottom: 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

#Text_Msg p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #333;
}

#Lab_Incharge {
  flex: 0.8;
  text-align: center;
}

#Lab_Incharge img {
  width: 300px;
  height: 300px;
  object-fit: cover;
  border-radius: 50%;
  border: 5px solid #00bfa5;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

#Lab_Incharge img:hover {
  transform: scale(1.05);
}

#Lab_Incharge h2 {
  margin-top: 1rem;
  color: #004d40;
  font-size: 1.4rem;
  font-weight: 600;
}

#Lab_Incharge p {
  font-size: 1rem;
  color: #00695c;
  margin-top: 0.3rem;
}

@media (max-width: 900px) {
  #Message {
    flex-direction: column;
    text-align: center;
    padding: 3rem 1.5rem;
  }

  #Text_Msg h1 {
    font-size: 1.8rem;
  }

  #Text_Msg p {
    font-size: 1rem;
  }

  #Lab_Incharge img {
    width: 180px;
    height: 180px;
  }
}
/* === About Section Layout === */
/* === About Section Layout === */
#About {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  padding: 4rem 8%;
  background: #f8f9fa;
  flex-wrap: wrap;
}

.About_Txt {
  flex: 1;
  max-width: 600px;
}

.About_Txt h1 {
  font-size: 2.5rem;
  color: #333;
  margin-bottom: 1rem;
}

.About_Txt p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #555;
}

/* === About Image Slideshow === */
.About_Img {
  flex: 1;
  display: flex;
  justify-content: center;
}

.about-slideshow {
  position: relative;
  width: 100%;
  max-width: 550px;
  height: 350px;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  background: #000;
}

/* Each slide stacked & animated */
.about-slideshow .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: aboutFade 95s infinite;
  animation-timing-function: ease-in-out;
}

.about-slideshow img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
}

/* Smooth fade animation */
@keyframes aboutFade {
  0% { opacity: 0; }
  5% { opacity: 1; }
  20% { opacity: 1; }
  25% { opacity: 0; }
  100% { opacity: 0; }
}

/* 19 images × 5s each = 95s total loop */
.about-slideshow .slide:nth-child(1) { animation-delay: 0s; }
.about-slideshow .slide:nth-child(2) { animation-delay: 5s; }
.about-slideshow .slide:nth-child(3) { animation-delay: 10s; }
.about-slideshow .slide:nth-child(4) { animation-delay: 15s; }
.about-slideshow .slide:nth-child(5) { animation-delay: 20s; }
.about-slideshow .slide:nth-child(6) { animation-delay: 25s; }
.about-slideshow .slide:nth-child(7) { animation-delay: 30s; }
.about-slideshow .slide:nth-child(8) { animation-delay: 35s; }
.about-slideshow .slide:nth-child(9) { animation-delay: 40s; }
.about-slideshow .slide:nth-child(10) { animation-delay: 45s; }
.about-slideshow .slide:nth-child(11) { animation-delay: 50s; }
.about-slideshow .slide:nth-child(12) { animation-delay: 55s; }
.about-slideshow .slide:nth-child(13) { animation-delay: 60s; }
.about-slideshow .slide:nth-child(14) { animation-delay: 65s; }
.about-slideshow .slide:nth-child(15) { animation-delay: 70s; }
.about-slideshow .slide:nth-child(16) { animation-delay: 75s; }
.about-slideshow .slide:nth-child(17) { animation-delay: 80s; }
.about-slideshow .slide:nth-child(18) { animation-delay: 85s; }
.about-slideshow .slide:nth-child(19) { animation-delay: 90s; }

/* === Responsive Fix === */
@media (max-width: 900px) {
  #About {
    flex-direction: column;
    text-align: center;
  }
  .About_Img {
    order: -1;
  }
  .about-slideshow {
    max-width: 100%;
    height: 300px;
  }
}


#Contact_1 {
  background: linear-gradient(180deg, #f8f9fa, rgb(129, 250, 169));
  padding: 5rem 8%;
  text-align: center;
}

/* === Contact Section (No Form) === */
#Contact {
  background: linear-gradient(180deg, #f0f4f8, rgb(129, 250, 169));
  padding: 5rem 8%;
  text-align: center;
}

/* === Contact Section Styling === */
.contact-container {
  text-align: center;
  background: #f8f9fa;
  padding: 5rem 8%;
  max-width: 900px;
  margin: 0 auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.contact-container h1 {
  font-size: 2.4rem;
  color: #222;
  margin-bottom: 1rem;
}

.contact-container p {
  color: #555;
  font-size: 1.1rem;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.contact-details {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.contact-item {
  background: white;
  padding: 1.5rem 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  flex: 1 1 300px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.contact-item h3 {
  color: #1b6ca8;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.contact-item p {
  margin: 0;
}

.contact-item a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.contact-item a:hover {
  color: #1b6ca8;
  text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .contact-details {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .contact-item {
    width: 100%;
    max-width: 400px;
  }
}

/* === Publications Section === */
#Publications {
  padding: 5rem 8%;
  background: #f0f4f8;
  text-align: center;
}

.pub-container {
  max-width: 1200px;
  margin: 0 auto;
}

#Publications h1 {
  font-size: 2.5rem;
  color: #222;
  margin-bottom: 1rem;
}

#Publications p {
  color: #555;
  font-size: 1.1rem;
  margin-bottom: 3rem;
  line-height: 1.6;
}

/* === Grid Layout for Cards === */
.pub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

/* === Individual Publication Card === */
.pub-card {
  background: white;
  padding: 1.8rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

.pub-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.pub-card h3 {
  font-size: 1.4rem;
  color: #1b6ca8;
  text-align: center;
  margin-bottom: 0.7rem;
}

.pub-card p {
  text-align: center;
  font-size: 0.95rem;
  color: #333;
  margin-bottom: 0.5rem;
}

.pub-card a {
  display: inline-block;   /* allows text-align or margin auto */
  text-align: center;      /* centers text inside the link */
  margin: 1rem auto 0;     /* top margin for spacing, auto horizontal centers it */
  color: #0004ff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.pub-card a:hover {
  color: #15547d;
  text-decoration: underline;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  #Publications {
    padding: 3rem 5%;
  }

  .pub-card h3 {
    font-size: 1.2rem;
  }
}
