/* Hero Section Background */
.hero-section {
  background: radial-gradient(1200px 700px at 10% 20%, rgba(6, 18, 40, 0.16), transparent 8%),
     radial-gradient(1000px 500px at 95% 60%, rgba(0, 178, 255, 0.06), transparent 10%),
     linear-gradient(180deg, #030416 0%, #070819 40%, #020212 100%);
   padding: 90px 0;
   color: #fff;
   font-family: "Manrope", sans-serif;
 }
 .pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f97316, #ef4444);
}
.process-pill {
    border-radius: 999px;
    background: #ffffff;
    color: #000000;
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    font-weight: 600;
}
 
 /* Left Tag */
.hero-tag {
    display: inline-block;
    padding: 6px 22px;
    border-radius: 25px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid rgba(255,255,255,0.12);
    color: #000000;
    letter-spacing: .07em;
    margin-bottom: 22px;
    background: #fff;
}
 
 /* Heading */
 .hero-heading {
   font-size: 3.8rem;
   font-weight: 500;
   line-height: 1.05;
   max-width: 650px;
 }
 
 .highlight {
   background: linear-gradient(90deg, #a45af5, #ff6a4a);
   -webkit-background-clip: text;
   background-clip: text;
   color: transparent;
 }
 
 /* Description */
 .hero-desc {
   max-width: 550px;
   color: #d8d3e6;
   font-size: 1.05rem;
   margin-top: 18px;
 }
 
 /* CTA Button */
 .btn-hero {
   background: #fff;
   border: none;
   padding: 12px 26px;
   border-radius: 12px;
   color: #2b0b3b;
   font-weight: 700;
   margin-top: 28px;
   transition: 0.25s;
 }
 
 .btn-hero:hover {
   background: #f1e9ff;
 }

 .btn-hero-dark {
  background: #000;
  border: none;
  padding: 12px 26px;
  border-radius: 12px !important;
  color: #fff;
  font-weight: 700;
  margin-top: 28px;
  transition: 0.25s !important;
}

 .btn-hero-dark:hover {
  background: #000 !important;
  color: #fff !important;
}
 
 /* Right Collage Wrapper */
 .hero-collage {
   background: rgba(255,255,255,0.06);
   padding: 16px;
   border-radius: 22px;
 }
 
 /* Top grid */
 .collage-top {
   display: flex;
   gap: 16px;
 }
 
 .img-box {
   flex: 1;
   height: 193px;
   border-radius: 16px;
   overflow: hidden;
 }
 
 /* Bottom image */
 .collage-bottom {
   margin-top: 16px;
   height: 290px;
   border-radius: 16px;
   overflow: hidden;
   width: 100%;
 }

 .collage-bottom img {
  object-fit: revert-layer;
 }
 
 /* Image styling */
 .hero-collage img {
   width: 100%;
   height: 100%;
   object-fit: cover;
 }
 
 /* Responsive */
 @media (max-width: 991px) {
   .hero-heading {
     font-size: 2.7rem;
   }
   .img-box {
     height: 130px;
   }
   .collage-bottom {
     height: 180px;
   }
 }
 /*******/
 .flow-section {
   background: #ecf0f7;
   /* Isolate rendering to improve performance */
   contain: layout style paint;
 }
 
.flow-wrapper {
  height: 700px;
  min-height: 700px;
  display: flex;
  align-items: center;
  /* Create a new stacking context and enable GPU acceleration */
  transform: translateZ(0);
  will-change: scroll-position;
}
 
 .flow-left {
   display: flex;
   flex-direction: column;
   justify-content: space-between;
   position: relative;
   z-index: 2;
   width: 25%;
   height: 100%;
   padding: 20px 0;
   /* GPU acceleration */
   transform: translateZ(0);
 }
 
 .flow-item {
   width: 100%;
   text-align: center;
   margin-bottom: 20px;
   /* Optimize rendering */
   backface-visibility: hidden;
   transform: translateZ(0);
 }
 
 .flow-item:last-child {
   margin-bottom: 0;
 }
 
 .flow-item h6 {
   font-weight: 600;
   margin-bottom: 12px;
   color: #000
 }
 
 .flow-item img {
   width: 100%;
   border-radius: 12px;
   height: 120px;
   object-fit: cover;
   box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;
   /* Optimize image rendering */
   image-rendering: -webkit-optimize-contrast;
   image-rendering: crisp-edges;
   transform: translateZ(0);
   will-change: transform;
   transition: transform 0.3s ease, filter 0.3s ease;
 }

/* Image popup wrapper for hover effect */
.img-popup-wrapper {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
}

.img-popup-wrapper:hover .img-popup {
  transform: scale(1.05);
  filter: blur(3px);
}

/* Overlay with blurred black background */
.img-popup-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  border-radius: 12px;
  padding: 15px;
  box-sizing: border-box;
}

.img-popup-wrapper:hover .img-popup-overlay {
  opacity: 1;
  visibility: visible;
}

.img-popup-overlay p {
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  line-height: 1.5;
  margin: 0;
  transform: translateY(10px);
  transition: transform 0.3s ease 0.1s;
}

.img-popup-wrapper:hover .img-popup-overlay p {
  transform: translateY(0);
}
 
/* Right box (GIF) */
.flow-right {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%) translateZ(0);
  width: 62%;
  height: 60%;
  z-index: 2;
  /* GPU acceleration */
  backface-visibility: hidden;
  will-change: transform;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
h6.kepler-mittxt {
    color: #000;
    max-width: 580px;
}

p.kepler-mittxt {
  color: black;
  font-size: 25px;
  font-weight: 500;
  text-align: center;
}

/* Typing animation for kepler-mittxt */
p.kepler-mittxt.typing-text {
  white-space: pre-wrap;
  margin-top:10px;
}

p.kepler-mittxt.typing-text.typing {
  white-space: pre-wrap;
}

p.kepler-mittxt.typing-text.typing::after {
  content: '';
  display: inline-block;
  width: 3px;
  height: 1.2em;
  margin-left: 4px;
  background: currentColor;
  vertical-align: text-bottom;
  animation: typing-blink-kepler 1s steps(1) infinite;
}

@keyframes typing-blink-kepler {
  50% { opacity: 0; }
}

.float-text-right {
    position: absolute;
    top: -165px;
    z-index: 9999;
}

.flow-right-content {
  background: #ffffff;
  border-radius: 12px;
  padding: 5px;
  box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  max-width: 900px;
  position: relative;
margin-top: 180px;
  z-index: 3;
}

/* Removed single connection point - now using multiple SVG connection points */

.flow-right-content img {
  width: 100%;
  max-width: 800px;
  height: 100%;
  max-height: 600px;
  border-radius: 8px;
  object-fit: contain;
  display: block;
}
 
/* SVG */
.flow-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  /* GPU acceleration and isolation */
  transform: translateZ(0);
  will-change: contents;
  pointer-events: none;
  overflow: visible;
}
 
 .flow-lines path {
   fill: none;
   stroke: #0f4468;
   stroke-width: 2;
   stroke-dasharray: 8;
   /* GPU acceleration */
   transform: translateZ(0);
   /* Reduce repaints */
   shape-rendering: geometricPrecision;
 }

/* Connection points on GIF left edge */
.connection-point {
  fill: #ff914d;
  z-index: 4;
  /* GPU acceleration */
  transform: translateZ(0);
  backface-visibility: hidden;
}
 
/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
  .flow-lines path,
  .flow-lines circle {
    animation: none !important;
  }
  .flow-lines circle animateMotion {
    display: none;
  }
}

/* Responsive adjustments for flow section */
@media (max-width: 991px) {
  .flow-wrapper {
    height: 500px;
    min-height: 500px;
    flex-direction: column;
    position: relative;
    display: flex;
  }
  
  .flow-left {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    height: auto;
    padding: 10px 0;
    flex-wrap: nowrap;
    gap: 8px;
  }
  
  .flow-item {
    width: 23%;
    margin-bottom: 0;
    flex: 0 0 23%;
    min-width: 0;
  }
  
  .flow-item img {
    height: 80px;
  }
  
  .flow-right {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 300px;
    top: auto;
    transform: none;
    margin-top: 50px;
    margin-left: 0;
    order: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  /* Add more space between items and GIF for better line visibility */
  .flow-left {
    margin-bottom: 30px;
  }
  
  .flow-right-content {
    padding: 15px;
    height: 300px;
    max-width: 100%;
    order: 1;
  }
  
  .flow-right-content::before {
    left: 50%;
    top: -8px;
    transform: translateX(-50%);
  }
  
  .flow-right-content img {
    max-width: 100%;
    max-height: 100%;
  }

  /* Position MIT logo after GIF on mobile */
  .float-text-right {
    position: relative;
    top: 0;
    margin-top: 15px;
    text-align: center;
    order: 2;
    width: 100%;
  }

  .float-text-right img {
    max-width: 150px;
    height: auto;
  }

  /* Keep SVG visible for connections */
  .flow-lines {
    display: block !important;
    z-index: 1;
  }

  /* Reorder elements: items first, then GIF, then MIT logo */
  .flow-left {
    order: 1;
  }

  .img-popup-overlay p {
    font-size: 5px;
  }
}

@media (max-width: 767.98px) {
  .flow-right {
    min-height: 383px;
    flex-direction: column-reverse;
}
p.kepler-mittxt {
    font-size: 14px;
    padding-bottom: 20px;
}
.flow-right-content {
    margin-top: -72px;
    z-index: 3;
}
.typeright {
    margin-top:50px;
}
.float-text-right {
    position: relative;
    top: 243px;
    margin-top: 15px;
}
  .flow-wrapper {
    height: 450px;
    min-height: 450px;
  }

  .flow-left {
    gap: 5px;
    padding: 8px 0;
    margin-bottom: 25px;
  }

  .flow-item {
    width: 23%;
    flex: 0 0 23%;
  }

  .flow-item img {
    height: 70px;
  }

  .flow-item h6 {
    font-size: 12px;
    margin-bottom: 8px;
  }

  .flow-right {
    height: 250px;
    margin-top: 40px;
  }

  .flow-right-content {
    padding: 10px;
  }

  .float-text-right {
    margin-top: 10px;
  }

  .float-text-right img {
    max-width: 120px;
  }

  .img-popup-overlay p {
    font-size: 5px;
  }
}

@media (max-width: 575.98px) {
  .flow-wrapper {
    height: 500px;
    min-height: 500px;
  }

  .flow-left {
    gap: 4px;
    padding: 5px 0;
    margin-bottom: 20px;
  }

  .flow-item {
    width: 23%;
    flex: 0 0 23%;
  }

  .flow-item img {
    height: 60px;
  }

  .flow-item h6 {
    font-size: 11px;
    margin-bottom: 5px;
  }

  .flow-right {
    height: 200px;
    margin-top: 35px;
  }

  .flow-right-content {
    padding: 8px;
  }

  .float-text-right img {
    max-width: 200px;
  }

  .img-popup-overlay p {
    font-size: 5px;
  }
}
 
 
 
 /*** end*/
 
 /*****/
 #projectCarousel {
   position: relative;
   overflow: hidden;   /* arrow cut na ho */
 }
 .project-slider {
   background: #f9fafc;
   position: relative;
 }
 
 .carousel-item {
   padding: 40px;
   border-radius: 20px;
   background: #ffffff;
   box-shadow: 0 10px 30px rgba(0,0,0,0.08);
 }
 h3.kepler-heading {
     color: #000;
     font-weight: 600;
     font-size: 28px;
     margin: 20px 0px;
 }
 
 .tag {
   display: inline-block;
   background: #e8f0ff;
   color: #0d6efd;
   padding: 5px 14px;
   border-radius: 20px;
   font-size: 13px;
   margin-right: 6px;
 }
 
 .carousel-control-prev-icon {
    filter: invert(1) grayscale(100%) brightness(0) !important;
}

/* Next icon ko black karne ke liye */
.carousel-control-next-icon {
    filter: invert(1) grayscale(100%) brightness(0) !important;
}
 
 .carousel-control-prev-icon,
 .carousel-control-next-icon {
   background-color: transparent;
   border-radius: 50%;
   padding: 16px;
 }
 
 /* dots */
 .carousel-indicators [data-bs-target] {
   background-color: #0d6efd;
   width: 8px;
   height: 8px;
   border-radius: 50%;
 }
 .carousel-control-next, .carousel-control-prev {
    position: absolute;
    top: 50%;
    bottom: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    /* width: 15%; */
    padding: 0;
    color: #000000;
    width: 38px;
    text-align: center;
    background: 0 0;
    border: 0;
    opacity: .5;
    transition: opacity .15s ease;
     background: transparent !important; 
    height: 38px;
    border-radius: 50%;
}
 
 p.slider-ktext {
     color: #333;
     font-size: 18px;
 }
 .project-slider .carousel-control-prev {
     left: 45px;
 }
 .project-slider .carousel-control-next {
     right: 50px;
 }
 .kelper-slider-left {
     border: 1px solid #000;
     height: 500px;
     border-radius: 8px;
     padding: 12px 20px;
     margin: 0px 10px 0px 0px;
     width: 49%;
 }
 .kelper-slider-right {
     height: 500px;
     border: 1px solid #000;
     border-radius: 8px;
     width: 48%;
     overflow: hidden;
     padding: 0;
     margin: 0px 0px 0px 10px;
 }
 .slider-img {
  width: 100%;
  object-fit: cover;
  height: 99%;
}

/* Nav Tabs Styling for Carousel */
.project-slider .nav-tabs {
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 20px;
}

.project-slider .nav-tabs .nav-item {
  margin-right: 8px;
}

.project-slider .nav-tabs .nav-link {
  border: none;
  border-radius: 8px 8px 0 0;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
  color: #6b7280;
  background: transparent;
  transition: all 0.3s ease;
}

.project-slider .nav-tabs .nav-link:hover {
  background: #f3f4f6;
  color: #111827;
  border-color: transparent;
}

.project-slider .nav-tabs .nav-link.active {
  color: #111827;
  background: #ffffff;
  border-bottom: 3px solid #1A73E8;
  font-weight: 700;
}

.project-slider .tab-content {
  padding-top: 0;
}

.project-slider .tab-pane {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive styles for project slider */
@media (max-width: 991.98px) {
  .project-slider .carousel-item {
    padding: 20px;
  }

  .kelper-slider-left,
  .kelper-slider-right {
    width: 100% !important;
    margin: 0 !important;
  }

  .kelper-slider-left {
    height: auto !important;
    min-height: auto;
    margin-bottom: 20px !important;
    padding: 20px 16px !important;
  }

  .kelper-slider-right {
    height: auto !important;
    min-height: 300px;
  }

  .slider-img {
    height: 100%;
    min-height: 300px;
    object-fit: cover;
  }

  h3.kepler-heading {
    font-size: 22px;
    margin: 15px 0;
  }

  p.slider-ktext {
    font-size: 16px;
    line-height: 1.6;
  }

  .project-slider .nav-tabs {
    flex-wrap: wrap;
    gap: 8px;
  }

  .project-slider .nav-tabs .nav-item {
    margin-right: 4px;
    margin-bottom: 8px;
  }

  .project-slider .nav-tabs .nav-link {
    padding: 8px 16px;
    font-size: 14px;
  }

  .project-slider .carousel-control-prev {
    left: 10px;
  }

  .project-slider .carousel-control-next {
    right: 10px;
  }

  .carousel-control-prev,
  .carousel-control-next {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 575.98px) {
  .project-slider .carousel-item {
    padding: 15px;
  }

  .kelper-slider-left {
    padding: 15px 12px !important;
  }

  .kelper-slider-right {
    min-height: 250px;
  }

  .slider-img {
    min-height: 250px;
  }

  h3.kepler-heading {
    font-size: 20px;
    margin: 12px 0;
  }

  p.slider-ktext {
    font-size: 15px;
  }

  .project-slider .nav-tabs .nav-link {
    padding: 6px 12px;
    font-size: 13px;
  }

  .project-slider .carousel-control-prev {
    left: 5px;
  }

  .project-slider .carousel-control-next {
    right: 5px;
  }

  .carousel-control-prev,
  .carousel-control-next {
    width: 28px;
    height: 28px;
    opacity: 0.7;
  }


}