/* ==================== SLIDER PAGE SPECIFIC STYLES ==================== */
/* This file extends the main portfolio CSS */

.sliderimageportfolio-row {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1000px;
  margin-bottom: 3vw;
  height: auto;
  padding: 10px;
  border: 1px solid var(--border-medium);
  box-sizing: border-box;
}

.sliderimageportfolio-left {
  width: 100%;
  box-sizing: border-box;
  overflow-y: visible;
  text-align: left;
  line-height: 1.6;
  height: auto;
  margin-bottom: 10px;
}

.sliderimageportfolio-right {
  position: relative;
  height: 400px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #464646;
  transition: box-shadow 0.3s ease;
}

/* Uses h2 and p from main CSS - no overrides needed */
.sliderimageportfolio-left h2 {
  display: inline-block;
  margin: 0 0 5px 0;
}

.sliderimageportfolio-left p {
  width: 90%;
}

.sliderimageportfolio-left ul {
  padding-left: 20px;
  margin: 10px 0;
}

.sliderimageportfolio-left li {
  font-size: var(--font-xs);
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 4px 0;
}

/* ==================== SLIDER INSTRUCTIONS ==================== */

.slider-instruction,
.homeslider-instruction {
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  color: rgb(221, 221, 221);
  font-size: clamp(1.2em, 3vw, 3em);
  font-weight: bold;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
  opacity: 1;
  visibility: visible;
}

.slider-instruction.hidden,
.homeslider-instruction.hidden {
  opacity: 0;
  visibility: hidden;
}

.slider-instruction p,
.homeslider-instruction p {
  display: inline-block;
  background: var(--highlight-bg);
  padding: 3px 8px;
  border-radius: 3px;
  margin: 0;
  font-weight: bold;
  color: var(--text-dark);
  font-size: var(--font-sm);
}

/* ==================== IMAGE SLIDER CONTAINER ==================== */

.img-slider-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.img-slider-container img,
.img-slider-container .overlay-image-wrapper {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slider-container {
  position: relative;
  width: 100%;
  max-width: 800px;
  height: 400px;
  overflow: hidden;
  border: 1px solid black;
}

/* ==================== SLIDER IMAGES ==================== */

.base-image,
.overlay-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.overlay-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 2;
}

.overlay-image {
  clip-path: inset(0 50% 0 0);
  z-index: 2;
}

/* ==================== SLIDER HANDLE & CONTROLS (REVISED: Arrows OUTSIDE) ==================== */

.slider-handle {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3px; 
  height: 100%;
  background-color: white; 
  cursor: ew-resize; 
  z-index: 10; 
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

/* Knob (draggable circle) - Central element */
.slider-handle .knob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px; /* Fixed size for simplicity */
  height: 32px;
  background-color: #333; 
  border: 3px solid white; 
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
  cursor: grab;
  z-index: 11;
  /* Remove internal arrow styling */
  display: block; 
}

/* Common arrow styles (Pseudo-elements) */
.slider-handle::before,
.slider-handle::after {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 30px; /* Fixed size */
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  z-index: 9; /* Below the knob, but above the maps */
}

/* Left arrow: positioned 40px to the left of the center line (50%) */
.slider-handle::before {
  content: "◄";
  left: calc(50% - 50px); /* 40px is a fixed, clean distance */
}

.slider-handle::after {
  content: "►";
  right: calc(50% - 50px); /* 40px is a fixed, clean distance */
}


/* ==================== MACHINE LEARNING IMAGE ==================== */
.ml-container {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 500px;
  margin: 0 auto 0 auto;
  overflow: hidden;
  border: 1px solid var(--border-medium);
}


.map-page-wrapper {
    display: flex;      
    flex-direction: row;
    width: 100%;
    height: 70vh;        
    min-height: 500px;
    overflow: hidden;
    position: relative;
}

/* 2. Info Panel Wrapper (Left Side) */
.info-panel-wrapper {
    flex-shrink: 0;    
    width: 300px;        
    height: 100%;
    overflow-y: auto;    
    z-index: 10;        
}

.info-panel-wrapper .ml-info {
    position: static !important;
    width: 100% !important;
    height: 100%;
}
.info-panel-wrapper .ml-info .info-panel {
    height: 100%;
    padding: 20px; /* Adjust as needed */
}


/* 3. Map Content Wrapper (Right Side) */
.map-content-wrapper {
    flex-grow: 1;         
    width: auto;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.map-overlay-page-container {
    position: relative; /* CRITICAL: Establishes the coordinate system for absolute children */
    width: 95%; 
    max-width: 1400px;
    margin: 20px auto;
    height: 70vh;
    min-height: 500px;
    border: 1px solid var(--border-medium, #ccc);
    overflow: hidden;
}

/* 2. ml-content: Makes the map content take up the full container space. */
.map-overlay-page-container .ml-content {
    position: absolute !important; /* Forces it to fill the container */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; 
}

/* 3. overlay-pin: NEW CLASS added to .ml-info to enforce absolute positioning */
.ml-info.overlay-pin {
    position: absolute !important;
    top: 10px !important;    
    left: 10px !important;   
    z-index: 5001; 
    width: 300px !important;
    max-width: 90%;
    height: auto;
    max-height: calc(100% - 20px); 
    overflow-y: auto; 
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.ml-info.overlay-pin .info-panel {
    padding: 15px;
}

/* ==================== ML SLIDESHOW CONTAINER ==================== */

.ml-slideshow-container {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 500px;
  margin: 0 auto 0 auto;
  overflow: hidden;
  border: 1px solid var(--border-medium);
}

.ml-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  pointer-events: none;
}

.ml-slide.active {
  opacity: 1;
  pointer-events: auto;
}

/* ==================== ML INFO PANEL (Top Left) ==================== */

.ml-info {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5000;
  max-width: 280px;
}

/* ==================== ML CONTENT (Full Width/Height) ==================== */

.ml-content {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.ml-content .sliderimageportfolio-right {
  width: 100%;
  height: 100%;
  border: none;
  margin: 0;
  padding: 0;
}

.ml-content .img-slider-container {
  width: 100%;
  height: 100%;
}

/* ==================== ML NAVIGATION WRAPPER ==================== */

.ml-navigation-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 15px auto 2vw auto;
  width: 100%;
  z-index: 100;
}

.ml-arrow {
  position: static;
  transform: none;
  background: rgba(200, 200, 200, 0.8);
  color: var(--text-primary);
  font-size: 2em;
  padding: 10px 15px;
  cursor: pointer;
  border: none;
  user-select: none;
  transition: background 0.3s;
}

.ml-arrow:hover {
  background: rgba(160, 160, 160, 0.9);
}

.ml-indicators {
  position: static;
  transform: none;
  display: flex;
  gap: 12px;
  background: rgba(255, 255, 255, 0.9);
  padding: 8px 10px;
  border-radius: 20px;
}

.ml-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  transition: background 0.3s;
}

.ml-dot:hover {
  background: #999;
}

.ml-dot.active {
  background: #333;
}


/* New CSS Class for Info Panel Sections */
.ml-panel-section {
    margin: 10px 0;
    padding: 10px;
    background: #ffffff;
}

.cumulative-stats-section {
    margin: 10px 0;
    font-size: 13px;
    line-height: 1.5;
}

.intro-panel-section {
    margin: 0px 0 10px 0;
    padding: 10px;
    background: #ffffff;
}


#aq-status {
    padding: 10px;
    margin: 10px 0 10px 0;
    background: #ffffff;
}

#aq-data-details {
    padding: 10px;
    background: #ffffff; 
}


#aq-loading-bar-container {
  height: 5px;
  background-color: #d7e7f9;
  border-radius: 5px;
  margin-top: 5px;
  overflow: hidden;
}

#aq-loading-bar {
  height: 100%;
  width: 0%;
  background-color: #007bff;
  border-radius: 5px;
  transition: width 0.35s ease;
  will-change: width;
}



.temp-display {
    font-size: 13px;
}

.temp-meta {
    padding: 8px;
    background: #ffffff;
    margin-bottom: 10px;
}

#temp-legend {
    padding: 8px;
    background: #ffffff;
    font-size: 12px;
    margin-bottom: 10px;
}

#elderly-legend {
    padding: 8px;
    background: #f0f8f0;
    font-size: 12px;
    margin-bottom: 10px;
}

#heat-risk-legend {
    padding: 8px;
    background: #fff3e0;
    font-size: 12px;
    margin-bottom: 10px;
}

#cumulative-heat-legend {
    padding: 8px;
    background: #fff3e0;
    font-size: 12px;
    margin-bottom: 10px;
}

#cumulative-cold-legend {
    padding: 8px;
    background: #e0f6ff;
    font-size: 12px;
    margin-bottom: 10px;
}

#current-temp-calculations {
  background: #f8f9fa; 
  padding: 10px; 
  margin-top: 5px;
}


#cold-risk-legend {
    padding: 8px;
    background: #e0f6ff;
    font-size: 12px;
    margin-bottom: 10px;
}


.temp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}

.temp-cell {
    padding: 10px 5px;
    text-align: center;
    font-size: 12px;
}

.temp-cell.avg {
    background: #fdeaff;
}

.temp-cell.range {
    background: #fff3e0;
}

.temp-cell.hot {
    background: #ffebee;
}

.temp-cell.cool {
    background: #e3f2fd;
}

.temp-gradient {
    margin: 15px 0;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 6px;
}

.temp-gradient h5 {
    margin: 0 0 8px 0;
    font-size: 12px;
    color: #666;
}

.gradient-bar {
    height: 20px;
    background: linear-gradient(to right, #0d47a1, #1976d2, #42a5f5, #4caf50, #ffeb3b, #ff9800, #f44336, #b71c1c);
    border-radius: 10px;
    border: 1px solid #999;
}

.gradient-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #666;
    margin-top: 5px;
}

.temp-timer {
}



/* Tooltip Styles */
.tract-tooltip {
    font-size: 12px;
    padding: 5px;
    border-radius: 0px;
    line-height: 1.6;
}

.tract-tooltip-inner {
    margin: 5px 0;
    padding: 5px 0;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
}

.tract-temp {
}

.tract-diff {
    margin-top: 3px;
}

.tract-points {
    margin-top: 5px;
}

.tract-elderly {
    margin-top: 5px;
}

.temp-tooltip {

}

/* Map Switch Styles */
.map-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.map-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.map-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 20px;
}

.map-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.map-switch input:checked + .map-slider {
    background-color: #2196F3;
}

.map-switch input:checked + .map-slider:before {
    transform: translateX(20px);
}



/* ===============================================
   DASHBOARD STATISTICS & METHODOLOGY STYLES
   =============================================== */

/* Methodology Section Container */
.methodology-section {
    margin-bottom: 10px;
        background: #f8f9fa;
padding: 10px;
  font-size: 13px;
    line-height: 1.5;
}

.methodology-section h4 {
}

/* Process Steps */
.process-step {
    margin-bottom: 10px;
}


.process-step-content {
}

.process-step-content ul {
  margin: 0px;
  padding-left: 20px;

}

.process-step-content li {
}


/* Dashboard Statistics Containers */
.stats-container {
}


.stats-row {
}

.stats-divider {
}

.heat-risk-container {
    background: #fff3e0;
    padding: 10px;
    margin-bottom: 10px;
}

.current-temp-b-container {
    background: #fff3e0;
    padding: 10px;
    margin-bottom: 10px;
}

.heat-risk-title {
}

/* Cold Risk Container */
.cold-risk-container {
    background: #e3f2fd;
    padding: 10px;
}

.cold-risk-title {
}

/* Temperature Summary Container */
.temp-summary-container {
    margin-bottom: 10px;
}


/* Current Temperature Display Box */
.current-temp-box {
    background: #f8f9fa;
    padding: 10px;
    margin-top: 10px;
}

.current-temp-title {
}

/* Statistical Info Boxes */
.stat-box {
    background: #f5f5f5;
    padding: 10px;

}

.stat-box-highlight {
    background: #e8f5e9;
    padding: 10px;
    margin-top: 10px;
}

/* Chart Container Styles */
.chart-container {
}


/* Cumulative Container - Two Column Layout */
.cumulative-container {
    background: #f5f5f5;
    padding: 10px;
    margin-bottom: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

/* Stats column wrapper */
.cumulative-stats-column {
    display: flex;
    flex-direction: column;
    /* gap: 5px; */
}

/* Chart column wrapper */
.cumulative-chart-column {
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    padding: 0px;
    
}

/* Cumulative/Historical Chart Container */
.cumulative-container .chart-container {
    width: 100%;
    margin: 0;
}

.cumulative-container canvas {
    border: 1px solid #000000;
    background: white;
    width: 100%;
    height: auto;
}


/* Current Data Chart Container */
.current-chart-container {
    /* background: linear-gradient(135deg, #e8f5e9 0%, #f5f5f5 100%); */
}

.current-chart-container canvas {
    border: 1px solid #000000;
    background: white;
}


/* Current Temperature Container - Two Column Layout */
.current-temp-b-container {
    background: #dbdbdb;
    padding: 10px;
    margin-bottom: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

/* Current stats column wrapper */
.current-stats-column {
    display: flex;
    flex-direction: column;
    /* gap: 5px; */
}

/* Current chart column wrapper */
.current-chart-column {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Current chart container adjustments */
.current-temp-b-container .current-chart-container {
    width: 100%;
    margin: 0;
}

.current-temp-b-container canvas {
    width: 100%;
    height: auto;
}