.cm1 {
    max-height: 20px;
    display: block;
    object-fit: cover;
    width: 100%;
    min-height: 200px;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --text-color: #333;
    --light-gray: #f5f6fa;
    --border-color: #e1e1e1;
}

p,
span {
    font-weight: unset;
}

b,
strong {
    font-weight: bold;
}

#main .section {
    background-color: white;
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

#main .section:hover {
    transform: translateY(-2px);
}

#main h1 {
    color: var(--primary-color);
    font-size: 2.5em;
    margin-bottom: 0.5rem;
    border-bottom: 3px solid var(--secondary-color);
    padding-bottom: 0.5rem;
}

#main h2 {
    color: var(--secondary-color);
    font-size: 1.8em;
    margin-top: 0.5rem;
}

#main .heading {
    color: var(--primary-color);
    font-size: 1.5em;
    font-weight: bold;
    margin: 1.5rem 0 1rem;
    padding-left: 1rem;
    border-left: 4px solid var(--secondary-color);
}

#main .table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1rem 0;
    border-radius: 8px;
    overflow: hidden;
}

#main .table td {
    padding: 1rem;
    vertical-align: top;
    border: 1px solid var(--border-color);
}

#main .table tr:nth-child(even) {
    background-color: var(--light-gray);
}

.table td:first-child {
    width: 25%;
    font-weight: bold;
    background-color: var(--primary-color);
    color: white;
}

#main .list {
    list-style-type: none;
    padding-left: 0;
}

.list li {
    margin-bottom: 1rem;
    padding-left: 2rem;
    position: relative;
}

#main .list li:before {
    content: "•";
    color: var(--secondary-color);
    font-weight: bold;
    position: absolute;
    left: 0.5rem;
}

#main .note {
    color: #686868;
    font-style: italic;
    font-size: 0.9em;
    padding: 1rem;
    background-color: var(--light-gray);
    border-left: 4px solid #686868;
    margin: 1rem 0;
    border-radius: 4px;
}

#main a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.2s ease;
    overflow-wrap: anywhere;
}

#main a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

#main .course-head a:hover,
#main a.btn-apply:hover {
    color: #fff;
    text-decoration: none;
}

#main a.btn-apply {
    display: inline-block;
    margin: 8px 0 4px;
    padding: 1rem 2rem;
    background-color: #3498db;
    color: #fff;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: bold;
    line-height: 1.2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

#main a.btn-apply:hover {
    background-color: #2980b9;
}

#main strong {
    color: var(--primary-color);
}

#main ol {
    padding-left: 1.5rem;
}

#main ol li {
    margin-bottom: 0.5rem;
}

#main p {
    margin: 0.5rem 0;
}

#main .schedule-wrap {
    overflow-x: auto;
    margin: 1rem 0;
}

#main table.schedule {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
}

#main table.schedule th,
#main table.schedule td {
    padding: 1rem;
    vertical-align: top;
    border: 1px solid var(--border-color);
    text-align: left;
}

#main table.schedule th {
    background-color: var(--primary-color);
    color: #fff;
    font-weight: bold;
}

#main table.schedule td {
    background-color: #fff;
}

#main .intro-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

#main .flyer-col {
    flex: 0 0 460px;
    width: 460px;
    max-width: 50%;
}

#main .flyer img {
    width: 100%;
    height: auto;
    display: block;
}

#main .flyer-links {
    margin: 6px 0 8px;
}

#main .advisors {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 0.5rem 0 0.2rem;
}

#main .advisor {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--light-gray);
    border-radius: 8px;
    padding: 1rem;
}

#main .advisor img {
    width: 118px;
    height: 156px;
    object-fit: cover;
    object-position: center top;
    flex: 0 0 auto;
    background: #e8e4e6;
}

#main .advisor h3 {
    margin: 0 0 4px;
    padding: 0;
    border: 0;
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.45;
}

#main .advisor ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#main .advisor li {
    position: relative;
    margin: 0 0 0.25rem;
    padding-left: 1rem;
}

#main .advisor li:before {
    content: "•";
    color: var(--secondary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

#main .level-next {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 0.4rem 0 0;
}

#main .level-next a {
    display: block;
    text-decoration: none;
}

#main .level-next a:hover {
    text-decoration: none;
}

#main .level-next img {
    width: 100%;
    height: auto;
    display: block;
}

#main .shares {
    display: flex;
    flex-direction: column;
    gap: 48px;
    margin: 0.5rem 0 0.2rem;
}

#main .share {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

#main .share img {
    width: 160px;
    height: 160px;
    object-fit: contain;
    object-position: center top;
}

#main .share h3 {
    margin: 0 0 2px;
    padding: 0;
    border: 0;
    color: var(--primary-color);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.45;
}

#main .share-role {
    margin: 0 0 0.45rem;
    line-height: 1.55;
}

#main .share blockquote {
    margin: 0.5rem 0 0;
    padding: 1rem;
    border: 0;
    border-left: 4px solid var(--secondary-color);
    border-radius: 4px;
    background: var(--light-gray);
    color: var(--text-color);
}

#main .pathway-col {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
}

#main .pathway-eco {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#main .pathway-eco .eco-wheel {
    width: min(340px, calc(100% - 158px));
    height: auto;
    flex: 0 0 auto;
}

#main .eco-ring {
    fill: #fff;
    font-size: 17px;
    font-weight: 700;
    font-family: "Microsoft JhengHei", "Noto Sans TC", "PingFang TC", sans-serif;
}

#main .eco-brand {
    fill: #111;
    font-size: 26px;
    font-weight: 700;
    font-family: Arial, "Microsoft JhengHei", sans-serif;
}

#main .eco-name {
    fill: #111;
    font-size: 16px;
    font-weight: 700;
    font-family: "Microsoft JhengHei", "Noto Sans TC", "PingFang TC", sans-serif;
}

#main .eco-arrow-wrap {
    flex: 0 0 auto;
    width: 148px;
}

#main .eco-arrow {
    background: #d3eeff;
    clip-path: polygon(0 0, 100% 0, 100% 78%, 50% 100%, 0 78%);
    padding: 14px 12px 56px;
    text-align: center;
}

#main .eco-arrow p {
    margin: 0;
    color: #222;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    font-family: "Microsoft JhengHei", "Noto Sans TC", "PingFang TC", sans-serif;
}

#main .eco-arrow-join {
    margin: 8px 0 0;
    color: #111;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    font-family: "Microsoft JhengHei", "Noto Sans TC", "PingFang TC", sans-serif;
}

#main .pathway {
    flex: none;
    min-width: 0;
    background: #d3eeff;
    border-radius: 10px;
    padding: 12px 12px 14px;
    margin: 0;
    font-family: "Microsoft JhengHei", "Noto Sans TC", "PingFang TC", sans-serif;
}

#main .pathway-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 8px;
    color: #111;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

#main .pathway-icon {
    width: 36px;
    height: 22px;
    flex: 0 0 auto;
}

#main .pathway-steps {
    display: flex;
    align-items: stretch;
    list-style: none;
    margin: 0;
    padding: 10px 2px 0;
}

#main .pathway-steps li {
    flex: 1 1 0;
    margin: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    min-height: 118px;
    min-width: 0;
}

#main .step-level,
#main .step-name,
#main .step-badge {
    color: #fff;
    font-weight: 700;
    line-height: 1.35;
}

#main .step-level {
    font-size: 16px;
    margin-bottom: 2px;
    white-space: nowrap;
}

#main .step-name {
    font-size: 13px;
    white-space: nowrap;
}

#main .step-1,
#main .step-2,
#main .step-3 {
    border: 4px solid #fff;
    border-radius: 14px 62px 62px 14px;
    min-height: 118px;
    width: auto;
    margin: 0;
    padding: 12px 14px;
}

#main .step-1 {
    z-index: 1;
    background: #127cbd;
    padding-right: 72px;
}

#main .pathway-steps li.step-2 {
    z-index: 2;
    background: #107589;
    margin-left: -86px;
    padding-left: 12px;
    padding-right: 72px;
}

#main .pathway-steps li.step-3 {
    z-index: 3;
    background: #3d4999;
    margin-left: -86px;
    padding-left: 18px;
    padding-right: 14px;
}

#main .pathway-steps li.step-2 .step-badge {
    right: 96px;
}

#main .step-badge {
    position: absolute;
    top: -12px;
    right: 10px;
    background: #fff;
    color: #3d4999;
    font-size: 15px;
    line-height: 1.2;
    border-radius: 999px;
    padding: 3px 10px;
    border: 2px solid #3d4999;
}

@media (max-width: 768px) {
    #main .table td:first-child {
        width: 35%;
    }

    #main .section {
        padding: 1rem;
        margin: 1rem 0;
    }

    #main h1 {
        font-size: 2em;
    }

    #main h2 {
        font-size: 1.5em;
    }

    #main table.schedule th,
    #main table.schedule td {
        padding: 6px 8px;
    }

    #main .advisors {
        grid-template-columns: 1fr;
    }

    #main .intro-row {
        flex-direction: column;
        align-items: stretch;
    }

    #main .flyer-col {
        flex: none;
        width: 100%;
        max-width: none;
    }

    #main .pathway-col,
    #main .pathway {
        width: 100%;
    }

    #main .pathway-eco {
        flex-direction: column;
        gap: 16px;
    }

    #main .pathway-eco .eco-wheel {
        width: min(100%, 340px);
    }

    #main .eco-arrow-wrap {
        width: 168px;
    }

    #main .pathway-title {
        font-size: 20px;
    }

    #main .pathway-icon {
        width: 44px;
        height: 28px;
    }

    #main .step-level {
        font-size: 20px;
    }

    #main .step-name {
        font-size: 16px;
    }

    #main .pathway-steps {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding-top: 8px;
    }

    #main .pathway-steps li.step-1,
    #main .pathway-steps li.step-2,
    #main .pathway-steps li.step-3 {
        flex: none;
        width: 100%;
        height: auto;
        margin: 0;
        min-height: 96px;
        padding: 16px 64px 16px 20px;
    }

    #main .pathway-steps li.step-3 {
        margin-top: 8px;
    }

    #main .pathway-steps li.step-2 .step-badge,
    #main .step-badge {
        top: -14px;
        right: 18px;
        font-size: 16px;
    }
}
