*,
::before,
::after {
  box-sizing: border-box;
}
body,
html {
  width: 100%;
  /* overflow-x: hidden; */
}
html {
  scroll-behavior: smooth;
}

body {
  /* background: url("./assets/images/");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: top;*/
  font-family: "Poppins", sans-serif;
  margin: 0;
  --primary: #d8b89a;
  --secondary: #2a514f;
  --gray: #d9d9d9;
  --dark: #363636;
  --light-gray: #f1f0f0;
}
.hero {
  padding: 4rem 5rem 7vw 5rem;
  background-color: beige;
  background: url(./assets/images/story_intro.png);
}
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header img {
  width: 188px;
}
.anchor-div {
  display: flex;
  gap: 5rem;
  align-items: center;
}
.main-anchor {
  text-decoration: none;
  font-size: 1.4rem;
  font-weight: 900;
  color: white;
  padding: 0;
}
.main-anchor:hover {
  color: var(--secondary);
  text-decoration: underline;
}
.profile-pic {
  background-color: var(--dark);
  color: white;
  font-size: 2rem;
  width: 4rem;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 100%;
}
.heading-div {
  padding: 8rem 0rem;
}
.heading-div > div {
  padding-bottom: 5rem;
}
.main-heading {
  font-size: 3.7rem;
  font-weight: 800;
  color: white;
  margin: 0;
}
.intro-lines {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0;
  text-shadow: 2px 2px 4px rgba(255, 255, 255, 1.5);
}
.read-anchor {
  text-decoration: none;
  color: var(--primary);
  background-color: var(--secondary);
  padding: 0.6rem 3rem;
  border-radius: 10rem;
  font-size: 1.7rem;
  font-weight: 700;
  /* color:white;  */
  text-decoration: none;
}

.main-section {
  background: url("./assets/images/main-bg.svg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: top;
  /* background-color: #ecd6c5; */
  margin: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.source {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  font-size: 13px;
  color: #555;
}

.boat {
  /* display: block;
  margin: auto; */

  position: sticky;
  --boat-height: 20rem;
  height: var(--boat-height);
  top: calc(50vh - var(--boat-height) / 6);
  z-index: 50;
}
.plow-lines {
  position: sticky;
  top: calc(0vh);
  z-index: 49;
  height: calc(50vh - 20rem / 10);
  /* top: calc(50vh - var(--tractor-height) / 2); */
  /* --tactor-height: calc(50vh - 20rem / 2); */
}
/*  */
@keyframes leafFloating {
  100% {
    rotate: 45deg;
  }
}
@keyframes leafblowing {
  100% {
    rotate: 0deg;
  }
}
@keyframes flowerRotator {
  100% {
    rotate: 360deg;
  }
}
.leaf-lake {
  height: 700px;
  width: 100%;
  position: relative;
  /* overflow-x: hidden; */
  /* overflow-y: hidden; */
}
.leaf-float {
  position: absolute;
  animation: leafFloating 20s infinite linear alternate;
}
.white-flowers {
  position: absolute;
  animation: flowerRotator 30s ease-in-out infinite;
}
.white-flower1 {
  top: 0;
  right: 50%;
}
.white-flower2 {
  top: 50%;
  right: 30%;
}
.white-flower3 {
  bottom: 0;
  left: 20%;
}
.white-flower4 {
  top: 30%;
  left: 30%;
}
.leafNo1 {
  bottom: 0;
  right: 50%;
  transform: translate(30%);
}
.leafNo2 {
  bottom: 60%;
  right: 37%;
  rotate: 60deg;
  scale: 0.9;
  transform: translate(30%);
}
.leafNo3 {
  bottom: 30%;
  left: 30%;
  scale: 0.8;
  rotate: 90deg;
  transform: translate(30%);
}
.leafNo4 {
  bottom: -10%;
  right: 10%;
  scale: 1.1;
  rotate: 180deg;
  transform: translate(30%);
}
.leaf-clump {
  position: absolute;
  /* outline: 4px red solid; */
  bottom: 0;
  width: 100%;
  height: 130%;
  overflow: hidden;
  z-index: 100;
}
.leaf-clump > div {
  position: absolute;
  bottom: 0;
}
.leaf-clump-right {
  right: -9%;
  isolation: isolate;
}
.leaf-clump-left {
  left: -9%;
  bottom: 50px;
  transform: rotateY(180deg) rotateZ(-5deg);
}
.big-leaf {
  position: absolute;
  transform-origin: right bottom;
  scale: 0.75;
  bottom: 0;
  right: 0;
  animation: leafblowing 7s infinite alternate ease-in-out;
}
.leaf-clump-left .big-leaf {
  animation: leafblowing 10s infinite alternate ease-in-out;
}
.flower {
  scale: 1;
  bottom: 180px;
  right: 180px;
}
.leaf-clump-left .flower {
  bottom: 0px;
  scale: 1.1;
  right: 450px;
  transform: rotateY(180deg);
}
.big-leaf1 {
  z-index: 6;
  rotate: 2deg;
}
.big-leaf2 {
  z-index: 5;
  rotate: -3deg;
}
.big-leaf3 {
  z-index: 2;
  rotate: -3deg;
}
.big-leaf4 {
  z-index: 3;
  scale: 0.62;
  rotate: 2deg;
}
.flower1 {
  z-index: 1;
  rotate: -3deg;
}
.flower2 {
  z-index: 4;
  rotate: 2deg;
}
.big-leaf5 {
  z-index: 4;
  rotate: 10deg;
}
.big-leaf6 {
  z-index: 5;
  rotate: -6deg;
}
.big-leaf7 {
  z-index: 3;
  scale: 0.62;
  rotate: 5deg;
}
.flower3 {
  z-index: 2;
  rotate: 2deg;
}

/*  */
.content-section {
  width: 100%;
}
.data-section {
  position: relative;
  display: flex;
  gap: 22rem;
  padding: 5rem;
  z-index: 100;
  --div-padding: 2rem;
  --svg-height: 4rem;
  --svg-width: calc((100vw - 0rem) / 4 + 9rem);
  --svg-left: calc((100vw - 21rem) / 4 + 6rem);
}
.data-section-reverse {
  /* flex-direction: row-reverse; */
  transform: rotateY(180deg);
}
.picture-div {
  flex: 1;
  position: relative;
  /* padding: var(--div-padding); */
  display: flex;
  align-items: start;
  align-content: center;
}
.leaf-background {
  width: 100%;
  padding-inline: 6rem;
  /* padding-block-start: 4rem; */
}
.round-img {
  position: absolute;
  border-radius: 50%;
  width: calc(100% - 14rem);
  top: 1rem;
  left: 7rem;
}
/*  */
.content-div {
  position: relative;
  align-items: center;
  flex: 1;
  justify-content: center;
  display: flex;
}
/* .content-bg {
  max-width: calc(100% + 104px);
  max-height: calc(100% + 104px);
} */

.content-bg {
  position: absolute;
  top: -8%;
  left: -7%;
  width: 119%; /* always slightly bigger than content */
  min-width: auto; /* never shrink below this */
  min-height: auto;
  height: 115%;
  object-fit: cover;
  border-radius: 20px;
  z-index: 0;
}

.content-div > .hidden-div {
  position: relative;
  z-index: 1; /* ensures content stays above background */
}
.data-section-reverse .content-article {
  transform: rotateY(180deg);
}
.hidden-div {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 0px;
  max-height: 0px;
  overflow: hidden;
  transition: all 1s 450ms;
  border-radius: 2rem;
}
.content-article {
  background-color: white;
  font-size: 1.4rem;
  opacity: 0.95;
  padding: 2rem var(--div-padding);
}

.article-title {
  margin-block: 0.5rem;
  text-align: center;
  font-weight: 800;
  font-size: 1.7rem;
}
.year {
  text-align: center;
  color: black;
  font-weight: 800;
  font-size: 16px;
  display: flex;
  justify-content: center; /* horizontal center */
  align-items: center; /* vertical center */
}
.value {
  text-align: center;
  color: red;
  font-size: 32px;
  font-weight: 600;
}
.unit {
  font-size: 14px;
  color: #555;
  text-align: center;
}
.label {
  font-size: 16px;
  font-weight: 900;
  color: #1a2b6d;
  text-align: center;
  margin-bottom: 5px;
}
.article-list {
  text-align: left;
  font-size: 18px;
  color: #333;
}
/*  */
.svg-div {
  position: absolute;
  left: var(--svg-left);
  transform: skewX(-45deg);
  z-index: 101;
}
.line-svg {
  width: calc(var(--svg-width));
  height: var(--svg-height);
}
.line-rect {
  position: relative;
  width: 100%;
  height: 100%;
  fill: transparent;
  stroke: #9f6236;
  stroke-width: 4px;
  stroke-dashoffset: 4rem;
  stroke-dasharray: 0rem calc((4rem + var(--svg-width)) * 2);
  transition: all 300ms 100ms;
}

.svg-div::after,
.svg-div::before {
  position: absolute;
  content: "";
  --radius: 0rem;
  width: var(--radius);
  height: var(--radius);
  border-radius: var(--radius);
  transform: skewX(45deg);
  background-color: #cd995a;
}
.svg-div::before {
  transition: all 100ms;
  bottom: -4px;
  left: calc(var(--radius) / -2);
}
.svg-div::after {
  transition: all 100ms 400ms;
  top: calc(var(--radius) / -2);
  right: calc(var(--radius) / -2);
}
.section-animate .line-rect {
  stroke-dasharray: calc(4rem + var(--svg-width));
}
.section-animate .svg-div::after,
.section-animate .svg-div::before {
  --radius: 1.3rem;
}
.section-animate .hidden-div {
  max-height: 200vh;
  max-width: 100vw;
}
/* charts size */
.chart {
  margin: 0 auto;
  display: block;
}
#ndvi-pie {
  width: 400px;
  height: 400px;
}
#crop-area-pie {
  width: 400px;
  height: 350px;
}
#ndviMeanChart {
  width: 400px;
  height: 350px;
}
#ndviMaxChart {
  width: 400px;
  height: 350px;
}
#ndviMinChart {
  width: 400px;
  height: 350px;
}
#flowchart-punjab {
  width: 400px;
  height: 400px;
  margin: 0 auto 20px auto;
  display: block;
}
#up-story {
  width: 400px;
  height: 350px;
}
#karnataka-story {
  height: 300px;
  width: 400px;
}
#ndviChart {
  width: 400px;
  height: 400px;
}

/*  */
/*  */
.htmlframe {
  width: 100%;
  height: 500px;
}
.article-content {
  font-size: 1rem;
}

/*NDVI sections*/

.custom-carousel {
  background-color: #f8edd9;
  max-width: 1405px; /* control width */
  max-height: 566px; /* control height */
  margin: 30px auto; /* center it on the page */
}
.custom-carousel img {
  /* object-fit: cover;  crop nicely if image ratio is different */
  height: 566px; /* same as max-height */
}
.carousel-control-prev-icon,
.carousel-control-next-icon {
  background-color: rgba(0, 0, 0, 0.9); /* dark semi-transparent background */
  border-radius: 50%; /* make it circular */
  padding: 20px; /* increase clickable area */
  filter: drop-shadow(0 0 3px white); /* white glow for contrast */
  background-size: 50% 50%; /* scale the arrow properly */
}
.carousel-control-next {
  right: 0px;
  width: 157px;
}
.carousel-control-prev {
  left: -19px;
  width: 157px;
}
#carouselExampleIndicators:focus {
  outline: none;
  box-shadow: none; /* some browsers add shadow instead of outline */
}
/* Green Header */
.data-stories-header {
  background-color: #1a3c24;
  color: white;
  padding: 50px 50px;
  border-radius: 0 40px 0 40px;
  /* display: inline-block; */
  margin: 50px 300px 20px 300px;
}

.data-stories-header h1 {
  margin: 0;
  font-size: 22px;
  font-weight: bold;
  line-height: 1.5;
  text-transform: uppercase;
  padding: 0 12px;
  text-align: center;
}

.ndvi-section {
  position: relative;
  background: url("./assets/images/NDVI_BG.png") no-repeat center center;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  width: 100%;
  min-height: 500px;
  height: 1000px;
  border-radius: 0;
  padding: 60px 0;
  color: #1a3c24;
  margin: 0;
  overflow: hidden;
  /* background-color: #f1e8cc; */
}

/* .ndvi-section::after {
  content: "";
  position: absolute;
  top: 0;
  left: 86px;
  width: 88.66%;
  height: 100%;
  background: rgba(255, 300, 500, 0.5); 
  background-color: #EED9C4;
  z-index: 0;
} */

.ndvi-section .container {
  position: relative;
  z-index: 1;
}

.formula-box {
  background-color: rgba(49, 112, 57, 1);

  border-radius: 40px 0 40px 0;
  color: white;
  display: inline-block;
  border: 10px solid white;
  padding: 20px 30px;
  text-align: center;
  margin-top: 16px;
  margin-right: 170px;
}

.formula-box h4 {
  font-weight: bold;
  font-size: 22px;
}

.formula-box .formula {
  background: rgba(20, 48, 33, 1);
  display: inline-block;
  padding: 8px 15px;
  margin-top: 10px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
}
.formula-range {
  margin: 65px 145px;
  background: rgba(49, 112, 57, 1);
  color: white;
  border-radius: 10px;
  padding: 6px;
}
.gauge-card {
  background: #fff;
  border-radius: 0 55px 0 55px;
  padding: 25px;
  display: inline-block;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  width: 350px;
  margin-left: 120px;
}

.gauge-card img {
  max-width: 260px;
}

.formula {
  font-weight: bold;
  font-size: 16px;
}

.gauge-video {
  max-width: 250px;
  border-radius: 10px;
}

.range-bar {
  position: relative;
  height: 35px; /* bar height */
  background: white;
  border-radius: 17px;
  overflow: visible; /* IMPORTANT: prevent clipping */
  margin-top: 120px; /* adds space above so circle shows */
}

.marker {
  position: absolute;
  top: -20px; /* circle sits above bar */
  width: 65px;
  height: 65px;
  background: #4d2c20;
  border: 3px solid white;
  border-radius: 50%;
  transform: translateX(-50%);
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.range-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(to right, #4d2c20, #f0c419, #2d6a4f);
  border-radius: 17px;
  width: 0%; /* will grow as user drags */
}

.range-fill {
  z-index: 1;
}
.range-label {
  color: rgba(49, 112, 57, 1);
  font-weight: 600;
}
/* NDVI Video Card Fix */
.ndvi-section .card {
  max-width: 1280px;
  max-height: 720px;
  margin: 0 auto; /* keep cards centered */
}

.ndvi-section .card video {
  width: 100%;
  height: 250px;
  max-width: 1280px;
  max-height: 720px;
  object-fit: cover; /* prevents distortion */
  display: block;
}
/* Different borders for each video card */
.card:nth-child(1) .ndvi-video {
  border-bottom: 4px solid #1a3c24;
}
.card:nth-child(2) .ndvi-video {
  border-bottom: 4px solid #f4b731;
}
.card:nth-child(3) .ndvi-video {
  border-bottom: 4px solid #e9a24c;
}
.card:nth-child(4) .ndvi-video {
  border-bottom: 4px solid #f2d08f;
}
.version {
  color: white;
  font-weight: 800;
}
.version-popup {
  margin: 0 575px 25px 10px;
}

.badge {
  background-color: #256d1b;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 18px;
}

.footer {
  position: relative;
  width: 100%;
}

.footer-img {
  width: 100%;
  height: auto;
  display: block;
}

.footer-section {
  position: absolute;
  bottom: 30%;
  left: 0;
  width: 100%;
  padding: 2rem 2rem;
  z-index: 2;
  /* display: flex;
  justify-content: space-between;
  align-items: flex-end; */
  /* gap: 31rem; */
}
.footer-div {
  position: absolute;
  max-width: calc(50% - 2rem);
}
/* First footer block pinned to the left at 1% */
.footer-section .footer-div:first-child {
  left: 2%;
  bottom: 0;
}

/* Last footer block pinned to the right at 1% */
.footer-section .footer-div:last-child {
  right: 2%;
  bottom: 0;
}
/* .footer-div {
  flex: 1;
} */

.footer-article {
  background-color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  padding: 1rem;
  border: #82b183 solid 1rem;
  border-radius: 2rem;
  text-align: left;
}

.footer-title {
  font-weight: 800;
  font-size: 1.7rem;
  margin-bottom: 1rem;
  text-align: center;
}

.footer-logo {
  width: 316px;
  padding: 120px 0;
  /* height: 350px; */
}
.footer-right {
  width: 582px;
}
.footer-div p {
  font-size: 17.5px;
  text-align: justify;
}
.footer-social a:hover {
  color: #0d6efd;
  transition: color 0.3s;
}
.footer-icon {
  font-size: 1.5rem;
}
.footer-social a {
  margin-right: 1.5rem;
}

.footer-social a:last-child {
  margin-right: 0;
}

ul {
  margin-bottom: 0;
}
.formula-title {
  color: white;
  font-weight: 600;
  margin-left: 120px;
}
.season {
  color: red;
  font-weight: 600;
  font-size: 32px;
}
.season-title {
  font-size: 1.4rem;
}
.season-content {
  font-size: 17px;
  font-weight: 500;
  color: #1a2b6d;
}
.conclusion-content {
  font-size: 18px !important;
  text-align: justify !important;
}
/* ==================== SMOOTH TRANSITIONS ==================== */
.gauge-card,
.formula-box,
.range-bar,
.marker,
.ndvi-section .card,
.range-fill {
  transition: all 0.3s ease;
}

/* -------------------- MOBILE RESPONSIVENESS -------------------- */
@media (max-width: 1280px){
  .footer-logo {
    width: 260px;
    padding: 80px 0;
  }
  .footer-right {
    width: 503px;
}
.footer-div p {
    font-size: 14px;
}
}
@media (max-width: 1200px) {
  body,
  html {
    width: 100%;
    overflow-x: hidden;
  }
  /* header section */
  .hero {
    padding: 3rem 3rem;
    background-size: cover;
    background-position: center;
  }

  .header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .header img {
    width: 160px;
  }

  .heading-div {
    padding: 6rem 0;
    text-align: center;
  }

  .main-heading {
    font-size: 2.8rem;
  }

  .intro-lines {
    font-size: 1.9rem;
  }

  .version {
    font-size: 1rem;
  }

  .read-anchor {
    font-size: 1.3rem;
    padding: 0.6rem 2rem;
  }

  .version-popup {
    margin: 22px 16rem;
    text-align: left;
  }

  /* NDVI carousel section */
  .ndvi-section {
    background-color: #f1e8cc;
  }
  #ndvi-carousel-section .data-stories-header {
    margin: 40px 150px 20px 150px;
    padding: 40px;
  }

  #ndvi-carousel-section .data-stories-header h1 {
    font-size: 20px;
  }

  #ndvi-carousel-section .custom-carousel {
    max-width: 1100px;
    max-height: 500px;
  }

  #ndvi-carousel-section .custom-carousel img {
    height: 463px;
  }

  #ndvi-carousel-section .carousel-control-prev,
  #ndvi-carousel-section .carousel-control-next {
    width: 60px;
  }

  #ndvi-carousel-section .carousel-control-prev {
    left: 18px;
  }

  #ndvi-carousel-section .carousel-control-next {
    right: 18px;
  }
  /* ==================== MAIN SECTION MOBILE RESPONSIVE CSS ==================== */
  /* ==================== TABLET RESPONSIVE (≤1200px) ==================== */
  /* Main section elements */
  .plow-lines {
    width: 200px !important;
  }
  .main-section {
    min-height: 100vh;
    /* background-attachment: fixed;  */
    background-size: cover;
    background-position: center;
  }
  .content-bg {
    width: 106%;
    left: -5%;
  }
  .hidden-div {
    width: 85%;
  }

  /* Data sections */
  .data-section {
    gap: 16rem;
    padding: 3rem 1rem;
    --svg-width: calc((100vw - 0rem) / 4 + 11rem);
    --svg-left: calc((100vw - 21rem) / 4 + 3rem);
  }

  /* Content styling */
  .content-article {
    font-size: 1.2rem;
    padding: 1.5rem;
  }

  .article-title {
    font-size: 1.5rem;
  }

  .article-list {
    font-size: 1rem;
  }

  /* Picture elements */
  .round-img {
    width: calc(100% - 10rem);
    left: 5rem;
  }

  .leaf-background {
    padding-inline: 4rem;
  }
  .footer-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    left: -12px;
    width: 102%;
    gap: 23.4rem;
    bottom: 142px;
  }
  .footer-logo {
    width: 178px;
    padding: 100px 0;
    /* height: 263px; */
  }
  .footer-right {
    width: 472px;
  }
  .footer-div {
    flex: 1;
  }
  .footer-div p {
    font-size: 13.5px !important;
  }
  .footer-title {
    font-size: 20px;
    margin-bottom: 0.5rem;
  }
  .footer-icon {
    font-size: 1.2rem;
  }
  /* charts size */
  .chart {
    margin: 0 auto;
    display: block;
    display: flex;
    justify-content: center; /* centers horizontally */
    align-items: center; /* centers vertically if height is fixed */
    width: 100%;
  }
  #ndvi-pie {
    width: 300px !important;
    height: 300px !important;
  }
  #crop-area-pie {
    width: 300px;
    height: 250px;
  }
  #ndviMeanChart {
    width: 300px;
    height: 250px;
  }
  #ndviMaxChart {
    width: 300px;
    height: 250px;
  }
  #ndviMinChart {
    width: 300px;
    height: 250px;
  }
  #flowchart-punjab {
    width: 300px;
    height: 300px;
    margin: 0 auto 20px auto;
    display: block;
  }
  #up-story {
    width: 300px;
    height: 250px;
  }
  #karnataka-story {
    height: 200px;
    width: 300px;
  }
  #ndviChart {
    width: 300px;
    height: 300px;
  }
  .season {
    color: red;
    font-weight: 600;
    font-size: 32px;
  }
  .season-title {
    font-size: 1.4rem;
  }
  .conclusion-content {
    font-size: 16px !important;
  }
}
/* @media (width: 1280px) {
  body {
    width: 117%;
  }
  .footer-section {
    bottom: 185px;
    gap: 30rem;
  }
} */

/* ==================== TABLET RESPONSIVE (≤1024px) ==================== */
@media (max-width: 1024px) {
  /* NDVI Section Base */
  .ndvi-section {
    height: auto;
    min-height: 800px;
    padding: 50px 20px;
  }

  .ndvi-section::after {
    left: 5%;
    width: 90%;
  }

  /* Green overlay div */
  .ndvi-section > div[style*="position: absolute"] {
    top: 280px !important;
    left: 5% !important;
    width: 90% !important;
    height: 250px !important;
  }
  .footer-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    left: 12px;
    width: 100%;
    gap: 23.4rem;
    bottom: 144px;
  }
  .footer-right {
    width: 410px;
  }
  .footer-article {
    font-size: 1rem;
    padding: 0.5rem;
    border: #82b183 solid 0.5rem;
    border-radius: 1rem;
    text-align: left;
  }
  .footer-logo {
    width: 178px;
    padding: 80px 0;
    /* height: 263px; */
  }
  .footer-title {
    font-size: 18px;
    margin-bottom: 0.5rem;
  }
  .footer-div p {
    font-size: 12px !important;
  }

  /* Formula Box */
  .formula-box {
    margin-right: 80px;
    padding: 18px 25px;
    border-width: 8px;
  }

  .formula-box h4 {
    font-size: 20px;
  }

  .formula-box .formula {
    font-size: 15px;
    padding: 7px 14px;
  }

  /* Gauge Card */
  .gauge-card {
    width: 320px;
    margin-left: 80px;
    padding: 22px;
  }

  .gauge-card img {
    max-width: 240px;
  }

  /* Formula Range */
  .formula-range {
    margin: 50px 100px;
    padding: 8px;
  }

  /* Range Bar */
  .range-bar {
    margin-top: 100px;
    height: 32px;
  }

  .marker {
    width: 60px;
    height: 60px;
    top: -18px;
  }

  .range-fill {
    height: 100%;
  }

  .range-label {
    font-size: 14px;
  }

  /* NDVI Video Cards */
  .ndvi-section .card video {
    height: 230px;
  }

  .ndvi-section .card-body {
    padding: 15px;
  }

  .ndvi-section .card-title {
    font-size: 16px;
  }

  .ndvi-section .card-text {
    font-size: 14px;
  }
  /* ==================== MAIN SECTION MOBILE RESPONSIVE CSS ==================== */
  /* ==================== TABLET RESPONSIVE (≤1200px) ==================== */
  /* Main section elements */
  .boat {
    --boat-height: 15rem;
  }

  /* Data sections */
  .data-section {
    gap: 13rem;
    padding: 3rem 1rem;
    --svg-width: calc((100vw - 0rem) / 4 + 9rem);
    --svg-left: calc((100vw - 21rem) / 4 + 3rem);
  }

  /* Content styling */
  .content-article {
    font-size: 1rem;
    padding: 1.5rem;
  }

  .article-title {
    font-size: 1.2rem;
  }

  .article-list {
    font-size: 0.8rem;
  }

  /* Picture elements */
  .round-img {
    width: calc(100% - 10rem);
    left: 5rem;
  }

  .leaf-background {
    padding-inline: 4rem;
  }
  .content-article > h5 {
    font-size: 1rem;
  }
  /* charts size */
  .chart {
    margin: 0 auto;
    display: block;
  }
  #ndvi-pie {
    width: 250px !important;
    height: 250px !important;
  }
  #crop-area-pie {
    width: 400px;
    height: 350px;
  }
  #ndviMeanChart {
    width: 400px;
    height: 350px;
  }
  #ndviMaxChart {
    width: 400px;
    height: 350px;
  }
  #ndviMinChart {
    width: 400px;
    height: 350px;
  }
  #flowchart-punjab {
    width: 400px;
    height: 400px;
    margin: 0 auto 20px auto;
    display: block;
  }
  #up-story {
    width: 400px;
    height: 350px;
  }
  #karnataka-story {
    height: 300px;
    width: 400px;
  }
  #ndviChart {
    width: 400px;
    height: 400px;
  }
  .season {
    color: red;
    font-weight: 600;
    font-size: 32px;
  }
  .season-title {
    font-size: 1.2rem;
  }
  .season-content {
    font-size: 15px;
    font-weight: 500;
    color: #1a2b6d;
  }
}

@media (max-width: 992px) {
  body,
  html {
    width: 100%;
    overflow-x: hidden;
  }
  /* header section */
  .hero {
    padding: 2.5rem 2rem;
    background-size: cover;
    background-position: center;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 1.2rem;
  }

  .header img {
    width: 140px;
  }

  .heading-div {
    padding: 4rem 0;
    text-align: center;
  }

  .main-heading {
    font-size: 2.3rem;
  }

  .intro-lines {
    font-size: 1.5rem;
  }

  .version {
    font-size: 0.95rem;
  }

  .read-anchor {
    display: inline-block;
    font-size: 1.1rem;
    padding: 0.5rem 1.8rem;
  }

  .version-popup {
    margin: 22px 8rem;
    text-align: left;
  }
  /* NDVI caurousel section  */
  #ndvi-carousel-section .data-stories-header {
    margin: 30px 80px 15px 80px;
    padding: 35px 25px;
    border-radius: 0 30px 0 30px;
  }

  #ndvi-carousel-section .data-stories-header h1 {
    font-size: 18px;
    line-height: 1.4;
  }

  #ndvi-carousel-section .custom-carousel {
    max-width: 900px;
    max-height: 420px;
  }

  #ndvi-carousel-section .custom-carousel img {
    height: 420px;
  }

  #ndvi-carousel-section .carousel-control-prev,
  #ndvi-carousel-section .carousel-control-next {
    width: 55px;
  }

  #ndvi-carousel-section .carousel-control-prev {
    left: -50px;
  }

  #ndvi-carousel-section .carousel-control-next {
    right: -50px;
  }
  /* ==================== MAIN SECTION MOBILE RESPONSIVE CSS ==================== */
  /* ==================== TABLET RESPONSIVE (≤1200px) ==================== */
  /* Main section elements */
  .plow-lines {
    width: 140px !important ;
  }
  .footer-section {
    left: -18px;
    width: 104%;
    gap: 16.4rem;
    bottom: 94px;
  }
  .footer-article {
    font-size: 1rem;
    padding: 0.5rem;
    border: #82b183 solid 1rem;
    border-radius: 2rem;
  }
  .footer-div p {
    font-size: 10.5px !important;
    margin-bottom: 0.2rem;
  }
  .footer-title {
    font-size: 14px;
    margin-bottom: 0.3rem;
  }
  .footer-icon {
    font-size: 0.8rem;
  }
  .footer-right {
    width: 324px;
  }
  .footer-logo {
    width: 178px;
    padding: 67px 0;
  }
}

@media (max-width: 768px) {
  body,
  html {
    width: 100%;
    overflow-x: hidden;
  }
  /* header section */
  .hero {
    padding: 2rem 1rem;
    background-size: cover;
    background-position: left;
  }

  .header {
    flex-direction: column;
    align-items: left;
    text-align: left;
  }

  .header img {
    width: 130px;
  }

  .heading-div {
    padding: 3rem 0;
    text-align: center;
  }
  .heading-div > div {
    padding-top: 8rem;
    padding-bottom: 3rem;
  }
  .main-heading {
    font-size: 2rem;
  }

  .intro-lines {
    font-size: 1.3rem;
  }

  .version {
    font-size: 0.9rem;
  }

  .read-anchor {
    display: inline-block;
    font-size: 1rem;
    padding: 0.5rem 1.5rem;
  }

  /* Ensure cards and containers don’t overflow */
  .version-popup {
    margin: 22px 5rem;
    text-align: left;
  }
  /* NDVI caurousel section  */
  #ndvi-carousel-section .data-stories-header {
    margin: 20px 30px;
    padding: 20px 15px;
    border-radius: 0 25px 0 25px;
  }

  #ndvi-carousel-section .data-stories-header h1 {
    font-size: 16px;
    text-align: center;
  }

  #ndvi-carousel-section .custom-carousel {
    max-width: 100%;
    max-height: 350px;
  }

  #ndvi-carousel-section .custom-carousel img {
    height: 350px;
  }

  #ndvi-carousel-section .carousel-control-prev,
  #ndvi-carousel-section .carousel-control-next {
    width: 45px;
  }

  #ndvi-carousel-section .carousel-control-prev {
    left: -25px;
  }

  #ndvi-carousel-section .carousel-control-next {
    right: -25px;
  }

  #ndvi-carousel-section .carousel-indicators {
    bottom: 10px;
  }
  /* NDVI Section Base */
  .ndvi-section {
    height: auto;
    min-height: auto;
    padding: 40px 15px;
    background-size: cover;
  }

  /* Hide green overlay on mobile */
  .ndvi-section > div[style*="position: absolute"] {
    display: none !important;
  }

  .ndvi-section::after {
    left: 0;
    width: 100%;
    background: rgba(255, 300, 500, 0.3);
  }

  .ndvi-section .container {
    padding: 0 10px;
    position: relative;
    z-index: 1;
  }

  /* Bootstrap rows and columns */
  .ndvi-section .row {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
  }

  .ndvi-section .col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 10px;
    margin-bottom: 20px;
  }

  .ndvi-section .col-lg-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .ndvi-section .col-12 {
    padding: 0 10px;
  }

  /* How It Works Section */
  .ndvi-section h4 {
    font-size: 18px !important;
    text-align: center;
    margin-bottom: 15px;
    color: #1a3c24 !important;
  }

  .ndvi-section p {
    font-size: 14px !important;
    text-align: justify;
    line-height: 1.5;
    /* color: #1a3c24 !important; */
  }
  .formula-title {
    color: #1a3c24;
    font-weight: 600;
    margin-left: 0px;
    text-align: center !important;
  }
  .formula-range {
    text-align: center !important;
  }
  .ndvi-section .mt-5 {
    margin-top: 20px !important;
  }

  .ndvi-section .text-center {
    text-align: center;
  }

  /* Gauge Card */
  .gauge-card {
    width: 90%;
    max-width: 280px;
    margin: 20px auto;
    margin-left: auto;
    margin-right: auto;
    padding: 15px;
    border-radius: 0 55px 0 55px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: inline-block;
  }

  .gauge-card img {
    max-width: 200px;
    width: 100%;
    height: auto;
  }

  .ndvi-section .mt-2 {
    margin-top: 15px !important;
  }

  /* Formula Box */
  .formula-box {
    background-color: rgba(49, 112, 57, 1);
    border-radius: 40px 0 40px 0;
    color: white;
    display: inline-block;
    border: 6px solid white;
    padding: 15px 20px;
    text-align: center;
    margin: 20px auto;
    margin-right: auto;
    margin-left: auto;
    max-width: 280px;
  }

  .formula-box h4 {
    font-weight: bold;
    font-size: 20px !important;
    margin: 0 0 10px 0;
    color: white !important;
  }

  .formula-box .formula {
    background: rgba(20, 48, 33, 1);
    display: inline-block;
    padding: 8px 12px;
    margin-top: 8px;
    border-radius: 6px;
    font-size: 15px !important;
    font-weight: 600;
  }

  /* "The Formula And Output" text */
  .ndvi-section .col-md-6 p[style*="margin-left"] {
    margin-left: 0 !important;
    margin-top: 20px !important;
    font-size: 16px !important;
    text-align: center;
    color: white !important;
  }

  .ndvi-section .mb-4 {
    margin-bottom: 20px !important;
  }

  .ndvi-section .mb-md-0 {
    margin-bottom: 20px !important;
  }

  /* Formula Range */
  .formula-range {
    margin: 30px 15px;
    background: rgba(49, 112, 57, 1);
    color: white;
    border-radius: 10px;
    padding: 8px;
    font-size: 14px !important;
  }

  /* Range Container */
  .range-container {
    padding: 0 40px;
  }

  .ndvi-section .mt-4 {
    margin-top: 20px !important;
  }

  .ndvi-section .mb-2 {
    margin-bottom: 15px !important;
  }

  /* Range Bar */
  .range-bar {
    position: relative;
    height: 30px;
    background: white;
    border-radius: 15px;
    overflow: visible;
    margin-top: 80px;
  }

  .marker {
    position: absolute;
    top: -18px;
    width: 55px;
    height: 55px;
    background: #4d2c20;
    border: 2px solid white;
    border-radius: 50%;
    transform: translateX(-50%);
    cursor: grab;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  }

  .marker:active {
    cursor: grabbing;
  }

  .range-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(to right, #4d2c20, #f0c419, #2d6a4f);
    border-radius: 15px;
    width: 0%;
    z-index: 1;
  }

  /* Range Labels */
  .range-label {
    color: rgba(49, 112, 57, 1);
    font-weight: 600;
    font-size: 11px !important;
    text-align: center;
    display: inline-block;
  }

  .ndvi-section .d-flex {
    display: flex;
  }

  .ndvi-section .justify-content-between {
    justify-content: space-between;
  }

  /* NDVI Color Map Section */
  .ndvi-section h2 {
    font-size: 18px !important;
    padding: 0 15px;
    margin-bottom: 15px;
    font-weight: bold;
    color: #1a3c24 !important;
    text-transform: uppercase;
  }

  .ndvi-section > .container > p {
    font-size: 14px !important;
    max-width: 100%;
    padding: 0 15px;
    margin: 10px auto !important;
    color: #1a3c24 !important;
  }

  .ndvi-section .mt-3 {
    margin-top: 20px !important;
  }

  .ndvi-section .mb-5 {
    margin-bottom: 40px !important;
  }

  /* Video Cards */
  .ndvi-section .card {
    max-width: 100%;
    border-radius: 15px;
    overflow: hidden;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    margin: 0 auto;
  }

  .ndvi-section .card.h-100 {
    height: auto !important;
  }

  .ndvi-section .card video,
  .ndvi-video {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
  }

  .ndvi-section .card-body {
    padding: 15px !important;
    text-align: left;
  }

  .ndvi-section .card-title {
    font-size: 15px !important;
    font-weight: bold;
    margin-bottom: 8px;
  }

  .ndvi-section .card-body p {
    font-size: 13px !important;
    margin: 5px 0 !important;
  }

  .ndvi-section .card-text {
    font-size: 13px !important;
    line-height: 1.4;
  }

  /* Different colored card bodies */
  .ndvi-section .card-body[style*="#ff6135"],
  .ndvi-section .card-body[style*="#e9a24c"],
  .ndvi-section .card-body[style*="#f4b731"],
  .ndvi-section .card-body[style*="#1a3c24"] {
    padding: 15px !important;
  }

  /* Video borders for each card */
  .card:nth-child(1) .ndvi-video {
    border-bottom: 3px solid #1a3c24;
  }
  .card:nth-child(2) .ndvi-video {
    border-bottom: 3px solid #f4b731;
  }
  .card:nth-child(3) .ndvi-video {
    border-bottom: 3px solid #e9a24c;
  }
  .card:nth-child(4) .ndvi-video {
    border-bottom: 3px solid #f2d08f;
  }

  /* Bootstrap py-5 class */
  .ndvi-section.py-5 {
    padding-top: 40px !important;
    padding-bottom: 40px !important;
  }

  /* align-items-center */
  .ndvi-section .align-items-center {
    align-items: center;
  }
  /* ==================== MAIN SECTION MOBILE RESPONSIVE CSS ==================== */
  /* ==================== TABLET RESPONSIVE (≤1200px) ==================== */
  /* Main section elements */
  body,
  html {
    width: 100%;
    overflow-x: hidden;
  }

  /* Main section */

  /* Tractor and plow lines - keep visible but scaled */

  .boat {
    --boat-height: 15rem;
    height: var(--boat-height);
    top: calc(67vh - var(--boat-height) / 2);
  }

  .plow-lines {
    height: calc(60vh - 12rem / 10);
  }
  #ndvi-carousel-section .carousel-control-next {
    right: 0px;
  }
  #ndvi-carousel-section .carousel-control-prev {
    left: 0px;
  }
  #ndvi-carousel-section .carousel-indicators {
    bottom: -10px;
  }
  #ndvi-carousel-section .carousel-indicators li {
    height: 2px;
  }

  /* Content section */
  .content-section {
    width: 100%;
  }

  /* Data sections - stack vertically */
  .data-section {
    flex-direction: column !important;
    gap: 2rem;
    padding: 11rem 1rem;
    align-items: center;
    transform: none !important;
    --div-padding: 1rem;
  }

  .data-section-reverse {
    flex-direction: column !important;
    transform: none !important;
  }

  /* Picture and content divs */
  .picture-div,
  .content-div {
    width: 90%;
    max-width: 450px;
    flex: unset;
  }

  .picture-div {
    position: relative;
    display: flex;
    align-items: start;
    align-content: center;
  }

  .content-div {
    position: relative;
    align-items: center;
    justify-content: center;
    display: flex;
  }

  /* Leaf background and round images */
  .leaf-background {
    width: 100%;
    padding-inline: 3rem;
  }

  .round-img {
    position: absolute;
    border-radius: 50%;
    width: calc(100% - 8rem);
    left: 4rem;
    top: 1rem;
    transform: none !important;
  }

  /* Content background tiles */
  .content-bg {
    position: absolute;
    width: 110%;
    min-width: unset;
    left: -5%;
    top: -5%;
    height: 110%;
    object-fit: cover;
    border-radius: 1rem;
    z-index: 0;
  }

  /* Hidden div and content article */
  .hidden-div {
    position: relative;
    z-index: 1;
    max-width: 100%;
    width: 100%;
    overflow: hidden;
    border-radius: 2rem;
  }

  .content-div > .hidden-div {
    position: relative;
    z-index: 2;
  }

  .content-article {
    background-color: white;
    font-size: 0.95rem;
    opacity: 0.95;
    padding: 1.2rem var(--div-padding);
    transform: none !important;
  }

  .data-section-reverse .content-article {
    transform: none !important;
  }

  /* Article elements */
  .article-title {
    margin-block: 0.4rem;
    text-align: center;
    font-weight: 800;
    font-size: 1.2rem;
  }

  .article-list {
    text-align: left;
    font-size: 0.85rem;
    color: #333;
    line-height: 1.4;
  }

  /* SVG lines - hide on mobile */
  .svg-div {
    display: none;
  }

  .line-svg {
    display: none;
  }

  .line-rect {
    display: none;
  }

  /* Stats and values */
  .stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
  }

  .stat {
    width: 100%;
  }

  .value {
    text-align: center;
    color: red;
    font-size: 24px;
    font-weight: 600;
  }

  .unit {
    font-size: 12px;
    color: #555;
    text-align: center;
  }

  .label {
    font-size: 13px;
    font-weight: 900;
    color: #1a2b6d;
    text-align: center;
    margin-bottom: 5px;
  }

  .year {
    text-align: center;
    color: black;
    font-weight: 800;
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  /* Charts inside data sections */
  #ndvi-pie,
  #crop-area-pie,
  #ndviMeanChart,
  #ndviMaxChart,
  #ndviMinChart,
  #flowchart-punjab,
  #up-story,
  #karnataka-story,
  #ndviChart {
    width: 100% !important;
    max-width: 380px !important;
    height: 280px !important;
    margin: 0 auto !important;
  }

  /* Tables inside content articles */
  .content-article table {
    font-size: 0.8rem;
    width: 100%;
  }

  .content-article table td,
  .content-article table th {
    padding: 0.3rem 0.2rem;
  }

  /* Badges */
  .badge {
    background-color: #256d1b;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 15px;
  }

  /* Maharashtra map image */
  .maharashtra-map {
    width: 100% !important;
    height: auto;
  }

  /* Footer */
  .footer {
    position: relative;
    width: 100%;
  }

  .footer-img {
    width: 100%;
    height: auto;
    display: block;
  }

  .footer-section {
    position: absolute;
    flex-direction: row;
    gap: 15rem;
    bottom: 98px;
    left: 0;
    width: 100%;
    padding: 0.8rem;
    z-index: 2;
  }

  .footer-div {
    flex: 1;
  }

  .footer-article {
    background-color: rgba(255, 255, 255, 0.9);
    font-size: 0.5rem;
    padding: 0.2rem;
    border: #82b183 solid 0.5rem;
    border-radius: 1rem;
    text-align: left;
  }

  .footer-title {
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 0.2rem;
    text-align: center;
  }
  .footer-div p {
    font-size: 10px !important;
    margin-bottom: 1px;
  }
  .footer-logo {
    width: 180px;
    padding: 65px 0;
    /* height: 196px; */
  }

  .footer-right {
    width: 300px;
  }
  .footer-social {
    margin-top: 0.2rem !important;
  }
  .footer-social a {
    margin-right: 1rem;
  }

  .footer-social a:last-child {
    margin-right: 0;
  }

  .footer-social a i {
    font-size: 0.5rem;
  }

  .footer-social a:hover {
    color: #0d6efd;
    transition: color 0.3s;
  }
  /* ==================== FIX BOOTSTRAP UTILITIES ON MOBILE ==================== */
  .ndvi-section .container {
    max-width: 93%;
  }

  .ndvi-section .row {
    width: 100%;
  }
}

/* ==================== SMALL MOBILE (≤576px) ==================== */
@media (max-width: 576px) {
  /* NDVI Section */
  .ndvi-section {
    padding: 30px 10px;
  }

  .ndvi-section.py-5 {
    padding-top: 30px !important;
    padding-bottom: 30px !important;
  }

  .ndvi-section h4 {
    font-size: 16px !important;
  }

  .ndvi-section p {
    font-size: 13px !important;
  }

  .ndvi-section h2 {
    font-size: 16px !important;
  }

  /* Gauge Card */
  .gauge-card {
    width: 95%;
    max-width: 260px;
    padding: 12px;
  }

  .gauge-card img {
    max-width: 180px;
  }

  /* Formula Box */
  .formula-box {
    max-width: 260px;
    padding: 12px 16px;
    border-width: 5px;
  }

  .formula-box h4 {
    font-size: 18px !important;
  }

  .formula-box .formula {
    font-size: 14px !important;
    padding: 6px 10px;
  }

  /* Formula Range */
  .formula-range {
    margin: 25px 10px;
    padding: 6px;
    font-size: 13px !important;
  }

  /* Range Bar */
  .range-bar {
    margin-top: 70px;
    height: 26px;
  }

  .marker {
    width: 50px;
    height: 50px;
    top: -16px;
  }

  .range-label {
    font-size: 10px !important;
  }

  /* Video Cards */
  .ndvi-section .col-md-6.col-lg-6 {
    padding: 0 8px;
    margin-bottom: 15px;
  }

  .ndvi-section .card {
    border-radius: 12px;
  }

  .ndvi-section .card video,
  .ndvi-video {
    height: 180px;
  }

  .ndvi-section .card-body {
    padding: 12px !important;
  }

  .ndvi-section .card-title {
    font-size: 14px !important;
  }

  .ndvi-section .card-body p,
  .ndvi-section .card-text {
    font-size: 12px !important;
  }

  .ndvi-section > .container > p {
    font-size: 13px !important;
  }
  /* header section */
  .main-heading {
    font-size: 1.7rem;
  }

  .intro-lines {
    font-size: 1.1rem;
  }

  .read-anchor {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }

  .header img {
    width: 110px;
  }

  .heading-div {
    padding: 0.5rem 0;
    font-size: 12px;
  }
  /* NDVI caurousel section  */
  #ndvi-carousel-section .data-stories-header {
    margin: 15px 20px;
    padding: 20px 10px;
    border-radius: 0 20px 0 20px;
  }

  #ndvi-carousel-section .data-stories-header h1 {
    font-size: 14px;
    line-height: 1.3;
  }

  #ndvi-carousel-section .custom-carousel {
    max-width: 100%;
    max-height: 280px;
  }

  #ndvi-carousel-section .custom-carousel img {
    height: 171px;
    object-fit: cover;
  }

  #ndvi-carousel-section .carousel-control-prev,
  #ndvi-carousel-section .carousel-control-next {
    width: 35px;
  }

  #ndvi-carousel-section .carousel-control-prev {
    left: -15px;
  }

  #ndvi-carousel-section .carousel-control-next {
    right: -15px;
  }

  #ndvi-carousel-section .carousel-indicators li {
    width: 8px;
    height: 8px;
  }
  /* ==================== MAIN SECTION MOBILE RESPONSIVE CSS ==================== */
  /* ==================== TABLET RESPONSIVE (≤1200px) ==================== */
  /* Main section elements */
  .boat {
    --boat-height: 9rem;
    height: var(--boat-height);
    top: calc(68vh - var(--boat-height) / 2);
  }
  .plow-lines {
    height: calc(63vh - 12rem / 10);
    width: 90px !important;
  }
  /* Data sections */
  .data-section {
    padding: 8rem 0.5rem;
    gap: 1.2rem;
  }

  /* Picture and content divs */
  .picture-div,
  .content-div {
    width: 85%;
  }

  .leaf-background {
    padding-inline: 2rem;
  }

  .round-img {
    /* width: calc(100% - 4rem);
    left: 2rem; */
    width: calc(103% - 5.9rem);
    left: 2.6rem;
  }

  .carousel-control-prev-icon,
  .carousel-control-next-icon {
    padding: 11px;
  }
  #ndvi-carousel-section .carousel-control-next {
    right: -6px;
  }
  #ndvi-carousel-section .carousel-control-prev {
    left: -6px;
  }
  #ndvi-carousel-section .carousel-indicators {
    bottom: -22px;
  }
  #ndvi-carousel-section .carousel-indicators li {
    height: 2px;
  }
  /* Content background */
  .content-bg {
    width: 108%;
    left: -4%;
    top: -4%;
    height: 108%;
  }

  /* Content article */
  .content-article {
    font-size: 0.85rem;
    padding: 1rem 0.8rem;
  }

  .article-title {
    font-size: 1.05rem;
    margin-block: 0.3rem;
  }

  .article-list {
    font-size: 0.78rem;
    padding-left: 1.2rem;
    line-height: 1.3;
  }

  /* Stats and values */
  .value {
    font-size: 20px;
  }

  .label {
    font-size: 12px;
  }

  .unit {
    font-size: 11px;
  }

  .year {
    font-size: 13px;
  }

  /* Charts */
  #ndvi-pie,
  #crop-area-pie,
  #ndviMeanChart,
  #ndviMaxChart,
  #ndviMinChart,
  #flowchart-punjab,
  #up-story,
  #karnataka-story,
  #ndviChart {
    max-width: 320px !important;
    height: 240px !important;
  }

  /* Tables */
  .content-article table {
    font-size: 0.7rem;
  }

  .content-article table td,
  .content-article table th {
    padding: 0.2rem 0.1rem;
  }

  /* Badges */
  .badge {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }
  /* Footer  */
  .footer-img {
    width: 100%;
    height: auto;
    display: block;
  }

  .footer-section {
    position: absolute;
    flex-direction: row;
    gap: 7.5rem;
    bottom: 30%;
    left: 0;
    width: 100%;
    padding: 0.4rem;
    z-index: 2;
  }

  .footer-div {
    flex: 1;
  }

  .footer-article {
    background-color: rgba(255, 255, 255, 0.9);
    font-size: 0.2rem;
    padding: 0.2rem;
    border: #82b183 solid 0.2rem;
    border-radius: 0.5rem;
    text-align: left;
  }

  .footer-title {
    font-weight: 800;
    font-size: 0.4rem;
    margin-bottom: 1px;
    text-align: center;
  }
  .footer-div p {
    font-size: 5px !important;
    margin-bottom: 1px;
  }
  .footer-logo {
    width: 75px;
    padding: 35px 0;
    /* height: 85px; */
  }

  .footer-right {
    width: 146px;
  }
  .footer-social {
    margin-top: 0rem !important;
  }
  .footer-social a {
    margin-right: 1rem;
  }

  .footer-social a:last-child {
    margin-right: 0;
  }

  .footer-social a i {
    font-size: 0.3rem;
  }

  .footer-social a:hover {
    color: #0d6efd;
    transition: color 0.3s;
  }
  .version-popup {
    margin: 22px 2rem;
    padding: 10px;
  }
  .version-popup > ul {
    padding: 0 23px;
  }

  /* .footer-logo {
    width: 140px;
  }

  .footer-article {
    font-size: 0.8rem;
    padding: 1rem;
  }

  .footer-title {
    font-size: 1.1rem;
  }

  .footer-social a i {
    font-size: 1.2rem;
  } */
}

/* ==================== EXTRA SMALL MOBILE (≤480px) ==================== */
@media (max-width: 480px) {
  .ndvi-section {
    padding: 25px 8px;
  }

  .ndvi-section.py-5 {
    padding-top: 25px !important;
    padding-bottom: 25px !important;
  }

  .ndvi-section h4 {
    font-size: 15px !important;
  }

  .ndvi-section p {
    font-size: 12px !important;
  }

  .ndvi-section h2 {
    font-size: 15px !important;
  }

  /* Gauge Card */
  .gauge-card {
    max-width: 240px;
    padding: 10px;
  }

  .gauge-card img {
    max-width: 160px;
  }

  /* Formula Box */
  .formula-box {
    max-width: 240px;
    padding: 10px 14px;
  }

  .formula-box h4 {
    font-size: 16px !important;
  }

  .formula-box .formula {
    font-size: 13px !important;
  }

  /* Formula Range */
  .formula-range {
    margin: 20px 8px;
    font-size: 12px !important;
  }

  /* Range Bar */
  .range-bar {
    margin-top: 60px;
    height: 24px;
  }

  .marker {
    width: 45px;
    height: 45px;
    top: -14px;
  }

  .range-label {
    font-size: 9px !important;
  }

  /* Video Cards */
  .ndvi-section .card video,
  .ndvi-video {
    height: 160px;
  }

  .ndvi-section .card-body {
    padding: 10px !important;
  }

  .ndvi-section .card-title {
    font-size: 13px !important;
  }

  .ndvi-section .card-body p,
  .ndvi-section .card-text {
    font-size: 11px !important;
  }

  .ndvi-section > .container > p {
    font-size: 12px !important;
  }
  #ndvi-pie,
  #crop-area-pie,
  #ndviMeanChart,
  #ndviMaxChart,
  #ndviMinChart,
  #flowchart-punjab,
  #up-story,
  #karnataka-story,
  #ndviChart {
    width: 100% !important;
    max-width: 380px !important;
    height: 280px !important;
    margin: 0 auto !important;
  }
  .footer-logo {
    padding: 23px 0;
  }
  .round-img {
    width: calc(100% - 6rem);
    left: 3rem;
  }
  .footer-section {
    gap: 8.6rem;
    bottom: 56px;
    left: 0;
    width: 99%;
    padding: 0.4rem;
    z-index: 2;
  }
  .footer-article {
    background-color: rgba(255, 255, 255, 0.9);
    font-size: 0.5rem;
    padding: 0.2rem;
    border: #82b183 solid 0.2rem;
    border-radius: 0.5rem;
    text-align: left;
  }
  .footer-div p {
    font-size: 4.5px !important;
    margin-bottom: 1px;
  }
  .footer-right {
    width: 140px;
  }

  /* ==================== MAIN SECTION MOBILE RESPONSIVE CSS ==================== */
  /* ==================== TABLET RESPONSIVE (≤1200px) ==================== */
  /* Main section elements */
}

@media (max-width: 360px) {
  #ndvi-carousel-section .custom-carousel img {
    height: 144px;
    object-fit: cover;
  }
  .ndvi-section {
    padding: 20px 5px;
  }

  .ndvi-section.py-5 {
    padding-top: 20px !important;
    padding-bottom: 20px !important;
  }

  .gauge-card {
    max-width: 220px;
  }

  .gauge-card img {
    max-width: 140px;
  }

  .formula-box {
    max-width: 220px;
    padding: 8px 12px;
  }

  .formula-box h4 {
    font-size: 15px !important;
  }

  .formula-box .formula {
    font-size: 12px !important;
  }

  .formula-range {
    font-size: 11px !important;
  }

  .range-bar {
    margin-top: 50px;
    height: 22px;
  }

  .marker {
    width: 40px;
    height: 40px;
    top: -12px;
  }

  .range-label {
    font-size: 8px !important;
  }

  .ndvi-section .card video,
  .ndvi-video {
    height: 140px;
  }

  .ndvi-section .card-title {
    font-size: 12px !important;
  }

  .ndvi-section .card-body p,
  .ndvi-section .card-text {
    font-size: 10px !important;
  }
  /* ==================== MAIN SECTION MOBILE RESPONSIVE CSS ==================== */
  /* ==================== TABLET RESPONSIVE (≤1200px) ==================== */
  /* Main section elements */
  /* Data sections */
  .data-section {
    padding: 7.5rem 0.3rem;
  }

  /* Picture and content divs */
  .picture-div,
  .content-div {
    width: 98%;
  }

  .leaf-background {
    padding-inline: 1.5rem;
  }

  .round-img {
    width: calc(100% - 5rem);
    left: 2.5rem;
  }

  /* Content article */
  .content-article {
    font-size: 0.75rem;
    padding: 0.8rem 0.6rem;
  }

  .article-title {
    font-size: 0.95rem;
  }

  .article-list {
    font-size: 0.7rem;
    padding-left: 1rem;
  }
  .carousel-control-prev-icon,
  .carousel-control-next-icon {
    padding: 11px;
  }
  #ndvi-carousel-section .carousel-control-next {
    right: -6px;
  }
  #ndvi-carousel-section .carousel-control-prev {
    left: -6px;
  }
  #ndvi-carousel-section .carousel-indicators {
    bottom: -22px;
  }
  #ndvi-carousel-section .carousel-indicators li {
    height: 2px;
  }
  /* Stats and values */
  .value {
    font-size: 18px;
  }

  .label {
    font-size: 10px;
  }

  .unit {
    font-size: 10px;
  }

  /* Charts */
  #ndvi-pie,
  #crop-area-pie,
  #ndviMeanChart,
  #ndviMaxChart,
  #ndviMinChart,
  #flowchart-punjab,
  #up-story,
  #karnataka-story,
  #ndviChart {
    max-width: 280px !important;
    height: 220px !important;
  }

  /* Tables */
  .content-article table {
    font-size: 0.65rem;
  }

  /* Badges */
  .badge {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }

  /* Footer */
  .footer-section {
    gap: 7rem;
    bottom: 48px;
    width: 100%;
  }

  .footer-logo {
    /* width: 120px; */
    padding: 24px 0;
  }
  .footer-right {
    width: 140px;
  }
  /* ==================== ANIMATION & TRANSITION FIXES ==================== */
  /* Section animations */
  .section-animate .hidden-div {
    max-height: none;
    max-width: 100%;
  }

  .hidden-div {
    transition: all 0.8s ease;
  }

  /* Ensure content stays above background */
  .content-div > .hidden-div {
    position: relative;
    z-index: 2;
  }

  /* Smooth transitions */
  .picture-div,
  .content-div,
  .leaf-background,
  .round-img,
  .content-bg {
    transition: all 0.3s ease;
  }
}
