/* page-public-fundraising.css */

.application-section {
  padding-bottom: 70px;
}

.application {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 56px;
  margin-top: 48px;
  color: #0b2f53;
  text-align: center;
}

/* === 卡片區（申請資格 + 應備文件） === */
.application__cards {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 48px;
}

.application__card {
  position: relative;
  flex: 0 1 auto;
  max-width: 498px;
}

.application__card:first-child {
  max-width: 444px;
}

.application__card-inner {
  min-height: 232px;
  height: 100%;
  border-radius: 10px;
  background-color: #fff;
  border: 2px solid #d9d9d9;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 44px 27.5px;
}

.application__card-badge {
  width: 58px;
  height: 55px;
  position: absolute;
  top: -8px;
  left: 24px;
  border-radius: 4px;
}

.application__card-title {
  align-self: stretch;
  font-weight: 500;
  margin: 0;
}

.application__card-body {
  align-self: stretch;
  min-height: 108px;
  border-radius: 10px;
  background-color: #eaeaea;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 22px;
  box-sizing: border-box;
  text-align: left;
  color: #000;
}

.application__card-text {
  margin: 0;
}

/* 應備文件清單 */
.application__doc-list {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px 17px;
}

.application__doc-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.application__doc-icon {
  width: 12px;
  flex-shrink: 0;
}

.application__doc-name {
  flex: 1;
  white-space: nowrap;
}

/* === 申請流程 === */
.application__process {
  width: 100%;
  max-width: 1335px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.application__section-heading {
  display: flex;
  align-items: center;
  gap: 16px;
}

.application__heading-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #e2ae3b;
}

.application__section-title {
  font-weight: 500;
  margin: 0;
}

.application__steps {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 27px;
}

.application__step {
  flex: 1 1 200px;
  max-width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.application__step-label {
  align-self: stretch;
  min-height: 56px;
  border-radius: 10px;
  background-color: #0b2f53;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  padding: 8px 12px;
  box-sizing: border-box;
}

.application__step-label--primary {
  background: linear-gradient(0deg, #0b2f53, #1969b9);
}

.application__step-name {
  font-weight: 500;
  text-align: center;
}

.application__step-desc {
  align-self: stretch;
  margin: 0;
  color: #0b2f53;
  text-align: left;
}

/* === 政府資源連結區 === */
.application__resources {
  width: 100%;
  max-width: 1094px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.application__resources-header {
  width: 100%;
  min-height: 60px;
  background: linear-gradient(180deg, #e2ae3b, #e2753b);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  box-sizing: border-box;
}

.application__resources-title {
  font-weight: 500;
  color: #fff;
  margin: 0;
  text-align: center;
}

.application__resources-body {
  width: 100%;
  min-height: 149.8px;
  background-image:
    linear-gradient(#fff, #fff), linear-gradient(180deg, #e2ae3b, #e2753b);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  border: 1px solid transparent;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px clamp(20px, 4vw, 54px);
}

.application__resources-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 19px;
}

.application__resources-label {
  min-height: 48px;
  width: 240px;
  border-radius: 60px;
  background-color: #e2ae3b;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.application__resources-label-text {
  font-weight: 500;
  color: #fff;
  text-align: center;
}

.application__resources-links {
  flex: 1;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.application__resources-link {
  font-weight: 500;
  color: #000;
  text-decoration: none;
  word-break: break-all;
  text-align: left;
}

.application__resources-link:hover {
  text-decoration: underline;
}

/* consultant */
.consultant-section {
  padding: 50px 0 87px;
  margin-bottom: -13px;
  background-color: #e6f3ff;
}
.consultant {
  margin-top: 23px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  color: #000;
  text-align: center;
}

.consultant__intro {
  margin: 0;
  text-align: center;
}

/* === 服務卡片群（彼此重疊 29px） === */
.consultant__services {
  width: 100%;
  max-width: 1404px;
  display: flex;
  justify-content: center;
  align-items: stretch;
}

/* 進場動畫：純淡入，不向上位移 */
html.js .consultant__services[data-reveal-stagger] > .consultant__service {
  transform: none;
}

.consultant__service {
  flex: 0 0 auto;
  width: 304px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: -29px;
}

.consultant__service:first-child {
  margin-left: 0;
}

/* 服務卡片頂部：底色條 + 圖示 + 標題 */
.consultant__service-header {
  width: 100%;
  min-height: 78px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 24px;
  box-sizing: border-box;
}

/* 直式 SVG 旗條：僅手機版顯示，桌機/平板隱藏 */
.consultant__service-header > svg {
  display: none;
}

.consultant__service-icon {
  width: 304px;
  height: 78px;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
}

.consultant__service-title {
  position: relative;
  z-index: 1;
  margin: 0;
  font-weight: 500;
  color: #fff;
}

/* 白底說明卡 */
.consultant__service-card {
  width: 194px;
  min-height: 155px;
  margin-top: -19px;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 23px;
  box-sizing: border-box;
  text-align: left;
  color: #000;
  z-index: 1;
}

.consultant__service-text {
  margin: 0;
}

/* === 結語 === */
.consultant__outro {
  width: 100%;
  max-width: 600px;
  margin: 0;
  text-align: left;
}

.mobile-only {
  display: none;
}

.desktop-only {
  display: block;
}

/* ==================== 桌面基礎樣式 ==================== */

/* ==================== 大螢幕 (max-width: 1440px) ==================== */
@media (max-width: 1440px) {
  .application-section,
  .consultant-section {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .application__step-desc {
    font-size: 0.75rem;
    max-width: 132px;
    align-self: center;
  }

  .application__resources-header {
    min-height: auto;
  }

  .application__resources-label {
    min-height: auto;
    width: 150px;
    padding: 2px 19px;
  }

  .application__resources-links {
    gap: 12px;
  }
}

/* ==================== 平板 (max-width: 1024px) ==================== */
@media (max-width: 1024px) {
  .application__cards {
    flex-direction: column;
    gap: 28px;
  }

  .application__card {
    width: 100%;
  }

  .application__steps {
    grid-template-columns: 1fr 1fr 1fr;
    display: grid;
    justify-items: center;
    gap: 16px;
  }

  .application__step {
    justify-items: center;
  }

  .application__resources-row {
    flex-direction: column;
    gap: 12px;
  }

  .consultant__services {
    gap: 24px;
    flex-wrap: wrap;
  }

  .consultant__service {
    max-width: 100%;
  }
}

/* ==================== 768px 以下 ==================== */
@media (max-width: 768px) {
  .application {
    gap: 16px;
    margin-top: 28px;
  }
  .application-section,
  .consultant-section {
    padding: 40px 1rem;
  }

  .application__card-inner {
    padding: 1.5rem;
  }

  .application__card-title {
    font-size: 1.125rem;
  }

  .application__card-text {
    max-width: 224px;
    line-height: 1.3;
  }

  .application__doc-list {
    grid-template-columns: repeat(1, 1fr);
    max-width: 172px;
  }

  .application__doc-name {
    font-size: 0.75rem;
  }

  .application__steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 16px;
  }

  .application__step {
    padding: 0;
    max-width: 150px;
    justify-items: center;
  }

  .application__step-label {
    font-size: 0.875rem;
    min-height: auto;
    padding: 4px 8px;
  }

  .application__step-name {
    font-size: 0.9375rem;
  }

  .consultant__service-header {
    padding: 14px;
  }

  .consultant__service-title {
    font-size: 1.125rem;
  }

  .consultant__service-card {
    padding: 14px;
  }

  .consultant__service-text {
    font-size: 0.9375rem;
  }
}

/* ==================== 小平板 (max-width: 992px) ==================== */
@media (max-width: 992px) {
}

/* ==================== 手機 (max-width: 480px) ==================== */
@media (max-width: 480px) {
  .application-section {
    padding: 0 12px 28px;
  }

  .consultant-section {
    padding: 28px 12px;
    margin-bottom: 54px;
  }

  .application__card-inner {
    padding: 1rem;
  }

  .application__card-badge {
    font-size: 0.875rem;
  }

  .application__card-title {
    font-size: 1rem;
  }

  .application__card-text {
    line-height: 1.3;
  }

  .application__doc-icon {
    width: 16px;
    height: 16px;
  }

  .application__doc-name {
    font-size: 0.75rem;
  }

  .application__section-title {
    font-weight: 600;
  }

  .application__heading-dot {
    width: 6px;
    height: 6px;
  }

  .application__steps {
  }

  .application__step {
    padding: 0;
  }

  .application__step-label {
    font-size: 0.75rem;
  }

  /* 手機版：「取得許可」(第 4 步) 背景改為漸層藍 */
  .application__step:nth-child(4) .application__step-label {
    background: linear-gradient(0deg, #0b2f53, #1969b9);
  }

  /* 手機版：「準備送件」(第 3 步) 背景改為純藍 */
  .application__step:nth-child(3) .application__step-label {
    background: #0b2f53;
  }

  .application__step-name {
    font-size: 0.875rem;
  }

  .application__step-desc {
    font-size: 0.75rem;
    max-width: 132px;
    align-self: center;
  }

  .application__resources {
    max-width: 272px;
  }

  .application__resources-body {
    padding: 20px 21.5px;
    border: 1px solid var(--color-primary);
  }

  .application__resources-links {
    min-width: auto;
  }

  .application__resources-title {
    font-size: 13px;
  }

  .application__resources-label-text {
    font-size: 13px;
  }

  .application__resources-link {
    font-size: 12px;
    word-break: break-all;
  }

  .consultant__intro {
    line-height: 1.7;
  }

  /* 手機版：服務項目改為「直式旗條 + 右側說明卡」橫向排列 */
  .consultant__services {
    flex-direction: column;
    gap: 0;
    align-items: center;
  }

  .consultant__service {
    width: 100%;
    max-width: 320px;
    margin-left: 0;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    justify-content: center;
  }

  .consultant__service-header {
    width: 55px;
    min-height: 210px;
    height: auto;
    padding: 44px 22px 44px 18px;
    flex-direction: column;
    align-items: flex-start;
    flex-shrink: 0;
    gap: 12px;
    position: relative;
    z-index: 0;
  }

  /* 直式 SVG 旗條：手機版顯示為背景旗條 */
  .consultant__service-header svg {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
  }

  .consultant__service-icon {
    display: none;
  }

  /* 標題改為直式書寫 */
  .consultant__service-title {
    writing-mode: vertical-rl;
    text-orientation: upright;
    letter-spacing: 2px;
    font-size: 13px !important;
    line-height: 1.2;
    white-space: nowrap;
  }

  /* 白底說明卡：撐滿剩餘寬度 */
  .consultant__service-card {
    max-width: 168px;
    max-height: 155px;
    margin-top: 27px;
    margin-left: -10px;
    padding: 55px 24px;
    min-height: 0;
  }

  .consultant__service:first-child .consultant__service-card {
    margin-top: 18px;
  }

  .consultant__service-text {
    font-size: 12px;
    line-height: 1.6;
  }

  .consultant__outro {
    max-width: 229px;
    line-height: 1.7;
  }
}
