/* Dark Mode Styles with Orange Accents */
:root {
    --background-color: #1a1a1a;
    --text-color: #e0e0e0;
    --secondary-text-color: #bdbdbd;
    --primary-color: #64b5f6;
    --primary-hover-color: #42a5f5;
    --secondary-color: #9e9e9e;
    --accent-color-orange: #ffb74d;
    --accent-color-orange-hover: #ffc78d;
    --focus-color-orange: #ffcc80;
    --border-color: #424242;
    --card-background: #292929;
    --error-color: #e57373;
    --success-color: #81c784;
    --input-background: #333333;
    --input-color: #e0e0e0;
    --box-shadow-color: rgba(0, 0, 0, 0.3);
    --header-background: #292929;
    --hero-background-start: #37474F;
    --hero-background-end: #263238;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans TC', sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    line-height: 1.6;
    background: var(--background-color);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

h1,
h3 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-color);
}

h2 {
    color: #ffb74d;
    margin-top: 1rem;
}


a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-hover-color);
}

/* Header Styles */
header {
    background: var(--header-background);
    padding: 1rem 0;
    box-shadow: 0 2px 4px var(--box-shadow-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Modified CSS for Logo and Header Title*/
header .container {
    display: flex;
    /* Enable flexbox */
    align-items: center;
    /* Vertically center items */
    justify-content: space-between;
    /* Space items on the same line */
}

header h1.logo-title {
    margin-left: 50;
    font-size: 1.7rem;
    display: flex;
    /* Use flex to align logo and text */
    align-items: center;
    /* Align vertically */
}

header header h1.logo-title .logo-img {
    height: 50px;
    width: auto;
    max-width: 100%;
    display: block;
    margin-right: 10px;
}

header h1 {
    margin: 0;
    font-size: 1.7rem;
}

header h1 img {
    width: 20%;
    height: 20%;
    position: relative;
    /* Enables top and bottom positioning */
    top: 10px;
    /* Move the image 10px down */
}

header nav a {
    margin-left: 1.5rem;
    padding: 0.5rem 0;
}

/* Orange accent for header navigation item */
header nav a.orange-menu:hover {
    background-color: var(--accent-color-orange);
    color: #1a1a1a;
    border-radius: 4px;
    padding: 0.5rem;
}

/* Orange accent border for header navigation item */
header nav a.orange-menu-border {
    border: 1px solid var(--accent-color-orange);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    transition: border 0.2s ease-in-out;
}

header nav a.orange-menu-border:hover {
    border: 1px solid var(--accent-color-orange-hover);
    background: var(--accent-color-orange);
    color: var(--text-color);
}

.floating-year {
    text-align: left;
    position: relative;
    top: -20px;
    /* Adjust this value to position it vertically */
    right: -80px;
    /* Adjust this value to position it horizontally */
    font-size: 40px;
    /* Adjust the size of the text */
    font-weight: bold;
    color: #e19327;
    /* Change the color as desired */
    /* z-index: 1000; /* Ensures it stays on top of other elements */
    transform: rotate(-8deg);
}


/* Hero Section Styles */
.hero {
    background: linear-gradient(135deg, var(--hero-background-start), var(--hero-background-end));
    padding: 1rem 0;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    text-shadow: 1px 1px 2px var(--box-shadow-color);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--secondary-text-color);
}

/* Button Styles */
.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: var(--text-color);
    border-radius: 5px;
    transition: background 0.3s ease;
    box-shadow: 0 2px 4px var(--box-shadow-color);
}

.button:hover {
    background: var(--accent-color-orange);
    /* Orange background on hover*/
    color: #1a1a1a;
}

/* Click to jump over sections*/
#target {
    scroll-margin-top: 60px;
    /* Adjust according to header height */
}

#courseType {
    scroll-margin-top: 120px;
    /* Same adjustment for another target */
}

#courses {
    scroll-margin-top: 60px;
    /* Same adjustment for another target */
}

#about {
    scroll-margin-top: 60px;
    /* Same adjustment for another target */
}

/* Section Styles */
.about,
.application,
.target,
.courseType,
.contact,
.courses {
    padding: 4rem 0;
}


.about,
.target,
.contact {
    background-color: var(--card-background);
    border-bottom: 1px solid var(--border-color);

}

.courses {
    background-color: #252525;
}

.courses h2 {

    /*margin-bottom: 2rem;    */
    margin-top: 2rem;
    color: #ffb74d;
}

/* About Section Image Styles */
.about-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.about-text {
    flex: 1 1 60%;
    padding-right: 20px;
}

.about-image {
    flex: 1 1 30%;
}

.about-image img,
.rounded-img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--box-shadow-color);
}

/* Course Section Styles */
.course {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--card-background);
    box-shadow: 0 4px 8px var(--box-shadow-color);
}

.course-content {
    flex: 1 1 50%;
    padding: 2%;
    box-sizing: border-box;
}

.course-video {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 415px;
    text-align: center;
    padding: 2%;
}




/* Link Decoration */
section a {
    text-decoration: underline;
    color: var(--primary-color);
}

section a:hover {
    color: var(--primary-hover-color);
    text-decoration-color: var(--accent-color-orange);
    /*Underline with accent color on hover*/
}

/* Footer Styles */
footer {
    background: #343a40;
    color: #555;
    padding: 1rem 0;
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: left;
}

footer p {
    margin: 0;
    font-size: 0.9rem;
    color: #9e9e9e;
}

#web-counter {
    display: none;
}

span#copyright:hover span#web-counter {
    display: block;
}

ul,
ol {
    list-style-type: none;
    padding-left: 0;
}

footer ul,
footer ol {
    color: #9e9e9e;
}


.styled-table {
    color: white;
    width: 60%;
    border-collapse: collapse;
}

.styled-table tr {
    border-bottom: 1px solid white;
    /* Set the color and thickness of the line */
}

/* Responsive design */
@media (max-width: 768px) {

    .courses .course {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        /* 讓左右兩側等高 */
    }

    .course-content,
    .course-video {
        flex: 1 1 50%;
    }

    .styled-table {
        width: 100%;
        border-collapse: collapse;
    }

    header .container {
        flex-direction: column;
        text-align: center;
    }

    header nav {
        margin-top: 1rem;
    }

    header nav a {
        margin: 0 10px;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .about-container {
        flex-direction: column;
    }

    .about-text {
        padding-right: 0;
        text-align: center;
    }

    .about-image {
        flex: 1 1 50%;
        margin-top: 20px;
    }


    .courses .course {
        display: flex;
        flex-direction: column;
        padding: 2%;
    }

    .course-content {
        text-align: left;
    }

    .course-video {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 415px;
        text-align: center;
    }

    .course-video img {
        max-width: 100%;
        height: auto;
        margin: 0 auto;
        display: block;
    }

    /* Your existing styles here */
    .course-details {
        overflow: hidden;
        transition: height 0.3s ease-in-out;
        /* Added for smooth animation */
    }
}

/* Accent Color on Button */
.orange-accent-button {
    background-color: var(--accent-color-orange);
    color: var(--text-color);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    transition: background 0.3s ease;
    box-shadow: 0 2px 4px var(--box-shadow-color);
    display: inline-block;
}

.orange-accent-button:hover {
    background-color: var(--accent-color-orange-hover);
}

/*Progress bar example*/
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #424242;
    /*Dark grey background*/
    border-radius: 4px;
    margin-bottom: 1rem;
}

.progress-bar-fill {
    background-color: var(--accent-color-orange);
    height: 100%;
    border-radius: 4px;
    width: 50%;
    /* Example width (you can adjust to display loading progress)*/
    transition: width 0.5s ease;
    /*Smooth animation for loading progress */
}

/* Highlight Text */
.highlight-orange {
    background-color: rgba(255, 183, 77, 0.1);
    padding: 0.2em 0.4em;
    border-radius: 2px;
}