* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: '微軟正黑體';
}
a {
    text-decoration: none;
}
header {
    text-align: center;
    background-color: #ececec;
}
.logo img{
    transform: scale(0.7);
}
nav {
    background-color: #1d1d1d;
    padding: 8px 0;
}
nav ul {
    display: flex;
    gap: 20px;
    justify-content: center;
}
nav ul li {
    list-style: none;
}
li a {
    color: #FFF;
    transition: all 0.2s ease-in;
    border-bottom: 2px solid transparent; /* 預設為透明 */
}
li a:link {
    color: #FFF;
}
li a:hover {
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}
main {
    position: relative;
    max-width: 850px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    background-color: rgba(46, 112, 75, 0.2)
}
.cover {
    z-index: 99;
    width: 100%;
    aspect-ratio: 850 / 585; /* 或直接填 16 / 9, 4 / 3 等比例 */
    background-image: url(https://www.1111edu.com.tw/edm/edu/ETG_MB_20250408/images/cover-bg.jpg);
    background-size: cover;
    background-position: center;
    color: #FFF;
    padding: 100px 50px;
    display: flex;
    flex-direction: column;
    align-items: flex-end; 
    gap: 50px;
    transition: all 0.1s ease-in;
}
.cover:link,
.cover:visited {
    opacity: 1;
}

.cover:hover,
.cover:active {
    opacity: 0.95;
}
.cover h1{
    font-size: 30px;
    text-align: end;
    text-decoration: underline 2px solid;
    text-underline-offset: 7px;      /* 調整底線與文字的距離 */
    margin-top: 20px;
    line-height: 1.5;
}
.cover h3 {
    font-weight: 500;
    font-size: 16px;
    word-break: break-all;
    max-width: 225px;
    text-align: right;
}
.content {
    width: 100%;
    background-image: url(https://www.1111edu.com.tw/edm/edu/ETG_MB_20250408/images/main-bg.jpg);
    padding: 50px 8% 0px 8%; 
}
.content .title {
    font-family: 'Noto Serif HK';
    display: flex;
    align-items: center;
}
.title span {
    display: inline-block;
    font-size: 36px;
    line-height: 36px;
    font-weight: 600;
    color: #2E704B;
    border: #2E704B 1px solid;
    padding: 3px;
    padding-bottom: 4px;
}
.course-card {
    font-family: 'Noto Sans TC';
    display: flex;
    margin: 30px 0px 40px 0;
    gap: 30px;
    /* align-items: center; */
}
.reverse {
    flex-direction: row-reverse;
}
.course-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.course-sort {
    display: flex;
    color: #065D82;
    line-height: 1;
    align-items: flex-start;
    gap: 10px;
}
.course-sort .no {
    font-size: 42px;
    font-weight: 800;
    border-bottom: 2px #065D82 solid;
    padding-bottom: 3px;
}
.course-sort .ono {
    font-weight: 600;
    padding-top: 5px;
    letter-spacing: 0.5px;
}
.course-title {
    position: relative;
    left: -16px;
    font-size: 24px;
    font-weight: 500;
    letter-spacing: 1px;
    background-color: #ffffff7e;
    display: inline-block;
    border-radius: 50px;
    padding: 5px 20px;
    align-self: flex-start;
    text-align: justify;
}
.course-describe {
    color: #034D24;
    text-align: justify;
}
.course-info ul {
    line-height: 1.2;
    list-style-position: inside;
}
.course-info ul li {
    list-style: none;
    line-height: 1.1rem;
    font-size: 14px;
    margin-bottom: 8px;
    text-align: justify;
    position: relative;
    padding-left: 1rem;
}
.course-info ul li:last-child {
    margin-bottom: 0;
}
.course-info ul li::before {
    position: absolute;
    content: "◆";
    display: inline-block;
    font-size: 12px;
    left: 0;
}
.course-sidebar {
    flex: 0 0 250px;
}
.course-sidebar img {
    border-radius: 15px;
    margin-bottom: 8px;
}
.signUp-btn {
    background-color: #FFBB00;
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #000;
    border-radius: 15px;
    padding: 6px 0;
    transition: all 0.2s ease-in;
    box-shadow: 0 0px 8px rgba(0, 0, 0, 0.1);
}
.signUp-btn:hover {
    background-color: #ecad00;
}
.back-cover {
    position: relative;
    width: 100%;
}
.back-cover img{
    width: 100%;
}
.more-btn {
    position: absolute;
    background-color: #065D82;
    padding: 8px 20px 8px 30px;
    border-radius: 50px;
    color: #FFF;
    display: flex;
    align-items: center;
    gap: 15px;
    letter-spacing: 2px;
    bottom: 10%;
    left: 20%;
    cursor: pointer;
    transition: all 0.2s ease;
}
.more-btn:hover {
    background-color: #013f5a;
}
footer {
    position: relative;
    top: -5px;
    background-color: #CCC;
}
.social-links {
    display: flex;
    gap: 20px;
    background-color: #000;
    color: #FFF;
    font-size: 14px;
    letter-spacing: 2px;
    justify-content: center;
    padding: 0 30%;
}

.social-link {
    text-align: center;
    padding: 15px 0;
    flex: 1;
}
.social-link svg, p {
    transition: all 0.1s ease-in;
}
.social-link p {
    margin-top: 8px;
    color: #FFF;
}
.social-link:hover p{
    color: #ccc;
}
.social-link:hover svg path {
    fill: #ccc;
}
.company-info {
    background-color: #ececec;
    padding: 20px;
    text-align: center;
    font-size: 13px;
    letter-spacing: 2px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.company-info p a {
    color: #12389A;
    font-weight: 600;
}

/* RWD start*/
@media (max-width: 768px) {
    main {
        width: 100%;
    }
    .cover {
        padding: 100px 50px;
    }
    .content {
        padding: 20px 6% 0 6%;
    }
    .social-links {
        padding: 0 15%;
    }
}

@media (max-width: 430px) {
    .cover {
        width: 100%;
        background-size: cover;
        padding: 45px 25px;
        background-image: url(https://www.1111edu.com.tw/edm/edu/ETG_MB_20250408/images/cover-bg.jpg);
        display: inline-block;
        /* gap: 25px; */
    }
    .cover h1 {
        font-size: 22px;
    }
    .cover h3 {
        font-size: 14px;
        max-width: 200px;
    }
    .content {
        padding: 20px 15% 0 15%;
    }
    .content .title {
        justify-content: center;
    }
    .title span {
        font-size: 24px;
        line-height: 24px;
    }
    .content {
        background-image: url(https://www.1111edu.com.tw/edm/edu/ETG_MB_20250408/images/main-bg-m.jpg);
    }
    .course-card {
        flex-direction: column;
        gap: 0;
    }
    .course-title {
        font-size: 18px;
    }
    .social-links {
        padding: 0 5%;
    }
    .more-btn {
        padding: 6px 10px 6px 15px;
        font-size: 12px;
        left: 13%;
        gap: 10px;
    }
    .course-info {
        gap: 8px;
    }
    .social-link p {
        font-size: 13px;
    }
    .course-sidebar {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .course-sidebar img {
        transform: scale(0.8);
        margin-bottom: 0;
    }
    .signUp-btn {
        width: 70%;
    }
}