* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: #f4f4f4;
}

table {
  width: 100%;
  border-collapse: collapse; /* Removes spacing */
}
td {
  padding: 12px;
  text-align: left;
}
tr:nth-child(odd) {
  background-color: #f2f2f2;
}
tr:nth-child(even) {
  background-color: #ffffff;
}

a {
  text-decoration: none;
  color: #333;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
}

a:hover {
  background: rgba(0,0,0,0.05);
}

.main-nav {
  position: relative;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.container {
  position: relative;
  min-height: 100vh;
  padding: 2rem 5vw 5vw;
}

.heading {
  position: relative;
  z-index: 10;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: bold;
  margin-top: -0.25rem;
  margin-bottom: 1rem;
}

.site-footer {
  padding: 1.5rem 5vw;
  font-size: 0.9rem;
  color: #666;
  background: #f4f4f4;
}

.body-text {
  position: relative;
  z-index: 10;
  max-width: 50ch;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  line-height: 1.6;
}

.text-panel {
  position: relative;
  z-index: 10;
  max-width: 55ch;
  background: rgba(244, 244, 244, 0.85);
  backdrop-filter: blur(1px);
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
}

.box {
  position: absolute;
  width: clamp(150px, 50vw, 480px);
  height: clamp(120px, 40vw, 400px);
  background: #ddd;
  border-radius: 12px;
  padding: 1rem;
  z-index: 1;
  object-fit: contain;
  object-position: center;
  opacity: 1;
  transition: opacity 4s ease-in-out;  // Should match the 4s in the JS
}

.box.fadeIn {
  opacity: 1;
}
.box.fadeOut {
  opacity: 0;
}

#box1 {
  top: 10%;
  right: 5%;
}

#box2 {
  top: 50%;
  left: 25%;
}

#box3 {
  bottom: 10%;
  right: 15%;
}

#box4 {
  bottom: 35%;
  left: 30%;
}

#calendar {
  width: 100%;
  min-height: 80vh;
  margin: 2rem auto;
  background: rgba(244, 244, 244, 0.85);
  padding: 1rem;
  border-radius: 12px;
}

.fc-daygrid-event {
  white-space: normal !important;
}

@media (max-width: 768px) {
  .container {
    padding-bottom: 2rem;
  }

  .text-panel {
    margin-bottom: 2rem;
  }

  .box {
    position: relative;
    width: 100%;
    height: auto;
    margin: 1.5rem auto;
    display: block;
  }

  #box1,
  #box2,
  #box3,
  #box4 {
    top: auto;
    bottom: auto;
    left: auto;
    right: auto;
  }
}

@media (max-width: 1024px) and (min-width: 769px) {
  .box {
    width: clamp(160px, 35vw, 300px);
  }
}
