
/* Reset and base */
*, *::before, *::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f9f9f9;
}
a {
  color: #007acc;
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover {
  color: #005fa3;
  text-decoration: underline;
}
h1, h2 {
  color: #222;
  margin-top: 0;
}

/* Layout containers */
header {
  background-color: #004080; /* Dark blue */
  color: #fff; /* White text for high contrast */
  padding: 1.5rem 2rem;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
  margin: 0;
  color: #fff; /* White text for high contrast */
  font-weight: 900; /* bolder for impact */
  font-size: 3.25rem;
  letter-spacing: 1.5px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4); /* subtle shadow for readability */
}

main {
  max-width: 1400px;
  margin: 2rem auto 3rem auto;
  padding: 0 1rem;
}

/* Intro header with text and image side-by-side */
.intro-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
  margin-bottom: 3rem;
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.05);
}
.intro-header .description {
  flex: 1 1 400px;
  min-width: 280px;
}
.intro-header h1 {
  font-size: 4.25rem;
  margin-bottom: 1rem;
}
.intro-header p {
  font-size: 1.6rem;
  color: #444;
  line-height: 1.5;
}
.intro-header img {
  max-width: 600px;  /* Set the max width to 300px (smaller size) */
  width: 100%;  
  height: auto;
  border-radius: 6px;
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

/* Guide section */
.guide-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.05);
  margin-bottom: 3rem;
}
.guide-points {
  flex: 1 1 350px;
}
.guide-points h2 {
  margin-bottom: 1rem;
  font-size: 1.8rem;
}
.guide-points ul {
  padding-left: 1.5rem;
  color: #444;
}
.guide-points li {
  margin-bottom: 0.75rem;
  font-size: 1.05rem;
}
.guide-flex img {
  max-width: 800px;  /* smaller max width for smaller image */
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

.heatmaps > div {
  display: inline-flex;       /* shrink wrap content */
  flex-direction: column;
  align-items: center;        /* center container horizontally */
  margin: 0 auto;
  max-width: 500px;           /* max width to avoid stretching */
  gap: 6px;                   /* spacing between rows */
}

/* Heatmaps section */
section.heatmaps {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.07);
  /* Optional: to center child elements, but not strictly needed when container is inline-flex and margin auto */
  text-align: center;
}
section.heatmaps h2 {
  font-size: 1.9rem;
  margin-bottom: 1.5rem;
  color: #222;
  text-align: center;
}
.slide-row {
  display: flex;
  align-items: center;
  /* Only this one: */
  justify-content: center;    /* center all items horizontally as a group */
  border-bottom: 1px solid #eee;
  padding: 0.6rem 0;
  font-size: 1rem;
  flex-wrap: nowrap;
  gap: 12px;                  /* space between columns */
  width: 100%;                /* fill container width */
  max-width: 500px;           /* same max-width as container */
}
.slide-row:last-child {
  border-bottom: none;
}
.slide-col {
  flex: 0 0 180px; /* fixed width column for variable names */
  font-weight: 600;
  color: #004080;
  text-align: left; /* left align variable names */
  min-width: 160px; /* optional min-width to maintain alignment */
}
.slide-row a {
  flex: 0 0 70px; /* fixed width buttons for alignment */
  display: inline-block;
  background: #007acc;
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  margin: 0; /* remove margins for tighter alignment */
  text-align: center;
  min-width: unset; /* reset if previously set */
}
.slide-row a:hover {
  background-color: #005fa3;
}

/* Responsive */
@media (max-width: 768px) {
  .intro-header, .guide-flex {
    flex-direction: column;
  }
  .slide-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .slide-row a {
    margin-left: 0;
    margin-top: 6px;
  }
  .slide-col {
    margin-bottom: 4px;
  }
  main {
    margin: 1rem auto 2rem auto;
  }
}

/* Upload Graph Section */
section.heatmaps form#uploadForm {
    background: #fff;
    padding: 1.5rem 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgb(0 0 0 / 0.05);
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    justify-content: center;
    text-align: center;
  }
  
  section.heatmaps label[for="histologyGraph"] {
    flex-basis: 100%;
    font-weight: 600;
    color: #004080;
    font-size: 1.2rem;
    margin-bottom: 8px;
  }
  
  section.heatmaps input[type="file"] {
    flex: 1 1 auto;
    padding: 6px 10px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.3s ease;
    max-width: 300px;
  }
  
  section.heatmaps input[type="file"]:focus,
  section.heatmaps input[type="file"]:hover {
    border-color: #007acc;
    outline: none;
  }
  
  section.heatmaps button[type="submit"] {
    flex: 0 0 auto;
    background: #007acc;
    color: #fff;
    border: none;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: 100px;
  }
  
  section.heatmaps button[type="submit"]:hover {
    background-color: #005fa3;
  }
  
  section.intro-header,
  section.guide-flex,
  section.heatmaps {
    margin-bottom: 3rem;
  }

  /* --- Description Section --- */
.description-section {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin: 2rem auto;
    max-width: 1200px;
    font-size: 1.2rem;
    color: #444;
    line-height: 1.6;
    text-align: center;
  }
  
  /* --- Results Section --- */
  .results-section {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin: 2rem auto 3rem auto;
    max-width: 1000px;
  }
  
  .results-section h2 {
    font-size: 1.9rem;
    margin-bottom: 1.5rem;
    color: #222;
    text-align: center;
    font-weight: 700;
  }
  
  /* --- Results Table --- */
  .results-section table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    font-size: 1rem;
  }
  
  .results-section th,
  .results-section td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eee;
    text-align: left;
  }
  
  .results-section th {
    background-color: #004080;
    color: #fff;
    font-weight: 700;
  }
  
  .results-section tr:nth-child(even) {
    background-color: #f9f9f9;
  }
  
  .results-section tr:hover {
    background-color: #f1f5ff;
  }
  
  /* --- Visualize Results Button --- */
  .visualize-section {
    text-align: center;
  }
  
  .visualize-button {
    display: inline-block;
    background: #007acc;
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
  }
  
  .visualize-button:hover {
    background-color: #005fa3;
    transform: translateY(-2px);
  }

  .intro-header {
    display: flex;
    justify-content: center;  /* center horizontally */
    align-items: center;       /* center vertically */
    text-align: center;        /* center text inside */
  }  
  
  /* --- Footer --- */
  footer {
    background: #004080;
    color: #fff;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
    font-size: 0.9rem;
    border-top: 3px solid #003366;
  }
  