/* =========================================================
   YH VIDEO CTA – Mobile No-Cut Final
   - Same mobile strategy as yh-post-cta
   - No JS changes required
========================================================= */

/* ✅ JS wrapper (id + class) : prevent horizontal overflow */
#yh-video-cta,
.yh-video-cta-wrap{
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: clip;
  overflow: hidden;
}

/* Base wrapper */
.yh-video-cta{
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 28px 0;
}

/* Card */
.yh-video-cta .yh-video-cta-card{
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 18px 18px 16px 18px;
  box-sizing: border-box;

  border-radius: 18px;
  border: 1px solid var(--line, rgba(15,23,42,0.12));
  background: linear-gradient(180deg,
    var(--panel, rgba(255,255,255,0.88)),
    var(--bg, rgba(255,255,255,0.92))
  );
  box-shadow: var(--shadow, 0 18px 50px rgba(15,23,42,0.18));

  position: relative;
  overflow: hidden;
}

/* Top accent line */
.yh-video-cta .yh-video-cta-card::before{
  content:"";
  position:absolute;
  left:0; top:0;
  width:100%;
  height:3px;
  background: linear-gradient(90deg, var(--primary, #0b5cff), rgba(34,197,94,0.9));
  opacity: .9;
}

/* Head */
.yh-video-cta .yh-video-cta-head{
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin: 2px 0 8px 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* Icon chip */
.yh-video-cta .yh-video-cta-ic{
  flex:none;
  width:36px;
  height:36px;
  border-radius:12px;
  border: 1px solid var(--line, rgba(15,23,42,0.12));
  background: rgba(15,23,42,0.04);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  line-height:1;
}

/* Title */
.yh-video-cta .yh-video-cta-title{
  margin:0;
  color: var(--text, #0f172a);
  font-size:16px;
  font-weight:950;
  letter-spacing:-0.3px;
  line-height:1.35;

  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Desc */
.yh-video-cta .yh-video-cta-desc{
  margin: 8px 0 14px 0;
  color: var(--muted, rgba(15,23,42,0.65));
  font-size:13px;
  line-height:1.65;
  letter-spacing:-0.2px;

  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Actions */
.yh-video-cta .yh-video-cta-actions{
  display:flex;
  gap:10px;
  align-items:stretch;
  flex-wrap:wrap;
  max-width:100%;
  box-sizing:border-box;
}

/* Buttons (PC default) */
.yh-video-cta .yh-video-cta-btn{
  flex: 1 1 180px;
  min-width: 180px;
  height: 44px;

  border-radius:14px;
  font-size:14px;
  font-weight:950;
  letter-spacing:-0.2px;

  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;

  box-sizing:border-box;
  white-space:nowrap;
  user-select:none;
  -webkit-tap-highlight-color: transparent;

  max-width: 100%;
}

/* Call */
.yh-video-cta .yh-video-cta-btn-call{
  background: rgba(15,23,42,0.05);
  color: var(--text, #0f172a) !important;
  border: 1px solid var(--line, rgba(15,23,42,0.12));
}

/* Online */
.yh-video-cta .yh-video-cta-btn-online{
  background: linear-gradient(90deg, #16a34a, #22c55e);
  color:#fff !important;
  border:0;
  box-shadow: 0 10px 22px rgba(34,197,94,0.28);
}

/* Hover (PC only) */
@media (hover:hover){
  .yh-video-cta .yh-video-cta-btn-call:hover{ transform: translateY(-1px); }
  .yh-video-cta .yh-video-cta-btn-online:hover{
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(34,197,94,0.32);
  }
  .yh-video-cta .yh-video-cta-btn-call,
  .yh-video-cta .yh-video-cta-btn-online{
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  }
}

/* =========================================================
   MOBILE (Same as yh-post-cta concept)
   - outer padding 12px
   - card fills width
   - buttons stack and never overflow
========================================================= */
@media (max-width: 480px){

  /* ✅ 핵심: 바깥 래퍼에 padding으로 안전영역 확보 */
  #yh-video-cta,
  .yh-video-cta-wrap{
    padding: 0 12px;
  }

  /* 본체는 패딩을 갖지 않음(바깥이 담당) */
  .yh-video-cta{
    padding: 0;
    margin: 18px 0 26px 0;
  }

  /* ✅ 카드: 모바일에서는 520 제한 해제하고 꽉 차게 */
  .yh-video-cta .yh-video-cta-card{
    max-width: 100%;
    margin: 0;
    padding: 16px 14px 14px 14px;
    border-radius: 16px;
  }

  /* ✅ 버튼 영역: 세로 스택 + 간격 줄임 */
  .yh-video-cta .yh-video-cta-actions{
    flex-direction: column;
    gap: 8px;
  }

  /* ✅ 버튼: min-width 제거 + 폭 100% (우측 잘림 방지 핵심) */
  .yh-video-cta .yh-video-cta-btn{
    width: 100%;
    min-width: 0;
    flex: 1 1 100%;

    height: 40px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 900;
    gap: 6px;
    white-space: nowrap;
  }
}

/* Dark mode fallback */
@media (prefers-color-scheme: dark){
  .yh-video-cta .yh-video-cta-card{
    background: linear-gradient(180deg, rgba(2,6,23,0.72), rgba(15,23,42,0.82));
    border-color: rgba(255,255,255,0.16);
    box-shadow: 0 24px 60px rgba(0,0,0,0.45);
  }
  .yh-video-cta .yh-video-cta-ic{
    background: rgba(255,255,255,0.10);
    border-color: rgba(255,255,255,0.16);
  }
  .yh-video-cta .yh-video-cta-desc{
    color: rgba(255,255,255,0.62);
  }
  .yh-video-cta .yh-video-cta-btn-call{
    background: rgba(255,255,255,0.10);
    border-color: rgba(255,255,255,0.16);
    color: rgba(255,255,255,0.92) !important;
  }
}

/* =========================================================
   HARD STOP: Mobile right-cut killer
   - fixes overflow from video_box / iframe / wrappers
========================================================= */

@media (max-width: 768px){

  /* 1) 영상(iframe) 때문에 가로가 늘어나는 경우 차단 */
  .video_box,
  .video_box iframe,
  iframe[src*="youtube"],
  iframe[src*="youtu.be"]{
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
  }

  /* 2) 영상 부모가 가로를 밀어내면 전체가 짤려 보이므로 차단 */
  .video_box{
    overflow: hidden !important;
  }

  /* 3) CTA 최외곽 래퍼도 컨테이너처럼 고정 */
  #yh-video-cta,
  .yh-video-cta-wrap{
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: clip !important;
    overflow: hidden !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  /* 4) CTA 카드/버튼은 절대 화면 밖으로 못 나가게 */
  .yh-video-cta,
  .yh-video-cta .yh-video-cta-card,
  .yh-video-cta .yh-video-cta-actions,
  .yh-video-cta .yh-video-cta-btn{
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .yh-video-cta .yh-video-cta-card{
    width: 100% !important;
    margin: 0 !important;
  }

  .yh-video-cta .yh-video-cta-btn{
    min-width: 0 !important;
    width: 100% !important;
  }
}

/* 온라인 상담 버튼 텍스트를 항상 흰색으로 */
.yh-video-cta-btn-online,
.yh-video-cta-btn-online span{
  color: #ffffff !important;
}

/* =========================================================
   🎥 VIDEO CTA – Shadow Unified (자연스러운 그림자 최종본)
   - 다른 CTA(post/gas/global)와 동일한 깊이감
========================================================= */

/* ❌ wrapper에는 그림자 제거 (중복 원인 차단) */
#yh-video-cta,
.yh-video-cta-wrap{
  box-shadow: none !important;
}

/* ✅ 카드 본체에만 soft shadow */
.yh-video-cta .yh-video-cta-card{
  box-shadow:
    0 10px 28px rgba(15, 23, 42, 0.10),
    0 2px 6px rgba(15, 23, 42, 0.04);
  transition: box-shadow .22s ease, transform .22s ease;
}

/* ✅ hover 시: post CTA와 동일한 상승감 */
@media (hover:hover){
  .yh-video-cta .yh-video-cta-card:hover{
    box-shadow:
      0 16px 36px rgba(15, 23, 42, 0.14),
      0 4px 10px rgba(15, 23, 42, 0.06);
    transform: translateY(-2px);
  }
}

/* =========================================================
   VIDEO CTA – Mobile Button Size Unified
   (Same as yh-post-cta / yh-gas-cta)
========================================================= */
@media (max-width: 480px){

  .yh-video-cta .yh-video-cta-btn{
    height: 46px !important;          /* ✅ 버튼 높이 통일 */
    font-size: 14px !important;       /* ✅ 글씨 크기 통일 */
    font-weight: 950 !important;      /* ✅ 두께 통일 */
    border-radius: 16px !important;   /* ✅ 둥글기 통일 */
  }

}

/* =========================================================
   VIDEO CTA – Mobile button size HARD OVERRIDE
   - Defeats theme/global anchor/button overrides
   - Matches yh-cta.final.css button feel on mobile
========================================================= */
@media (max-width: 1023px){
  #yh-video-cta a.yh-video-cta-btn,
  #yh-video-cta .yh-video-cta a.yh-video-cta-btn{
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 14px !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    border-radius: 14px !important;
    line-height: 1 !important;
  }
  #yh-video-cta a.yh-video-cta-btn span{
    font-size: 14px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
  }
}
