/* 組織頁面樣式 */

/* 橫幅圖片 */
.group-banner {
  width: 100%;
  height: 280px;
  overflow: hidden;
}

.group-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 組織圖像 */
.group-logo-container {
  margin-top: -60px;
}

.group-logo {
  width: 189px;
  height: 189px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #e5e5e5;
}

/* 組織名稱 */
.group-name {
  font-weight: bold;
  color: #000000;
  margin-bottom: 0.5rem;
}

/* 類型和關注議題標籤 */
.group-label {
  font-size: 16px;
  font-weight: 400;
  color: #717171;
  margin-right: 0.5rem;
  white-space: nowrap;
}

/* Badge 樣式 */
.group-badge {
  background-color: #f4f4f4;
  border: 1px solid #e7e7e7;
  padding: 4px 8px;
  border-radius: 8px;
  display: inline-block;
  font-size: 12px;
  font-weight: 400;
  color: #4a4a4a;
  margin-right: 4px;
}

/* 統計數據卡片 */
.stats-container {
  display: flex;
  gap: 12px;
  margin-bottom: 1.5rem;
}

.stat-card {
  flex: 1;
  min-width: 0;
  background-color: #ffffff;
  border: 1px solid #d3d3d3;
  padding: 16px;
  border-radius: 12px;
  text-align: center;
}

.stat-value {
  font-weight: 600;
  font-size: 32px;
  color: #00a9e0;
}

.stat-label {
  font-weight: 400;
  font-size: 14px;
  color: #717171;
}

/* 單位+聯絡資訊區塊 */
.info-card {
  background-color: #f4f4f4;
  padding: 24px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-section-title {
  font-weight: 600;
  font-size: 18px;
  color: #000;
  margin-bottom: 12px;
}

.info-item {
  margin-bottom: 8px;
}

.info-item-label {
  font-weight: 600;
  font-size: 16px;
  color: #717171;
}

.info-item-separator {
  font-weight: 600;
  font-size: 16px;
  color: #717171;
}

.info-item-value {
  font-weight: 400;
  font-size: 16px;
  color: #717171;
}

/* 組織介紹 */
.group-description {
  font-weight: 400;
  font-size: 16px;
  color: #717171;
  line-height: 1.8;
}

.group-description ul,
.group-description ol {
  padding-left: 1.5em;
  margin: 0.5em 0;
}

.group-description ul {
  list-style-type: disc;
}

.group-description ol {
  list-style-type: decimal;
}

.group-description li {
  margin-bottom: 0.25em;
  padding-left: 0.25em;
}

.group-description ul ul,
.group-description ol ul {
  list-style-type: circle;
}

.group-description ul ul ul,
.group-description ol ol ul {
  list-style-type: square;
}

/* 響應式設計 */
@media (max-width: 768px) {
  .group-banner {
    height: 160px;
  }

  .group-logo-container {
    margin-top: -40px;
  }

  .group-logo {
    width: 120px;
    height: 120px;
  }

  /* 組織信息垂直排列 */
  .group-info-container {
    flex-direction: column !important;
    gap: 0;
  }

  /* 社群連結在手機版時左對齊 */
  .group-info-container > .d-flex:last-child {
    margin-top: 0;
    justify-content: flex-start;
  }

  .stats-container {
    flex-wrap: wrap;
  }

  .stat-card {
    flex: 1 1 calc(50% - 6px);
  }

  .stat-value {
    font-size: 24px;
  }

  .info-card {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .stat-value {
    font-size: 20px;
  }

  .stat-label {
    font-size: 12px;
  }
}

/* 專案滑動容器 */
.project-wrapper {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  gap: 24px;
  padding: 24px 0;
  padding-right: 120px;
  cursor: grab;
  user-select: none;
  -ms-overflow-style: none;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.project-wrapper::-webkit-scrollbar {
  display: none;
}

.project-wrapper:active {
  cursor: grabbing;
}

/* 專案卡片容器 - 與首頁精選專案一致 */
.project-selection-card {
  flex: 0 0 350px;
  width: 350px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* 專案卡片標題樣式 */
.project-selection-card .home-selection-title {
  height: 3em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  max-height: calc(1em * 2 * 1.5);
  letter-spacing: 1px;
}

/* Scroll Buttons */
.scroll-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  padding: 16px;
  background-color: #e7e7e7;
  border: 1px solid #e7e7e7;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #000;
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.scroll-btn:hover:not(:disabled) {
  background-color: #f4f4f4;
  border: 1px solid #e7e7e7;
}

.scroll-btn:active:not(:disabled) {
  background-color: #e7e7e7;
  border: 1px solid #d3d3d3;
}

.scroll-btn:focus {
  outline: none;
}

.scroll-btn:disabled {
  background-color: #e7e7e7;
  border: 1px solid #e7e7e7;
  cursor: not-allowed;
  opacity: 0.5;
}

/* Scroll Indicator */
.scroll-indicator {
  font-size: 14px;
  color: #666;
  min-width: 40px;
  justify-content: center;
  gap: 2px;
}

.scroll-indicator span {
  font-weight: 500;
}

/* 響應式設計 - 專案卡片 */
@media (max-width: 768px) {
  .project-selection-card {
    flex: 0 0 280px;
    width: 280px;
  }

  .scroll-indicator {
    display: flex !important;
  }
}

@media (min-width: 769px) {
  .scroll-indicator {
    display: none !important;
  }
}
