/*CSS Reset*/

/* 1. Use a more-intuitive box-sizing model */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Remove default margin in favour of better control in authored CSS */
body, h1, h2, h3, h4, p,
figure, blockquote, dl, dd {
  margin-block-end: 0;
}

/* Prevent font size inflation */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

body {
  /* 3. Add accessible line-height */
  line-height: 1.5;
  /* 4. Improve text rendering */
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  line-height: 1.5;
  font: 1rem/1.5 var(--body-font);
}

/* 5. Improve media defaults */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

/* 6. Inherit fonts for form controls */
input, button, textarea, select {
  font: inherit;
}

/* 7. Avoid text overflows */
p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* Set shorter line heights on headings and interactive elements */
h1, h2, h3, h4,
button, input, label {
  line-height: 1.1;
}

/* 8. Improve line wrapping */
p {
  text-wrap: pretty;
}
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
  color: var(--primary);
}

/*
  9. Create a root stacking context
*/
#root, #__next {
  isolation: isolate;
}

/* Inherit fonts for inputs and buttons */
input, button,
textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* Make sure textareas without a rows attribute are not tiny */
textarea:not([rows]) {
  min-height: 10em;
}

/* Anything that has been anchored to should have extra scroll margin */
:target {
  scroll-margin-block: 5ex;
}

/*end reset*/

/*This sets color/font variables for the entire site. Change these once and it updates the color everywhere.
That said, check for contrast rations of 4.5:1 on https://webaim.org/resources/contrastchecker/ to ensure they're accessible*/
:root {
  --primary: #C53530;
  --secondary: #0068AD;
  --body-color: #333;
  --light-color: #fff;
  --gray-color: #e9e9e9;
  --visit-color: #F9F06B;
  --body-font: arial, helvetica, sans-serif;
}

body {
  margin: 0;
  color: var(--body-color);
}

a {
  color: var(--primary);
}

a:hover {
  text-decoration: none;
}

.primary {
  color: var(--primary);
}

.header {
  background-color: var(--primary);
  color: var(--light-color);
  padding: 1rem;
/*  Feel free to swap the below image out as long as there is no text. Higher resolution images are usually best*/
  background-image: url(images/SCRC25-Web-bkgr-option1-640x377.jpg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  display: grid;
  align-content: center;
  justify-content: center;
}

.header h1 {
  background-color: var(--primary);
  padding: 1rem;
  margin: 0;
  width: fit-content;
  height: fit-content;
  border-radius: 1rem;
  text-align: center;
}

.header h1 b {
  font-size: 1.5rem;
}

.nav.top {
  background-color: var(--primary);
  color: var(--light-color);
  padding: 1rem 0;
}

.nav.top details {
  background-color: var(--secondary);
  border-radius: 1rem;
  padding: .5rem;
  margin: 0 1rem;
}

.nav li a, .footer li a {
  color: var(--light-color);
  text-decoration: none;
}

.sidebar.nav li a {
  color: var(--body-color);
}

.nav li a:visited, .footer li a:visited {
  color: var(--visit-color);
}

.sidebar.nav li a:visited {
  color: var(--primary);
}

.nav li a:hover, .footer li a:hover {
  text-decoration: underline;
}

.sidebar.nav h2 {
  padding: 0 .8rem;
  font-size: 1rem;
}

.nav {
  font-size: 1rem;
}

.nav nav ul, .footer ul {
  list-style-type: none; 
  margin: 0;
  padding: .5rem .3rem;
}

.nav nav li, .footer li {
  padding: .5rem;
}

.container:has(.content) {
  display: grid;
}

.content, .sidebar {
  padding: 1rem;
}

.content h2 a {
  color: var(--body-color);
}

.content h2:has(a[name]), .content h2 {
  border-bottom: 1px solid var(--primary);
}

.content h2.plain {
  border: none;
}

.content h2.plain a {
  color: var(--primary);
}

.content h3.fancy {
  border-bottom: 1px solid var(--gray-color);
}

.content p.top {
  text-align: right;
}

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

.content .center img {
  margin: 0 auto;
}

.content .box {
  padding: 1rem 1rem 1.2rem 1rem;
  display: block;
  border: 1px solid var(--body-color);
  margin-top: 1.2rem;
  margin-bottom: 1rem;
  border-radius: 1rem;
}

.content .box h3 {
  text-align: center;
}

.content .box .final {
  text-align: left;
}

.content table {
  table-layout: fixed;
  border-collapse: collapse;
  max-width: 100%;
}

.content caption, .content th:first-child, .content td:first-child {
  text-align: left;
}

.content td, .content th {
  padding: .5rem 1rem;
  text-align: center;
  vertical-align: top;
}

.content .instructor-box {
  padding: .8rem;
  margin-bottom: .8rem;
  border: 1px solid var(--primary);
  border-radius: 1rem;
}

.content .instructor-box img {
  float: right;
  border: 1px solid var(--body-color);
  margin-bottom: .8rem;
  margin-left: 1rem;
  border-radius: 1rem;
}

.content .instructor-box .instructor {
  padding: 0;
  margin: 0;
}

.sidebar img {
  margin: 0 auto;
}

.footer {
  background-color: var(--secondary);
  color: var(--light-color);
}

/*schedule page*/
.schedule .h2 {
  font-size: 1.2rem;
  text-align: center;
  margin-bottom: -2.5rem;
}

.schedule .content table {
  margin: 2rem 0;
}
.schedule caption {
  text-align: center;
  font-weight: bold;
  font-size: 1.5rem;
  padding: 1rem 0;
}

.schedule caption span {
  font-weight: normal;
  font-size: 1.2rem;
}

.schedule .content caption, .schedule .content th:first-child, .schedule .content td:first-child {
  text-align: center;
}

.schedule td, .schedule th {
  border: 1px solid var(--body-color);
  padding: .5rem 1rem;
  vertical-align: middle;
  text-align: center;
  min-width: 15ch;
}

.schedule th {
  background-color: var(--body-color);
  color: var(--light-color);
}

.schedule .no-rowspan {
  display: none;
}

@media screen and (max-width: 48em) {
/*  schedule styles*/
  .schedule table {
    border: 0;
    width: 100%;
  }

  .schedule table caption {
    font-size: 1.3em;
  }
  
  .schedule table thead {
    border: none;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
  }
  
  .schedule table tr {
    border-bottom: 3px solid #ddd;
    display: block;
    margin-bottom: .625em;
  }

  .schedule .no-rowspan {
    display: grid;
  }
  
  .schedule table td {
    border-bottom: 1px solid #ddd;
    display: block;
    font-size: 1em;
    text-align: right;
    display: grid;
    grid-template-columns: 12ch 1fr;
  }

  .schedule .content table td:first-child {
    text-align: right;
  }
  
  .schedule table td::before {
    content: attr(data-label);
/*    float: left;*/
    font-weight: bold;
    text-transform: uppercase;
    text-align: left;
  }
  
  .schedule table td:last-child {
    border-bottom: 0;
  }

}
/*end schedule styles*/

/*desktop size*/
@media (min-width: 48em) {
  .container {
    max-width: 64rem;
    margin: 0 auto;
    width: 100%;
  }

  .container:has(.sidebar) {
    grid-template-columns: 20rem 1fr;
  }

  .wrapper {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 15rem auto 1fr auto;
  }   

  .nav details, .nav.top details {
    padding: 0;
  }
  .nav details[open] summary { 
    display: none;
  } 

  .nav ul, .footer ul {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .sidebar.nav ul {
    flex-direction: column;
  }

  .footer ul {
    justify-content: space-around;
  }

  .content .imgRight {
    float: right;
    margin: .6rem 0 .6rem .6rem;
  }

  .sidebar {
    background-color: var(--gray-color);
    border-radius: 1rem;
    margin: 1rem;
    height: fit-content;
  }

  .sidebar.nav a {
    color: var(--body-color);
  }

  .sidebar.nav a:visited {
    color: var(--body-color);
  }
}

/*mobile size*/
@media (max-width: 48em) {
  .header h1 {
    font-size: 1.5rem;
    margin: 0;
  }

  .header h1 b {
    font-size: 1.2rem;
  }

  .header p {
    margin: 0;
  }

  .sidebar {
    background-color: var(--gray-color);
    padding: 1rem;
    order: 1;
  }

  .sidebar.nav {
    order: unset;
  }
}