/* ====================================
   Business Stability Component
   Palette isolated with cpb- prefix
==================================== */

.cpb-business-stability {
    position: relative;
}

/* 패딩 래퍼: 외부 여백 담당 */
.cpb-business-stability__padding-wrapper {
    display: flex;
    flex-direction: column;
}

@media (min-width: 1501px) {
    .cpb-business-stability__padding-wrapper {
        padding: 10vh 5vw;
    }
}

@media (min-width: 769px) and (max-width: 1500px) {
    .cpb-business-stability__padding-wrapper {
        padding: 100px 70px;
    }
}


/* 컨테이너: 헤더 + 컨텐츠 중앙정렬 */
.cpb-business-stability__container {
    display: flex;
    flex-direction: column;
}

/* 섹션 헤더 마진 제거 */
.cpb-business-stability .section-header {
    margin-bottom: 0;
}

.cpb-business-stability__cards {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 1fr 1fr;
}

@media (min-width: 1501px) {
    .cpb-business-stability__cards {
        gap: 1.3vh;
        max-width: 71vw;
        margin: 5vh auto 0;
    }
}

@media (min-width: 769px) and (max-width: 1500px) {
    .cpb-business-stability__cards {
        gap: 13px;
        max-width: 1065px;
        margin: 50px auto 0;
    }
}

.cpb-business-stability__row {
    display: contents;
}

/* 첫 번째 카드(제천시 공식 협약)는 2칸 차지 */
.cpb-business-card--primary {
    grid-column: span 2;
}

.cpb-business-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #f3f2f2;
    box-shadow: none;
    overflow: hidden;
    text-align: center;
    align-items: center;
    height: 100%;
}

@media (min-width: 1501px) {
    .cpb-business-card {
        gap: 1vh;
        padding: 2.5vh 2vw;
        border-radius: 2vh;
    }
}

@media (min-width: 769px) and (max-width: 1500px) {
    .cpb-business-card {
        gap: 10px;
        padding: 25px 30px;
        border-radius: 20px;
    }
}

.cpb-business-card__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

/* 기본 카드 타이틀 스타일 - 모든 카드에 공통 적용 */
.cpb-business-card__title {
    font-weight: 700;
    color: #000000;
    letter-spacing: -0.08em;
}

@media (min-width: 1501px) {
    .cpb-business-card__title {
        font-size: 1.2vw;
    }
}

@media (min-width: 769px) and (max-width: 1500px) {
    .cpb-business-card__title {
        font-size: 18px;
    }
}

.cpb-business-card__subtitle {
    font-weight: 500;
    color: #000000;
    line-height: 2.3;
    letter-spacing: -0.05em;
}

@media (min-width: 1501px) {
    .cpb-business-card__subtitle {
        font-size: 0.9vw;
    }
}

@media (min-width: 769px) and (max-width: 1500px) {
    .cpb-business-card__subtitle {
        font-size: 15px;
    }
}

.cpb-business-card__list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    color: #575757;
    line-height: 1;
    align-items: center;
}

@media (min-width: 1501px) {
    .cpb-business-card__list {
        gap: 0.4vh;
        font-size: 0.75vw;
    }
}

@media (min-width: 769px) and (max-width: 1500px) {
    .cpb-business-card__list {
        gap: 5px;
        font-size: 14px;
    }
}

.cpb-business-card__list li {
    padding: 0;
}

.cpb-business-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0 auto;
}

@media (min-width: 1501px) {
    .cpb-business-card__icon {
        width: 3.5vw;
        border-radius: 1.6vh;
    }
}

@media (min-width: 769px) and (max-width: 1500px) {
    .cpb-business-card__icon {
        width: 52px;
        border-radius: 16px;
    }
}

.cpb-business-card__icon img {
    object-fit: contain;
    filter: none;
}

@media (min-width: 1501px) {
    .cpb-business-card__icon img {
        width: 2vw;
        height: 2vw;
    }
}

@media (min-width: 769px) and (max-width: 1500px) {
    .cpb-business-card__icon img {
        width: 30px;
        height: 30px;
    }
}

/* Primary hero card */
.cpb-business-card--primary {
    background-image: url('../img/bento-img-1.png');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    color: #ffffff;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
}

@media (min-width: 1501px) {
    .cpb-business-card--primary {
        padding: 3vh 2.5vw;
    }
}

@media (min-width: 769px) and (max-width: 1500px) {
    .cpb-business-card--primary {
        padding: 30px 37px;
    }
}

.cpb-business-card__content--primary {
    text-align: left;
    align-items: flex-start;
    text-shadow: none;
}

@media (min-width: 1501px) {
    .cpb-business-card__content--primary {
        max-width: 30vw;
        gap: 0.5vh;
    }
}

@media (min-width: 769px) and (max-width: 1500px) {
    .cpb-business-card__content--primary {
        max-width: 450px;
        gap: 5px;
    }
}

/* Primary 카드 독립 타이틀 스타일 */
.cpb-business-card--primary .cpb-business-card__title {
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.01em;
}

@media (min-width: 1501px) {
    .cpb-business-card--primary .cpb-business-card__title {
        font-size: 1.5vw;
    }
}

@media (min-width: 769px) and (max-width: 1500px) {
    .cpb-business-card--primary .cpb-business-card__title {
        font-size: 22px;
    }
}

.cpb-business-card--primary .cpb-business-card__subtitle,
.cpb-business-card--primary .cpb-business-card__list,
.cpb-business-card--primary .cpb-business-card__list li {
    color: #f8fafc;
}

.cpb-business-card--primary .cpb-business-card__list {
    align-items: flex-start;
}

/* 강조 텍스트 스타일 */
.cpb-business-card--primary .highlight-emphasis {
    font-weight: 800;
    color: #ffffff;
    padding: 1px 0;
}

@media (min-width: 1501px) {
    .cpb-business-card--primary .highlight-emphasis {
        font-size: 0.85vw;
    }
}

@media (min-width: 769px) and (max-width: 1500px) {
    .cpb-business-card--primary .highlight-emphasis {
        font-size: 13px;
    }
}

/* Secondary card */
.cpb-business-card--secondary {
    background: #f3f2f2;
}

/* Secondary 카드 독립 타이틀 스타일 */
.cpb-business-card--secondary .cpb-business-card__title {
    font-weight: 700;
    color: #000000;
    letter-spacing: -0.01em;
}

@media (min-width: 1501px) {
    .cpb-business-card--secondary .cpb-business-card__title {
        font-size: 1.5vw;
    }
}

@media (min-width: 769px) and (max-width: 1500px) {
    .cpb-business-card--secondary .cpb-business-card__title {
        font-size: 22px;
    }
}

/* Compact cards */
@media (min-width: 1501px) {
    .cpb-business-card--compact {
        padding: 2.7vh 1.8vw;
        gap: 0.5vh;
    }
}

@media (min-width: 769px) and (max-width: 1500px) {
    .cpb-business-card--compact {
        padding: 27px 27px;
        gap: 5px;
    }
}

/* Compact 카드 독립 타이틀 스타일 */
.cpb-business-card--compact .cpb-business-card__title {
    font-weight: 700;
    color: #000000;
    letter-spacing: -0.01em;
}

@media (min-width: 1501px) {
    .cpb-business-card--compact .cpb-business-card__title {
        font-size: 1.2vw;
    }
}

@media (min-width: 769px) and (max-width: 1500px) {
    .cpb-business-card--compact .cpb-business-card__title {
        font-size: 20px;
    }
}

/* Bottom mini grid cards */
.cpb-business-card--tertiary {
    background: #f3f2f2;
}

/* Tertiary 카드 독립 타이틀 스타일 */
.cpb-business-card--tertiary .cpb-business-card__title {
    font-weight: 700;
    color: #000000;
    letter-spacing: -0.01em;
}

@media (min-width: 1501px) {
    .cpb-business-card--tertiary .cpb-business-card__title {
        font-size: 1.2vw;
    }
}

@media (min-width: 769px) and (max-width: 1500px) {
    .cpb-business-card--tertiary .cpb-business-card__title {
        font-size: 20px;
    }
}

.cpb-business-card--quaternary {
    background: #f3f2f2;
}

/* Quaternary 카드 독립 타이틀 스타일 */
.cpb-business-card--quaternary .cpb-business-card__title {
    font-weight: 700;
    color: #000000;
    letter-spacing: -0.01em;
}

@media (min-width: 1501px) {
    .cpb-business-card--quaternary .cpb-business-card__title {
        font-size: 1.2vw;
    }
}

@media (min-width: 769px) and (max-width: 1500px) {
    .cpb-business-card--quaternary .cpb-business-card__title {
        font-size: 20px;
    }
}

.cpb-business-card--rating {
    background: #6699cc;
    color: #ffffff;
    align-items: center;
    justify-content: center;
    text-align: center;
}

@media (min-width: 1501px) {
    .cpb-business-card--rating {
        gap: 0.5vh;
    }
}

@media (min-width: 769px) and (max-width: 1500px) {
    .cpb-business-card--rating {
        gap: 5px;
    }
}

/* Rating 카드는 타이틀 없음 - AAA 등급 표시용 */

.cpb-business-card__rating {
    font-weight: 800;
    letter-spacing: 0.03em;
    margin-bottom: 0;
}

@media (min-width: 1501px) {
    .cpb-business-card__rating {
        font-size: 2.5vw;
    }
}

@media (min-width: 769px) and (max-width: 1500px) {
    .cpb-business-card__rating {
        font-size: 37px;
    }
}

.cpb-business-card--rating .cpb-business-card__subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

@media (min-width: 1501px) {
    .cpb-business-card--rating .cpb-business-card__subtitle {
        font-size: 0.9vw;
        margin-bottom: 0.5vh;
    }
}

@media (min-width: 769px) and (max-width: 1500px) {
    .cpb-business-card--rating .cpb-business-card__subtitle {
        font-size: 20px;
    }
}

.cpb-business-card--rating .cpb-business-card__description {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.3;
    margin-top: 0;
    font-weight: 400;
}

@media (min-width: 1501px) {
    .cpb-business-card--rating .cpb-business-card__description {
        font-size: 0.75vw;
    }
}

@media (min-width: 769px) and (max-width: 1500px) {
    .cpb-business-card--rating .cpb-business-card__description {
        font-size: 14px;
    }
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .cpb-business-stability {
        padding: 100px 40px;
        height: auto;
        min-height: auto;
        overflow: visible;
    }

    .cpb-business-stability__padding-wrapper {
        padding: 0;
        overflow-y: visible;
    }

    .cpb-business-stability__cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
        max-width: 100%;
        margin: 40px auto 0;
    }

    .cpb-business-card {
        padding: 24px 20px;
        border-radius: 16px;
        gap: 12px;
    }

    .cpb-business-card__title {
        font-size: 16px;
    }

    .cpb-business-card__subtitle {
        font-size:14px;
        line-height: 2;
    }

    .cpb-business-card__list {
        gap: 6px;
        font-size: 14px;
    }

    .cpb-business-card__icon {
        width: 48px;
        border-radius: 12px;
    }

    .cpb-business-card__icon img {
        width: 28px;
        height: 28px;
    }

    .cpb-business-card--primary {
        padding: 32px 24px;
        grid-column: 1 / span 2;
    }

    .cpb-business-card__content--primary {
        max-width: 100%;
        gap: 8px;
    }

    .cpb-business-card--primary .cpb-business-card__title {
        font-size: 20px;
    }

    .cpb-business-card--primary .highlight-emphasis {
        font-size: 12px;
        font-weight: 800;
        color: #ffffff;
    }

    .cpb-business-card--secondary .cpb-business-card__title {
        font-size: 20px;
    }

    .cpb-business-card--compact {
        padding: 24px 18px;
        gap: 8px;
    }

    .cpb-business-card--compact .cpb-business-card__title {
        font-size: 18px;
    }

    .cpb-business-card--tertiary .cpb-business-card__title {
        font-size: 18px;
    }

    .cpb-business-card--quaternary .cpb-business-card__title {
        font-size: 18px;
    }

    .cpb-business-card--rating {
        gap: 6px;
    }

    .cpb-business-card__rating {
        font-size: 32px;
        margin-bottom: 0;
    }

    .cpb-business-card--rating .cpb-business-card__subtitle {
        font-size: 18px;
        margin-bottom: 6px;
    }

    .cpb-business-card--rating .cpb-business-card__description {
        font-size: 14px;
        margin-top: 0;
    }

    .cpb-business-card--secondary {
        grid-column: 1;
    }

    .cpb-business-card--tertiary {
        grid-column: 2;
    }

    .cpb-business-card--quaternary {
        grid-column: 1;
    }

    .cpb-business-card--rating {
        grid-column: 2;
    }
}

@media (max-width: 1024px) {
    .cpb-business-card__title {
        font-size: 15px;
    }

    .cpb-business-card--primary .cpb-business-card__title {
        font-size: 18px;
    }

    .cpb-business-card--primary .highlight-emphasis {
        font-size: 11.5px;
        font-weight: 800;
        color: #ffffff;
    }

    .cpb-business-card__rating {
        font-size: 42px;
    }
}

@media (max-width: 768px) {
    .cpb-business-stability {
        height: auto;
        min-height: auto;
        padding: 60px 20px !important;
    }

    .cpb-business-stability__padding-wrapper {
        padding: 0 !important;
    }

    .cpb-business-stability__inner {
        padding: 0;
    }

    .cpb-business-stability__title {
        font-size: 2.4rem;
    }

    .cpb-business-stability__cards {
        grid-template-columns: 1fr;
        gap: 12px;
        max-width: 100%;
        margin: 40px 0 0 0;
    }

    .cpb-business-card {
        padding: 24px;
        border-radius: 8px;
    }

    .cpb-business-card--primary,
    .cpb-business-card--secondary,
    .cpb-business-card--tertiary,
    .cpb-business-card--quaternary,
    .cpb-business-card--rating {
        grid-column: auto;
    }

    .cpb-business-card--primary {
        padding: 28px;
        border-radius: 8px;
    }

    .cpb-business-card--compact {
        padding: 24px;
        border-radius: 8px;
    }
}
