/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif, 'Microsoft YaHei'; /* Added common Chinese font */
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensure footer stays at bottom */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

header h1 a {
    color: #007bff;
    text-decoration: none;
    font-size: 1.8rem;
}

.nav-menu ul {
    list-style: none;
    display: flex;
}

.nav-menu li {
    margin-left: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    transition: color 0.3s ease;
    position: relative; /* For active indicator */
}

.nav-menu a:hover {
    color: #007bff;
}

.nav-menu a.active {
    color: #007bff;
}
/* Optional: Add an underline indicator for active link */
/* .nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #007bff;
} */


.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
}

/* Main Content */
main {
    flex: 1; /* Push footer to bottom */
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 5rem 0;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.download-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary { background-color: #007bff; color: white; }
.btn-secondary { background-color: #28a745; color: white; }
.btn-tertiary { background-color: #ffc107; color: black; }

/* Stats Section */
.stats {
    background-color: #007bff;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.stat-item h3 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.stat-item p { margin: 0; opacity: 0.9; }

/* Features Section */
.features {
    padding: 4rem 0;
    background-color: white;
}

.features h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #007bff;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-item {
    background-color: #f9f9f9;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-item h3 {
    margin-bottom: 1rem;
    color: #007bff;
}

/* News Section */
.news {
    padding: 4rem 0;
    background-color: #f4f4f4;
}

.news h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #007bff;
}

.news-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.news-item {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.news-item h3 a {
    color: #007bff;
    text-decoration: none;
    font-size: 1.3rem;
    display: block; /* Make entire area clickable */
}

.news-item h3 a:hover {
    text-decoration: underline;
}

.news-item p {
    margin: 0.5rem 0 1rem 0;
    color: #666;
}

.news-item .date {
    display: block;
    color: #999;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Testimonials Section */
.testimonials {
    padding: 4rem 0;
    background-color: white;
}

.testimonials h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #007bff;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-item {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-style: italic;
}

.testimonial-item p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.testimonial-item span {
    display: block;
    text-align: right;
    font-weight: bold;
    color: #007bff;
}

/* Page Content (for inner pages) */
.page-content {
    padding: 4rem 0;
    background-color: white;
    flex: 1;
}

.page-content .container h2 {
    margin-bottom: 2rem;
    font-size: 2rem;
    color: #007bff;
}

.page-content .container h3 {
    margin: 1.5rem 0 0.5rem 0;
    color: #0056b3;
}

.page-content .container h4 {
    margin: 1.2rem 0 0.5rem 0;
    color: #007bff;
}

.page-content .container p,
.page-content .container ul,
.page-content .container ol,
.page-content .container code {
    margin-bottom: 1rem;
}

.page-content .container ul li,
.page-content .container ol li {
    margin-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.page-content .container code {
    background-color: #f4f4f4;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.95em;
}

/* Tutorial-specific styles */
.tutorial-steps ol {
    counter-reset: step-counter;
    padding-left: 0;
}

.tutorial-steps li {
    counter-increment: step-counter;
    margin-bottom: 1.5rem;
    list-style: none;
    position: relative;
    padding-left: 2.5rem;
}

.tutorial-steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    background-color: #007bff;
    color: white;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.tutorial-steps img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 1rem 0;
}

/* FAQ-specific styles */
.faq-item {
    margin-bottom: 1.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.faq-question {
    background-color: #f8f9fa;
    padding: 1rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-answer {
    padding: 0 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    background-color: white;
}

.faq-answer.open {
    padding: 1rem;
    max-height: 500px; /* Adjust as needed */
}

.faq-icon {
    font-size: 1.2rem;
}

/* Download-specific styles */
.download-platform {
    margin-bottom: 3rem;
    padding: 1.5rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: white;
}

.download-platform h3 {
    margin-top: 0;
    color: #007bff;
}

.download-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    margin-right: 1rem;
    margin-bottom: 0.5rem;
}

.download-link:hover {
    background-color: #0056b3;
}

.download-notes {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #666;
}

/* Introduction-specific styles */
.intro-highlights {
    background-color: #f8f9fa;
    padding: 2rem 0;
    margin: 2rem 0;
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.highlight-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.highlight-card h4 {
    color: #007bff;
    margin-bottom: 0.5rem;
}

.protocol-support {
    margin: 2rem 0;
}

.protocol-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    text-align: center;
}

.protocol-item {
    background-color: #e9ecef;
    padding: 1rem;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

.protocol-item:hover {
    background-color: #dae0e5;
}

/* Privacy-specific styles */
.privacy-policy {
    line-height: 1.8;
}
.privacy-policy p,
.privacy-policy li {
    margin-bottom: 1rem;
}
.privacy-policy h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: #0056b3;
}
.disclaimer-box {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    padding: 1rem;
    margin: 1.5rem 0;
    font-size: 0.95em;
}

/* Airports-specific styles */
.airports-intro {
    background-color: #e9f7ef;
    border: 1px solid #a3d9b1;
    border-radius: 5px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.airports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.airport-card {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.airport-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.airport-header {
    background-color: #007bff;
    color: white;
    padding: 1rem;
}

.airport-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.airport-body {
    padding: 1.5rem;
    flex-grow: 1; /* Push link to bottom */
}

.airport-features {
    list-style: none;
    padding: 0;
}

.airport-features li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.airport-features li::before {
    content: "✓";
    color: green;
    margin-right: 0.5rem;
}

.airport-link {
    display: block;
    width: 100%;
    padding: 0.8rem;
    background-color: #28a745;
    color: white;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    border-radius: 0 0 8px 8px; /* Rounded bottom corners */
    margin-top: auto; /* Push link to bottom of card */
    margin-top: 1rem;
}

.airport-link:hover {
    background-color: #218838;
}

.warning-box {
    background-color: #fdeded;
    border: 1px solid #f1a5a5;
    border-radius: 5px;
    padding: 1rem;
    margin: 1.5rem 0;
    font-size: 0.95em;
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    padding: 2rem 0 1rem;
    margin-top: auto; /* Push footer to bottom */
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 1rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: #007bff;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #007bff;
}

.copyright {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #555;
    text-align: center;
    width: 100%;
    color: #aaa;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu ul {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: white;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        z-index: 99; /* Ensure menu appears over other content */
    }

    .nav-menu ul.show {
        display: flex;
    }

    .nav-menu li {
        margin: 0;
        border-bottom: 1px solid #eee;
    }

    .nav-menu a {
        display: block;
        padding: 1rem 2rem;
    }

    .nav-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .download-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 80%;
        max-width: 300px;
        margin-bottom: 0.5rem;
    }

    .feature-grid,
    .news-list,
    .testimonial-grid,
    .highlights-grid,
    .airports-grid {
        grid-template-columns: 1fr; /* Stack items on smaller screens */
    }

    .stats-grid {
        grid-template-columns: 1fr; /* Stack stats on smaller screens */
    }

    .download-platform {
        padding: 1rem;
    }

    .download-link {
        display: block;
        margin-bottom: 0.5rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    header .container {
        padding: 0.8rem 15px;
    }

    .hero {
        padding: 3rem 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .container {
        padding: 0 15px;
    }

    .page-content {
        padding: 2rem 0;
    }

    .page-content .container h2 {
        font-size: 1.8rem;
    }
}