/* === CSS Reset === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  width: 100%;
  font-family: sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}





/* === Color Variables === */
:root {
  --background-color: #ffffff;
  --text-color: #222222;
  --accent-color: #037c3b;
  --accent-2: #FFE315;
  --table-header-bg: #f2f2f2;
  --table-header-bg-sorted:rgb(227, 227, 227);
}



@font-face {
    font-family: Archivo-Medium;
    src: url(/static/assets/fonts/Archivo-Medium.otf);
  }

  @font-face {
    font-family: Archivo-SemiCondensed-SemiBold;
    src: url(/static/assets/fonts/ArchivoSemiCondensed-SemiBold.otf);
  }

  @font-face {
    font-family: Archivo-Bold;
    src: url(/static/assets/fonts/Archivo-Bold.otf);
  }




/* === Base Styles === */
body {
  background-color: var(--background-color);
  color: var(--text-color);
  transition: background-color 0.3s, color 0.3s;
  font-family: Archivo-Medium;
}

#back-to-top {
  position: fixed;
  right: 50px;
  bottom: 100px;
  z-index: 1;
  width: 80px;
  height: 80px;
  border-radius: 100%;
  background-color: white;
  filter: drop-shadow(2px 5px 12px #00000033);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  transform: rotate(-45deg);
  transition: transform 0.3s ease-in-out,
              opacity 0.2s ease-in-out;
}

#back-to-top img {
  width: 60px;
}

#back-to-top:hover {
  transform: rotate(0deg);
}

#back-to-top.hidden {
  opacity: 0;
  transition: opacity 0.5s ease-in;
}

#back-to-top.visible {
  opacity: 1;
}

strong {
  font-family: Archivo-Bold;
}

main {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

#logo-img {
  max-height: 150px;
}

header {
  padding: 1.5rem;
  text-align: center;
  margin: 0 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--accent-color)
}

footer {
  padding: 1.5rem 0;
  margin: 0 2rem;
}

footer section,
footer p {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

footer #copyright {
  text-align: center;
}



header p,
footer p {
  margin-bottom: 0px;
  color: var(--accent-color);


}

header {
    border-bottom: 1px solid #ccc;
}

footer {
  border-top: 1px solid #ccc;
  padding-bottom: 3rem;
}

#headboard {
  border: 1px solid #ccc;
  width: 100%;
  height: 80px;
  margin-top: 20px;
  border-radius: 50% / 100%;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  transform: translateY(1px);
  display: flex;
  align-items: center;
  

}



.nbrk {
  white-space: nowrap;
}

/* === Table Styles === */
table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  
}

th, td {
  padding: 10px;
  border: 1px solid #ccc;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;

  font-family: Archivo-SemiCondensed-SemiBold;

}

td {
  
}

td:first-child {
  text-transform: uppercase;
}

/* Table headers */
th {
  cursor: pointer;
  position: relative; /* Needed for pseudo-elements */
  text-transform: uppercase;
  letter-spacing: 0.2px;
  border-bottom: 2px solid var(--text-color);

}

/* Reserve space for sort arrows */
th::after {
  content: "";
  display: inline-block;
  width: 1em; /* Reserve space for arrow */
  height: 1em;
  vertical-align: middle;
  margin-left: 4px;
}

/* Show actual arrows on sorted columns */
th.sort-asc::after {
  content: "▲";
  font-size: 0.8em;
  transform: translateY(-3.25px);
  color: var(--accent-color);
}

th.sort-desc::after {
  content: "▼";
  font-size: 0.8em;
  transform: translateY(-3.25px);
  color: var(--accent-color);
}

td:nth-child(1) {
  width: 40%;
}

td:nth-child(2) {
  width: 40%;
}

td:nth-child(3) {
  color: red;
  width: 20%;
}

/* === Dark Mode Toggle Button === */
button,
.button-link {
  margin-top: 10px;
  padding: 5px 10px;
  border-radius: 5px;
  background-color: var(--background-color);
  color: var(--accent-color);
  border: 2px solid var(--accent-color);
  transition: background-color 0.3s, color 0.3s;
  text-align: center;
  text-decoration: none;
  font-family: Archivo-Bold;
  letter-spacing: 0.5px;
  box-shadow: 2px 3px 7px 2px rgba(0,0,0,0.02);
  flex-shrink: 0;
  flex-grow: 0;
  flex-basis: auto;
}

div.horizontal-flex {
  display: flex;
  gap: 10px;
  row-gap: 0px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 10px;
}

button.accent {
  background-color: var(--accent-color);
  color: var(--background-color);
  
}

button.accent:hover{
  color: var(--accent-color);
  background-color: var(--background-color);
  border: 2px solid var(--accent-color);
}


button.centered,
.button-link.centered {
    margin: 0 auto;

  margin-bottom: 10px;
}

  p + .button-link {
    margin-top: 12px !important;
  }




button:hover,
.button-link:hover {
  background-color: var(--accent-color);
  color: var(--background-color);
}

/* === Last Fetched Timestamp === */
p[id$="-last-updated"] {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-color);
  opacity: 0.7;
  text-align: right;
  letter-spacing: 0.3px;
}

/* === Fade-in animation === */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  
  tbody tr {
    animation: fadeIn 0.5s ease-in;
  }

  /* === Sorted Column Highlight === */
th.sorted {
    background-color: var(--table-header-bg-sorted); /* Light accent color */
  }
  

  p {
    font-size: 19px;
    line-height: 30px;
    margin-bottom: 10px;
  }

  li {

    font-size: 19px;
  }

  li::marker {
    content: "➤ ";
    font-size: 13px;
    color: var(--accent-color)
  }

  ul {
    padding-left: 20px;
    margin-bottom: 25px;
  }

  h1,
  h2,
  h3 {
    font-size: 1.618em;
    font-family: Archivo-SemiCondensed-SemiBold;

  }

  h2 {
    transform: translateX(-10px);
    color: var(--accent-color)
  }

  #headboard h2{
  color: var(--text-color);
  transform: none;
  text-align: center;
  width: 100%;
  text-transform: uppercase;
  letter-spacing: 1px;
}

  h3 {
    font-size: 1.3em;
    letter-spacing: 0.2px;
  }

  h1 {
    color: var(--accent-2);
    font-size: 72px;
    font-weight: 100;
  }

  #logo {
    width: 300px;
    margin: 30px;
    margin-bottom: 20px;
  }

  section {
    padding: 42px 16px;
    border-bottom: 1px solid #ccc;
    display: flex;
    flex-direction: column;
  }

  footer section {
    padding-left: 0px;
    padding-right: 0px;
    padding-top: 0px;
  }

  nav {
    padding: 16px 16px 42px 16px;
    display: flex;
    flex-direction: row;
    column-gap: 16px;

  }

  nav a {
    color: var(--text-color);
    opacity: 0.6;
    text-decoration: none;
  }

  a {

    color: var(--text-color);
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
  }

  a:active {
    background-color: transparent;
  }

  section.center-aligned {
    align-items: center;
  }

  section:last-of-type {
    border-bottom: none;
  }

  .button-link.cta {
  background-color: var(--accent-color);
  color: var(--background-color);
  text-transform: uppercase;
  }

  .button-link.cta:hover {
    background-color: var(--background-color);
  color: var(--accent-color);
  border: 2px solid var(--accent-color);

  }

  p b {
    font-family: Archivo-Bold;
  }

  p a {
    text-decoration: underline;
  }


  .calendar {
    border-radius: 16px;
    padding: 16px;
    padding-bottom: 12px;
    padding-top: calc(42px + 20px);
    width: 320px;
    box-shadow: 0px 3px 7px 2px rgba(0,0,0,0.05);
    margin: 16px;
    position: relative;
    color: #868686;
    transition: transform 0.1s ease-in;

  }

  .calendar:hover {
    transform: rotate(0.5deg);
    transition: transform 0.2s ease-in;
  }

  .calendar p:first-of-type {
    border-radius: 16px 16px 0px 0px;
    background-color: #fc263c;
    padding: 8px 13px;
    color: white;
    font-family: Archivo-Bold;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
  }

    .calendar.blue p:first-of-type {
    background-color: #423ce7;
    }

  .calendar p:nth-of-type(2) {
    font-family: Archivo-Bold;
    color: var(--text-color);
    font-size: 32px;

  }

  a.social-link,
  small {
    color: #868686;
  }

  small {
    display: block;
    width: 100%;
    text-align: center;
  }

  #section-impressum {
    display: flex;
    flex-direction: row;
    column-gap: 16px;


  }

  #section-impressum p,
  #section-impressum a{
    font-size: 16px;
    line-height: 22px;

    color: #868686;
    flex: 1;
  }



  a.social-link:hover {
    color: var(--text-color)
  }

  .sponsoren-logo {
    width: 30%;
    margin-left: 35%;
    opacity: 0.4;
    margin-top: 20px;
    margin-bottom: 10px;
  }

  .social-icon {
    opacity: 0.4;
    width: 40px;
    transition: 0.15s;
  }

  .social-icon:hover {
    transition: 2;
    opacity: 0.6;
    transition: 0.05s;
  }

  @media only screen and (max-width: 600px) {

    #back-to-top {
      right: 24px;
      bottom: 100px;
    }

    td,
    th {
      font-size: 16px;
    }
    td:nth-child(2),
    th:nth-child(2) {
      display: none;
    }

    section {
      padding: 42px 32px;
    }

    nav {
      padding: 16px 32px 42px 32px;
    }


  .sponsoren-logo {
    width: 60%;
    margin-left: 20%;
  }


  #section-impressum p,
  #section-impressum a{
    font-size: 14px;
    line-height: 18px;
  }

  .cookie-box {
    display: flex;
    flex-direction: column; 
    text-align: left !important;
    padding-top: 1em !important;
  } 

  .cookie-box button {
    margin-left: 0 !important;
    margin-right: 0.5em;
    
  }

  .cookie-box div {
    display: flex;
    justify-content: flex-end;
  }

  }