@import url('https://fonts.googleapis.com/css2?family=Merriweather+Sans&family=Roboto&display=swap');

:root {
  --page-width: 60rem;
  --text-font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI',
  'Oxygen','Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
  sans-serif;
  --header-font-family: 'Merriweather Sans', sans-serif;
  --text-font-size: 1.1rem;
  --color-pharo-blue: #3297d4;
  --color-pharo-light-blue: #dcedf7;
  --color-dark-gray: #616161;
  --color-light-gray: #f5f5f5;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  font-family: var(--text-font-family);
  font-size: var(--text-font-size);
  font-weight: 400;
  font-style: normal;
  line-height: 150%;
}

nav {
  display: flex;
  overflow: visible;
  border-bottom: 5px solid var(--color-light-gray);
}

.nav-buttons {
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  text-align: center;
  width: 100%;
}

.nav-buttons.responsive {
  position: relative;
  display: inline-block;
}

.nav-buttons .icon {
  float: right;
  display: block;
}

.nav-buttons.responsive .icon {
  position: absolute;
  right: 0;
  top: 0;
}

.nav-buttons a {
  display: inline-block;
  margin: 0;
  padding: 15px 14px;
  color: var(--color-pharo-blue);
  text-decoration: none;
}

.nav-buttons a:hover {
  background-color: var(--color-pharo-light-blue);
}

.nav-buttons a.active {
  background-color: var(--color-pharo-light-blue);
}

.nav-buttons:not(.responsive) a:not(.active):not(.icon) {
  display: none;
}

.nav-buttons.responsive a {
  float: none;
  display: block;
  text-align: left;
}

main {
  max-width: var(--page-width);
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem 2rem 1rem;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--color-pharo-blue);
  font-family: var(--header-font-family);
  line-height: 130%;
  margin-top: 2rem;
}

h1 {
  text-align: center;
  margin: 2rem auto 1rem auto;
  max-width: 45rem;
}

/* Sub-title */
h5 {
  color: var(--color-dark-gray);
  text-align: center;
  margin-top: 0;
  padding-top: 0;
  font-size: 14pt;
  font-weight: 400;
}

a {
  color: var(--color-pharo-blue);
}

main li {
  padding: 0.3rem;
  line-height: 120%;
}

span.ltrText {
  unicode-bidi: bidi-override;
  direction: rtl;
}

.teacher-container {
  margin-bottom: 2em;
}

img.teacher-photo {
  width: 10em;
  height: 10em;
  border-radius: 100%;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.teacher-text {
  text-align: center;
}

img.banner {
  width: 100%;
}

.map iframe {
  width: 100%;
  height: 30rem;
}

table {
  border: 0;
  border-collapse: collapse;
  width: 100%;
  table-layout: fixed;
  margin-top: 1.2em;
}

table tr {
  background-color: var(--color-light-gray);
  border: 1px solid #ddd;
  padding: .35em;
}

table th,
table td {
  padding: .625em;
  text-align: center;
}

.hotels-table {
  text-align: left;
  display: block;
  overflow-x: auto;
  white-space: nowrap;
}

.hotels-table tbody {
  display: table;
  width: 100%;
}

.table-wrapper {
  position: relative;
}

.table-scroll {
  overflow: auto;
}

.hotels-table th {
  background-color: var(--color-light-gray);
  font-weight: normal;
  padding: 1rem 1.5rem 1rem 1.5rem;
}

.hotels-table td {
  border-bottom: 1px solid var(--color-light-gray);
  padding: 1rem 1.5rem 1rem 1.5rem;
}

footer {
  margin-top: auto;
  padding: 3rem;
  text-align: center;
  background-color: var(--color-light-gray);
}

footer p {
  margin-top: 0.3em;
  margin-bottom: 0;
}

footer span {
  display: inline-block;
}

.footer-logos img {
  height: 2.5rem;
  background: transparent;
  margin-top: 0.7rem;
  margin-left: 0.6rem;
  margin-right: 0.6rem;
}

.footer-logos {
  margin-top: 0.9rem;
}

.footer-logos a {
  text-decoration: none;
}

/* Timeline table: mobile-first (cards) */

.timeline-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.2em;
}

/* Hide header on mobile */
.timeline-table thead {
  display: none;
}

/* Each row becomes a card */
.timeline-table tbody tr {
  display: block;
  margin: 0 0 0.9rem 0;
  border: 1px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
}

/* Cells stack */
.timeline-table tbody td {
  display: block;
  border: 0;
  border-bottom: 1px solid #ddd;
  background-color: #fff;
  padding: 0.85rem 1rem;
  text-align: left;
  line-height: 140%;
}

.timeline-table tbody td:last-child {
  border-bottom: 0;
}

/* Label + value layout */
.timeline-table tbody td[data-label]::before {
  content: attr(data-label);
  display: block;
  font-size: 0.9rem;
  color: var(--color-dark-gray);
  margin-bottom: 0.25rem;
  font-weight: 600;
}

/* Shared rows */
.timeline-table tbody tr.shared td {
  background-color: var(--color-pharo-light-blue);
  border-bottom: 0;
}

.timeline-table tbody tr.shared td[colspan="2"] {
  text-align: left;
}

/* Optional: make the time a bit more prominent */
.timeline-table tbody td:first-child b {
  font-size: 1.05rem;
}

/* Program track switcher */

.track-switch {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: 1rem 0 1.5rem 0;
}

.track-button {
  appearance: none;
  border: 1px solid #ddd;
  background: #fff;
  color: var(--color-dark-gray);
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--text-font-family);
  font-size: 1rem;
}

.track-button:hover {
  background: var(--color-pharo-light-blue);
}

.track-button.active {
  border-color: var(--color-pharo-blue);
  background: var(--color-pharo-light-blue);
  color: var(--color-pharo-blue);
}

.track-content {
  display: none;
}

.track-content.active {
  display: block;
}

/* Optional: slightly reduce heading spacing inside the track content */
.track-content h2 {
  margin-top: 1rem;
}

@media only screen and (min-width: 768px) { 
  main {
    padding-bottom: 3rem;
  }

  .nav-buttons {
    width: auto;
  }

  .nav-buttons a {
    display: inline-block!important;
    text-align: center;
  }

  .nav-buttons.responsive a {
    display: inline-block;
    text-align: center;
  }

  .nav-buttons .icon {
    display: none!important;
  }

  .teacher-container {
    display: flex;
  }

  img.teacher-photo {
    float: left;
    margin: 0 1.5em 1em 0;
  }

  .teacher-text {
    display: inline;
    text-align: left;
  }

  .teacher-text h3 {
    margin-top: 0;
  }

  /* Timeline table: switch back to classic table */
  .timeline-table {
    table-layout: fixed;
    border-collapse: collapse;
  }

  .timeline-table thead {
    display: table-header-group;
  }

  .timeline-table tbody {
    display: table-row-group;
  }

  .timeline-table tbody tr {
    display: table-row;
    margin: 0;
    border: 0;
    border-radius: 0;
    overflow: visible;
  }

  /* IMPORTANT: override the mobile rule with same specificity */
  .timeline-table tbody td {
    display: table-cell;
    border: 1px solid #ddd;
    padding: 0.9rem 1rem;
    vertical-align: top;
    text-align: left;
    line-height: 140%;
    background-color: transparent;
  }

  .timeline-table thead th {
    display: table-cell;
    border: 1px solid #ddd;
    padding: 0.9rem 1rem;
    text-align: left;
    background-color: var(--color-pharo-light-blue);
    color: var(--color-dark-gray);
    font-weight: 600;
  }

  /* Remove labels on desktop */
  .timeline-table tbody td[data-label]::before {
    content: none;
  }

  /* Zebra striping on desktop */
  .timeline-table tbody tr:nth-child(odd) td {
    background-color: #fff;
  }

  .timeline-table tbody tr:nth-child(even) td {
    background-color: var(--color-light-gray);
  }

  /* Shared rows on desktop */
  .timeline-table tr.shared td {
    background-color: var(--color-pharo-light-blue) !important;
  }

  .timeline-table tr.shared td[colspan="2"] {
    text-align: center;
  }

  /* Time column readability */
  .timeline-table tbody td:first-child,
  .timeline-table thead th:first-child {
    white-space: nowrap;
    width: 10rem;
  }
}