/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    background-color: #f5f6f5;
}

/* Container */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
header {
    background: #fff;
    color: #002157;
    padding: 10px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-family: Arial, Helvetica, sans-serif;
    transition: transform 0.3s ease;
}

header.hidden {
    transform: translateY(-100%);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo {
    height: 60px;
}

header .nav-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

header .main-nav ul {
    list-style: none;
    display: flex;
    gap: 15px;
}

header .main-nav a {
    color: #002157;
    text-decoration: none;
    font-size: 14px;
    padding: 5px 12px; /* Adjusted for wider Chinese text */
    transition: background 0.2s;
    display: inline-block;
}

header .main-nav a:hover {
    background: #e0e0e0;
    border-radius: 3px;
}

/* Multilingual Menu Items */
.nav-item {
    display: none;
}

.nav-item.active {
    display: inline;
}

.lang-switcher {
    display: flex;
    gap: 10px;
}

.lang-switcher button {
    background: #f5f6f5;
    color: #002157;
    border: 1px solid #002157;
    padding: 5px 10px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 3px;
    font-family: Arial, Helvetica, sans-serif;
}

.lang-switcher button.active {
    background: #002157;
    color: #fff;
}

.lang-switcher button:hover {
    background: #e0e0e0;
}

.menu-toggle {
    display: none;
    background: #002157;
    color: #fff;
    border: none;
    padding: 8px 12px;
    font-size: 18px;
    cursor: pointer;
    border-radius: 3px;
    font-family: Arial, Helvetica, sans-serif;
}

/* Maintenance Notice */
.maintenance-notice {
    display: none;
    position: fixed;
    top: 80px;
    width: 100%;
    background: #fff3cd;
    border-bottom: 2px solid #dc3545;
    z-index: 999;
    font-family: Arial, Helvetica, sans-serif;
    text-align: center;
    padding: 10px 40px 10px 20px;
    /* NEW: Add transition for smooth hiding */
    transition: transform 0.3s ease;
}

/* NEW: Logic to hide the notice off-screen */
.maintenance-notice.hidden {
    transform: translateY(-250px); /* Move way up to clear screen */
}

.maintenance-notice-active {
    display: block;
}

.maintenance-notice .notice-content {
    display: none;
}

.maintenance-notice .notice-content.active {
    display: block;
}

.maintenance-notice p {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.maintenance-notice p strong {
    color: #dc3545;
}

.close-notice {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #dc3545;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    padding: 5px;
}

.close-notice:hover {
    color: #a71d2a;
}

/* Main Content */
main {
    transition: margin-top 0.3s ease;
}

main.notice-active {
    margin-top: 120px; /* Adjust for notice height */
}

/* Main Sections */
.section {
    padding: 80px 0;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 80px;
    font-family: Arial, Helvetica, sans-serif;
}

.section-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: transparent;
}

.left-image {
    flex-direction: row;
}

.right-image {
    flex-direction: row-reverse;
}

.section-image {
    width: 300px;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.text-content {
    flex: 1;
}

.section h1 {
    font-size: 24px;
    font-weight: bold;
    color: #002157;
    margin-bottom: 20px;
}

.section h2 {
    font-size: 18px;
    font-weight: bold;
    margin: 15px 0 10px;
}

.section p {
    margin-bottom: 15px;
}

.section ul {
    list-style: disc;
    margin: 15px 0;
    padding-left: 25px;
}

.section ul ul {
    list-style: circle;
    padding-left: 20px;
}

.section a {
    color: #002157;
    text-decoration: none;
}

.section a:hover {
    text-decoration: underline;
}

/* Accordion Styling for Setup Section */
.accordion {
    margin: 10px 0;
    background-color: #f5f6f5;
    border-radius: 5px;
    font-family: Arial, Helvetica, sans-serif;
}

.accordion summary {
    padding: 10px;
    font-size: 16px;
    font-weight: bold;
    color: #002157;
    cursor: pointer;
    outline: none;
    background: transparent;
    transition: background-color 0.3s ease;
    list-style: none;
}

.accordion summary::-webkit-details-marker {
    display: none;
}

.accordion summary::-moz-list-bullet {
    display: none;
}

.accordion summary:hover {
    background-color: #e0e0e0;
}

.accordion summary::before {
    content: '▶ ';
    display: inline-block;
    font-size: 12px;
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.accordion[open] summary::before {
    transform: rotate(90deg);
}

.accordion[open] summary {
    background-color: #002157;
    color: white;
}

.accordion p, .accordion ul {
    padding: 0 10px 10px 10px;
    margin: 0;
    color: #333;
}

.accordion ul {
    padding-left: 20px;
    margin-left: 10px;
    list-style-position: outside;
}

.accordion ul li {
    margin: 5px 0;
}

.accordion ul li a {
    color: #002157;
    text-decoration: none;
    transition: color 0.3s ease;
}

.accordion ul li a:hover {
    color: #005566;
    text-decoration: underline;
}

/* Footer */
footer {
    background: #002157;
    color: #fff;
    padding: 20px 0;
    font-size: 14px;
    font-family: Arial, Helvetica, sans-serif;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.footer-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left {
    flex: 1;
    text-align: left;
    line-height: 1.5;
}

.footer-nav {
    flex: 1;
    text-align: center;
}

.footer-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 0;
    padding: 0;
}

.footer-nav a {
    color: #fff;
    text-decoration: none;
    line-height: 1.5;
}

.footer-nav a:hover {
    text-decoration: underline;
}

.footer-right {
    flex: 1;
    text-align: right;
    line-height: 1.5;
}

.footer-right p {
    margin: 0;
}

footer a {
    color: #fff;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    header .container {
        flex-direction: row;
        align-items: center;
        padding: 10px;
    }

    .menu-toggle {
        display: block;
        /* Keep Z-Index high just in case */
        position: relative;
        z-index: 9999 !important;
    }

    .nav-container {
        display: none;
        flex-direction: column;
        gap: 10px;
        width: 100%;
        position: absolute;
        top: 80px;
        left: 0;
        background: #fff;
        padding: 10px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        z-index: 1001;
    }

    .nav-container.active {
        display: flex;
    }

    .maintenance-notice {
        top: 70px; /* Adjust for smaller header */
        padding: 8px 30px 8px 15px;
        font-size: 14px;
    }

    main.notice-active {
        margin-top: 100px; /* Adjust for notice height on mobile */
    }

    header .main-nav ul {
        flex-direction: column;
        align-items: center;
    }

    header .main-nav a {
        font-size: 16px;
        padding: 8px 15px; /* Adjusted for mobile */
    }

    .lang-switcher {
        justify-content: center;
    }

    header .logo {
        height: 50px;
    }

    .section {
        padding: 60px 15px;
        margin-top: 80px;
    }

    .section-content {
        flex-direction: column;
    }

    .section-image {
        width: 100%;
        height: auto;
        max-width: 300px;
        margin: 0 auto 20px auto;
    }

    .section h1 {
        font-size: 20px;
    }

    .section h2 {
        font-size: 16px;
    }

    footer .container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .footer-left,
    .footer-nav,
    .footer-right {
        flex: none;
        text-align: center;
        width: 100%;
    }

    .footer-nav ul {
        flex-direction: column;
        gap: 10px;
    }

    .footer-right {
        margin-top: 0;
    }
}

/* Larger Screens */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
        padding: 0 20px;
    }
}