/* Modern Wikipedia-inspired styling with a fresh twist */
:root {
    --primary-color: #1a5f7a;          /* Deep teal */
    --secondary-color: #2c88a0;        /* Medium teal */
    --accent-color: #34ace0;           /* Bright teal */
    --text-color: #2d3436;             /* Dark slate */
    --text-secondary: #636e72;         /* Medium gray */
    --background-light: #f5f9fa;       /* Light teal tint */
    --border-color: #e3eef0;          /* Light teal gray */
    --success-color: #2ecc71;         /* Vibrant green */
    --card-background: #ffffff;        /* Pure white */
    --hover-color: #34ace0;           /* Bright teal */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-light);
}

/* Navigation */
.top-nav {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    z-index: 1000;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

.nav-right {
    display: flex;
    gap: 2rem;
}

.nav-right a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

.nav-right a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-right a:hover {
    color: var(--accent-color);
}

.nav-right a:hover::after {
    transform: scaleX(1);
}

/* Wiki Container */
.wiki-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 2rem 2rem;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

/* Side Navigation */
.side-nav {
    position: sticky;
    top: 5rem;
    height: fit-content;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.toc h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.toc ul {
    list-style: none;
}

.toc a {
    display: block;
    padding: 0.5rem 0;
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.2s ease;
}

.toc a:hover {
    color: var(--primary-color);
}

/* Main Content */
.content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.article-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.title-area h1 {
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.subtitle {
    color: #666;
    font-size: 1.1rem;
}

.metadata {
    margin-top: 1rem;
    display: flex;
    gap: 2rem;
    color: #666;
    font-size: 0.9rem;
}

.metadata i {
    margin-right: 0.5rem;
}

/* Sections */
.section {
    margin-bottom: 3rem;
}

.section h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.lead {
    font-size: 1.2rem;
    color: #444;
    margin-bottom: 1.5rem;
}

/* Info Box */
.info-box {
    background: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin: 1rem 0;
}

.info-box-header {
    background: var(--primary-color);
    color: var(--card-background);
    padding: 0.75rem 1rem;
    border-radius: 8px 8px 0 0;
    font-weight: 600;
}

.info-box-content {
    padding: 1rem;
}

.info-box-content ul {
    list-style: none;
}

.info-box-content li {
    margin-bottom: 0.5rem;
}

/* Formula Box */
.formula-box {
    background: var(--background-light);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    margin: 1.5rem 0;
}

.formula-content {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.5rem;
}

.fraction {
    display: inline-flex;
    flex-direction: column;
    text-align: center;
    padding: 0 0.5rem;
}

.numerator {
    border-bottom: 2px solid var(--text-color);
    padding: 0.5rem;
}

.denominator {
    padding: 0.5rem;
}

/* Calculator */
.calculator-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: linear-gradient(145deg, var(--card-background), var(--background-light));
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
}

.input-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 95, 122, 0.1);
}

.btn-calculate {
    width: 100%;
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-calculate:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

.btn-calculate:active {
    transform: translateY(0);
}

.result {
    display: none;
    margin-top: 2rem;
    text-align: center;
    padding: 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.result.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

.result.success {
    background-color: rgba(46, 204, 113, 0.1);
    border: 2px solid rgba(46, 204, 113, 0.2);
}

.result.info {
    background-color: var(--background-light);
    border: 2px solid var(--border-color);
}

.ntr-value {
    font-size: 3rem;
    font-weight: bold;
    color: #2ecc71;
    line-height: 1.2;
}

.ntr-label {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Use Cases */
.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.use-case-card {
    background: linear-gradient(145deg, var(--card-background), var(--background-light));
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.2s ease;
    border: 1px solid var(--border-color);
}

.use-case-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(52, 172, 224, 0.1);
}

.use-case-card i {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.use-case-card h3 {
    margin-bottom: 0.5rem;
}

/* Benefits */
.benefits-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.benefit-item {
    text-align: center;
    padding: 1.5rem;
}

.benefit-item i {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* Contact Form */
.contact-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background: linear-gradient(145deg, var(--card-background), var(--background-light));
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(44, 136, 160, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.btn-submit {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-submit:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit i {
    font-size: 1rem;
}

/* Footer */
.site-footer {
    background: white;
    padding: 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 1rem;
}

.footer-links a {
    color: #666;
    font-size: 1.5rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--accent-color);
}

/* Notifications */
.notification {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 6px;
    text-align: center;
    animation: slideDown 0.3s ease-out;
}

.notification.success {
    background-color: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.2);
}

@keyframes slideDown {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .wiki-container {
        grid-template-columns: 1fr;
    }

    .side-nav {
        display: none;
    }

    .nav-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-right {
        width: 100%;
        justify-content: space-around;
    }
}
