/* === Grundlayout === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: sans-serif;
}

html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  background-color: #fefaf3; /* sanfter, heller Hintergrund */
  color: #1e1e1e;
  -webkit-font-smoothing: antialiased;
}

a, .tile {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  outline: none;
  user-select: none;
  text-decoration: none;
}

/* === Header (hellere, freundlichere Blautöne) === */
.header-lightblue {
  background-color: #a8c7d7; /* heller freundlicher Blauton */
  color: #203e5f;
  padding: 12px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

header h1 {
  font-size: 1.5rem;
  font-weight: 700;
}

/* === Home-Kachel im Header === */
.home-tile {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #d4aa00; /* warmes Goldgelb */
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.9rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
  box-shadow: 0 6px 12px rgba(0,0,0,0.3);
  user-select: none;
}

.home-tile:hover,
.home-tile:focus {
  transform: scale(1.15);
  box-shadow: 0 0 15px rgba(212, 170, 0, 0.8);
  outline: none;
}

/* === Hauptbereich (Index) === */
main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 30px 20px;
}

.menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 30px;
  max-width: 900px;
  width: 100%;
  justify-items: center;
}

/* === Kachel-Stil === */
.tile {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  padding: 10px;
  overflow: hidden;
  word-break: break-word;
  white-space: normal;
  color: #1e1e1e;

  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.tile .title {
  font-size: 1rem;
  font-weight: bold;
  line-height: 1.1;
}

.tile .subtitle {
  font-size: 0.75rem;
  display: none;
  margin-top: 6px;
  line-height: 1.1;
  max-width: 90%;
}

.tile:hover,
.tile:focus {
  transform: scale(1.2);
  outline: none;
}

.tile:hover .subtitle,
.tile:focus .subtitle {
  display: block;
}

/* === Farbvarianten + individuelle Hover-Schatten === */
.tile1 {
  background-color: #a3bfcf; /* Familie - Hellblau */
}
.tile1:hover,
.tile1:focus {
  box-shadow: 0 0 25px rgba(163, 191, 207, 0.8);
}

.tile2 {
  background-color: #b8a0c9; /* Zinzino - Violett */
}
.tile2:hover,
.tile2:focus {
  box-shadow: 0 0 25px rgba(184, 160, 201, 0.8);
}

.tile3 {
  background-color: #a67c52; /* Convit - Mittelbraun */
}
.tile3:hover,
.tile3:focus {
  box-shadow: 0 0 25px rgba(166, 124, 82, 0.8);
}

.tile4 {
  background-color: #8fae85; /* Wildpflanzen - Grün */
}
.tile4:hover,
.tile4:focus {
  box-shadow: 0 0 25px rgba(143, 174, 133, 0.8);
}

.tile5 {
  background-color: #7b5e3b; /* Holz - Dunkelbraun */
}
.tile5:hover,
.tile5:focus {
  box-shadow: 0 0 25px rgba(123, 94, 59, 0.8);
}

/* === Footer (hellere blaue Farbe) === */
.footer-lightblue {
  background-color: #a8c7d7; /* heller freundlicher Blauton */
  color: #203e5f;
  text-align: center;
  padding: 12px 0;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
}

/* === Unterseiten: „Blatt Papier“ Inhaltsbereich === */
.content-card {
  background: white;
  max-width: 900px;
  margin: 40px auto;
  padding: 25px 30px;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  color: #1e1e1e;
  line-height: 1.5;
  position: relative; /* Für Logout-Button Positionierung */
}

/* === Farbige Body-Hintergründe für Unterseiten (helle Varianten der Kachelfarben) */
.bg-familie {
  background-color: #d9e8f2; /* helles hellblau */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.bg-zinzino {
  background-color: #e5d9f0; /* helles violett */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.bg-convit {
  background-color: #d9cbb9; /* helles braun */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.bg-wildpflanzen {
  background-color: #d9e7d9; /* helles grün */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.bg-holz {
  background-color: #d6cdbf; /* helles dunkelbraun */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* === Fotoalbum Stile === */
.photo-album {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.photo-item {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  aspect-ratio: 4/3;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.photo-item:hover img {
  transform: scale(1.05);
}

/* === Login-Formular === */
.login-form {
  max-width: 400px;
  margin: 0 auto;
  padding: 30px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}

.login-form input {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.login-form button {
  background-color: #a3bfcf;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  width: 100%;
  margin-top: 10px;
}

.logout-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #203e5f;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
}

/* === Responsive === */
@media (max-width: 600px) {
  .tile {
    width: 100px;
    height: 100px;
  }

  .tile .title {
    font-size: 0.85rem;
  }

  .tile .subtitle {
    font-size: 0.65rem;
  }

  .home-tile {
    width: 45px;
    height: 45px;
    font-size: 0.7rem;
  }

  header h1 {
    font-size: 1.2rem;
  }

  .content-card {
    margin: 25px 15px;
    padding: 20px 15px;
  }
  
  .photo-album {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
  }
  
  .login-form {
    padding: 20px 15px;
  }
}
