/* General Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    color: #333;
}

.calculator-container,
.about-section,
.formula-section,
.faq-section,
.site-footer {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Header and Navigation */
.top-menu {
    background-color: #0056b3;
    color: #fff;
    padding: 10px 0;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.top-menu nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.top-menu nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 5px 10px;
    transition: background-color 0.3s ease;
}

.top-menu nav ul li a:hover {
    background-color: #004494;
    border-radius: 5px;
}

.language-selector {
    margin-top: 10px;
}

.language-selector select {
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ddd;
    background-color: #f9f9f9;
}

/* Calculator Section */
h1 {
    color: #0056b3;
    text-align: center;
    margin-bottom: 20px;
}

.calculator-container span {
    display: block;
    text-align: center;
    margin-bottom: 20px;
    color: #555;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.input-with-unit {
    display: flex;
    gap: 10px;
}

.input-with-unit input[type="number"] {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.input-with-unit select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    background-color: #f9f9f9;
}

.norm-display {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
    text-align: right;
}

button {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #0056b3;
}

.result-group {
    margin-top: 20px;
    text-align: center;
}

.result-group h3 {
    color: #0056b3;
    margin-bottom: 10px;
}

.result-group p {
    font-size: 24px;
    font-weight: bold;
    color: #28a745;
}

/* About Section */
.about-section h2,
.formula-section h2,
.faq-section h2 {
    color: #0056b3;
    margin-top: 30px;
    margin-bottom: 15px;
    text-align: center;
}

.about-section p {
    line-height: 1.6;
    margin-bottom: 10px;
    text-align: justify;
}

/* Formula Section */
.formula-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.formula-box {
    background-color: #e9f7ef;
    border: 1px solid #28a745;
    border-left: 5px solid #28a745;
    padding: 15px;
    border-radius: 5px;
}

.formula-math {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.1em;
    color: #0056b3;
    display: block;
    margin-top: 5px;
}

.formula-note {
    font-size: 0.9em;
    color: #666;
    text-align: center;
    margin-top: 15px;
}

/* FAQ Section */
.faq-item {
    background-color: #f0f8ff;
    border: 1px solid #cce5ff;
    border-radius: 5px;
    margin-bottom: 10px;
    padding: 15px;
}

.faq-question {
    color: #0056b3;
    cursor: pointer;
    margin: 0;
    font-size: 1.1em;
}

.faq-answer {
    margin-top: 10px;
    padding-left: 15px;
    border-left: 3px solid #007bff;
    color: #555;
    display: none; /* Hidden by default */
}

.faq-item.active .faq-answer {
    display: block; /* Shown when active */
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 20px;
    margin-top: 30px;
    color: #4a5a6a;
    font-size: 0.9em;
    border-top: 1px solid #eee;
}

.site-footer a {
    color: #0056b3;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .top-menu nav ul {
        flex-direction: column;
        gap: 10px;
    }

    .top-menu nav ul li a {
        padding: 10px;
        display: block;
    }

    .language-selector {
        margin-top: 15px;
    }
}

@media (max-width: 480px) {
    .calculator-container,
    .about-section,
    .formula-section,
    .faq-section,
    .site-footer {
        margin: 10px auto;
        padding: 15px;
    }

    .input-with-unit {
        flex-direction: column;
        gap: 5px;
    }

    .input-with-unit select {
        width: 100%;
    }

    button {
        font-size: 16px;
    }

    .result-group p {
        font-size: 20px;
    }

    .formula-box {
        padding: 10px;
    }

    .faq-question {
        font-size: 1em;
    }

    .faq-answer {
        padding-left: 10px;
    }
} 