/* General Body and Container Styles */
/* Removed @import url for Google Fonts */

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; /* System font stack */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
    background: #f0f2f5;
    margin: 0;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 80px;
}

.container {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    width: 960px;
    max-width: 98%;
    margin-top: 40px;
    text-align: left;
    border-top: 3px solid #e3eafc;
    margin-bottom: 40px; /* Add margin to bottom to separate from footer */
}

.container h1 {
    color: #1a73e8;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    letter-spacing: 0.8px;
}

.container h2 {
    color: #1976d2;
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.container p {
    color: #495057;
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .container {
        padding: 25px;
        margin-top: 30px;
        width: 95%;
    }

    .container h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .container h2 {
        font-size: 1.5rem;
        margin-top: 1.5rem;
        margin-bottom: 0.8rem;
    }

    .container p {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px;
        margin-top: 20px;
        border-radius: 15px;
    }

    .container h1 {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }

    .container h2 {
        font-size: 1.3rem;
        margin-top: 1rem;
        margin-bottom: 0.6rem;
    }

    .container p {
        font-size: 0.85rem;
    }
}

.calculator-container {
    background-color: #ffffff;
    padding: 40px 36px 32px 36px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    width: 960px;
    max-width: 98%;
    text-align: center;
    margin-top: 40px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    border-top: 3px solid #e3eafc;
}

.calculator-container:hover {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

.top-menu {
    width: 100%;
    background: linear-gradient(to right, #1a73e8, #0056b3);
    padding: 20px 0;
    box-shadow: 0 5px 24px rgba(26, 115, 232, 0.13), 0 1.5px 0 #e9ecef;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: box-shadow 0.3s;
}

.top-menu nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.top-menu nav .language-selector {
    margin-left: auto;
}

.top-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 8px;
}

.top-menu ul li {
    margin-right: 32px;
    position: relative;
}

.top-menu ul li:last-child {
    margin-right: 0;
}

.top-menu ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.15rem;
    padding: 6px 14px;
    border-radius: 6px;
    transition: color 0.3s, background 0.3s, box-shadow 0.2s, transform 0.2s;
    position: relative;
    display: inline-block;
}

.top-menu ul li a.active,
.top-menu ul li a:focus,
.top-menu ul li a:hover {
    color: #fff;
    background: rgba(255,255,255,0.13);
    box-shadow: 0 2px 8px rgba(26,115,232,0.08);
    text-decoration: none;
    transform: translateY(-2px) scale(1.04);
}

.top-menu ul li a.active::after {
    content: '';
    display: block;
    margin: 0 auto;
    width: 60%;
    height: 2.5px;
    background: #fff;
    border-radius: 2px;
    margin-top: 3px;
}

.top-menu ul li a::after {
    transition: width 0.3s;
}

.top-menu ul li a:active {
    background: rgba(255,255,255,0.18);
    color: #e0f2ff;
}

.language-selector select {
    padding: .6rem 1.2rem;
    border-radius: .4rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background-color: rgba(255, 255, 255, 0.15);
    color: #333;
    font-size: 1rem;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22white%22%20d%3D%22M287%2C114.7L159.2%2C242.5c-4.5%2C4.5-11.8%2C4.5-16.3%2C0L5.3%2C114.7c-4.5-4.5-4.5-11.8%2C0-16.3l11.8-11.8c4.5-4.5%2C11.8-4.5%2C16.3%2C0l110.8%2C110.8c4.5%2C4.5%2C11.8%2C4.5%2C16.3%2C0l110.8-110.8c4.5-4.5%2C11.8-4.5%2C16.3%2C0l11.8%2C11.8C291.5%2C102.9%2C291.5%2C110.2%2C287%2C114.7z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 0.9rem;
    padding-right: 2.5rem;
    transition: background-color 0.3s ease-in-out;
}

.language-selector select option {
    color: #333 !important;
    background-color: white !important;
}

.language-selector select:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

h2 {
    color: #1a73e8;
    margin-bottom: 2.5rem;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}

.input-group {
    margin-bottom: 1.2rem;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 0.6rem;
    font-weight: 500;
}

.input-with-unit {
    display: flex;
    align-items: center;
    border: 1px solid #c1d3ec;
    border-radius: 10px;
    overflow: hidden;
    background-color: #f7fafd;
    transition: all 0.3s ease;
}

.input-with-unit:focus-within {
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.2);
}

.input-with-unit input[type="number"] {
    flex-grow: 1;
    padding: 14px 18px;
    border: none;
    outline: none;
    font-size: 1.15rem;
    color: #333;
    background: transparent;
    width: 100%;
}

.input-with-unit input[type="number"]::placeholder {
    color: #9aa7b8;
}

.input-with-unit select {
    padding: 14px 18px;
    border: none;
    background-color: #e3eafc;
    color: #1a73e8;
    font-size: 1.15rem;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%231a73e8%22%20d%3D%22M287%2C114.7L159.2%2C242.5c-4.5%2C4.5-11.8%2C4.5-16.3%2C0L5.3%2C114.7c-4.5-4.5-4.5-11.8%2C0-16.3l11.8-11.8c4.5-4.5%2C11.8-4.5%2C16.3%2C0l110.8%2C110.8c4.5%2C4.5%2C11.8%2C4.5%2C16.3%2C0l110.8-110.8c4.5-4.5%2C11.8-4.5%2C16.3%2C0l11.8%2C11.8C291.5%2C102.9%2C291.5%2C110.2%2C287%2C114.7z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 0.9rem;
    padding-right: 2.5rem;
    border-left: 1px solid #c1d3ec;
}

.input-with-unit select:hover {
    background-color: #dbe7fa;
}

.norm-display {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
    text-align: left;
    padding-left: 10px;
}

button {
    background-color: #1a73e8;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.2rem;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.3);
    width: 100%;
    max-width: 300px;
}

button:hover, button:focus {
    background-color: #165cb2;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 115, 232, 0.4);
}

button:active {
    background-color: #134a8c;
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.2);
}

.result-group {
    margin-top: 2rem;
    background-color: #e6f3ff;
    border: 1px solid #a8d7ff;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.05);
}

.result-group h3 {
    color: #0d47a1;
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
}

.result-group p {
    font-size: 2.2rem;
    color: #1a73e8;
    font-weight: 700;
    word-break: break-all;
}

/* FAQ Section Styling */
.faq-section {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    width: 960px;
    max-width: 98%;
    margin-top: 40px;
    text-align: center;
    border-top: 3px solid #e3eafc;
    margin-bottom: 40px;
}

.faq-section h2 {
    color: #1a73e8;
    margin-bottom: 2.5rem;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}

.faq-item {
    background-color: #f7fafd;
    border: 1px solid #e3eafc;
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:last-child {
    margin-bottom: 0;
}

.faq-item h3 {
    color: #333;
    font-size: 1.2rem;
    padding: 18px 25px;
    margin: 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #e3eafc;
    transition: background-color 0.3s ease;
}

.faq-item h3::before {
    content: '+';
    font-size: 1.5rem;
    font-weight: bold;
    margin-right: 15px;
    color: #1a73e8;
    transition: transform 0.3s ease;
}

.faq-item.active h3::before {
    content: '-';
    transform: rotate(0deg);
}

.faq-item h3:hover {
    background-color: #dbe7fa;
}

.faq-item p {
    padding: 0 25px 20px;
    margin: 0;
    font-size: 1rem;
    color: #555;
    text-align: left;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out, padding 0.4s ease-in-out;
}

.faq-item.active p {
    max-height: 200px; /* Adjust as needed */
    opacity: 1;
    padding: 15px 25px 20px;
}

.faq-item.collapsed p {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

/* Responsive FAQ Adjustments */
@media (max-width: 768px) {
    .faq-section {
        padding: 30px;
        margin-top: 30px;
    }

    .faq-section h2 {
        font-size: 2.2rem;
        margin-bottom: 2rem;
    }

    .faq-item h3 {
        font-size: 1.1rem;
        padding: 15px 20px;
    }

    .faq-item p {
        font-size: 0.95rem;
        padding: 0 20px 15px;
    }
}

@media (max-width: 480px) {
    .faq-section {
        padding: 20px;
        margin-top: 20px;
    }

    .faq-section h2 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    .faq-item h3 {
        font-size: 1rem;
        padding: 12px 15px;
    }

    .faq-item p {
        font-size: 0.9rem;
        padding: 0 15px 12px;
    }
}

/* Media Queries for overall layout adjustments */
@media (max-width: 768px) {
    .calculator-container {
        padding: 30px 25px 25px 25px;
        margin-top: 30px;
    }

    .top-menu nav {
        padding: 0 20px;
    }

    .top-menu ul {
        gap: 4px;
    }

    .top-menu ul li {
        margin-right: 20px;
    }

    .top-menu ul li a {
        font-size: 1rem;
        padding: 5px 10px;
    }

    .language-selector {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }

    .language-selector select {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        background-position: right 10px center;
        background-size: 0.8rem;
        padding-right: 2rem;
    }

    h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .input-group {
        margin-bottom: 1rem;
    }

    .input-group label {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .input-with-unit input[type="number"] {
        padding: 12px 15px;
        font-size: 1.05rem;
    }

    .input-with-unit select {
        padding: 12px 15px;
        font-size: 1.05rem;
        background-position: right 12px center;
        background-size: 0.8rem;
        padding-right: 2.2rem;
    }

    .norm-display {
        font-size: 0.85rem;
    }

    button {
        padding: 12px 25px;
        font-size: 1.1rem;
        margin-top: 1rem;
    }

    .result-group {
        padding: 15px;
    }

    .result-group h3 {
        font-size: 1.4rem;
    }

    .result-group p {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .calculator-container {
        padding: 25px 20px 20px 20px;
        margin-top: 25px;
    }

    .top-menu {
        padding: 15px 0;
    }

    .top-menu nav {
        padding: 0 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .top-menu ul {
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
    }

    .top-menu ul li {
        margin-right: 15px;
    }

    .top-menu ul li a {
        font-size: 0.9rem;
        padding: 4px 8px;
    }

    .language-selector select {
        width: 100%;
        text-align-last: center;
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
        background-position: center right 10px;
        background-size: 0.7rem;
        padding-right: 1.8rem;
    }

    h2 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    .input-group {
        margin-bottom: 0.8rem;
    }

    .input-group label {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }

    .input-with-unit input[type="number"] {
        padding: 10px 12px;
        font-size: 0.95rem;
    }

    .input-with-unit select {
        padding: 10px 12px;
        font-size: 0.95rem;
        background-position: right 10px center;
        background-size: 0.7rem;
        padding-right: 2rem;
    }

    .norm-display {
        font-size: 0.8rem;
    }

    button {
        padding: 10px 20px;
        font-size: 1rem;
        margin-top: 0.8rem;
    }

    .result-group {
        padding: 12px;
    }

    .result-group h3 {
        font-size: 1.2rem;
    }

    .result-group p {
        font-size: 1.6rem;
    }
}

/* Footer */
.site-footer {
    background-color: #1a73e8;
    color: white;
    text-align: center;
    padding: 20px 0;
    width: 100%;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    bottom: 0;
    left: 0;
    margin-top: auto; /* Pushes the footer to the bottom */
}

.site-footer .footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    font-size: 0.95rem;
}

.site-footer a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.site-footer a:hover {
    color: #e0f2ff;
    text-decoration: underline;
}

/* Responsive adjustments for footer */
@media (max-width: 768px) {
    .site-footer {
        padding: 15px 0;
    }

    .site-footer .footer-content {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .site-footer {
        padding: 10px 0;
    }

    .site-footer .footer-content {
        font-size: 0.75rem;
    }
}

/* About Section specific styles */
.formula-section {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    width: 960px;
    max-width: 98%;
    margin-top: 40px;
    text-align: center;
    border-top: 3px solid #e3eafc;
    margin-bottom: 40px;
}

.formula-title {
    color: #1a73e8;
    margin-bottom: 2.5rem;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}

.formula-content p {
    color: #495057;
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    text-align: center;
}

.formula-box {
    background-color: #e6f3ff;
    border: 1px solid #a8d7ff;
    border-radius: 10px;
    padding: 20px;
    margin: 20px auto;
    max-width: 800px;
    text-align: left;
    box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.05);
}

.formula-math {
    display: block;
    font-size: 1.4rem;
    color: #1a73e8;
    font-weight: 600;
    margin-top: 10px;
    word-wrap: break-word;
}

.formula-note {
    font-size: 0.9rem;
    color: #666;
    margin-top: 1rem;
    text-align: center;
}

@media (max-width: 900px) {
    .formula-section {
        padding: 30px;
    }
    .formula-title {
        font-size: 2rem;
    }
}

.seo-intro {
    background-color: #f7fafd;
    padding: 15px 20px 12px 20px;
    border-radius: 10px;
    border: 1px solid #e3eafc;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.03);
    margin-top: 20px;
    text-align: left;
    line-height: 1.6;
    font-size: 0.95rem;
    color: #555;
    width: 960px;
    max-width: 98%;
    margin-bottom: 20px;
}

.seo-intro p {
    margin-bottom: 0.5em;
}

.seo-intro strong {
    color: #1a73e8;
}

@media (max-width: 1000px) {
    .seo-intro { width: 98%; padding: 12px 8px 10px 12px; }
}

.about-section {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    width: 960px;
    max-width: 98%;
    margin-top: 40px;
    text-align: center;
    border-top: 3px solid #e3eafc;
    margin-bottom: 40px;
}

.about-section h2 {
    color: #1a73e8;
    margin-bottom: 2.5rem;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}

.about-section p {
    color: #495057;
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    text-align: justify;
}

.about-section p:last-child {
    margin-bottom: 0;
}

/* Responsive About Section Adjustments */
@media (max-width: 768px) {
    .about-section {
        padding: 30px;
        margin-top: 30px;
    }

    .about-section h2 {
        font-size: 2.2rem;
        margin-bottom: 2rem;
    }

    .about-section p {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .about-section {
        padding: 20px;
        margin-top: 20px;
    }

    .about-section h2 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    .about-section p {
        font-size: 0.9rem;
    }
}

.literature-section {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    width: 960px;
    max-width: 98%;
    margin-top: 40px;
    text-align: center;
    border-top: 3px solid #e3eafc;
    margin-bottom: 40px;
}

.literature-section h2 {
    color: #1a73e8;
    margin-bottom: 2.5rem;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}

.literature-section h3 {
    color: #1976d2;
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.literature-section p {
    color: #495057;
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    text-align: justify;
}

.literature-section p:last-of-type {
    margin-bottom: 0;
}

.literature-section a {
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.literature-section a:hover {
    color: #165cb2;
    text-decoration: underline;
}

/* Responsive Literature Section Adjustments */
@media (max-width: 768px) {
    .literature-section {
        padding: 30px;
        margin-top: 30px;
    }

    .literature-section h2 {
        font-size: 2.2rem;
        margin-bottom: 2rem;
    }

    .literature-section h3 {
        font-size: 1.5rem;
        margin-top: 1.5rem;
        margin-bottom: 0.8rem;
    }

    .literature-section p {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .literature-section {
        padding: 20px;
        margin-top: 20px;
    }

    .literature-section h2 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    .literature-section h3 {
        font-size: 1.3rem;
        margin-top: 1rem;
        margin-bottom: 0.6rem;
    }

    .literature-section p {
        font-size: 0.9rem;
    }
} 