/* ============================================
   빅토리공동체 (jnissi.net) - 모던 디자인 v2
   가독성 + 명도 대비 강화
   ============================================ */

:root {
  --vc-primary:      #1d4565;
  --vc-primary-light:#2c5f8d;
  --vc-accent:       #d4a44b;
  --vc-accent-dark:  #b88a32;
  --vc-warm:         #f5ede0;
  --vc-soft:         #f7f5f0;
  --vc-text:         #1a1d24;
  --vc-text-light:   #ffffff;
  --vc-muted:        #5a5e66;
  --vc-line:         rgba(29,69,101,.12);
  --vc-dark:         #14263a;
  --vc-dark-deep:    #0d1929;
  --vc-shadow-sm:    0 2px 10px rgba(0,0,0,.06);
  --vc-shadow-md:    0 8px 24px rgba(29,69,101,.14);
  --vc-shadow-lg:    0 16px 40px rgba(29,69,101,.22);
  --vc-radius:       16px;
  --vc-tx:           all .35s cubic-bezier(.4,0,.2,1);
}

@keyframes vcFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes vcGlow {
  0%, 100% { box-shadow: 0 8px 24px rgba(29,69,101,.35); }
  50%      { box-shadow: 0 12px 32px rgba(29,69,101,.55); }
}

/* ============================================
   글로벌
   ============================================ */
html { scroll-behavior: smooth; }
::selection { background: rgba(212,164,75,.4); color: var(--vc-text); }
:focus-visible { outline: 2px solid var(--vc-accent); outline-offset: 3px; border-radius: 4px; }

body {
  background: var(--vc-soft) !important;
  color: var(--vc-text) !important;
}

/* ============================================
   상단 정보바 / 헤더 컨트라스트 강화
   ============================================ */
nav a, .nav a, #nav a,
.gnb a {
  color: var(--vc-text) !important;
  font-weight: 600 !important;
  letter-spacing: -.2px;
  position: relative;
  transition: var(--vc-tx);
}
nav a::after, .gnb a::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -4px;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--vc-primary), var(--vc-accent));
  transition: var(--vc-tx);
  border-radius: 1px;
}
nav a:hover, .gnb a:hover { color: var(--vc-primary) !important; }
nav a:hover::after, .gnb a:hover::after { width: 80%; }

/* ============================================
   메인 비주얼 / 히어로 - 진한 그라데이션 + 흰 텍스트 + 그림자
   ============================================ */
.main-visual,
#main-visual,
.main-slider,
.hero-section,
[class*="visual"]:not(.sub-visual),
[id*="visual"]:not(.sub-visual),
.slide-item {
  position: relative !important;
}

.main-visual::after,
#main-visual::after,
.main-slider::after,
.slide-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13,25,41,.45) 0%, rgba(13,25,41,.75) 100%) !important;
  pointer-events: none;
  z-index: 1;
}

/* 메인 비주얼 안의 모든 텍스트 — ID와 클래스 양쪽 다 타겟 */
#main-visual *,
.main-visual *,
.main-slider *,
.slide-item *,
[class*="main-visual"] *,
[id*="main-visual"] *,
.main-title,
.main-title *,
.main-title h1,
.main-title h2,
.main-title h3,
.main-title p {
  color: #fff !important;
  text-shadow: 0 4px 18px rgba(0,0,0,.85), 0 2px 8px rgba(0,0,0,.6) !important;
  position: relative;
  z-index: 2;
}

/* 부제 (subtitle) 가독성 강화 */
#main-visual .subtitle,
#main-visual .desc,
#main-visual h2,
#main-visual h3,
#main-visual small,
.main-visual h2,
.main-title h2,
.main-title h3 {
  color: #fff !important;
  text-shadow: 0 3px 16px rgba(0,0,0,.9), 0 1px 6px rgba(0,0,0,.7) !important;
  font-weight: 500 !important;
  opacity: 1 !important;
}

/* 인라인 color 스타일 강제 무시 */
#main-visual *[style*="color"],
.main-visual *[style*="color"],
.main-title *[style*="color"] {
  color: #fff !important;
  text-shadow: 0 3px 14px rgba(0,0,0,.85) !important;
}

/* ============================================
   카드 섹션 (공동체소개/중독의 경험/치유의 말씀) - 텍스트 가독성
   ============================================ */
[class*="card"],
.card-section a,
.box-link,
.thumb-card {
  position: relative !important;
  overflow: hidden;
  border-radius: var(--vc-radius);
  transition: var(--vc-tx);
}

/* 카드 안 이미지 + 어두운 오버레이 */
.card a, .card .item, [class*="card"] a {
  position: relative;
  display: block;
}
.card img, [class*="card"] img,
.card-section img {
  transition: var(--vc-tx);
  border-radius: var(--vc-radius);
}

/* 이미지 위 텍스트가 있는 카드 — 어두운 오버레이 추가 */
.card-img-overlay,
.card-overlay,
[class*="overlay"] {
  background: linear-gradient(180deg, rgba(0,0,0,.1) 0%, rgba(0,0,0,.7) 100%) !important;
}

/* 카드 호버 */
.card:hover, [class*="card"]:hover {
  transform: translateY(-6px);
  box-shadow: var(--vc-shadow-md);
}
.card:hover img, [class*="card"]:hover img {
  transform: scale(1.05);
}

/* 카드 위 흰 텍스트 — 모든 흰 텍스트에 그림자 강제 */
.card h2, .card h3, .card h4, .card p, .card span,
[class*="card"] h2, [class*="card"] h3, [class*="card"] h4, [class*="card"] p,
.thumb-card h2, .thumb-card h3, .thumb-card p {
  text-shadow: 0 3px 10px rgba(0,0,0,.7), 0 1px 4px rgba(0,0,0,.5) !important;
  font-weight: 700 !important;
}

/* 메인 페이지 카드 영역 (top thumbnails) */
.main-thumb,
.top-thumb,
[class*="main-card"],
.intro-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--vc-radius);
  box-shadow: var(--vc-shadow-sm);
}
.main-thumb::before,
.top-thumb::before,
.intro-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.65) 100%);
  z-index: 1;
  pointer-events: none;
}
.main-thumb > *,
.top-thumb > *,
.intro-card > * { position: relative; z-index: 2; }

/* ============================================
   섹션 타이틀
   ============================================ */
h2.section-title,
.section-title {
  color: var(--vc-text) !important;
  font-weight: 800 !important;
  position: relative;
  display: inline-block;
}
h2.section-title::after,
.section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--vc-primary), var(--vc-accent));
  border-radius: 2px;
}

/* ============================================
   게시판 박스 (공지사항/지체전용/신앙상담)
   ============================================ */
.board-box,
.notice-box,
.bbs-box,
[class*="latest"] {
  background: #fff !important;
  border-radius: var(--vc-radius) !important;
  padding: 24px 22px !important;
  box-shadow: var(--vc-shadow-sm) !important;
  border: 1px solid var(--vc-line);
  transition: var(--vc-tx);
}
.board-box:hover, .notice-box:hover, .bbs-box:hover,
[class*="latest"]:hover {
  box-shadow: var(--vc-shadow-md) !important;
  transform: translateY(-3px);
  border-color: rgba(212,164,75,.25);
}

.board-box h3, .notice-box h3, .bbs-box h3,
.board-box .title, [class*="latest"] .title,
[class*="latest"] h3 {
  color: var(--vc-primary) !important;
  font-weight: 700 !important;
  font-size: 18px !important;
  border-bottom: 2px solid var(--vc-accent) !important;
  padding-bottom: 10px !important;
  margin-bottom: 14px !important;
  letter-spacing: -.3px;
}

.board-box li, .notice-box li, .bbs-box li,
[class*="latest"] li {
  color: var(--vc-text) !important;
  font-size: 14.5px !important;
  padding: 8px 0 !important;
  border-bottom: 1px dashed rgba(29,69,101,.1) !important;
  transition: var(--vc-tx);
}
.board-box li:hover, .notice-box li:hover {
  color: var(--vc-primary) !important;
  padding-left: 6px !important;
}
.board-box li:last-child, .notice-box li:last-child,
.bbs-box li:last-child { border-bottom: 0 !important; }

/* 날짜 색상 */
.board-box .date, .notice-box .date,
[class*="latest"] .date,
[class*="time"] {
  color: var(--vc-muted) !important;
  font-size: 12.5px !important;
}

/* ============================================
   WITH US / 자기사랑학교 섹션
   ============================================ */
.with-us,
[class*="with-us"] {
  padding: 60px 20px;
  text-align: center;
}

/* ============================================
   푸터 - 다크 테마 (흰글씨가 보이도록)
   ============================================ */
footer,
.footer,
#footer,
.main-footer {
  background: linear-gradient(180deg, var(--vc-dark) 0%, var(--vc-dark-deep) 100%) !important;
  color: rgba(255,255,255,.92) !important;
  border-top: 3px solid var(--vc-accent) !important;
  padding: 50px 20px 36px !important;
  position: relative;
}

footer *,
.footer *,
.main-footer * {
  color: rgba(255,255,255,.85) !important;
}

footer .logo,
footer .brand,
footer .title,
.footer .logo,
.footer .brand,
.footer .title {
  color: #fff !important;
  font-weight: 700 !important;
}

footer a,
.footer a,
.main-footer a {
  color: var(--vc-accent) !important;
  transition: var(--vc-tx);
  text-decoration: none;
}
footer a:hover,
.footer a:hover {
  color: #fff !important;
  text-decoration: underline;
}

footer p,
footer div,
.footer p,
.footer div {
  color: rgba(255,255,255,.78) !important;
  line-height: 1.8;
}

footer .copyright,
.footer .copyright,
[class*="copyright"] {
  color: rgba(255,255,255,.55) !important;
  font-size: 13px !important;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.1);
}

/* 푸터 로고 영역 */
footer img,
.footer img,
.main-footer img {
  filter: brightness(0) invert(1) opacity(.85);
  transition: var(--vc-tx);
}
footer img:hover, .footer img:hover { opacity: 1; }

/* ============================================
   링크 일반
   ============================================ */
a:hover {
  color: var(--vc-primary);
}

/* ============================================
   버튼 시스템
   ============================================ */
.btn,
.button,
button[type="submit"],
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 999px !important;
  font-weight: 600 !important;
  letter-spacing: -.2px;
  transition: var(--vc-tx) !important;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary,
.button-primary,
button[type="submit"],
input[type="submit"] {
  background: linear-gradient(135deg, var(--vc-primary) 0%, var(--vc-primary-light) 100%) !important;
  color: #fff !important;
  box-shadow: 0 6px 18px rgba(29,69,101,.32);
}
.btn-primary:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(29,69,101,.5);
  color: #fff !important;
}

/* ============================================
   게시판 테이블
   ============================================ */
table.board_list,
.board_list table,
.bbs_list,
.tbl_head01,
.tbl_wrap table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  background: #fff;
  border-radius: var(--vc-radius);
  overflow: hidden;
  box-shadow: var(--vc-shadow-sm);
}

.board_list th, .bbs_list th, .tbl_head01 th {
  background: linear-gradient(180deg, var(--vc-warm) 0%, #ebe1ce 100%) !important;
  color: var(--vc-text) !important;
  font-weight: 700 !important;
  letter-spacing: -.2px;
  padding: 14px 12px !important;
  border-bottom: 2px solid var(--vc-accent) !important;
}

.board_list td, .bbs_list td, .tbl_head01 td {
  padding: 14px 12px !important;
  border-bottom: 1px solid var(--vc-line) !important;
  color: var(--vc-text) !important;
  transition: var(--vc-tx);
}

.board_list tr:hover td, .bbs_list tr:hover td, .tbl_head01 tr:hover td {
  background: rgba(245,237,224,.5);
}

/* ============================================
   인용문 / 성경 구절
   ============================================ */
blockquote {
  background: linear-gradient(135deg, var(--vc-warm) 0%, #fff 100%);
  border-left: 4px solid var(--vc-accent);
  padding: 20px 28px;
  border-radius: 0 var(--vc-radius) var(--vc-radius) 0;
  margin: 24px 0;
  font-style: italic;
  color: var(--vc-text) !important;
  font-size: 16px;
  line-height: 1.8;
  box-shadow: var(--vc-shadow-sm);
}

/* ============================================
   플로팅 상담 버튼
   ============================================ */
.floating-help-vc {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: linear-gradient(135deg, var(--vc-primary) 0%, var(--vc-primary-light) 100%);
  color: #fff !important;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: 0 8px 24px rgba(29,69,101,.45);
  z-index: 999;
  transition: var(--vc-tx);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -.2px;
  animation: vcGlow 3s ease-in-out infinite;
}
.floating-help-vc:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 14px 36px rgba(29,69,101,.6);
  color: #fff !important;
}
.floating-help-vc::before {
  content: '🙏';
  font-size: 18px;
}

/* ============================================
   기타 가독성 강화
   ============================================ */
p, li, span, div {
  color: inherit;
}

/* 본문 일반 텍스트 — 너무 옅은 회색 방지 */
body p, body li {
  color: var(--vc-text);
}

/* 모바일 */
@media (max-width: 768px) {
  .floating-help-vc {
    right: 12px;
    bottom: 12px;
    padding: 12px 18px;
    font-size: 13px;
  }
  .floating-help-vc::before { font-size: 15px; }

  blockquote { padding: 16px 22px; font-size: 15px; }
}

img { max-width: 100%; height: auto; }

/* ============================================
   파트너 배너 그리드 (5개 사이트)
   ============================================ */
.partner-grid h2 {
  margin-bottom: 28px;
}

.partner-banners {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  max-width: 1200px;
  margin: 0 auto;
}

.partner-banner {
  display: block;
  text-decoration: none !important;
  border-radius: 14px;
  overflow: hidden;
  transition: var(--vc-tx);
  box-shadow: var(--vc-shadow-sm);
  border: 1px solid var(--vc-line);
  background: #fff;
  position: relative;
}

.partner-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--vc-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--vc-tx);
}

.partner-banner:hover {
  transform: translateY(-4px);
  box-shadow: var(--vc-shadow-md);
}
.partner-banner:hover::before { transform: scaleX(1); }

.partner-banner-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  text-align: left;
}

.partner-banner-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

.partner-banner-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 16px;
  box-shadow: var(--vc-shadow-sm);
  color: #fff;
}

/* 사이트별 아이콘 컬러 */
.icon-loveus   { background: linear-gradient(135deg, #e88aa8 0%, #c5658a 100%); box-shadow: 0 4px 12px rgba(232,138,168,.35); }
.icon-4give    { background: linear-gradient(135deg, #2c5f8d 0%, #1d4565 100%); box-shadow: 0 4px 12px rgba(29,69,101,.3); }
.icon-here     { background: linear-gradient(135deg, #9eb5a8 0%, #6e9488 100%); box-shadow: 0 4px 12px rgba(110,148,136,.3); }
.icon-codep    { background: linear-gradient(135deg, #8faea3 0%, #5a8076 100%); box-shadow: 0 4px 12px rgba(110,148,136,.3); }
.icon-4giving  { background: linear-gradient(135deg, #d4a44b 0%, #b88a32 100%); box-shadow: 0 4px 12px rgba(212,164,75,.35); }

.partner-banner-text {
  text-align: left;
  min-width: 0;
  flex: 1;
}

.partner-banner-text h3 {
  color: var(--vc-text) !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  margin: 0 0 1px !important;
  letter-spacing: -.3px;
  line-height: 1.2 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.partner-banner-text p {
  color: var(--vc-muted) !important;
  font-size: 11px !important;
  margin: 0 !important;
  line-height: 1.3 !important;
  font-weight: 400 !important;
  letter-spacing: -.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 사이트별 호버 보더/그림자 컬러 */
.partner-banner.partner-loveus::before  { background: #e88aa8; }
.partner-banner.partner-4give::before   { background: var(--vc-primary-light); }
.partner-banner.partner-here::before    { background: #6e9488; }
.partner-banner.partner-codep::before   { background: #5a8076; }
.partner-banner.partner-4giving::before { background: var(--vc-accent); }

.partner-banner.partner-loveus:hover   { border-color: rgba(232,138,168,.4); box-shadow: 0 12px 28px rgba(232,138,168,.20); }
.partner-banner.partner-4give:hover    { border-color: var(--vc-primary-light); box-shadow: 0 12px 28px rgba(29,69,101,.18); }
.partner-banner.partner-here:hover     { border-color: rgba(110,148,136,.4); box-shadow: 0 12px 28px rgba(110,148,136,.18); }
.partner-banner.partner-codep:hover    { border-color: rgba(90,128,118,.4); box-shadow: 0 12px 28px rgba(90,128,118,.18); }
.partner-banner.partner-4giving:hover  { border-color: var(--vc-accent); box-shadow: 0 12px 28px rgba(212,164,75,.22); }

/* 반응형: 데스크톱 5열 → 태블릿 3열 → 모바일 2열 → 작은 모바일 1열 */
@media (max-width: 1024px) {
  .partner-banners {
    grid-template-columns: repeat(3, 1fr);
    max-width: 720px;
  }
}

@media (max-width: 600px) {
  .partner-banners {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    max-width: 480px;
  }
  .partner-banner-inner { padding: 8px 10px; gap: 8px; }
  .partner-banner-img,
  .partner-banner-icon { width: 28px; height: 28px; font-size: 14px; }
  .partner-banner-text h3 { font-size: 12.5px !important; }
  .partner-banner-text p { font-size: 10.5px !important; }
}

@media (max-width: 380px) {
  .partner-banners { grid-template-columns: 1fr; }
}
