/* ===========================================
   subject.css - Subject page specific styles
   Requires: base.css loaded first
   =========================================== */

/* Subject nav title (generated by subject.js) */
nav .title {
  font-size: clamp(1rem, 2.5vw, 3rem);
  color: var(--base-heading-color);
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Subject dropdown menu */
nav ul.dropdown {
  display: flex;
  list-style: none;
}

nav ul.dropdown li {
  padding: 15px;
  border-right: 1px solid var(--base-nav-divider);
}

nav ul.dropdown li:last-child {
  border-right: none;
}

nav ul.dropdown li a {
  color: var(--base-nav-link);
  text-decoration: none;
}

nav ul.dropdown li a:hover {
  color: var(--base-nav-hover);
}

/* Subject mobile overrides */
.menu-toggle .menu-text {
  display: none;
}

@media (max-width: 768px) {
  nav .logo-holder {
    display: none;
  }

  nav .title {
    text-align: left;
    padding-left: 15px;
    flex: 1;
  }

  nav ul.dropdown {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 15px;
    background: var(--base-nav-bg);
    border: 1px solid var(--base-nav-divider);
  }

  nav ul.dropdown.show {
    display: flex;
  }

  nav ul.dropdown li {
    padding: 10px;
    border-right: none;
  }

  .menu-toggle {
    display: block;
  }

  .menu-toggle .menu-text {
    display: inline;
    margin-left: 10px;
  }

  nav ul.dropdown li.show-on-mobile {
    display: block;
  }
}

@media (min-width: 768px) {
  nav ul.dropdown li.show-on-mobile {
    display: none;
  }
}

/* ===========================================
   Subject page layout
   =========================================== */

/* Container grid */
.container {
  margin: 50px auto 10px auto;
  max-width: 1000px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

/* Topic boxes */
.item {
  width: 30%;
  margin-bottom: 4%;
  position: relative;
  background: var(--base-card-bg);
  border-radius: 10px;
  box-shadow: 0 0 20px var(--base-card-shadow);
  border: 1px solid var(--base-accent);
  padding: 20px 20px 30px 20px;
}

.item::before {
  background: var(--base-accent);
  width: 43px;
  height: 38px;
  content: 'M';
  position: absolute;
  left: -20px;
  color: #fff;
  border-radius: 0 19px 19px 0;
  text-align: center;
  line-height: 38px;
}

@media screen and (max-width: 600px) {
  .container {
    justify-content: center;
  }
  .item {
    width: 85%;
    min-width: 0;
  }
  .item::before {
    display: none;
  }
}

/* Box content styling */
h1 {
  padding: 0 0 15px 25px;
  font: 35px;
}

h1 a {
  color: var(--base-accent);
}

.text-holder {
  border-bottom: 1px solid #e1e1e1;
  padding-bottom: 10px;
}

li {
  padding: 0 0 15px 25px;
  font: 15px;
}

li a {
  color: var(--base-accent);
}

/* Rows and links */
.links {
  padding: 15px 0 0;
}

ol {
  padding-left: 20px;
}

.rows {
  display: flex;
  justify-content: space-between;
  padding: 0 0 10px;
}

.rows h3 {
  font: 16px verdana, sans-serif;
  font-weight: 300;
}

.rows a {
  color: var(--base-accent);
}

.rows a:hover {
  text-decoration: underline;
}

.rows a::after {
  content: '>>';
  padding: 0 0 3px;
}

/* GIF container */
.gif-container {
  width: 100%;
  text-align: center;
  margin-bottom: 20px;
}

.gif-image {
  width: 100%;
  height: auto;
}
