/* --- Root Variables & Body --- */
:root {
    --primary-blue: #0060f0; /* Strong blue from screenshot */
    --primary-orange: #f58320; /* Accent orange */
    --dark-blue-text: #1d3557;
    --light-text: #ffffff;
    --body-bg: #f7f8fa; /* Light background */
    --body-text: #4a4a4a;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    margin: 0;
    background-color: var(--body-bg);
    color: var(--body-text);
    line-height: 1.6;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* --- Hero Section (Header) --- */
.hero-section {
    background: linear-gradient(90deg, #0052d4, #4364f7, #6fb1fc); /* Blue gradient */
    color: var(--light-text);
    padding: 30px 20px 50px 20px; /* Adjusted padding */
    text-align: center;
}

/* --- Navigation inside Hero --- */
.hero-nav {
    max-width: 900px;
    margin: 0 auto 30px auto; /* Add space below nav */
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative; /* Added for mobile menu positioning */
}
.nav-logo a {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--light-text); /* Changed to white */
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}
.nav-logo a:hover {
    opacity: 1;
}
.nav-links {
    display: flex; /* This wrapper now handles the links */
}
.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}
.nav-menu li {
    margin-left: 25px;
}
.nav-menu a {
    font-family: 'Space Grotesk', sans-serif; 
    font-weight: 600;
    color: var(--light-text); /* Changed to white */
    text-decoration: none;
    font-size: 1rem;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}
.nav-menu a:hover {
    opacity: 1;
}

/* --- Burger Menu Button --- */
.burger-menu {
    display: none; /* Hidden on desktop */
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001; /* Above the mobile menu */
}
.burger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--light-text);
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

/* --- Hero Content & Form --- */
.hero-section h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 10px 0;
}
.hero-section p {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

form {
    display: flex;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}
input[type="text"] {
    flex-grow: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 6px 0 0 6px;
    font-size: 1rem;
    font-family: 'DM Sans', sans-serif;
}
input[type="submit"] {
    padding: 15px 25px;
    background-color: var(--primary-orange);
    color: var(--light-text);
    border: none;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    transition: background-color 0.2s ease;
}
input[type="submit"]:hover {
    background-color: #e07010;
}
input[type="submit"]:disabled {
    background-color: #aaa;
    cursor: not-allowed;
}

/* --- Main Content Container --- */
.container {
    max-width: 900px;
    margin: -30px auto 30px auto; /* Pulls content up over hero */
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

/* --- Error Styling --- */
.error {
    background-color: #ffebee;
    border: 1px solid #c62828;
    color: #c62828;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    font-family: 'DM Sans', sans-serif;
    /* Hidden by default */
    display: none;
}

/* --- Results Box Styling --- */
.results-box {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 25px 30px;
    /* Hidden by default */
    display: none;
}

.results-header {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    color: var(--dark-blue-text);
    font-weight: 600;
    margin-bottom: 25px;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.stat-item {
    background-color: var(--body-bg);
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 20px;
    text-align: center;
}

.stat-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 5px;
    text-transform: uppercase; /* Fixes 'k' to 'K' */
}

.stat-label {
    font-size: 0.9rem;
    color: #555;
    font-weight: 500;
    font-family: 'DM Sans', sans-serif; /* Added this for consistency */
}

/* --- Content Section Styling --- */
.content-section {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 25px 30px;
    margin-top: 30px; /* Add space above it */
}

.content-section h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    color: var(--dark-blue-text);
    font-weight: 600;
    margin-top: 10px;
    margin-bottom: 15px;
}

.content-section h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    color: #333;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 10px;
}

.content-section p {
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 15px;
    color: var(--body-text);
}

.content-section ul {
    padding-left: 20px;
    margin-top: 15px;
    margin-bottom: 20px;
}

.content-section li {
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 10px;
}

.content-section li strong {
    color: var(--dark-blue-text);
    font-weight: 700;
}

.content-section a {
    font-family: 'Space Grotesk', sans-serif; 
    font-weight: 600;
    color: var(--primary-blue);
    text-decoration: none; /* Looks cleaner */
    border-bottom: 1px dotted var(--primary-blue); /* Underline alternative */
    transition: color 0.2s ease;
}
.content-section a:hover {
    color: var(--dark-blue-text);
    border-bottom-color: var(--dark-blue-text);
}


/* --- Footer Styling --- */
.site-footer {
    padding: 25px 20px;
    margin-top: 40px;
    text-align: center;
}

.footer-container {
    max-width: 900px;
    margin: 0 auto;
}

.site-footer p {
    font-family: 'DM Sans', sans-serif;
    margin: 0;
    font-size: 0.9rem;
}


/* --- THIS IS THE FIX --- */
/* --- MOBILE RESPONSIVE STYLES --- */
@media (max-width: 768px) {

    .hero-section h1 {
        font-size: 2rem; /* Make heading smaller on mobile */
    }

    .burger-menu {
        display: block; /* Show the burger button */
    }

    .nav-links {
        display: none; /* Hide the nav links container by default */
        position: absolute;
        top: 60px; /* Position it below the nav bar */
        left: 0;
        right: 0;
        width: 100%;
        background: #fff; /* Give it a white background */
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        border-radius: 6px;
        z-index: 1000;
    }

    .nav-links.nav-active {
        display: block; /* This class will be toggled by JS to show the menu */
    }

    .nav-menu {
        flex-direction: column; /* Stack links vertically */
        width: 100%;
    }

    .nav-menu li {
        margin: 0;
        width: 100%;
    }

    .nav-menu a {
        color: var(--dark-blue-text); /* Change link color for white bg */
        padding: 15px 20px;
        display: block; /* Make link fill the whole space */
        width: 100%;
        box-sizing: border-box; /* Include padding in width */
        border-bottom: 1px solid #f0f0f0;
    }
    .nav-menu li:last-child a {
        border-bottom: none;
    }
    .nav-menu a:hover {
        color: var(--primary-blue);
        background: #f7f8fa;
    }
    
    /* Burger icon animation ('X') when active */
    .burger-menu.nav-active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .burger-menu.nav-active span:nth-child(2) {
        opacity: 0;
    }
    .burger-menu.nav-active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .nav-logo a {
        flex-shrink: 0; /* Don't allow the logo to shrink */
    }
}

/* --- NEW: API & Pricing Page Styling --- */

.pricing-box {
    background: var(--body-bg);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    margin: 30px auto;
    max-width: 400px;
}

.pricing-plan {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-blue);
    text-transform: uppercase;
}

.pricing-price {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--dark-blue-text);
    margin: 10px 0;
}

.pricing-details {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 20px;
}

.pricing-box p {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 25px;
}

.pricing-button {
    font-family: 'Space Grotesk', sans-serif;
    display: block;
    padding: 15px 20px;
    background-color: var(--primary-orange);
    color: var(--light-text);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.2s ease;
}
.pricing-button:hover {
    background-color: #e07010;
}

hr.api-divider {
    border: none;
    border-top: 1px solid #eee;
    margin: 40px 0;
}

pre, 
pre.endpoint {
    background: #1d3557; /* Dark blue */
    color: #f0f0f0;
    padding: 20px;
    border-radius: 6px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    overflow-x: auto; /* Allow horizontal scrolling for long lines */
    white-space: pre;
}

pre.endpoint {
    background: #f7f8fa;
    color: var(--dark-blue-text);
    border: 1px solid #e0e0e0;
}