@charset "UTF-8";

/* breadcrumb */
.sub-breadcrumb {display: flex; align-items: center; gap: 8px; padding: 20px 0; border-bottom: 1px dashed #c6c6c6;}
.sub-breadcrumb a, .concept-breadcrumb span, .concept-breadcrumb strong {font-size: 16px;}
.sub-breadcrumb strong {color: var(--text-red);}


/* 경제 핵심개념 상단 소개 */
.sub-head {display: flex; gap: 20px; align-items: center; justify-content: space-between; height: 190px; margin-top: 50px; padding: 20px 30px; border-radius: 15px; background: var(--bg-grey);}
.sub-head__visual {display: flex; align-items: center; justify-content: center; flex-shrink: 0;}
.sub-head__visual--left {width: 140px;}
.sub-head__visual--right {width: 300px; margin-left: auto;}
.sub-head__visual img {display: block; width: auto; max-width: 100%; max-height: 150px;}
.sub-head__content {flex: 1; min-width: 0;}
.sub-head__title {font-family: 'GmarketSans', sans-serif; font-size: 30px; font-weight: 700; line-height: 1.3;}
.sub-head__title strong {color: var(--text-red);}
.sub-head__desc {margin-top: 8px; color: var(--text-grey); font-size: 18px;}


/* 경제 핵심개념 탭 */
.concept-tabs {display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; margin-top: 50px;}
.concept-tabs button {position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; height: 110px; padding: 10px; border: 1px solid var(--border-grey); border-radius: 10px; background: #fff; font-size: 18px; font-weight: 600; transition: border-color 0.25s ease, background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;}
.concept-tabs button img {display: block; width: 64px; height: 50px; object-fit: contain;}
.concept-tabs button span {display: block; font-size: 18px; font-weight: 500; line-height: 1.2; text-align: center; white-space: nowrap;}
.concept-tabs button:hover {border-color: var(--text-orange); box-shadow: var(--shadow-grey);}
.concept-tabs button.active {border-color: var(--text-orange); background: var(--bg-orange); color: var(--text-orange); font-weight: 700;}
.concept-tabs button.active span {font-weight: 700;}
.concept-tabs button.active::after {content: ""; position: absolute; left: 50%; bottom: -12px; width: 0; height: 0; transform: translateX(-50%); border-left: 14px solid transparent; border-right: 14px solid transparent; border-top: 12px solid var(--text-orange);}


/* 주제 타이틀 */
.concept-topic {display: flex; align-items: center; gap: 10px; padding: 15px 30px; border: 1px solid var(--text-orange); border-radius: 15px; background: var(--bg-orange);}
.concept-topic__icon {display: block; width: 40px; height: 40px; object-fit: contain;}
.concept-topic__title {flex-shrink: 0; font-size: 24px; font-weight: 700; line-height: 1.4;}
.concept-topic__desc {color: var(--text-grey); font-size: 16px;}


/* 핵심개념 설명 섹션 */
.concept-content {display: none;}
.concept-content.active {display: flex; flex-direction: column; gap: 30px; margin-top: 50px;}
.concept-section {display: flex; align-items: flex-start; width: 100%; padding: 30px; border-radius: 15px;}
.concept-section--white {gap: 10px; border: 1px solid var(--border-grey); background: #fff; box-shadow: var(--shadow-grey);}
.concept-section--yellow {gap: 20px; background: var(--bg-orange);}
.concept-section__content {flex: 1; min-width: 0;}
.concept-section__visual {display: flex; align-self:stretch; align-items: flex-end; justify-content: center; flex-shrink: 0;}
.concept-section__visual img {display: block; width: auto; max-width: 100%; max-height: 100%;}
.concept-section__title {display: flex; align-items: center; gap: 10px; margin-bottom: 15px; font-size: 22px; font-weight: 700; line-height: 1.4;}
.concept-section__title::before {content: ""; display: block; flex-shrink: 0; width: 50px; height: 50px; background-repeat: no-repeat; background-position: center; background-size: contain;}
.concept-section__title--book::before {background-image: url('../images/common/icon-book.svg'); background-color: var(--bg-grey); background-size: 35px; border-radius: 50%;}
.concept-section__title--question::before {background-image: url('../images/common/icon-question.svg'); background-color: #fff; background-size: 35px; border-radius: 50%;}
.concept-section__title--star::before {background-image: url('../images/common/icon-star.svg'); background-color: #fff; background-size: 35px; border-radius: 50%;}
.concept-section__text {font-size: 16px; line-height: 30px;}
.concept-section__text p + p {margin-top: 5px;}

/* 형광펜 강조 */
.concept-highlight {display: inline-block; padding: 0 2px; background: var(--tip-yellow); line-height: 30px;}
/* TIP 단어 */
.concept-tip {position: relative; display: inline-flex; align-items: center; padding: 0 5px; background: var(--tip-purple); color: var(--tip-yellow); font-size: 16px; font-weight: 600; line-height: 30px; cursor: help;}
.concept-tip__label {position: absolute; top: -5px; right: 0; padding: 1px 3px; background: var(--tip-red); color: #fff; font-size: 7px; font-weight: 500; line-height: 1;}
/* TIP 툴팁 */
.concept-tooltip {position: absolute; left: 50%; bottom: calc(100% + 12px); z-index: 20; width: max-content; max-width: 400px; padding: 10px 15px; border-radius: 8px; background: #333; color: #fff; font-size: 14px; font-weight: 400; line-height: 1.5; opacity: 0; visibility: hidden; transform: translate(-50%, 5px); transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;}
.concept-tip:hover .concept-tooltip, .concept-tip:focus .concept-tooltip {opacity: 1; visibility: visible; transform: translate(-50%, 0);}




/* ========================================
   태블릿 (1035px 이하)
======================================== */
@media (max-width: 1035px) {
	 /* 공통 상단 소개 */
    .sub-head {gap: 15px; height: auto; margin-top: 40px; padding: 20px;}
    .sub-head__visual--left {width: 110px;}
    .sub-head__visual--right {width: 200px;}
    .sub-head__visual img {max-height: 120px;}
    .sub-head__title {font-size: 26px;}
    .sub-head__desc {font-size: 16px;}
    
    /* 경제 핵심개념 탭 */
    .concept-tabs {grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin-top: 40px;}
    .concept-tabs button {height: 100px; gap: 8px;}
    .concept-tabs button img {width: 55px; height: 45px;}
    .concept-tabs button span {font-size: 16px; white-space: normal; word-break: keep-all;}
    
    .concept-topic {display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 10px; row-gap: 0; padding: 15px 20px;}
    .concept-topic__icon {grid-column: 1; grid-row: 1;}
    .concept-topic__title {grid-column: 2; grid-row: 1; font-size: 20px;}
    .concept-topic__desc {grid-column: 2; grid-row: 2; font-size: 15px; line-height: 1.5;}
    
    .concept-section {gap: 20px;}
    .concept-section__visual {flex: 0 0 25%;}
    .concept-section__visual img {max-height: 150px; object-fit: contain;}
	}
	
	
	
/* ========================================
   모바일 (768px 이하)
======================================== */	
@media (max-width: 768px) {
    /* 공통 상단 소개 */
    .sub-head {gap: 15px; height: auto; min-height: 130px; margin-top: 30px; padding: 20px 15px;}
    .sub-head__visual--left {width: 80px;}
    .sub-head__visual--right {display: none;}
    .sub-head__visual img {max-height: 100px;}
    .sub-head__title {font-size: 22px;}
    .sub-head__desc {font-size: 14px; line-height: 1.5;}
    
    /* 경제 핵심개념 탭 */
    .concept-tabs {grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 30px;}
    .concept-tabs button {height: 85px; gap: 5px; padding: 10px 5px;}
    .concept-tabs button img {width: 45px; height: 40px;}
    .concept-tabs button span {font-size: 14px; line-height: 1.3;}
    .concept-tabs button.active::after {bottom: -9px; border-left-width: 10px; border-right-width: 10px; border-top-width: 9px;}
    
    .concept-topic {grid-template-columns: 35px minmax(0, 1fr); column-gap: 8px; padding: 15px;}
    .concept-topic__icon {width: 35px; height: 35px;}
    .concept-topic__title {font-size: 18px;}
    .concept-topic__desc {font-size: 14px;}
    
    /* 설명 섹션 */
    .concept-section {flex-direction: column; gap: 15px; padding: 20px;}
    .concept-section__content {order: 1; width: 100%;}
    .concept-section__visual {order: 2; align-self: flex-end; flex: none; width: 100%; justify-content: flex-end;}
    .concept-section__visual img {width: auto; max-width: 100%; max-height: 100px; object-fit: contain;}

    /* 타이틀 및 본문 */
    .concept-section__title {font-size: 18px;}
    .concept-section__title::before {width: 40px; height: 40px; background-size: 30px;}
    .concept-section__text {font-size: 14px; line-height: 1.7;}

    /* 형광펜 및 TIP */
    .concept-highlight {display: inline; line-height: inherit; box-decoration-break: clone; -webkit-box-decoration-break: clone;}
    .concept-tip {font-size: inherit; line-height: inherit;}
    .concept-tooltip {left: 0; width: max-content; max-width: min(260px, 80vw); transform: translateY(5px);}
    .concept-tip:hover .concept-tooltip, .concept-tip:focus .concept-tooltip {transform: translateY(0);}
	}	



/* ========================================
   모바일 (500px 이하)
======================================== */	
@media (max-width: 500px) {
	.concept-tooltip {position: fixed; left: 50%; bottom: auto; top: 50%; width: calc(100vw - 40px); max-width: 360px; transform: translate(-50%, -50%); white-space: normal; overflow-wrap: break-word;}
    .concept-tip:hover .concept-tooltip, .concept-tip:focus .concept-tooltip {transform: translate(-50%, -50%);}
	}