<template>
  <div id="app">
    <h1>DJK Saarbrücken-Rastpfuhl - Herren 1</h1>

    <div class="main-container">
      <!-- DutyDisplay Component -->
      <SectionContainer title="Mannschaftsdienste">
        <DutyDisplay :duties="duties" />
      </SectionContainer>

      <!-- GameDisplay Component -->
      <SectionContainer title="Anstehende Spiele">
        <GameDisplay :games="games" />
      </SectionContainer>
    </div>
  </div>
</template>

<script>
import DutyDisplay from "./components/DutyDisplay.vue";
import GameDisplay from "./components/GameDisplay.vue";
import SectionContainer from "./components/SectionContainer.vue"; // New reusable container
import { duties, games } from "./data"; // Importing duties and games

export default {
  name: "App",
  components: {
    DutyDisplay,
    GameDisplay,
    SectionContainer, // Reusable container for sections
  },
  data() {
    return {
      duties, // Use imported duties data
      games, // Use imported games data
    };
  },
};
</script>

<style scoped>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  text-align: center;
  background-color: #f4f4f9;
  min-height: 100vh;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center; /* Center content vertically */
  align-items: center; /* Center content horizontally */
}

h1 {
  color: #34495e;
  margin-bottom: 40px;
  font-size: 2.5em;
  font-weight: bold;
}

.main-container {
  display: flex;
  flex-direction: column; /* Stack items vertically */
  gap: 20px;
  width: 100%;
  max-width: 1200px;
  align-items: center; /* Center the containers horizontally */
}

@media (max-width: 768px) {
  #app {
    padding: 10px; /* Reduce padding on mobile */
  }

  h1 {
    font-size: 2em; /* Smaller heading on mobile */
  }

  .main-container {
    gap: 20px; /* Consistent spacing between sections */
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.8em; /* Further reduce font size for smaller screens */
  }
}
</style>
