@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.2.19/tailwind.min.css');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');


body {
    font-family: 'Inter', sans-serif;
    background-color: #f8edda;
    background:
        linear-gradient(rgba(248, 237, 218, 0.8), rgba(248, 237, 218, 0.8)),
        url('images/story_intro.png') no-repeat center center fixed;
    margin: 0;
    background-size: cover;
    overflow-x: hidden;
    color: #2c3e50;
    overflow-y: scroll;
    scrollbar-width: none;  
}

body::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

.justify-text {
    text-align: justify !important;
}

.main-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    min-height: 500vh;
    position: relative;
}

.center-column {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 150px;
    height: 100vh;
    z-index: 10;
    background-color: #cd995a;
    background-size: contain;
    background-repeat: repeat-y;
    background-position: top;
    background-size: cover;
}

.tractor-path {
    width: 150px;
    height: calc(100vh - 300px);
    background: #cd995a url('images/plow_lines.png') repeat-y center top;
    background-size: contain;
    z-index: 1;
    position: fixed;
    top: 0;
    left: 50%;
    bottom: 50%;
    transform: translateX(-50%);
}

.tractor-plow {
    display: none;
}

.tractor-container {
    position: fixed;
    bottom: 10vh;
    z-index: 20;
    display: flex;
    align-items: flex-end;
    width: fit-content;
    background: none;
}

.tractor {
    width: 150px;
    height: auto;
    background-size: contain;
    background-repeat: no-repeat;
    filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.4));
}

.content-column {
    position: relative;
    z-index: 5;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.left-column {
    padding-right: 2rem;
    padding-left: 2rem;
    grid-column: 1;
    font-family: 'Poppins', sans-serif;
    max-width: 500px;
    line-height: 1.8;
    margin-left: 50px;
}

.left-column h2 {
    color: #1f3829;
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.left-column h1 {
    color: #317039;
}

.left-column p {
    font-size: 1rem;
    color: #333;
    text-align: left;
    word-wrap: break-word;
}

.left-column .text-section {
    margin-bottom: 2.5rem;
}

.right-column {
    padding-left: 2rem;
    padding-right: 2rem;
    grid-column: 3;
    font-family: 'Poppins', sans-serif;
    max-width: 500px;
    margin-right: 50px;
    margin-left: auto;
    text-align: right;
}

.right-column h2 {
    color: #1f3829;
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.right-column p {
    font-size: 1rem;
    color: #333;
    line-height: 1.8;
    word-wrap: break-word;
}

.right-column .text-section {
    margin-bottom: 2.5rem;
}

#maharashtra-section {
    position: relative;
    top: 200px;
}

.text-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    overflow: visible;
}

.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.left-section {
    transform: translateX(-50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.right-section {
    transform: translateX(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.left-section.is-visible,
.right-section.is-visible {
    transform: translateX(0);
}

h2 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.0rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    font-size: 1rem;
    line-height: 1.6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .main-container {
        grid-template-columns: 1fr;
    }

    .center-column {
        position: static;
        transform: none;
        grid-column: 1;
        height: auto;
    }

    .tractor-container {
        position: static;
        margin-top: 2rem;
    }

    .left-column,
    .right-column {
        grid-column: 1;
    }
}

/*Graph Styles */
#graph1 {
    position: absolute;
    top: -50px;
    left: -17px;
    z-index: 3;

    /* Appearance */
    background-color: rgba(255, 255, 255, 0.8);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.green-section {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.greenrows {
    position: relative;
    margin: 2rem;
    right: auto;
    z-index: 10;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/*slide 2 images styling*/
.scene {
    position: relative;
    width: 600px;
    height: 0;
    margin-top: 70%;
    margin-left: -90px;
    z-index: 2;
    top: -0;
}

.layer,
.grass,
.barn {
    position: absolute;
    /* Take images out of normal flow for precise placement */
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    transition: transform 0.8s ease-out;
}

.layer {
    z-index: 1;
    width: 25%;
    bottom: 0;
    left: 0;
}

.grass {
    z-index: 2;
    width: 25%;
    bottom: 10px;
    left: 30px;
}

.barn {
    z-index: 3;
    bottom: 0;
    left: 190px;
    width: 150px;
}

.placeholder-box {
    width: 400px;
    height: 200px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    /* subtle shadow */
    margin: 30rem auto 1.5rem auto;
    text-align: center;
}

.placeholder-box ul {
    list-style-type: disc;
}

/*slide 3 styling*/
.feeder-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20rem;
}

.feeder-section {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    transition: all 0.2s ease-out;
    background-color: rgba(205, 153, 90, 0.3);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
}

.feeder {
    width: 500px;
    height: auto;
    z-index: 1;
}

.cow {
    position: absolute;
    top: -200px;
    left: 190px;
    width: 130px;
    opacity: 0;
    transition: top 1.5s ease-out, opacity 1.5s ease-out;
    z-index: 5;
}

.cow.drop-in {
    opacity: 1;
    top: 220px;
    /* slide down into visible area */
}

#rabi-section {
    margin-top: -250px;
}

.barn-image {
    position: relative;
    width: fit-content;
    margin-top: 100px;
    margin-left: -80px;
    text-align: left;
}

#barn-horizontal {
    width: 100%;
    max-width: 90%;
    position: relative;
    left: 0;
    z-index: 5;
}

/* chart cards */
.card {
    position: relative;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    padding: 20px;
    margin: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    top: 0;
    width: 100%;
    text-align: left;
    margin-bottom: 20rem;
}

.card:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    transform: translateY(-3px);
}

.card p {
    margin-top: 12px;
    font-size: 1rem;
    color: #333;
    line-height: 1.5;
}

.card ul {
    margin: 12px 0;
    padding-left: 20px;
    list-style-type: disc;
}

.card .source a {
    color: #2563eb;
    text-decoration: none;
    font-size: 13px;
    text-align: left;
}

.card h2 {
    font-size: 24px;
    font-weight: 600;
    color: #1a2b6d;
    margin-bottom: 25px;
    text-align: center;
}

.card-number {
    display: none;
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;                
    background-color: #317039;  
    border-radius: 50%;           
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.card:hover .card-number,
.seasons-content:hover .card-number,
.program-card:hover .card-number {
    display: flex;
}

.circle-badge {
  position: absolute;
  top: 70px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: #317039;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.circle-badge img {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}

.circle-badge:hover::before {
  opacity: 0;
}
.circle-badge:hover img {
  opacity: 1;
}

.circle-badge::before {
  content: attr(data-number);
}

/* Side placement */
.circle-badge.left {
  left: -25px;  /* sticks out from the left */
}

.circle-badge.right {
  right: -750px; /* sticks out from the right */
}

#crop-area-card {
    width: 110%;
}

/*seasons content*/
.seasons-content {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    padding: 30px 20px;
    max-width: 700px;
    margin: 10px auto 30px auto;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.seasons-content:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

.seasons-content h2 {
    font-size: 24px;
    font-weight: 600;
    color: #1a2b6d;
    margin-bottom: 25px;
}

.seasons-content .stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
}

.seasons-content .stat {
    flex: 1;
}

.seasons-content .stat .value {
    font-size: 32px;
    font-weight: 600;
    color: #e53935;
}

.seasons-content .stat .unit {
    font-size: 14px;
    color: #555;
    margin-bottom: 10px;
}

.seasons-content .stat .label {
    font-size: 16px;
    font-weight: 500;
    color: #1a2b6d;
}

.seasons-content ul {
    margin-top: 15px;
    padding-left: 20px;
    text-align: left;
    font-size: 14px;
    color: #333;
    list-style-type: disc;
}

.seasons-content .source {
    margin-top: 15px;
    font-size: 13px;
    color: #555;
    text-align: left;
}

.seasons-content .source a {
    color: #2563eb;
    /* blue link */
    text-decoration: none;
}

.seasons-content .source a:hover {
    text-decoration: underline;
}

#ndvi-distribution {
    margin-top: 100px;
    margin-right: 50px;
}

/**/
.program-card {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    padding: 30px 25px;
    max-width: 750px;
    margin: 30px auto;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.program-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

.program-card h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1a2b6d;
    margin-bottom: 5px;
    text-align: center;
}

.program-card h4 {
    font-size: 15px;
    font-weight: 400;
    color: #555;
    margin-bottom: 20px;
    text-align: center;
}

.program-details .year {
    font-size: 40px;
    font-weight: 700;
    color: #e53935;
    margin-bottom: 15px;
    text-align: center;
}

.metrics {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    /* space between boxes */
    margin-top: 25px;
}

.metric {
    flex: 1;
    background: rgba(245, 235, 220, 0.7);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.metric .value {
    font-size: 26px;
    font-weight: 700;
    color: #1a2b6d;
    margin-bottom: 10px;
}

.metric .label {
    font-size: 14px;
    color: #444;
    line-height: 1.4;
}

.left-column > *,
.right-column > * {
    margin-bottom: 2.5rem;
}

.left-column > *:last-child,
.right-column > *:last-child {
    margin-bottom: 2rem;
}

.left-column > .image-slide,
.right-column > .image-slide {
    margin-bottom: 2.5rem;
    text-align: center;
}

.image-slide {
    display: flex;
    justify-content: space-between; /* puts space between images */
    align-items: center;            /* vertically centers them */
    gap: 20px;                      /* optional spacing */
}

.grass-img {
    max-width: 45%;   /* so two fit nicely */
    height: auto;     /* keeps aspect ratio */
}

/* Responsive image */
.image-slide img {
    max-width: 41%;
    height: auto;
    display: block;
    border-radius: 0.5rem;
}

/* Alignment helpers */
.image-slide.left img {
    margin-left: 0;
    margin-right: auto;
    size: 50%;
}

.image-slide.center img {
    margin-left: auto;
    margin-right: auto;
}

.image-slide.right img {
    margin-left: auto;
    margin-right: 0;
}

.image-slide:hover img {
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

