/* Basic resets and typography */
:root {
    --primary-color: #0f3357;
    --primary-background-color: #FFF;
    --primary-text-color: #222;
    --secondary-color: #1e5033;
    --secondary-text-color: #fff;

    font-size: 1.2rem;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  html {
    height: 100%;
  }
  
  body {
    font-family: Roboto, Arial, sans-serif;
    line-height: 1.4;
    background-color: var(--primary-background-color);
    color: var(--primary-text-color);
    padding: 0px;
  }

  p {
    margin-bottom: 1rem;
  }

  /* Header styles */
  header {
    color: var(--primary-color);
    padding: 20px;
    text-align: center;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-flow: column;
    margin-bottom: 3rem;
  }
  

  header .logo img {
    height: 20rem;
    width: auto;
  }
  
  header h1 {
    font-size: 2.5em;
  }


  a {
    text-decoration-style: dotted;
    color: var(--primary-color);
  }
  a:visited {
    filter: grayscale(.5);
  }
  
  /* Main content container */
  main {
    margin: 0px auto;
    max-width: 960px;
    padding: 20px;
    /*box-shadow: 0px 0px 4px 4px lightgray;*/
  }
  
  /* Section styling */
  section {
    background: var(--primary-background-color);
    margin-bottom: 20px;
    border-radius: 5px;
  }

  h1 {
    margin-bottom: 1rem;
  }

  h2,
  h3{
    margin-top: 1rem;
    color: var(--primary-color);
    /*margin-bottom: 1rem;*/
  }

  h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    margin-top: 2rem;
  }
  
  .large {
    font-size: 150%;
  }

  .centered {
    text-align: center;
  }

  section p {
    margin: 1em 0;
  }

  img.fullwidth {
    width: 100%;
    height: auto;
    margin-bottom: 20px;
  }

  div.fullwidth {
    display: flex; 
    gap: .25rem; 
    width: 100%; 
    justify-content: center;
    & img {
      object-fit: cover; 
      width: auto; 
      min-width: 0;
      height: 20rem;
    }
  }

  @media (max-width: 768px) {
    div.fullwidth {
      flex-flow: column nowrap;
    }
  }

  .activity {
    display: grid;
    grid-template-columns: 1fr 30%;
    grid-template-rows: auto 1fr;
    column-gap: 1rem;

    img {
      grid-column: 1;
      grid-row: 1 / 3;
  
      width: 100%;
      max-width: 500px;
      height: auto;
      object-fit: cover;
      display: block;
      justify-self: center;
    }

    h3 {
      margin-top: 1rem;
    }
  }

  @media (max-width: 768px) {
    .activity {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    .activity img {
        grid-row: 3;
    }

    .activity h3 {
        grid-row: 1;
    }

    .activity p {
        grid-row: 2;
    }
}
  
  /* Registration form styling */
  .registration-form h2 {
    margin-bottom: 10px;
    color: var(--primary-color);
  }
  
  form {
    margin-top: 20px;
  }
  
  form p {
    margin-bottom: 15px;
  }

  form label {
    max-width: 20rem;
  }

  form .helptext {
    font-size: small;
    display: block;
    margin-bottom: .5rem;
    opacity: .5;
    display: none;
  }

  form textarea {
    display: block;
  }

  form input {
    padding: 5px; 
  }


  form input, form textarea {
    display: block;
    font-size: 100%;
    width: 20rem;
  }



  nav {
    display: flex;
    flex-flow: row wrap;
    gap: 1rem;
    justify-content: center;
    align-items: baseline;
    background-color: var(--primary-background-color);
  }

  footer nav {
    background-color: var(--primary-color);
  }
  

  
  
  /* Button styles */
  button {
    background-color: var(--primary-color);
    border: none;
    padding: 10px 20px;
    color: var(--primary-background-color);
    font-size: 1em;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  
  button:hover {
    filter: brightness(90%);
  }
  
  /* Footer styles */
  footer {
    text-align: center;
    padding: 1rem;
    z-index: 1;
    color: var(--secondary-text-color);
    background-color: var(--primary-color);
  }

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

  footer nav > * {
    margin-right: 1rem;
  }

  footer a:visited {
    color: var(--primary-background-color)
  }

  header, footer, .fancy-color {
    /*background: linear-gradient(149deg, rgba(2,0,36,1) 0%, rgba(9,9,121,1) 40%, rgba(0,212,255,1) 100%);*/
  }

  .inverted {
    margin: 0 -20px;
    background-color: var(--primary-color);
    color: var(--primary-background-color);
    padding: 1rem 0;
    h1, h2, h3 {
      margin-top: 3rem;
      margin-bottom: 1rem;
      color: var(--primary-background-color);
    }
  }

  h2.inverted, h3.inverted {
    color: var(--primary-background-color);
  }

  .errorlist {
    color: red;
    list-style-type: none;
    margin: 5px 0 0 0;
    padding: 0;
  }

  .errorlist li {
      margin: 0;
  }

  .form-group input.error,
  .form-group textarea.error {
      border-color: red;
  }

  menu {
    list-style-type: none;
    margin: 1rem 0;
  }

  section > * {
    margin: 2rem 0;
  }



  /* Responsive adjustments */
  @media (max-width: 600px) {

    :root {
      
    }
  
    header, section {
      padding: 15px;
    }

    button {
      width: 100%;
    }

    form input, form textarea {
      display: block;
      font-size: 100%;
    }
  }

  @media (min-width: 600px) {
    .large.centered {
      padding-left: 3rem;
      padding-right: 3rem;
    }
  }
  
  table td, table th {
    padding: 3px;
  }