body {
  font-family: Arial, sans-serif;
  margin: 40px auto;
  max-width: 1600px;
  line-height: 1.6;
  color: #333;
}
h2 {
  text-align: center;
  margin-top: 70px;
}
p {
  font-size: 20px;
  text-align: left;
  margin-bottom: 20px;
}
ul {
  font-size: 20px;
  margin-bottom: 20px;
}
ul li {
  margin: 1px 0;
}
a {
  color: #0066cc;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
nav {
  margin-bottom: 30px;
  text-align: center;
}
nav a {
  margin: 0 10px;
  padding: 8px 12px;
  border-radius: 6px;
  background: #f2f2f2;
  color: #333;
  text-decoration: none;
}
nav a:hover {
  background: #ddd;
}


/* General alignment for headers */
.alignment {
    height: 60px;
    margin-top: 50px;
    line-height: 60px;
    text-align: center;
    border-bottom: thin lightgrey solid;
}

/* ================= TABLE STYLING ================= */

/* Table container (scrollable area) */
.table-container {
    max-height: 70ex;
    overflow-y: auto;
    max-width: 200ex;
    min-width: 30ex;
    border: 1px solid black;
    margin: 20px auto;
}

/* Table */
.table-container table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid black;
}

/* Table header */
.table-container th {
    font-family: Arial, Helvetica, sans-serif;
    font-size: medium;
    background-color: antiquewhite;
    color: black;
    font-weight: bold;
    text-align: center;
    position: sticky;
    top: 0; /* fixed header */
    border: 1px solid black;
    padding: 8px;
}

/* Table rows / cells */
.table-container td {
    font-family: 'Times New Roman', Times, serif;
    font-size: medium;
    text-align: left;
    border: 1px solid #ddd;
    padding: 6px;
    background-color: white;
    white-space: normal;
}

/* Row hover effect */
.table-container tbody tr:hover {
    background-color: #f5f5f5;
}


/* ================= BUTTON STYLING ================= */
button {
    background-color: #af4c8c;
    border: none;
    color: white;
    padding: 6px 15px;
    text-align: center;
    font-size: 15px;
    margin: 4px 2px;
    transition-duration: 0.4s;
    cursor: pointer;
    border-radius: 4px;
}

button:hover {
    background-color: white;
    color: black;
    border: 2px solid #4CAF50;
}

/* Floating button row (top-right corner) */
.row {
    position: fixed;
    top: 10px;
    right: 10px;
    display: flex;
    justify-content: space-around;
}

/* ================= PARAGRAPH STYLING ================= */
.summary p {
    text-align: justify;
    font-size: 18px;
    margin-top: 20px;
    line-height: 1.6;
}

/* Debugging (optional) */
.my-container {
    background-color: #eebfbf;
    padding: 10px;
}

.chart-container {
  width: 100%;
  height: auto;
}

#statTopUni,
#uniRanking {
  width: 100% !important;
  min-height: 400px;
}


@media (max-width: 768px) {
  #statTopUni,
  #uniRanking {
    min-height: 300px;
  }

  .js-plotly-plot .plot-container {
    width: 100% !important;
  }

  /* Reduce left margin so labels stay visible */
  .plotly .main-svg {
    margin-left: 0 !important;
  }
}

/* ================= RESPONSIVE BODY ================= */
@media (max-width: 768px) {
  body {
    margin: 10px;   /* smaller margin on mobile */
    padding: 10px;  /* add breathing room */
    max-width: 100%; /* let content use full width */
  }

  h2, h3, p, ul {
    font-size: 16px;   /* slightly smaller text for readability */
  }

  nav a {
    display: inline-block;
    margin: 5px 5px;
    font-size: 14px;
    padding: 6px 10px;
  }

  .table-container {
    max-width: 100%;
    overflow-x: auto;  /* allow horizontal scroll if needed */
  }

  button {
    font-size: 14px;
    padding: 5px 12px;
  }
}


