/* 서브메뉴 전체 바 */
.sub-nav {
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    background: #fafafa;
}

/* 가운데 정렬 + 좌우 균등 배치 */
.sub-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}

.sub-nav-inner ul {
    margin: 0;
    padding: 0;
    list-style: none;

    display: flex;
    justify-content: space-evenly;   /* 가운데 기준 좌우 균등 */
    align-items: center;
    min-height: 48px;                /* 바 높이 */
}

/* 각 메뉴 항목 */
.sub-nav-inner li {
    margin: 0;
}

/* 기본 글꼴/여백 */
.sub-nav-inner a {
    font-weight: 400;
    display: inline-block;
    padding: 12px 20px;
    font-size: 15px;
    color: #4b5563;
    text-decoration: none;

    position: relative;
    transition:
        color .18s ease,
        transform .18s ease;
}

/* 밑줄 애니메이션 베이스 */
.sub-nav-inner a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: #c40000;             /* 포인트 색상(적색 계열) */
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .18s ease;
}

/* 호버 효과 */
.sub-nav-inner a:hover,
.sub-nav-inner a:focus {
    color: #c40000;
    transform: translateY(-1px);
}
.sub-nav-inner a:hover::after,
.sub-nav-inner a:focus::after {
    transform: scaleX(1);
}

/* 활성 탭 스타일 (.active 는 PHP에서 li에 붙이고 있음) */
.sub-nav-inner li.active > a {
    color: #c40000;
    font-weight: 500;
}
.sub-nav-inner li.active > a::after {
    transform: scaleX(1);
}

/* 좁은 화면에서 간격/크기 조정 */
@media (max-width: 768px) {
    .sub-nav-inner ul {
        justify-content: center;
        flex-wrap: wrap;
        row-gap: 4px;
    }
    .sub-nav-inner a {
        padding: 8px 14px;
        font-size: 14px;
    }
}
