:root {
    /* BioSync Brand Colors */
    --primary-navy: #0d2c54; /* Navy Blue from logo text/flask bottom */
    --primary-green: #6db33f; /* Green from logo top */
    --primary-teal: #0d2c54; /* Keeping variable name but mapping to Navy for backward compat/primary use */
    --primary-teal-light: #6db33f; /* Mapping light teal to Green */

    --secondary-gray: #f4f6f8; /* Softer gray */
    --text-dark: #333333;
    --text-light: #555555;
    --white: #FFFFFF;
    --code-bg: #282c34;
    --header-height: 80px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--white);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Header & Nav */
header {
    background-color: var(--white);
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.nav-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-navy);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-green);
}

.lang-toggle-btn {
    background: none;
    border: 2px solid var(--primary-green);
    color: var(--primary-green);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.lang-toggle-btn:hover {
    background-color: var(--primary-green);
    color: var(--white);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: var(--primary-navy);
    border-radius: 10px;
    transition: all 0.3s linear;
}

/* Main Content */
main {
    width: 90%;
    max-width: 1200px;
    margin: 2rem auto;
    padding-bottom: 4rem;
    min-height: calc(100vh - var(--header-height) - 100px);
}

section {
    margin-bottom: 3rem;
}

h1, h2, h3 {
    color: var(--primary-navy);
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; border-bottom: 2px solid var(--secondary-gray); padding-bottom: 0.5rem; color: var(--primary-navy); }
h2 { font-size: 2rem; margin-top: 2rem; color: var(--primary-navy); }
h3 { font-size: 1.5rem; margin-top: 1.5rem; color: var(--primary-navy); }

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

/* Introduction Cards */
.intro-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    border-left: 5px solid var(--primary-green);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}

/* AP to WiFi Flow */
.step-list {
    list-style: none;
    counter-reset: step;
}

.step-list li {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 1.5rem;
}

.step-list li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 2rem;
    height: 2rem;
    background-color: var(--primary-green);
    color: var(--white);
    text-align: center;
    line-height: 2rem;
    border-radius: 50%;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* API Documentation */
.endpoint {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.endpoint-header {
    background: var(--secondary-gray);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid #ddd;
}

.method {
    font-weight: bold;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    color: white;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.get { background-color: #61affe; }
.post { background-color: #49cc90; }

.url {
    font-family: monospace;
    font-size: 1.1rem;
    color: #333;
}

.endpoint-body {
    padding: 1.5rem;
}

.params-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.params-table th, .params-table td {
    text-align: left;
    padding: 0.8rem;
    border-bottom: 1px solid #eee;
}

.params-table th {
    color: var(--primary-navy);
}

/* Code Blocks */
pre {
    background: var(--code-bg);
    color: #f8f8f2;
    border-radius: 6px;
    padding: 1rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
}

/* Tabbed Code Examples */
.tabs {
    margin-top: 1rem;
}

.tab-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.tab-btn {
    background: #e0e0e0;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.9rem;
}

.tab-btn.active {
    background: var(--primary-navy);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Automation Guide */
.script-card {
    background: #f9f9f9;
    border: 1px solid #eee;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.platform-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: var(--text-dark);
    color: white;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

footer {
    background-color: var(--text-dark);
    color: var(--white);
    padding: 2rem;
    text-align: center;
    margin-top: auto;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        height: var(--header-height);
        padding: 0;
        overflow: visible; /* Ensure dropdown is visible */
    }

    .nav-container {
        flex-direction: row; /* Keep logo and hamburger side by side */
        justify-content: space-between;
        height: 100%;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: var(--white);
        border-bottom: 1px solid #e0e0e0;
        padding: 1rem 0;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        text-align: center;
        gap: 1.5rem;
    }

    .nav-links.active {
        display: flex;
    }
}
