body {
  font-family: "Kanit", sans-serif;
  background: #f8f9fa;
  color: #333;
}

header {
  text-align: center;
  padding: 20px; /* ลดระยะ padding ให้เล็กลง */
  background: #004085;
  color: white;
  border-radius: 0 0 20px 20px;
}

.calendar-container {
  overflow: hidden;
  max-width: 90%;
  margin: 10px auto; /* ลดระยะห่างระหว่างหัวข้อกับปฏิทิน */
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  padding: 20px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.day-header {
  text-align: center;
  padding: 10px;
  font-weight: bold;
  color: white;
  background: #007bff;
  border-radius: 5px;
  font-size: 16px;
}

.day-empty {
  background: #f0f0f0;
  border-radius: 5px;
}

.day-filled {
  text-align: center;
  padding: 15px;
  background: #e9f7ff;
  border: 1px solid #cce5ff;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
}

.day-filled:hover {
  background: #d4edda;
  transform: scale(1.02);
}

.day-number {
  font-size: 16px;
  font-weight: bold;
  color: #333;
}

.day-today {
  border: 2px solid #2256ff; /* สีเด่นสำหรับวันที่ปัจจุบัน */
  background: #e0e8f8; /* พื้นหลังที่แตกต่าง */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* เงาที่ดูเด่นขึ้น */
  transition: all 0.3s ease-in-out;
}

.holiday {
  color: #e3342f;
  font-size: 12px;
  margin-top: 5px;
}

.person {
  font-size: 14px;
  padding: 5px;
  color: white;
  border-radius: 5px;
  margin-top: 5px;
}

.month-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px auto;
  max-width: 90%;
}

button {
  background: #007bff;
  border: none;
  color: white;
  padding: 8px 12px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

button:hover {
  background: #0056b3;
}

.phone-list {
  margin-top: 20px;
  background-color: #f8f9fa;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  text-align: center;
}

.phone-list h3 {
  font-size: 18px;
  font-weight: bold;
  color: #004085;
  margin-bottom: 10px;
  width: 100%;
}

.phone-list ul {
  list-style: none;
  padding: 0;
  font-size: 14px;
  margin: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.phone-list li {
  margin-right: 20px;
  margin-bottom: 10px;
}

.phone-list li strong {
  color: #013063;
  margin-right: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .calendar {
    grid-template-columns: repeat(3, 1fr);
  }

  .day-header {
    font-size: 12px;
    padding: 8px;
  }

  .day-filled {
    padding: 10px;
    font-size: 12px;
  }

  .month-navigation {
    flex-direction: column;
    align-items: center;
  }

  button {
    margin: 5px 0;
    padding: 6px 10px;
  }
}

@media (max-width: 576px) {
  .calendar {
    grid-template-columns: repeat(2, 1fr);
  }

  .day-header {
    display: none;
  }

  .day-number {
    font-size: 14px;
  }

  .person {
    font-size: 12px;
  }

  .phone-list ul {
    flex-direction: column;
    align-items: center;
  }

  .phone-list li {
    margin-right: 0;
  }
}

/* Print Styles */
@media print {
  header h1 {
    font-size: 18px;
    text-align: center;
  }

  header p {
    display: none;
  }

  .calendar {
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin: 0;
    padding: 0;
  }

  .month-navigation {
    display: none;
  }

  .phone-list {
    display: block;
    margin-top: 10px;
    text-align: center;
    font-size: 12px;
  }

  .phone-list h3 {
    font-size: 14px;
    margin-bottom: 5px;
  }

  .phone-list ul {
    padding: 0;
    list-style: none;
    margin: 0;
    display: flex;
    justify-content: space-evenly;
  }

  .phone-list li {
    margin: 0 10px;
  }

  .day-today {
    border: 2px solid #cce5ff; /* แสดงกรอบเหมือนวันปกติ */
    background: none; /* ลบสีพื้นหลัง */
    box-shadow: none; /* ลบเงา */
  }
}
