/*
 태쏘 홈 전용 스타일 (1) — 강의 섹션 / Elementor / 강의 카드 (구역 6-0, 6, 5)
 functions.php의 tasso_enqueue_home_css()가 홈 화면에서만 로드
*/

/* ==========================================================
   6-R. 스크롤 등장 효과 — 화면에 들어오면 아래에서 떠오름
   (functions.php의 tasso_scroll_reveal 스크립트가 클래스를 붙임)
   ========================================================== */
.tasso-reveal {
  opacity: 0;
  transform: translateY(44px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.tasso-reveal.tasso-in {
  opacity: 1;
  transform: none; /* translateY(0)가 아닌 none — 흔적이 남으면 자식의 화면 고정(fixed)이 깨짐 */
  will-change: auto;
}

/* 시스템에서 "동작 줄이기"를 켠 사용자에겐 효과 없이 바로 표시 */
@media (prefers-reduced-motion: reduce) {
  .tasso-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ==========================================================
   6-0. 홈 강의 섹션 (제목/혜택/소개/수강 버튼 — functions.php 스크립트가 삽입)
   ========================================================== */
/* 강의 카드 위 섹션 제목 (가격표 제목 스타일 재사용) */
.tasso-courses-head {
  padding: 30px 24px 10px;
}

/* 강의 혜택 이벤트 박스 — 강의 소개 아래, 빨간 EVENT 뱃지 */
.tasso-courses-event {
  position: relative;
  display: table;
  margin: 34px auto 0;
  padding: 16px 34px;
  background: var(--tasso-bg-soft);
  border: 1px solid rgba(196, 60, 46, 0.55);
  border-radius: 12px;
  color: var(--tasso-gold) !important;
  font-weight: 700;
  font-size: 1.05rem;
  text-align: center;
  word-break: keep-all;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

.tasso-event-badge {
  position: absolute;
  top: -31px;
  left: -12px;
  transform: rotate(-4deg);
  background: var(--tasso-red);
  color: #fff5ec;
  font-family: var(--tasso-brush);
  font-size: 1.25rem;
  font-weight: 400;
  padding: 3px 14px 5px;
  border-radius: 6px 10px 7px 9px;
  letter-spacing: 2px;
  box-shadow: 3px 4px 0 rgba(0, 0, 0, 0.4);
  animation: tasso-event-urgent 2.6s ease-in-out infinite;
}

/* 긴급! 뱃지가 주기적으로 흔들리며 커졌다 돌아옴 */
@keyframes tasso-event-urgent {
  0%, 72%, 100% { transform: rotate(-4deg) scale(1); }
  78%           { transform: rotate(-9deg) scale(1.1); }
  83%           { transform: rotate(1deg) scale(1.12); }
  88%           { transform: rotate(-7deg) scale(1.06); }
  93%           { transform: rotate(-2deg) scale(1.02); }
}

/* 뱃지 옆 기간한정 문구 — 깜빡이며 시선 유도 */
.tasso-event-urgency {
  position: absolute;
  top: -25px;
  left: 82px;
  color: #e8503c;
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  animation: tasso-urgency-blink 1.5s ease-in-out infinite;
}

@keyframes tasso-urgency-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

/* 강의 소개 — 섹션 제목 아래, 카드 위 */
.tasso-courses-desc {
  max-width: 860px;
  margin: 30px auto 0;
  text-align: center;
  color: var(--tasso-muted) !important;
  font-size: 1rem;
  line-height: 1.95;
  word-break: keep-all;
}

.tasso-courses-desc strong {
  color: var(--tasso-text);
  font-weight: 700;
}

@media (max-width: 768px) {
  .tasso-courses-desc br {
    display: none;
  }
}

/* 강의 카드 "수강하기" 버튼 (가격 아래에 삽입) */
.product-item .tasso-enroll-btn {
  display: block;
  margin-top: 16px;
  padding: 12px 0;
  text-align: center;
  font-size: 0.98rem;
}

/* ==========================================================
   6. Elementor 섹션 (홈 화면)
   ========================================================== */
.elementor-section {
  background-color: transparent;
}

.elementor-heading-title {
  color: var(--tasso-text) !important;
}

/* ==========================================================
   5. 홈 강의(상품) 카드 — WooLentor 위젯 다크 스킨
   ========================================================== */
.elementor-widget-woolentor-product-tab .product-item .actions { display: none !important; }

/* 프로그램 이용권 상품(숨김 발행)은 강의 카드에서 제외 — 위젯이 카탈로그 숨김을 무시함.
   주소의 %ec%9d%b4%ec%9a%a9%ea%b6%8c = "이용권" (스크립트가 카드째 제거, CSS는 그 전 깜빡임 방지) */
.elementor-widget-woolentor-product-tab .product-item:has(h4.title a[href*="%ec%9d%b4%ec%9a%a9%ea%b6%8c"]) {
  display: none !important;
}

.product-item,
.product-item .product-inner,
ul.products li.product,
.elementor-widget-woolentor-product-tab .product-item,
.elementor-widget-woolentor-product-tab .product-item .product-inner,
.woolentor-product-tab-area .product-item,
.ht-products .product-item {
  background-color: var(--tasso-surface) !important;
  border: 1px solid var(--tasso-border) !important;
  border-radius: var(--tasso-radius) !important;
  overflow: hidden;
  box-shadow: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

/* Elementor 위젯 자체 설정(흰 배경 !important)보다 강한 덮어쓰기 */
html body .elementor .elementor-element .elementor-widget-woolentor-product-tab .product-item,
html body .elementor .elementor-element .elementor-widget-woolentor-product-tab .product-item .product-inner,
html body .elementor .elementor-element .elementor-widget-woolentor-product-tab .product-item .product-inner .content {
  background-color: var(--tasso-surface) !important;
}

html body .elementor .elementor-element .elementor-widget-woolentor-product-tab .product-item .product-inner .image-wrap {
  background-color: #10151f !important;
}

html body .elementor .elementor-element .elementor-widget-woolentor-product-tab .product-item .actions,
html body .elementor .elementor-element .elementor-widget-woolentor-product-tab .product-item .actions:hover {
  background-color: var(--tasso-surface) !important;
}

html body .elementor .elementor-element .elementor-widget-woolentor-product-tab .product-item h4.title a {
  color: var(--tasso-text) !important;
}

/* 카드 안쪽 요소는 테두리 중복 제거 */
.product-item .product-inner,
.elementor-widget-woolentor-product-tab .product-item .product-inner {
  border: none !important;
  border-radius: 0 !important;
}

.product-item:hover,
ul.products li.product:hover,
.elementor-widget-woolentor-product-tab .product-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  border-color: var(--tasso-accent) !important;
}

.product-item .image-wrap,
.product-item .image {
  background-color: var(--tasso-bg-soft);
}

.product-item .image-wrap img,
ul.products li.product img {
  border-radius: 0;
  display: block;
  width: 100%;
}

.product-item .content,
.elementor-widget-woolentor-product-tab .product-item .content,
.woolentor-product-tab-area .product-item .content {
  padding: 18px 20px 22px !important;
  background-color: var(--tasso-surface) !important;
}

.product-item h4.title,
.product-item h4.title a,
.elementor-widget-woolentor-product-tab .product-item h4.title,
.elementor-widget-woolentor-product-tab .product-item h4.title a,
.woolentor-product-tab-area .product-item h4.title a,
.woocommerce-loop-product__title {
  color: var(--tasso-text) !important;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  line-height: 1.45;
}

.product-item h4.title a:hover,
.elementor-widget-woolentor-product-tab .product-item h4.title a:hover {
  color: var(--tasso-accent) !important;
}

/* 가격 */
.price,
.woocommerce-Price-amount,
.product-item .price {
  color: var(--tasso-gold) !important;
  font-weight: 700 !important;
}

.price del,
.price del .woocommerce-Price-amount {
  color: var(--tasso-muted) !important;
  font-weight: 400 !important;
  opacity: 0.7;
}

.price ins {
  text-decoration: none !important;
}

