@charset "utf-8";

/**
 * 교육 화면 공용 컴포넌트
 *
 * 부모 교육(ik_parent) · PBS 교육(ik_pbs) · 정보마당(ik_notice) 이 같은 목록·상세
 * 화면을 쓰므로 한곳에 모았습니다. 스킨마다 다른 값만 각 스킨 CSS 가 덮어씁니다.
 *
 *   목록  .edu-list · .edu-filter · .edu-search · .edu-toolbar · .edu-grid · .edu-card
 *   상세  .edu-detail · .edu-info · .edu-sec · .edu-file · .edu-curri · .edu-btn
 *   입력  .datefield · .datecal · .sortdrop
 *
 * 공용 토큰(--color-*)은 style.css 에 있습니다.
 */

/* ============================================================
 * 목록 (03-1-1 · 03-1-2 · 03-1-3)
 * ============================================================ */
.edu-list {
    display: flex;
    flex-direction: column;
}

/* ----- 기간 필터 (시작일 / 종료일) ----- */
.edu-filter {
    background: #fff;
    display: flex;
    gap: 12px;
    padding: 20px 20px 0;
    position: relative;
}

.datefield {
    flex: 1 0 0;
    min-width: 0;
}

.datefield__toggle {
    align-items: center;
    background: #fff;
    border-radius: 16px;
    border: 2px solid var(--color-border);
    color: var(--color-text);
    display: flex;
    font-size: 16px;
    font-weight: 600;
    gap: 8px;
    height: 52px;
    justify-content: space-between;
    line-height: 20px;
    padding: 14px 20px;
    width: 100%;
}

.datefield__label.is-placeholder {
    opacity: .3;
}

.datefield__caret {
    border-bottom: 2px solid #9a9a9a;
    border-right: 2px solid #9a9a9a;
    flex: 0 0 auto;
    height: 8px;
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform .15s;
    width: 8px;
}

.datefield.is-open .datefield__caret {
    transform: rotate(-135deg) translate(-2px, -2px);
}

/* ----- 달력 팝업 (기간 필터 전체 폭) ----- */
.datecal {
    background: #fff;
    border-radius: 20px;
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
    display: none;
    left: 20px;
    padding: 8px;
    position: absolute;
    right: 20px;
    top: calc(100% + 8px);
    z-index: 40;
}

.datefield.is-open .datecal {
    display: block;
}

.datecal__head {
    align-items: center;
    display: flex;
    gap: 24px;
    justify-content: center;
    padding: 12px 0 16px;
}

.datecal__title {
    color: var(--color-text);
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
}

.datecal__nav {
    height: 24px;
    position: relative;
    width: 24px;
}

.datecal__nav::before {
    border-bottom: 2px solid #9a9a9a;
    border-left: 2px solid #9a9a9a;
    content: "";
    height: 8px;
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-30%, -50%) rotate(45deg);
    width: 8px;
}

.datecal__nav--next::before {
    transform: translate(-70%, -50%) rotate(-135deg);
}

.datecal__row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.datecal__dow {
    color: var(--color-text);
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    opacity: .5;
    padding: 8px 0;
    text-align: center;
}

.datecal__day {
    align-items: center;
    border-radius: 50%;
    color: var(--color-text);
    display: flex;
    font-size: 14px;
    font-weight: 600;
    height: 40px;
    justify-content: center;
    line-height: 20px;
    margin: 2px auto;
    opacity: .8;
    width: 40px;
}

.datecal__day.is-muted {
    cursor: default;
    opacity: .25;
}

.datecal__day.is-selected {
    background: var(--color-primary);
    color: #fff;
    opacity: 1;
}

/* ----- 검색 ----- */
.edu-search {
    background: #fff;
    padding: 12px 20px 20px;
}

/* ----- 건수 / 정렬 ----- */
.edu-toolbar {
    align-items: center;
    display: flex;
    justify-content: space-between;
    padding: 20px 24px;
}

.edu-toolbar__count {
    color: var(--color-text);
    font-size: 16px;
    font-weight: 600;
    line-height: 32px;
}

.sortdrop {
    position: relative;
}

.sortdrop__toggle {
    align-items: center;
    color: var(--color-text);
    display: inline-flex;
    font-size: 16px;
    font-weight: 600;
    gap: 8px;
    line-height: 32px;
}

.sortdrop__caret {
    border-bottom: 2px solid #9a9a9a;
    border-right: 2px solid #9a9a9a;
    height: 8px;
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform .15s;
    width: 8px;
}

.sortdrop.is-open .sortdrop__caret {
    transform: rotate(-135deg) translate(-2px, -2px);
}

.sortdrop__menu {
    background: #fff;
    border-radius: 16px;
    border: 2px solid var(--color-border);
    box-shadow: 0 0 6px rgba(0, 0, 0, .06);
    display: none;
    list-style: none;
    margin: 0;
    padding: 8px 20px;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 112px;
    z-index: 40;
}

.sortdrop.is-open .sortdrop__menu {
    display: block;
}

.sortdrop__option {
    color: var(--color-text);
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    line-height: 40px;
    opacity: .3;
}

.sortdrop__option.is-selected {
    opacity: 1;
}

/* ----- 카드 그리드 ----- */
/* 카드 그리드
   1fr 은 최소 폭이 '내용의 최소 너비'라, 띄어쓰기 없는 긴 교육명이 들어오면
   (body 가 word-break: keep-all 이라 한글이 안 쪼개집니다) 칸이 화면 밖으로
   벌어집니다. minmax(0, 1fr) 로 칸 너비를 화면에 묶어 둡니다. */
.edu-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 20px 8px;
}

.edu-card {
    background: #fff;
    border-radius: 24px;
    border: 1px solid var(--color-border);
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 8px 12px;
}

.edu-card__thumb {
    background: var(--color-bg);
    border-radius: 16px;
    height: 178px;
    overflow: hidden;
    position: relative;
}

.edu-card__thumb img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.edu-card__badge {
    align-items: center;
    border-radius: 12px;
    color: #fff;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    height: 28px;
    justify-content: center;
    left: 12px;
    line-height: 24px;
    padding: 0 10px;
    position: absolute;
    top: 12px;
}

.edu-card__badge--ready {
    background: rgba(40, 40, 40, .7);
}

.edu-card__badge--open {
    background: var(--color-primary);
}

.edu-card__badge--closed {
    background: rgba(40, 40, 40, .4);
}

.edu-card__body {
    padding: 4px 8px;
}

.edu-card__region {
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 600;
    line-height: 20px;
}

/* 교육명 — 3줄까지 보여 주고 넘치면 잘라냅니다.
   "양육자)[키움노리카]양육자힐링'서천치유의숲'" 처럼 띄어쓰기 없이 긴 이름이
   있어 카드 폭을 넘기지 않도록 줄바꿈을 허용합니다. */
.edu-card__title {
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    color: var(--color-text);
    display: -webkit-box;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    margin-top: 2px;
    min-height: 60px;
    opacity: .8;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.edu-card__meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 16px 0 0;
}

.edu-card__row {
    align-items: center;
    display: flex;
    font-size: 12px;
    gap: 4px;
    line-height: 20px;
}

.edu-card__key {
    flex: 0 0 auto;
    font-weight: 600;
}

.edu-card__key--apply {
    color: var(--color-primary);
}

.edu-card__key--learn {
    color: #6db92b;
}

.edu-card__key--people {
    color: #ffa000;
}

.edu-card__val {
    color: var(--color-text);
    margin: 0;
    opacity: .5;
}

/* ============================================================
 * 상세 (03-1-4)
 * ============================================================ */
.edu-detail {
    background: #fff;
}

.edu-detail__hero {
    aspect-ratio: 1 / 1;
    background: var(--color-bg);
    overflow: hidden;
    width: 100%;
}

.edu-detail__hero img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.edu-detail__head {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 24px;
}

.edu-detail__badges {
    display: flex;
    gap: 8px;
}

.edu-detail__badge {
    align-items: center;
    border-radius: 12px;
    display: inline-flex;
    font-size: 14px;
    font-weight: 700;
    height: 32px;
    justify-content: center;
    line-height: 24px;
    padding: 0 12px;
}

.edu-detail__badge--status {
    background: var(--color-text);
    color: #fff;
}

.edu-detail__badge--region {
    background: rgba(0, 145, 132, .1);
    color: var(--color-primary);
}

.edu-detail__title {
    color: var(--color-text);
    font-size: 20px;
    font-weight: 600;
    line-height: 32px;
    margin: 0;
}

/* 정보 표 */
.edu-info {
    margin: 4px 0 0;
}

.edu-info__row {
    align-items: center;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    font-size: 14px;
    gap: 12px;
    height: 48px;
    justify-content: space-between;
    line-height: 24px;
}

.edu-info__key {
    color: var(--color-text);
    flex: 0 0 auto;
    font-weight: 700;
    opacity: .5;
}

.edu-info__val {
    color: var(--color-text);
    font-weight: 500;
    margin: 0;
    text-align: right;
}

/* 버튼 */
.edu-detail__cta {
    padding: 16px 20px;
}

.edu-btn {
    align-items: center;
    border-radius: 16px;
    display: flex;
    font-size: 16px;
    font-weight: 700;
    height: 60px;
    justify-content: center;
    line-height: 20px;
    width: 100%;
}

.edu-btn--primary {
    background: var(--color-primary);
    color: #fff;
}

.edu-btn--ghost {
    background: #f6f6f6;
    color: var(--color-text);
    opacity: .8;
}

/* 섹션 */
.edu-sec {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 8px 20px;
}

.edu-sec--tight {
    padding: 8px 24px;
}

.edu-sec__title {
    align-items: center;
    color: var(--color-text);
    display: flex;
    font-size: 16px;
    font-weight: 700;
    gap: 8px;
    line-height: 24px;
    margin: 0;
}

.edu-sec__bullet {
    border-bottom: 5px solid transparent;
    border-left: 8px solid var(--color-primary);
    border-top: 5px solid transparent;
    flex: 0 0 auto;
    height: 0;
    width: 0;
}

.edu-sec__text {
    color: var(--color-text);
    font-size: 14px;
    font-weight: 500;
    line-height: 24px;
    margin: 0;
    opacity: .8;
}

.edu-sec__placeholder {
    background: #d9d9d9;
    border-radius: 20px;
    min-height: 600px;
    width: 100%;
}

/* 참고 자료 */
.edu-file {
    align-items: center;
    background: #f6f6f6;
    border-radius: 20px;
    color: var(--color-text);
    display: flex;
    gap: 12px;
    height: 60px;
    padding: 0 24px;
}

.edu-file__ico {
    flex: 0 0 auto;
    height: 16px;
    position: relative;
    width: 16px;
}

.edu-file__ico::before {
    background: var(--color-text);
    content: "";
    height: 10px;
    left: 50%;
    opacity: .7;
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    width: 2px;
}

.edu-file__ico::after {
    border-bottom: 2px solid var(--color-text);
    border-right: 2px solid var(--color-text);
    content: "";
    height: 8px;
    left: 50%;
    opacity: .7;
    position: absolute;
    top: 4px;
    transform: translateX(-50%) rotate(45deg);
    width: 8px;
}

.edu-file__name {
    color: var(--color-text);
    font-size: 16px;
    font-weight: 600;
    line-height: 20px;
    opacity: .8;
}

/* 학습 목차 (03-2-2 온라인 부모 교육 상세) */
.edu-curri {
    display: flex;
    flex-direction: column;
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 8px 0;
    width: 100%;
}

.edu-curri__item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.edu-curri__code {
    color: var(--color-text);
    font-size: 14px;
    font-weight: 700;
    line-height: 24px;
    margin: 0;
}

.edu-curri__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.edu-curri__label {
    color: var(--color-primary);
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    margin: 0;
}

.edu-curri__value {
    color: var(--color-text);
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    margin: 0;
    opacity: .5;
}

/* 교육 안내 본문 — 운영 DB 의 에디터 HTML 을 그대로 렌더링합니다.
   PC 기준으로 작성된 내용이라 모바일 폭에 맞춰 넘침을 제어합니다. */
.edu-sec__body {
    font-size: 14px;
    line-height: 24px;
    overflow-x: auto;
    width: 100%;
    word-break: break-word;
}

.edu-sec__body img, .edu-sec__body video, .edu-sec__body iframe {
    height: auto;
    max-width: 100%;
}

.edu-sec__body table {
    border-collapse: collapse;
    max-width: 100%;
}

.edu-sec__body p {
    margin: 0 0 8px;
}

.edu-card__placeholder {
    align-items: center;
    background: #e3f1f4;
    color: var(--color-primary);
    display: flex;
    font-size: 18px;
    font-weight: 700;
    height: 100%;
    justify-content: center;
    line-height: 26px;
    text-align: center;
    width: 100%;
}

.edu-detail__hero--banner {
    background: #f7bfba;
}
