.container {
    max-width: 1980px;
    padding: 20px;
    margin-left: 20px;
}

.vertical-tabs-container {
    display: flex;
    flex-wrap: nowrap;
}

.nav-subjects {
    width: 350px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-right: 30px;
    flex-shrink: 0;
}

.subject-tab {
    padding: 15px 20px;
    cursor: pointer;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
    transition: background-color 0.3s, color 0.3s;
    text-align: left;
}

.subject-tab.active {
    background-color: #367c39;
    color: white;
    border-color: #ffffff;
}

.subject-tab:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.6s ease, opacity 0.6s ease, box-shadow 0.6s ease !important;
}

.subject-info {
    padding: 25px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: none;
    max-width: 74vw;
    height: auto;
    flex-grow: 1;
}

.subject-info.active {
    display: block;
}

.subject-info > .couresName {
    color: #333;
    text-align: center;
    margin-bottom: 15px;
    font-size: 2em;
}

.subject-info > .courseNameSeparate {
    position: relative;
    width: 1010px;
    height: 2px;
    background-color: #4CAF50;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 45px;
}

.subject-info > .courseInfo {
    width: 95%;
    max-width: 1100px;
    margin: 40px auto;
    padding: 30px;
}

.courseInfoContainer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2%;
}

.info-box {
    width: calc(50% - 1%);
    margin-bottom: 25px;
    border-top: 3px solid #367c39;
    padding: 25px;
    box-sizing: border-box;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-box h2 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #367c39;
    font-size: 1.4em;
    font-weight: 600;
}

.info-box p {
    color: #555;
    line-height: 1.6;
    font-size: 1.05em;
}

@media (max-width: 768px) {
    .info-box,
    .info-box-blue {
        width: 100%;
    }
}

.subject-info > .couresText1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.5em;
    margin-bottom: 45px;
    padding-left: 12px;
}

.subject-info > .couresText2 {
    margin-bottom: 45px;
    padding-left: 40px;
}

/* 로드맵 컨테이너 개선 */
.roadmap-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    position: relative;
    padding: 25px 15px;
    margin-bottom: 15px;
    min-height: 280px;
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    gap: 15px;
    /* 스크롤바 스타일링 */
    scrollbar-width: thin;
    scrollbar-color: #367c39 #f1f1f1;
}

.roadmap-container::-webkit-scrollbar {
    height: 8px;
}

.roadmap-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.roadmap-container::-webkit-scrollbar-thumb {
    background: #367c39;
    border-radius: 4px;
}

.roadmap-container::-webkit-scrollbar-thumb:hover {
    background: #2d5a2f;
}

/* 로드맵 아이템 개선 - 글씨 크기 증가 및 더 나은 가독성 */
.roadmap-item {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    flex: 0 0 auto;
    width: 200px;
    min-width: 200px;
    min-height: 220px;
    margin-right: 0;
    padding: 25px 20px;
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    text-align: center;
    opacity: 0;
    animation: slideIn 0.8s ease-out forwards;
    animation-delay: calc(var(--delay) * 0.4s);
    position: relative;
    white-space: normal;
    word-wrap: break-word;
    box-sizing: border-box;
    border: 1px solid #e9ecef;
}

.roadmap-item::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -15px;
    transform: translateY(-50%);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 10px solid #ddd;
}

.roadmap-item:last-child::after {
    display: none;
}

.roadmap-item:nth-child(1) {
    --delay: 1;
}
.roadmap-item:nth-child(2) {
    --delay: 2;
}
.roadmap-item:nth-child(3) {
    --delay: 3;
}
.roadmap-item:nth-child(4) {
    --delay: 4;
}
.roadmap-item:nth-child(5) {
    --delay: 5;
}
.roadmap-item:nth-child(6) {
    --delay: 6;
}
.roadmap-item:nth-child(7) {
    --delay: 7;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.month {
    font-weight: bold;
    font-size: 1.3em;
    color: #367c39;
    margin-bottom: 15px;
    flex-shrink: 0;
}

.content {
    line-height: 1.5em;
    color: #555;
    font-size: 1em;
    word-break: keep-all;
    overflow-wrap: break-word;
    flex: 1;
    display: block;
}

/* 로드맵 내용 각 줄을 구분하기 위한 스타일 - 글씨 크기 증가 */
.content span {
    display: block;
    padding: 3px 0;
    border-bottom: 1px dotted rgba(54, 124, 57, 0.3);
    margin-bottom: 3px;
    font-size: 0.95em;
    line-height: 1.4;
    word-wrap: break-word;
    white-space: normal;
}

.content span:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.courseIn {
    display: flex;
    position: relative;
    align-items: center;
    gap: 15px;
}

.courseIn > .courseNum {
    font-size: 25px;
    color: #367c39;
}

.courseIn > .separate {
    background-color: #D8D8D8;
    width: 2px;
    height: 18px;
}

.courseIn > .courseInName {
    font-size: 18px;
    position: relative;
    top: 3px;
    color: #367c39;
}

.benefits {
    width: 100%;
    background-color: #fff;
}

.benefit-group {
    margin-bottom: 30px;
    padding: 20px;
    border-radius: 8px;
    width: 100%;
}

.benefit-group:last-child {
    margin-bottom: 0;
}

.benefit-group ul li {
    margin-bottom: 10px;
    padding-left: 30px;
    position: relative;
    text-indent: -10px;
}

.benefit-group ul ul {
    margin-top: 5px;
    padding-left: 20px;
    margin-bottom: 5px;
}

.benefit-group ul li strong {
    font-weight: 600;
    color: #444;
}

.benefit-group > ul,
.benefit-group > ul > li > ul {
    list-style: none;
    padding-top: 10px;
}

.itButtons {
    margin-top: 40px;
    max-width: 90%;
    position: relative;
}

.itButtons > .itButton1 {
    border-radius: 15px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    padding: 10px 20px;
    color: #4CAF50;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1;
    display: inline-block;
    text-align: center;
    line-height: 40px;
    background-color: transparent;
    border: 2px solid #4CAF50;
}

.itButtons > .itButton1:hover {
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.3);
}

.itButtons > .itButton1 .fa-arrow-right {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.itButtons > .itButton1:hover .fa-arrow-right {
    transform: translateX(5px);
}

.inItButton1 {
    width: 100px;
    text-align: center;
    color: white;
    border-radius: 15px 0 0 15px;
    border: 1px solid #fff;
}

/* 큰 화면에서 로드맵 개선 */
@media (min-width: 1601px) {
    .roadmap-container {
        padding: 30px 20px;
        min-height: 300px;
        gap: 20px;
        justify-content: space-between;
        overflow-x: visible;
    }
    
    .roadmap-item {
        flex: 1;
        width: auto;
        max-width: 220px;
        min-width: 180px;
        min-height: 240px;
        padding: 30px 25px;
    }
    
    .month {
        font-size: 1.4em;
    }
    
    .content {
        font-size: 1.1em;
    }
    
    .content span {
        font-size: 1em;
        padding: 4px 0;
        margin-bottom: 4px;
    }
}

@media (max-width: 1600px) {
    .vertical-tabs-container {
        flex-direction: row; 
    }

    .nav-subjects {
        width: 300px;
        margin-right: 0;
        margin-bottom: 20px;
    }

    .subject-tab {
        padding: 10px 15px;
    }

    .subject-info {
        flex: 1;
        max-width: calc(100% - 320px);
    }
    
    .subject-info > .couresName {
        font-size: 1.8em;
    }

    .subject-info > .courseNameSeparate {
        width: 90%;
        margin-bottom: 25px;
    }
    
    .subject-info > .couresText1 {
        font-size: 1.2em;
        margin-bottom: 25px;
        padding-left: 0;
    }
    
    .subject-info > .couresText2 {
        padding-left: 10px;
    }

    .roadmap-container {
        padding: 25px 10px;
        min-height: 260px;
        gap: 15px;
    }

    .roadmap-item {
        flex: 0 0 auto;
        width: 180px;
        min-width: 180px;
        min-height: 200px;
        margin-right: 0;
        margin-bottom: 10px;
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.12);
        padding: 22px 18px;
    }

    .roadmap-item::after {
        display: none;
    }
    
    .month {
        font-size: 1.25em;
    }
    
    .content {
        font-size: 0.95em;
    }
    
    .content span {
        font-size: 0.9em;
        line-height: 1.4;
        padding: 3px 0;
        margin-bottom: 3px;
    }

    .benefit-group h3 {
        font-size: 1.3em;
    }
    
    .benefit-group ul li {
        font-size: 0.95em;
        padding-left: 20px;
    }
    
    .benefit-group ul li i {
        top: 2px;
    }
}

/* 태블릿 (1024px 이하) */
@media (max-width: 1024px) {
    .container {
        max-width: 100%;
        padding: 15px;
        margin-left: 0;
    }

    .nav-subjects {
        width: 280px;
        margin-right: 20px;
    }

    .subject-info {
        max-width: calc(100% - 300px);
        padding: 20px;
    }

    .subject-info > .couresName {
        font-size: 1.7em;
    }

    .subject-info > .courseNameSeparate {
        width: 100%;
        max-width: 800px;
    }

    .subject-info > .courseInfo {
        padding: 20px;
    }

    .roadmap-container {
        padding: 20px 5px;
        min-height: 240px;
        gap: 12px;
    }

    .roadmap-item {
        flex: 0 0 auto;
        width: 170px;
        min-width: 170px;
        min-height: 180px;
        margin-right: 0;
        padding: 20px 16px;
    }
    
    .roadmap-item::after {
        display: none;
    }
    
    .month {
        font-size: 1.2em;
    }
    
    .content {
        font-size: 0.9em;
    }
    
    .content span {
        font-size: 0.85em;
        padding: 2px 0;
        margin-bottom: 2px;
        line-height: 1.4;
    }
}

/* 중간 태블릿 (768px 이하) */
@media (max-width: 768px) {
    .vertical-tabs-container {
        flex-direction: column;
    }

    .nav-subjects {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        margin-right: 0;
        margin-bottom: 20px;
        gap: 10px;
        padding-bottom: 10px;
        white-space: nowrap;
    }

    .subject-tab {
        min-width: 150px;
        flex-shrink: 0;
        padding: 12px 16px;
        text-align: center;
    }

    .subject-info {
        max-width: 100%;
        padding: 15px;
    }

    .subject-info > .couresName {
        font-size: 1.5em;
    }

    .subject-info > .couresText1 {
        font-size: 1.2em;
        padding-left: 0;
        margin-bottom: 25px;
    }

    .subject-info > .couresText2 {
        padding-left: 15px;
        margin-bottom: 25px;
    }

    .courseInfoContainer {
        gap: 15px;
    }

    .info-box {
        width: 100%;
        margin-bottom: 15px;
        padding: 20px;
    }

    .roadmap-container {
        padding: 20px 5px;
        min-height: 220px;
        overflow-x: auto;
        justify-content: flex-start;
        gap: 12px;
    }

    .roadmap-item {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        flex: 0 0 auto;
        width: 160px;
        min-width: 160px;
        min-height: 170px;
        margin-right: 0;
        padding: 18px 14px;
    }

    .roadmap-item::after {
        display: none;
    }

    .month {
        font-size: 1.1em;
        margin-bottom: 10px;
    }

    .content {
        font-size: 0.85em;
    }
    
    .content span {
        font-size: 0.8em;
        line-height: 1.3;
        padding: 2px 0;
        margin-bottom: 2px;
    }

    .benefit-group {
        padding: 15px;
        margin-bottom: 20px;
    }

    .courseIn > .courseNum {
        font-size: 22px;
    }

    .courseIn > .courseInName {
        font-size: 16px;
    }
}

/* 모바일 (480px 이하) */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    .nav-subjects {
        gap: 8px;
    }

    .subject-tab {
        min-width: 120px;
        padding: 10px 12px;
        font-size: 0.9em;
    }

    .subject-info {
        padding: 12px;
    }

    .subject-info > .couresName {
        font-size: 1.3em;
        margin-bottom: 10px;
    }

    .subject-info > .courseNameSeparate {
        margin-bottom: 20px;
    }

    .subject-info > .couresText1 {
        font-size: 1.1em;
        margin-bottom: 20px;
    }

    .subject-info > .couresText2 {
        padding-left: 10px;
        margin-bottom: 20px;
        font-size: 0.95em;
    }

    .subject-info > .courseInfo {
        margin: 20px auto;
        padding: 15px;
    }

    .info-box {
        padding: 15px;
        margin-bottom: 12px;
    }

    .info-box h2 {
        font-size: 1.2em;
        margin-bottom: 8px;
    }

    .info-box p {
        font-size: 0.95em;
    }

    .roadmap-container {
        padding: 15px 5px;
        min-height: 200px;
        gap: 10px;
    }

    .roadmap-item {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        flex: 0 0 auto;
        width: 150px;
        min-width: 150px;
        min-height: 160px;
        margin-right: 0;
        padding: 16px 12px;
    }

    .month {
        font-size: 1em;
        margin-bottom: 8px;
    }

    .content {
        font-size: 0.8em;
    }
    
    .content span {
        font-size: 0.75em;
        line-height: 1.3;
        padding: 2px 0;
        margin-bottom: 2px;
    }

    .courseIn {
        gap: 10px;
    }

    .courseIn > .courseNum {
        font-size: 20px;
    }

    .courseIn > .courseInName {
        font-size: 15px;
    }

    .benefit-group {
        padding: 12px;
        margin-bottom: 15px;
    }

    .benefit-group ul li {
        font-size: 0.9em;
        padding-left: 20px;
        margin-bottom: 8px;
    }

    .benefit-group ul ul {
        padding-left: 15px;
    }

    .itButtons {
        margin-top: 20px;
    }

    .itButtons > .itButton1 {
        padding: 8px 16px;
        line-height: 35px;
        font-size: 0.9em;
    }
}

/* 작은 모바일 (360px 이하) */
@media (max-width: 360px) {
    .container {
        padding: 8px;
    }

    .subject-tab {
        min-width: 100px;
        padding: 8px 10px;
        font-size: 0.85em;
    }

    .subject-info {
        padding: 10px;
    }

    .subject-info > .couresName {
        font-size: 1.2em;
    }

    .subject-info > .couresText1 {
        font-size: 1em;
    }

    .subject-info > .couresText2 {
        font-size: 0.9em;
        padding-left: 5px;
    }

    .roadmap-container {
        padding: 12px 5px;
        min-height: 180px;
        gap: 8px;
    }

    .roadmap-item {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        flex: 0 0 auto;
        width: 140px;
        min-width: 140px;
        height: 150px;
        margin-right: 0;
        padding: 14px 10px;
    }

    .month {
        font-size: 0.95em;
        margin-bottom: 6px;
    }

    .content {
        font-size: 0.75em;
    }
    
    .content span {
        font-size: 0.7em;
        line-height: 1.2;
        padding: 1px 0;
        margin-bottom: 1px;
    }

    .courseIn > .courseNum {
        font-size: 18px;
    }

    .courseIn > .courseInName {
        font-size: 14px;
    }

    .info-box {
        padding: 12px;
    }

    .info-box h2 {
        font-size: 1.1em;
    }

    .info-box p {
        font-size: 0.9em;
    }

    .benefit-group ul li {
        font-size: 0.85em;
        padding-left: 15px;
    }
}