* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


.scroll-container {
    position: fixed;
    top: 750px;
    right: 50px;
    z-index: 50;
}

.scroll-container i {
    font-size: 46px;
    color: white;
    cursor: pointer;
}

.railway1 {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
}

video {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
}

.hero-text {
    width: 80%;
    text-align: center;
    font-weight: bold; 
    text-shadow: 2px 2px 6px rgba(255, 255, 255, 0.2); /* Bright glowing effect */
    color: #ffffff; /* Pure white text */
    padding: 20px; /* Adds spacing */
    border-radius: 10px; /* Smooth edges for text background */
}

.hero-text h1 {
    font-size: 4rem;
}

.hero-text h2 {
    font-size: 2rem;
}

.intoduction {
    width: 70%;
    padding: 1.5rem 0rem;
    text-align: justify;
}

/* Workflow Styling */
.workflow-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.workflow-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
}

.workflow-btn {
    background-color: #6c5ce7;
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 8px;
    transition: transform 0.2s, background-color 0.3s;
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.2);
    /* cursor: default  !important; */
}

.workflow-btn:hover {
    background-color: #a29bfe;
    transform: scale(1.05);
}

.popup {
    display: none;
    position: absolute;
    top: 0;
    left: 110%; /* right side of button */
    background-color: #fff;
    color: #333;
    padding: 10px 15px;
    border-radius: 8px;
    /* white-space: nowrap; */
    width: 600px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 1000;
    font-size: 0.4rem;
}

.popup::before {
    content: "";
    position: absolute;
    top: 10px;
    left: -10px; /* just outside the left edge */
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 12px solid #fff; /* match background of .popup */
}

.workflow-step.show-popup .popup {
    display: block;
}

/* Arrow Styling */
.arrow {
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 20px solid white;
    margin: 15px 0;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Hidden Arrows Initially */
.hidden {
    opacity: 0;
}

/* Show Arrow when Scroll is Triggered */
.show-arrow {
    opacity: 1;
    transform: translateY(0);
}

.study-area img {
    padding-bottom: 2rem;
}

/* Ensure the comparison container is properly positioned */
#comparison-container1, #comparison-container2, #comparison-container3, #comparison-container4, #comparison-container5, #comparison-container6, #changedetection-container1, #changedetection-container2 {
    position: relative;
    width: 100%;
    height: 100vh; /* Full-screen height */
}

/* Both maps should fully overlap */
.beforemap, .aftermap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#CD-map-NDVI, #CD-map-NDBI {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.mapboxgl-compare .compare-swiper {
    background: white !important;
    width: 3px !important; 
}


/* On maps heading overlay start */

.overlay-left, .overlay-right {
    position: absolute;
    top: 36px;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.5px;
    color: white; 
    background: rgba(0, 0, 0, 0.7); /* ✅ Semi-transparent background for contrast */
    padding: 4px;
    border-radius: 3px; /* ✅ Rounded corners */
    z-index: 10; /* ✅ Ensures it appears above the map */
}

.overlay-left {
    left: 15%;
}

.overlay-right {
    right: 15%;
}

.overlay-left2, .overlay-right2 {
    position: absolute;
    top: 5px;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.5px;
    color: white; 
    background: rgba(0, 0, 0, 0.7); /* ✅ Semi-transparent background for contrast */
    padding: 4px;
    border-radius: 3px; /* ✅ Rounded corners */
    z-index: 10; /* ✅ Ensures it appears above the map */
}

.overlay-left2 {
    left: 12%;
}

.overlay-right2 {
    right: 12%;
}

/* On maps heading overlay end  */

/* legends start */
.legend {
    position: absolute;
    top: 78%;
    right: 10px;
    /* background: rgba(0, 0, 0, 0.1);  */
    padding: 15px 20px;
    border-radius: 8px;
    /* border: 2px solid #F8DE22;  */
    text-align: center;
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.2);
}

.legend h4 {
    margin: 0 0 12px;
    font-size: 18px;
    color: #F8DE22; /* Yellow Title */
    text-decoration: underline;
}

.legend h4 {
    margin: 0 0 12px;
    font-size: 18px;
    color: #F8DE22; /* Yellow Title */
    text-decoration: underline;
}

.min-max {
    display: flex;
    justify-content: space-between;
}


.legend-ds {
    width: 500px; 
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(to right, red, white, green,);
    margin: 10px auto; 
}

.legend-line {
    width: 500px; 
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(to right, #162be9, #f7eb3d, #e91330, #29c81e, #0a6116); 
    margin: 10px auto;
}


.legend-line-ryg {
    width: 250px; 
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(to right, #e91330, #f7eb3d, #2dcb21); 
    margin: 10px auto;
}

.legend-line-ryg-ndbi {
    width: 250px; 
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(to right, #2dcb21, #f7eb3d, #e91330); 
    margin: 10px auto;
}

.legend-line-rr{
    width: 500px; 
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(to right, #162be9, #f7eb3d, #e91330, #8a0324, #52e666); 
    margin: 10px auto;
}


.legend-labels {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-top: 5px;
}
/* legends end */

/* Dashboard start */
.dashboard-container {
    position: relative;
    height:100vh;
}

#container-dashboard {
    position: relative;
    width: 100%;
    height: 100%;
}

#map-dashboard {
    position: absolute;
    top: 0;
    left: 0;
    right: 350px;   /* leave space for the dashboard */
    bottom: 0;   /* leave space for the graphs */
    z-index: 1;
}

#dashboard-overlay {
    position: absolute;
    top: 0;
    right: 0;
    width: 350px;
    height: 100vh;
    background: rgb(0, 0, 0,0.65);
    backdrop-filter: blur(8px);
    color: white;
    z-index: 10;
    padding: 20px 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  #dashboard-overlay h2 {
    text-align: center;
    margin-top: 0;
    font-size: 20px;
    margin-bottom: 12px;
  }
  
  .info-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px;
    margin: 10px 0;
    width: 100%;
    text-align: center;
  }
  
  .stat {
    font-size: 32px;
    font-weight: bold;
    color: #00e676;
  }
  
  .label {
    font-size: 14px;
    color: #ccc;
  }
  
  .chart-container-dashboard {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 12px auto;
  }
  
  #areaChart {
    width: 100% !important;
    height: 100% !important;
  }
  
  #legend-dashboard {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    text-align: center;
    color: white;
    line-height: 1.4;
    pointer-events: none;
  }
  
  .button-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    width: 100%;
    align-items: center;
  }
  
  .year-buttons {
    display: flex;
    gap: 10px;
    width: 100%;
    justify-content: space-between;
  }
  
  .button-row button {
    flex: 1;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: bold;
    border: 2px solid white;
    background: transparent;
    color: white;
    transition: all 0.3s ease;
    text-align: center;
  }
  
  .button-row button:hover {
    background: white;
    color: black;
  }
  
  
  /* Charts at Bottom */
  #graph-section {
    position: absolute;
    bottom: 0;
    left: 0;                            /* align with map edge */
    right: 280px;                       /* stop before dashboard */
    height: 33vh;
    /* background-color: rgba(20, 20, 20, 0.65); */
    background-color: rgb(0, 0, 0,0.65);
    backdrop-filter: blur(5px);
    display: flex;
    gap: 100px;
    padding: 12px 20px;
    z-index: 5;
    border-radius: 0 12px 0 0;
    
  }
  
  #graph-section canvas {
    flex: 0 0 40%;
    max-width: 40%;
    background-color: transparent !important;
    height: 100% !important;
    margin-left: 30px;
  }
  /* dashboard end */

  /* pie chart style start*/
.pie-chart-container {
    width: 100vw;
    max-width: 1200px;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

h2 {
    text-align: center;
    font-size: 1.5em;
    margin-bottom: 10px;
    color: white;
}

.chart-map-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    color: white;
}

.chart-container {
    width: 30%;
    min-width: 300px;
}

.map {
    width: 70%;
    height: 300px;
    position: relative;
}

/* Reset Button Styling */
.reset-map-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
}

.reset-map-btn:hover {
    background-color: rgba(255, 255, 255, 1);
}

/* pie chart style end*/

.ndvi-ndbi {
    display: flex;
    justify-content: space-around;
    align-items: flex-start; /* Ensure vertical alignment */
    gap: 20px; /* Adds spacing between sections */
    padding: 20px;
}

.ndvi-change, .ndbi-change {
    flex: 1; /* Ensures both sections take equal width */
    padding: 20px;
}

/* Add vertical line between NDVI and NDBI */
.ndvi-change {
    border-right: 3px solid #F8DE22; /* Yellow vertical line */
    padding-right: 50px; /* Add spacing before the line */
}


/* Ensure NDBI section has space from the left */
.ndbi-change {
    padding-left: 30px;
}


.ndvi-ul li, .ndbi-ul li, .ndvi-cause li, .ndbi-cause li {
    list-style-type: none;
    padding: 0.1rem;
}

.ndvi-ul, .ndbi-ul {
    padding-top: 15px;
}

.ndvi-ul li::before, .ndbi-ul li::before, .ndvi-cause li::before, .ndbi-cause li::before {
    content: "🚊";
    margin: 8px;
}

h4{
    color: #F8DE22;
}

/* bar chart start */
.barchart-outer-container {
    margin: 0 auto; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
}


#barchart-container {
    width: 70%; 
    background: #fff; 
    padding: 10px; 
    box-sizing: border-box; 
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
/* bar chart end */


.conclusion h3 {
    color: #F8DE22;
}

.conclusion p {
    text-align: justify;
    padding: 10px 50px;
}

/* Prevent content from overlapping on the map */
.contents {
    position: relative;
    left: 16%;
    z-index: 10;
    width: 70%;
    padding: 1.2rem 0rem;
    text-align: justify;
}

.enhanced-railway {
    display: flex;
    flex-direction: column;
    align-items: center;
}


.enhanced-railway ul {
    /* list-style-type: none; */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}


/* cards style start */
.card-container {
    display: flex;
    gap: 5px;
    padding: 6px;
    flex-wrap: wrap;
    
}

.card-container .card-body {
    background-color: rgb(53, 52, 52);
    color: white;
    padding: 16px;
    border-radius: 10px;
    list-style-type: none;
}

.card-body h5 {
    color: gold;
}

.card-container ul {
    list-style-type: none;
}
/* cards style end */


@media (max-width: 768px) {
    .intoduction {
        width: 92%;
        padding: 0.8rem 0rem;
    }

    .scroll-container {
        top: 650px;
        right: 40px;
    }

    .scroll-container i {
        font-size: 36px;
    }

    .overlay-left {
        left: 16%;
    }
    
    .overlay-right {
        right: 16%;
    }

    /* pie char start */
    .chart-map-container {
        flex-direction: column;
        align-items: center;
    }
    .chart-container {
        width: 100%;
    }
    .map {
        width: 100%;
        height: 300px;
    }
    /* pie chart end */

    .ndvi-ndbi {
        flex-direction: column; /* ✅ Stack NDVI and NDBI vertically on mobile */
        align-items: center; /* Center elements for better alignment */
        gap: 5px; /* Reduce spacing on smaller screens */
    }

    .ndvi-change {
        border-right: none; /* ✅ Remove vertical line in mobile view */
        border-bottom: 3px solid #F8DE22; /* ✅ Add horizontal separator */
        padding: 8px; /* Add spacing below */
    }

    .results p {
        padding: 10px;
    }

    .contents {
        left: 4%;
        width: 92%;
    }

    #comparison-container {
        height: 92vh; /* Adjust height for smaller screens */
    }

    .conclusion p {
        padding: 5px 25px;
    }

}

@media (max-width: 426px) {
    .intoduction {
        width: 85%;
        padding: 0.8rem 0rem;
    }

    .scroll-container {
        top: 600px;
        right: 30px;
    }

    .scroll-container i {
        font-size: 28px;
    }

    .hero-text h1 {
        font-size: 1.8rem;
        font-weight: bold; 
    }


    .hero-text h2{
        font-size: 1.2rem;
        font-weight: bold; 
    }

    .overlay-left, .overlay-right {
        position: absolute;
        top:33px;
        font-size: 8px;
        font-weight: bold;
        color: white; 
        background: rgba(0, 0, 0, 0.7); 
        padding: 4px;
        border-radius: 4px; 
        z-index: 10;
    }

    .overlay-left {
        left: 13%;
    }
    
    .overlay-right {
        right: 13%;
    }

    .overlay-left2, .overlay-right2 {
        position: absolute;
        top: 7px;
        font-size: 8px;
        font-weight: bold;
        color: white; 
        background: rgba(0, 0, 0, 0.7); /* ✅ Semi-transparent background for contrast */
        padding: 4px;
        border-radius: 4px; /* ✅ Rounded corners */
        z-index: 10; /* ✅ Ensures it appears above the map */
    }

    .overlay-left2 {
        left: 2%;
    }
    
    .overlay-right2 {
        right: 2%;
    }

    .popup {
        display: none !important;
    }

    
    .workflow-btn {
        cursor: default;
    }

    .workflow-btn:hover {
        background-color: none;
        transform: none;
    }

    .contents {
        left: 8%;
        width: 85%;
    }

    .ndvi-ndbi {
        flex-direction: column; /* ✅ Stack NDVI and NDBI vertically on mobile */
        align-items: center; /* Center elements for better alignment */
        gap: 5px; /* Reduce spacing on smaller screens */
    }

    .ndvi-change {
        border-right: none; /* ✅ Remove vertical line in mobile view */
        border-bottom: 3px solid #F8DE22; /* ✅ Add horizontal separator */
        padding: 8px; /* Add spacing below */
    }

    .ndbi-change {
        padding: 8px;
    }

    .ndvi-img, .ndbi-img{
        width: 100%;
    }

    .ndvi-ul li {
        padding: 0px;
    }

    .ndvi-ul, .ndbi-ul {
        padding-bottom: 0px;
        margin-bottom: 0px;
    }

    #comparison-container1, #comparison-container2, #comparison-container3, #comparison-container4, #comparison-container5, #comparison-container6 {
        height: 90vhs;
    }

    .legend {
        position: absolute;
        top: 80%;
        right: 0;
        background: rgba(0, 0, 0, 0.1); /*Semi-transparent background */
        padding: 10px 6px;
    }

    .legend-line {
        width: 410px; 
        height: 10px;
        margin: 0 auto;
    }

    .legend-line-ryg {
        width: 410px; 
        height: 8px;
        margin: 0 auto;
    }
    .legend-line-rr{
        width: 410px; 
        height: 8px;
        margin: 0 auto;
    }

    .card-container {
        flex-wrap: wrap;
    }

    .card-container .card-body {
        padding: 8px;
        margin: 6px;
    }
}
