/* 교리 페이지 아코디언 스타일
   모든 선택자를 #ffDoctrineRoot 아래로 제한해 아임웹 전역 스타일과 섞이지 않게 합니다.
   색상은 theme.css의 --ff-* 토큰을 쓰되, theme.css가 없어도 같은 색이 나오도록
   var(..., 기본값) 형태로 적어 둡니다. */

#ffDoctrineRoot,
#ffDoctrineRoot * {
  box-sizing: border-box;
}

#ffDoctrineRoot {
  color: #222;
  padding: 24px 16px;
}

#ffDoctrineRoot .acc-source-note {
  max-width: 860px;
  margin: 0 auto 24px;
  text-align: center;
  color: #918b86;
  font-size: 14px;
  line-height: 1.6;
}

/* 교리 내용을 Supabase에서 불러오는 동안, 그리고 못 불러왔을 때 자리에 뜨는 한 줄 안내 */
#ffDoctrineRoot .acc-status {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 16px;
  text-align: center;
  color: #918b86;
  font-size: 15px;
  line-height: 1.6;
}

#ffDoctrineRoot .acc-status-error {
  color: #a3564f;
}

#ffDoctrineRoot .accordion {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

#ffDoctrineRoot .acc-item { background: transparent; }
#ffDoctrineRoot .acc-divider { height: 1px; background: #ebecea; opacity: 0.5; }

#ffDoctrineRoot .acc-visible { padding: 28px 4px 24px; background: transparent; }

#ffDoctrineRoot .acc-title-row {
  display: block;
  cursor: default;
  user-select: none;
  pointer-events: none;
}

#ffDoctrineRoot .acc-title {
  display: block;
  color: #433E3C;
  line-height: 1.5;
  font-weight: 700;
  font-size: 20px;
}

#ffDoctrineRoot .acc-summary {
  margin-top: 14px;
  line-height: 1.9;
  color: #6B6460;
}

#ffDoctrineRoot .more-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  color: var(--ff-gold, #D2B983);
  cursor: pointer;
  user-select: none;
  letter-spacing: 0.02em;
  transition: color 0.2s;
  font-size: 16px;
}

#ffDoctrineRoot .more-label:hover { color: #433E3C; }

#ffDoctrineRoot .more-label[hidden] {
  display: none !important;
}

#ffDoctrineRoot .collapse-button-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 32px;
}

#ffDoctrineRoot .collapse-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 220px;
  min-height: 48px;
  padding: 12px 28px;
  border: 1px solid var(--ff-main, #443F3D);
  border-radius: 6px;
  background: transparent;
  color: var(--ff-main, #443F3D);
  cursor: pointer;
  user-select: none;
  letter-spacing: 0.02em;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

#ffDoctrineRoot .collapse-label:hover {
  background: var(--ff-main, #443F3D);
  border-color: var(--ff-main, #443F3D);
  color: var(--ff-white, #FFFFFF);
  transform: translateY(-1px);
}

#ffDoctrineRoot .collapse-label:active {
  transform: translateY(0);
}

#ffDoctrineRoot .collapse-label:focus-visible {
  outline: 2px solid rgba(210, 185, 131, 0.75);
  outline-offset: 4px;
}

#ffDoctrineRoot .collapse-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transform: translateY(-1px);
}

#ffDoctrineRoot .more-arrow {
  display: inline-flex;
  transition: transform 0.3s ease;
  line-height: 1;
}

#ffDoctrineRoot .more-label.open .more-arrow {
  transform: rotate(-90deg);
}

#ffDoctrineRoot .video-embed {
  width: 100%;
  max-width: 720px;
  max-height: 0;
  margin: 0 auto;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    max-height 0.42s ease,
    margin-top 0.42s ease,
    opacity 0.25s ease,
    visibility 0s linear 0.42s;
}

#ffDoctrineRoot .video-embed.show {
  max-height: 500px;
  margin-top: 20px;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    max-height 0.42s ease,
    margin-top 0.42s ease,
    opacity 0.25s ease,
    visibility 0s linear 0s;
}

#ffDoctrineRoot .video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

#ffDoctrineRoot .video-frame iframe,
#ffDoctrineRoot .video-frame .video-thumb {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

#ffDoctrineRoot .video-thumb-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: pointer;
  background: #000;
}

#ffDoctrineRoot .video-thumb {
  object-fit: cover;
}

#ffDoctrineRoot .video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  pointer-events: none;
}

#ffDoctrineRoot .acc-body {
  max-height: 0;
  overflow: hidden;
  overflow-anchor: none;
  transition: max-height 0.45s ease;
  will-change: max-height;
}

#ffDoctrineRoot .ff-no-transition,
#ffDoctrineRoot .ff-no-transition * {
  transition: none !important;
}

#ffDoctrineRoot .acc-body-inner {
  padding: 28px 4px 36px;
  line-height: 1.9;
  background: transparent;
}

#ffDoctrineRoot .acc-body-inner p {
  margin: 0 0 16px 0;
  color: #5a5350;
}

/* .verse는 상세 본문뿐 아니라 요약(.acc-summary) 안에서도 쓰입니다. */
#ffDoctrineRoot .verse {
  background: #f7f5f0;
  padding: 14px 18px;
  margin: 12px 0 18px;
  color: #433E3C;
  border-radius: 8px;
  line-height: 1.85;
}

#ffDoctrineRoot .verse .ref {
  color: var(--ff-gold, #D2B983);
  display: block;
  margin-bottom: 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 16px;
  font-weight: 700;
}

#ffDoctrineRoot .bracket-label {
  display: inline-block;
  color: var(--ff-gold, #D2B983);
  background: #f7f5f0;
  padding: 3px 12px;
  border-radius: 20px;
  margin: 18px 0 10px;
  letter-spacing: 0.04em;
  font-size: 16px;
  font-weight: 700;
}

#ffDoctrineRoot ul.list {
  padding-left: 18px;
  margin: 0 0 16px 0;
}

#ffDoctrineRoot ul.list li {
  margin-bottom: 5px;
  color: #5a5350;
}

@media (max-width: 768px) {
  #ffDoctrineRoot .video-play {
    width: 60px;
    height: 60px;
    font-size: 24px;
  }
}
