/* food.css */
body {
  margin: 0;
  font-family: "Noto Sans TC", sans-serif;
  background-color: #fdf6dc;
  color: #333;
}

/* ------------------------ Header ------------------------ */
header {
  background-color: #fdf6dc;
  padding: 10px 30px;
  border-bottom: 1px solid #ccc;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 80px;
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  padding: 0 40px;
}

.left-group {
  display: flex;
  align-items: center;
  gap: 36px;
}

.navbar-links {
  flex: 1.5;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 50px;
  padding-left: 275px;
}

nav a {
  font-size: 20px;
  text-decoration: none;
  color: #887d00;
  font-weight: bold;
  padding: 6px 12px;
}

nav a:hover {
  color: #2a8491;
  text-decoration: underline;
  transition: 0.3s;
}

.buttons {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.buttons a {
  padding: 6px 12px;
  border-radius: 6px;
  background-color: #f0c837;
  color: white;
  text-decoration: none;
  font-size: 14px;
}

.buttons a:hover {
  background-color: #b9953d;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: 0.3s;
}

a.logo {
  text-decoration: none;
  color: inherit;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  height: 75px;
  width: auto;
  display: block;
}

.logo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.2;
  text-align: left;
}

.logo-title {
  font-size: 30px;
  font-weight: bold;
  white-space: nowrap;
}

.logo-blue {
  color: #418693;
}

.logo-orange {
  color: #f37c3a;
}

.logo-subtitle {
  font-size: 20px;
  color: #21414C;
  margin-top: 2px;
  font-weight: bold;
}

/* ------------------------ Hero 區塊 ------------------------ */
.hero {
  position: relative;
  height: 750px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-overlay {
  position: absolute;
  background-color: rgba(0, 0, 0, 0.4);
  inset: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  font-size: 32px;
  font-weight: bold;
  color: white;
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.6);
}

/* ------------------------ 任務區塊 ------------------------ */
.community-wrapper {
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 20px;
}

.community-title {
  text-align: center;
  font-size: 28px;
  color: #333;
  margin-bottom: 20px;
}

.category-bar {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.category-button {
  padding: 10px 20px;
  font-size: 16px;
  font-weight: bold;
  border: 2px solid #ccc;
  border-radius: 20px;
  background-color: #fff;
  color: #555;
  cursor: pointer;
  transition: all 0.3s ease;
}

.category-button:hover {
  background-color: #e9e9e9;
  border-color: #aaa;
}

.category-button.active {
  background-color: #418693;
  color: #fff;
  border-color: #418693;
}

.task-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

.task-card {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  padding: 24px;
  display: flex;
  flex-direction: column;
  border-top: 5px solid #ccc;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.task-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.task-card.代購 { border-top-color: #418693; }
.task-card.送餐 { border-top-color: #f37c3a; }
.task-card.協助料理 { border-top-color: #f0c837; }

.task-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.task-card-category {
  font-size: 14px;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 12px;
  color: #fff;
}

.task-card.代購 .task-card-category { background-color: #418693; }
.task-card.送餐 .task-card-category { background-color: #f37c3a; }
.task-card.協助料理 .task-card-category { background-color: #f0c837; }

.task-card-user {
  font-size: 15px;
  color: #777;
}

.task-card-title {
  font-size: 20px;
  font-weight: bold;
  margin: 0 0 16px 0;
  line-height: 1.5;
  color: #333;
  flex-grow: 1;
}

.task-card-details {
  font-size: 15px;
  color: #555;
  margin-bottom: 20px;
}

.task-card-details p {
  margin: 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-card-button {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  font-weight: bold;
  color: #fff;
  background-color: #333;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: auto;
  transition: background-color 0.2s ease;
}

.task-card-button:hover {
  background-color: #555;
}

/* ------------------------ Footer ------------------------ */
.site-footer {
  background-color: #b4b4b4;
  color: #333;
  padding: 30px 20px 10px;
  font-size: 14px;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo img {
  height: 70px;
  width: auto;
  object-fit: contain;
}

.footer-links a {
  display: block;
  color: #424242;
  text-decoration: none;
  margin: 4px 0;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-contact p {
  margin: 4px 0;
}

.footer-bottom {
  text-align: center;
  margin-top: 20px;
  border-top: 1px solid #999;
  padding-top: 10px;
  font-size: 12px;
  color: #666;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.footer-links .link-row {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ------------------------ 新增任務按鈕 ------------------------ */
#add-task-fab {
  position: fixed;
  bottom: 40px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: #2a8491;
  color: white;
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  cursor: pointer;
  font-size: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

#add-task-fab:hover {
  background-color: #1d5c64;
  transform: scale(1.08);
}

/* ------------------------ Modal 通用 ------------------------ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.65);
  z-index: 1000;
  display: none; 
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

/* ------------------------ 新增任務 Modal ------------------------ */
#add-task-modal {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  padding: 30px;
  width: 90%;
  max-width: 500px;
  z-index: 1001;
}

#add-task-modal h3 {
  font-size: 24px;
  font-weight: bold;
  color: #333;
  margin-top: 0;
  margin-bottom: 25px;
  text-align: center;
}

#add-task-modal input, 
#add-task-modal select {
  width: 100%;
  padding: 12px;
  margin-bottom: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  box-sizing: border-box;
  background-color: #fafafa;
}

#add-task-modal input:focus, 
#add-task-modal select:focus {
  outline: none;
  border-color: #2a8491;
  box-shadow: 0 0 5px rgba(42, 132, 145, 0.3);
}

#add-task-modal .button-row {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  margin-top: 10px;
}

#add-task-modal button {
  padding: 12px 25px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.2s ease;
}

#add-task-modal .submit-btn {
  background-color: #418693;
  color: #fff;
}
#add-task-modal .submit-btn:hover {
  background-color: #2a6a74;
}

#add-task-modal .cancel-btn {
  background-color: #f0f0f0;
  color: #555;
  border: 1px solid #ddd;
}
#add-task-modal .cancel-btn:hover {
  background-color: #e5e5e5;
  border-color: #ccc;
}

/* ------------------------ RWD 響應式設計 ------------------------ */
@media (max-width: 768px) {
  .hero-content {
    font-size: 20px;
  }

  .navbar-links {
    flex-direction: column;
    padding-left: 0;
    gap: 20px;
    align-items: center;
  }

  .logo img {
    height: 60px;
  }

  .logo-title {
    font-size: 22px;
  }

  .logo-subtitle {
    font-size: 14px;
  }

  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* ------------------------ 任務確認視窗 ------------------------ */
#task-confirm-modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.65);
  z-index: 1002;
  display: none; 
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

#task-confirm-modal {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  padding: 30px;
  width: 100%;
  max-width: 450px;
  z-index: 1003;
  text-align: left;
}

#task-confirm-modal h3 {
  font-size: 24px;
  font-weight: bold;
  color: #333;
  margin-top: 0;
  margin-bottom: 20px;
  text-align: center;
}

.task-details-preview {
  margin-bottom: 20px;
}

.task-details-preview p {
  font-size: 16px;
  color: #555;
  margin: 12px 0;
  line-height: 1.6;
  display: flex;
}

.task-details-preview p strong {
  flex-shrink: 0;
  margin-right: 8px;
  color: #333;
}

.task-details-preview hr {
  border: 0;
  height: 1px;
  background-color: #eee;
  margin: 20px 0;
}

.task-details-preview .contact-phone {
  font-size: 18px;
  font-weight: bold;
  color: #418693;
}

.modal-warning {
  font-size: 14px;
  color: #888;
  text-align: center;
  margin-bottom: 25px;
}

.modal-button-row {
  display: flex;
  justify-content: space-between;
  gap: 15px;
}

.modal-button-row button {
  flex-grow: 1;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.2s ease;
}

.modal-button-row .submit-btn {
  background-color: #418693;
  color: #fff;
}

.modal-button-row .submit-btn:hover {
  background-color: #2a6a74;
}

.modal-button-row .cancel-btn {
  background-color: #f0f0f0;
  color: #555;
  border: 1px solid #ddd;
}

.modal-button-row .cancel-btn:hover {
  background-color: #e5e5e5;
  border-color: #ccc;
}