@charset "utf-8";

/* CSS Document */
body {
  font-family: sans-serif;
  background: #f8f8f8;
  margin: 0;
}

.nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1em;
  flex-wrap: nowrap;
  margin-bottom: 1em;
  flex-shrink: 0;
}

.nav button {
  padding: 0.5em 1em;
  margin: 0 1em;
  font-size: 1em;
  cursor: pointer;
}

.nav button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

#current-month {
  font-weight: bold;
  font-size: 1.2em;
}

#calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
}

.day,
.weekday {
  background: #fff;
  min-height: 120px;
  padding: 6px;
  box-sizing: border-box;
  font-size: 0.9em;
  border: 1px solid #ddd;
  display: flex;
  flex-direction: column;
}

.weekday {
  background: #eee;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  min-height: 40px;
}

.sun .date-label,
.day.sun .date-label,
.weekday.sun {
  color: red;
}

.sat .date-label,
.day.sat .date-label,
.weekday.sat {
  color: blue;
}

a {
  color: #007BFF;
  text-decoration: none;
  font-size: 1.2em;
  margin-top: 2px;
}

a:hover {
  text-decoration: underline;
}

.date-label.mobile {
  display: none;
}

.date-label.desktop {
  display: inline;
  font-weight:bold;
}

.events-mobile {
  display: none;
}

.events-pc a {
  display: block;
  margin-bottom: 4px;
}

.event-title {
  font-size: 0.85em;
  margin-bottom: 4px;
}

.event-img {
  width: 20%;
  max-height: 80px;
  object-fit: cover;
  display: block;
  margin-bottom: 6px;
  border-radius: 4px;
}

.event-img-mobile {
  width: 60px;
  max-height: 40px;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 6px;
  border-radius: 4px;
}

#card-section {
  margin-top: 40px;
}

.card-container {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 30px;
  background: #fff;
  padding: 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-sizing: border-box;
}

.card-img img {
  width: 100%;
}

.card-text h2 {
  font-size: 2em;
  margin: 0;
}

.card-text p {
  font-size: 1.2em;
}

.card-text h2 span {
  font-size: 0.6em;
  display: block;
}

.card__text {
  margin-top: 8px;
  font-size: 0.95em;
}

.card__button2 {
  margin: 12px auto;
  width:100%;
  text-align:center;
}

@media screen and (max-width: 768px) {
  .nav {
    flex-wrap: nowrap;
  }

  #current-month {
    font-size: 1.2em;
    font-weight: bold;
    margin: 10px auto;
    display: block;
    width: 30%;
    text-align: center;
  }

  #calendar {
    grid-template-columns: 1fr !important;
  }

.day,
.weekday {
  background: #fff;
  min-height: 20px;
  padding: 6px;
  box-sizing: border-box;
  font-size: 0.9em;
  border: 1px solid #ddd;
  display: flex;
  flex-direction: column;
}

  .weekday {
    display: none;
  }

  .day:empty {
    display: none;
  }

  .day {
    display: block;
    padding: 10px;
    border-bottom: 1px solid #ddd;
  }

  .row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
  }

  .date-label {
    font-weight: bold;
    min-width: 80px;
  }

  .events a {
    font-size: 0.95em;
    color: #007BFF;
    text-decoration: none;
  }

  .events a:hover {
    text-decoration: underline;
  }

  .date-label.mobile {
    display: inline;
  }

  .date-label.desktop {
    display: none;
  }

  .events-mobile {
    display: inline;
  }

  .events-pc {
    display: none;
  }

  .events-mobile a {
    display: inline;
    margin-right: 6px;
  }

  .card-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .card-img img {
    max-width: 100%;
  }

  .card-text h2 span {
    display: block;
  }

  card__button2 img{
  width:20%;
}
}

@media screen and (max-width: 400px) {
  #current-month {
    width: 40%;
  }

  .nav button {
  margin: 0 0em;
}

}