/* ===== 共通設定 ===== */
.donation-section {
  max-width: 850px;
  margin: 4rem auto;
  padding: 1rem;
  color: var(--color-text);
}

.donation-section h2 {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 2rem;
}

.donation-block {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.philosophy-sub-img {
  flex: 1 1 300px;
  max-width: 320px;
  width: 100%;
  border-radius: 8px;
  object-fit: contain;
  display: block;
}

.donation-text {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  flex: 1 1 300px;
  font-size: 1rem;
  line-height: 1.8;
}

.donation-text h3 {
  margin: 0 0 1rem 0;
  padding: 0;
  line-height: 1.2;
}

.custom-list2 {
  display: flex;
  flex-direction: column;
  gap: 0.8em;
}

.list-item {
  display: flex;
  align-items: flex-start;
}

.list-body {
  flex: 1;
  line-height: 1.6;
}

.document-table {
  margin-top: 2rem;
  overflow-x: hidden;
}

.document-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  table-layout: auto;
}

.document-table th,
.document-table td {
  border-bottom: 1px solid #ccc;
  padding: 0.5em;
  text-align: center;
  white-space: normal;
  word-break: break-word;
  vertical-align: top;
}

.document-table a {
  color: var(--color-link);
  text-decoration: underline;
}

.grant-text-cell {
  text-align: left;
  padding: 0.4em 0.5em;
}

.grant-icon-cell {
  text-align: center;
  padding: 0.4em 0.5em;
}

.grant-info-box {
  display: block;
  font-size: 0.95em;
  line-height: 1.6;
  text-align: left;
}

.grant-project-name {
  text-align: left;
  font-size: 0.95em;
  line-height: 1.4;
  color: var(--color-text);
}

.report-icon {
  width: 55px;
  height: auto;
  object-fit: contain;
}

.donation-howto-block {
  border: 2px solid var(--color-border);
  background-color: var(--color-bg-soft);
  border-radius: 12px;
  padding: 2rem;
  margin: 3rem 0;
}

.donation-howto-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
}

.donation-howto-text {
  flex: 1 1 300px;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
}

.donation-howto-text h4 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.donation-screenshot {
  flex: 1 1 300px;
  text-align: center;
}

.zoomable-image-wrapper {
  position: relative;
}

.zoom-hint {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.zoomable-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

.zoomable-image.zoomed {
  transform: scale(2.5);
  z-index: 1000;
  position: relative;
  cursor: zoom-out;
}

/* === 支援画像エリア === */
.support-image-grid {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 3rem;
  padding: 0 1rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

.support-item {
  text-align: center;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}

.support-item img {
  max-width: 100%;
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: none;
}

.support-label {
  margin-top: 0.8rem;
  font-weight: bold;
  font-size: 1rem;
  color: var(--color-text);
}

/* === カラーテーマ === */
:root {
  --color-bg-soft: #f9f9f9;
  --color-border: #ccc;
  --color-text: #333;
  --color-main-bg: #e0e0e0;
}

[data-theme="dark"] {
  --color-bg-soft: #1a1a1a;
  --color-border: #777;
  --color-text: #eee;
  --color-main-bg: #333;
}

/* === リンク群 === */
.service-links-wrapper {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  margin: 2em 0;
}

/* === PC表示（3列固定＋順序） === */
@media screen and (min-width: 768px) {
  .support-image-grid {
    flex-direction: row;
    justify-content: center;
    gap: 2rem;
    flex-wrap: nowrap;
  }

  .support-item {
    flex: 0 0 calc((100% - 4rem)/3);
    margin: 0;
    max-width: none;
  }

  .support-item.goods { order: 1; }
  .support-item.donate { order: 2; }
  .support-item.spread { order: 3; }
}

/* === スマホ表示（縦並び・中央寄せ） === */
@media screen and (max-width: 768px) {
  .support-image-grid {
    flex-direction: column;
    align-items: center;
  }

  .support-item {
    width: 100%;
    max-width: 280px;
    margin-bottom: 2rem;
  }

  .donation-block {
    flex-direction: column;
    text-align: center;
  }

  .donation-text {
    text-align: left;
    margin-bottom: 0;
  }

  .document-table {
    margin-top: 1.2rem;
  }

  .responsive-table thead {
    display: none;
  }

  .responsive-table tr {
    display: block;
    margin-bottom: 0.8em;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.5em;
  }

  .responsive-table td {
    display: flex;
    justify-content: space-between;
    text-align: left;
    padding: 0.3em 0;
    font-size: 0.9rem;
    border: none;
    border-bottom: 1px dashed #ccc;
  }

  .responsive-table td::before {
    content: attr(data-label);
    font-weight: bold;
    flex: 1;
    color: var(--color-text);
    min-width: 7em;
  }

  .responsive-table td a {
    flex: 1;
    text-align: right;
    color: var(--color-link);
    text-decoration: underline;
  }

  .service-links-wrapper {
    justify-content: center;
  }
}
