/* ------------------------ 網頁基本設定 ------------------------ */
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 共用樣式 ------------------------ */
.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;
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
}
.hero-content h1 {
  font-size: 64px;
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.6);
}

/* ===== 【全新版面】衣物任務交流平台樣式 ===== */
.shirt-wrapper {
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 20px;
}

.shirt-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-title {
  font-size: 28px;
  font-weight: bold;
  color: #333;
  margin-top: 0;
}

.category-filters {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 18px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 20px;
  background-color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}
.filter-btn:hover {
  background-color: #e9e9e9;
  border-color: #bbb;
}
.filter-btn.active {
  background-color: #2a8491;
  color: white;
  border-color: #2a8491;
}

.task-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

/* --- 【全新卡片樣式】 (參照 road 頁面) --- */
.task-card {
  background-color: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #eee;
  cursor: pointer;
}

.task-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.task-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  background-color: #f0f0f0; /* 圖片載入前的底色 */
}

.task-card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.task-card-tag {
  align-self: flex-start;
  font-size: 12px;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 12px;
  color: white;
  margin-bottom: 12px;
}
.task-card-tag.捐贈 { background-color: #418693; }
.task-card-tag.需求 { background-color: #f37c3a; }
.task-card-tag.改造 { background-color: #f0c837; }

.task-card-title {
  font-size: 20px;
  font-weight: bold;
  margin: 0 0 12px 0;
  color: #333;
  line-height: 1.4;
}

.task-card-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
  font-size: 14px;
  color: #777;
}

.add-task-btn {
  position: fixed;
  bottom: 40px;
  right: 40px;
  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: 998;
  transition: all 0.3s ease;
}
.add-task-btn:hover { background-color: #1d5c64; transform: scale(1.1); }

/* --- Modal 樣式 --- */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.modal-backdrop:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}

/* 發布任務 Modal */
.task-form {
  background: white;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  width: 90%;
  max-width: 500px;
}
.task-form h3 {
  margin-top: 0;
  font-size: 22px;
  text-align: center;
  color: #333;
}
.task-form form {
  margin-top: 25px;
}
.task-form label {
  font-size: 14px;
  color: #555;
  display: block;
  margin-top: 10px;
  margin-bottom: 5px;
}
.task-form input, .task-form select, .task-form textarea {
  width: 100%;
  margin-bottom: 16px;
  padding: 12px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
}
.task-form textarea {
  resize: vertical;
}
.task-form .button-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}
.task-form button {
  padding: 10px 20px;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
}
#submit-task {
  background-color: #2a8491;
  color: white;
}
#cancel-task {
  background-color: #eee;
  color: #333;
}

/* 任務詳情 Modal */
.task-detail-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    position: relative;
}
.detail-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 32px;
    font-weight: bold;
    color: white;
    background: rgba(0,0,0,0.3);
    border-radius: 50%;
    border: none;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
}
.detail-close-btn:hover {
  background: rgba(0,0,0,0.6);
}
#detail-modal-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
}
.detail-modal-content {
    padding: 25px 35px;
    overflow-y: auto;
}
#detail-modal-title {
    margin: 0 0 15px 0;
    font-size: 26px;
    font-weight: bold;
    color: #333;
}
.detail-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #888;
    margin-bottom: 20px;
}
.meta-divider {
  color: #ddd;
}
#detail-modal-status {
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 5px;
    background-color: #e0f2f1;
    color: #00796b;
}
#detail-modal-status.closed {
    background-color: #fbe9e7;
    color: #d84315;
}
#detail-modal-description {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
    white-space: pre-wrap;
}
.detail-modal-content hr {
    border: 0;
    height: 1px;
    background-color: #eee;
    margin: 25px 0;
}

/* --- 【新增】聯絡方式容器的兩種狀態 --- */
.contact-container-button {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: bold;
    background-color: #f0c837;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-sizing: border-box;
}
.contact-container-button:hover {
    background-color: #d8b432;
}

.contact-container-info {
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 8px;
    text-align: left;
    transition: all 0.3s ease;
}
.contact-container-info p {
    margin: 0 0 10px 0;
    color: #555;
    font-size: 14px;
}
.contact-container-info strong {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}
.hidden {
  display: none;
}

/* --- Footer 樣式 --- */
.site-footer {
  background-color: #b4b4b4;
  color: #333;
  padding: 30px 20px 10px;
  font-size: 14px;
  margin-top: 60px;
}

.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;
}

.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;
}