/*
 * 메인 서비스 카드 (#nt-cards) — 2026-10 리뉴얼, 시안 A 서비스 카드
 * 마크업: resources/views/pages/partials/home-cards.blade.php
 * 모든 선택자는 #nt-cards 로 시작한다 (Avada 의 #main h2, .post-content p, body a 등보다 우선).
 * PC(1024px 이상) 카드 4열 · 태블릿(768~1023px) 카드 2열 · 모바일(767px 이하) 목록형
 */

#nt-cards {
    padding: 96px 0 104px;
    background: #F4F7FA;
    color: #1B2A3A;
    font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    text-align: left;
    word-break: keep-all;
    overflow-wrap: break-word;
    -webkit-font-smoothing: antialiased;
}

#nt-cards *,
#nt-cards *::before,
#nt-cards *::after {
    box-sizing: border-box;
}

/* 헤더 로고와 같은 1170px 기준선 */
#nt-cards .nt-cards__inner {
    box-sizing: content-box;
    display: flex;
    flex-direction: column;
    gap: 48px;
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 30px;
}

/* 머리글: 제목 묶음(왼쪽) + 버튼(오른쪽 아래 정렬) */
#nt-cards .nt-cards__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px 48px;
}

#nt-cards .nt-cards__intro {
    display: flex;
    flex: 1 1 520px;
    flex-direction: column;
    gap: 14px;
    max-width: 680px;
}

/* #17669A: 배경 #F4F7FA 위 작은 글씨 대비 4.5:1 이상 (#1E79B4 는 4.4:1) */
#nt-cards .nt-cards__eyebrow {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    line-height: 16px;
    letter-spacing: 0.14em;
    color: #17669A;
}

/*
 * 제목(h2·h3)의 font-size·line-height 만 !important:
 * Avada 의 fusion-responsive-typography.js 가 모든 h1~h6 에 인라인 line-height 와
 * .fusion-responsive-typography-calculated 를 넣고, 1000px 이하에서는 그 클래스로
 * font-size 를 !important 로 다시 계산해 시안 크기(모바일 26px → 30px 등)가 깨진다.
 */
#nt-cards .nt-cards__title {
    margin: 0;
    font-family: inherit;
    font-size: 38px !important;
    font-style: normal;
    font-weight: 750;
    line-height: 1.3 !important;
    letter-spacing: -0.025em;
    text-transform: none;
    color: #0B2540;
}

#nt-cards .nt-cards__lead {
    margin: 0;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.7;
    letter-spacing: 0;
    color: #4B5B6B;
}

#nt-cards .nt-cards__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* 테두리는 투명으로라도 항상 두어 고대비 모드에서 버튼 윤곽이 보이게 한다 */
#nt-cards .nt-cards__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    margin: 0;
    padding: 0 21px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 650;
    line-height: 20px;
    letter-spacing: 0;
    text-decoration: none;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

#nt-cards .nt-cards__btn svg {
    flex-shrink: 0;
}

#nt-cards .nt-cards__btn--secondary,
#nt-cards .nt-cards__btn--secondary:focus {
    color: #0B2540;
}

#nt-cards .nt-cards__btn--secondary {
    padding: 0 22px;
    border-color: #C9D3DE;
    background: #FFFFFF;
}

#nt-cards .nt-cards__btn--secondary:hover {
    border-color: #1E79B4;
    color: #155E8E;
}

#nt-cards .nt-cards__btn--primary,
#nt-cards .nt-cards__btn--primary:hover,
#nt-cards .nt-cards__btn--primary:focus {
    color: #FFFFFF;
}

#nt-cards .nt-cards__btn--primary {
    border-color: #1E79B4;
    background: #1E79B4;
}

#nt-cards .nt-cards__btn--primary:hover {
    border-color: #155E8E;
    background: #155E8E;
}

/* 서비스 카드: 카드 전체가 하나의 링크 */
#nt-cards .nt-cards__list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

#nt-cards .nt-cards__item {
    display: flex;
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

#nt-cards .nt-cards__card,
#nt-cards .nt-cards__card:hover,
#nt-cards .nt-cards__card:focus {
    color: #1B2A3A;
    text-decoration: none;
}

#nt-cards .nt-cards__card {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
    padding: 32px 28px 28px;
    border: 1px solid #E2E8EF;
    border-radius: 16px;
    background: #FFFFFF;
    box-shadow: 0 1px 2px rgba(11, 37, 64, 0.05);
    transition: border-color 0.2s, box-shadow 0.2s;
}

#nt-cards .nt-cards__card:hover {
    border-color: rgba(30, 121, 180, 0.4);
    box-shadow: 0 12px 28px -10px rgba(11, 37, 64, 0.16);
}

#nt-cards .nt-cards__card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#nt-cards .nt-cards__card-icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: #EAF3FA;
    color: #1E79B4;
}

#nt-cards .nt-cards__card-icon svg {
    display: block;
    width: 28px;
    height: 28px;
}

#nt-cards .nt-cards__card-num {
    font-size: 14px;
    font-weight: 600;
    line-height: 16px;
    letter-spacing: 0.06em;
    color: #5F6E7D;
}

#nt-cards .nt-cards__card-text {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#nt-cards .nt-cards__card-title {
    margin: 0;
    font-family: inherit;
    font-size: 21px !important;
    font-style: normal;
    font-weight: 700;
    line-height: 1.35 !important;
    letter-spacing: -0.015em;
    text-transform: none;
    color: #0B2540;
}

#nt-cards .nt-cards__card-desc,
#nt-cards .nt-cards__card-summary {
    margin: 0;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.65;
    letter-spacing: 0;
    color: #4B5B6B;
}

/* 모바일 전용 요소 */
#nt-cards .nt-cards__card-summary,
#nt-cards .nt-cards__card-chevron {
    display: none;
}

#nt-cards .nt-cards__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

#nt-cards .nt-cards__chips li {
    margin: 0;
    padding: 5px 10px;
    border-radius: 999px;
    background: #F1F5F9;
    color: #3E4C5A;
    font-size: 13px;
    font-weight: 500;
    line-height: 15px;
    letter-spacing: 0;
    list-style: none;
}

#nt-cards .nt-cards__card-more {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    color: #1E79B4;
    font-size: 15px;
    font-weight: 650;
    line-height: 18px;
    letter-spacing: 0;
    transition: color 0.2s;
}

#nt-cards .nt-cards__card-more svg {
    flex-shrink: 0;
}

#nt-cards .nt-cards__card:hover .nt-cards__card-more {
    color: #155E8E;
}

#nt-cards a:focus-visible {
    outline: 3px solid #1E79B4;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: no-preference) {
    #nt-cards .nt-cards__card {
        transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    }

    #nt-cards .nt-cards__card:hover {
        transform: translateY(-2px);
    }

    #nt-cards .nt-cards__btn--primary svg,
    #nt-cards .nt-cards__card-more svg {
        transition: transform 0.2s;
    }

    #nt-cards .nt-cards__btn--primary:hover svg,
    #nt-cards .nt-cards__card:hover .nt-cards__card-more svg {
        transform: translateX(3px);
    }
}

/* 좁은 PC: 카드 좌우 여백을 줄여 가장 긴 제목(MES 제조실행시스템)이 한 줄에 들어가게 한다 */
@media (min-width: 1024px) and (max-width: 1199px) {
    #nt-cards .nt-cards__card {
        padding-right: 22px;
        padding-left: 22px;
    }
}

/* 태블릿: 카드 2열 (카드 모양은 PC 와 같다) */
@media (max-width: 1023px) {
    #nt-cards .nt-cards__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* 모바일: 버튼은 상담 신청을 앞에 두고 나란히, 카드는 아이콘·제목·요약·화살표의 목록형 */
@media (max-width: 767px) {
    #nt-cards {
        padding: 56px 0 64px;
    }

    #nt-cards .nt-cards__inner {
        gap: 28px;
        padding: 0 20px;
    }

    #nt-cards .nt-cards__head {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        gap: 20px;
    }

    #nt-cards .nt-cards__intro {
        flex: none;
        gap: 12px;
        max-width: none;
    }

    #nt-cards .nt-cards__eyebrow {
        font-size: 13px;
        line-height: 15px;
    }

    #nt-cards .nt-cards__title {
        font-size: 26px !important;
        line-height: 1.35 !important;
    }

    #nt-cards .nt-cards__lead {
        font-size: 15px;
        line-height: 1.65;
    }

    #nt-cards .nt-cards__lead-pc,
    #nt-cards .nt-cards__btn-pc {
        display: none;
    }

    #nt-cards .nt-cards__actions {
        flex-wrap: nowrap;
        gap: 8px;
    }

    #nt-cards .nt-cards__btn {
        flex: 1 1 0;
        gap: 6px;
        min-width: 0;
        padding: 0 11px;
        font-size: 15px;
    }

    #nt-cards .nt-cards__btn--secondary {
        padding: 0 12px;
    }

    #nt-cards .nt-cards__btn--primary {
        order: -1;
    }

    #nt-cards .nt-cards__list {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    #nt-cards .nt-cards__card {
        flex-direction: row;
        align-items: center;
        gap: 16px;
        padding: 20px 18px;
        border-radius: 14px;
        box-shadow: none;
    }

    #nt-cards .nt-cards__card-top {
        flex-shrink: 0;
    }

    #nt-cards .nt-cards__card-icon {
        width: 48px;
        height: 48px;
        border-radius: 12px;
    }

    #nt-cards .nt-cards__card-icon svg {
        width: 24px;
        height: 24px;
    }

    #nt-cards .nt-cards__card-num,
    #nt-cards .nt-cards__card-desc,
    #nt-cards .nt-cards__chips,
    #nt-cards .nt-cards__card-more {
        display: none;
    }

    #nt-cards .nt-cards__card-text {
        flex: 1 1 auto;
        gap: 4px;
        min-width: 0;
    }

    #nt-cards .nt-cards__card-title {
        font-size: 17px !important;
        line-height: 1.4 !important;
        letter-spacing: 0;
    }

    #nt-cards .nt-cards__card-summary {
        display: block;
        font-size: 14px;
        line-height: 1.55;
    }

    #nt-cards .nt-cards__card-chevron {
        display: block;
        flex-shrink: 0;
        width: 20px;
        height: 20px;
        color: #5F6E7D;
        transition: color 0.2s;
    }

    #nt-cards .nt-cards__card:hover .nt-cards__card-chevron {
        color: #1E79B4;
    }
}
