/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    background: #f8f9fa;
    color: #1a1a2e;
    line-height: 1.6;
}

/* ===== HEADER ===== */
header {
    background: #ffffff;
    border-bottom: 2px solid #e9ecef;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2d6a4f;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo span { color: #52b788; }

nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }

nav a {
    text-decoration: none;
    color: #495057;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

nav a:hover { color: #2d6a4f; }

/* ===== MAIN LAYOUT ===== */
main {
    max-width: 860px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* ===== CALCULATOR CARD ===== */
.calc-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

.calc-card h1 {
    font-size: 1.7rem;
    color: #1a1a2e;
    margin-bottom: 0.4rem;
    font-weight: 700;
}

.calc-subtitle {
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 1.8rem;
}

/* ===== FORM ELEMENTS ===== */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 580px) {
    .form-grid { grid-template-columns: 1fr; }
    header { flex-direction: column; gap: 0.8rem; }
    nav { justify-content: center; }
}

.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group.full-width { grid-column: 1 / -1; }

label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="number"], select {
    padding: 0.7rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    color: #1a1a2e;
    background: #f8f9fa;
    transition: border-color 0.2s, background 0.2s;
    width: 100%;
}

input[type="number"]:focus, select:focus {
    outline: none;
    border-color: #52b788;
    background: #ffffff;
}

/* ===== RADIO TOGGLE ===== */
.toggle-group {
    display: flex;
    gap: 0.5rem;
}

.toggle-group input[type="radio"] { display: none; }

.toggle-group label {
    flex: 1;
    text-align: center;
    padding: 0.6rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s;
}

.toggle-group input[type="radio"]:checked + label {
    background: #2d6a4f;
    border-color: #2d6a4f;
    color: #ffffff;
}

/* ===== BUTTON ===== */
.btn-calculate {
    width: 100%;
    padding: 0.9rem;
    background: #2d6a4f;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    letter-spacing: 0.3px;
}

.btn-calculate:hover { background: #1b4332; }
.btn-calculate:active { transform: scale(0.99); }

/* ===== RESULTS ===== */
.results {
    display: none;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e9ecef;
}

.results.visible { display: block; }

.result-main {
    text-align: center;
    background: linear-gradient(135deg, #2d6a4f, #52b788);
    border-radius: 10px;
    padding: 1.5rem;
    color: #ffffff;
    margin-bottom: 1.2rem;
}

.result-main .result-number {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
}

.result-main .result-unit {
    font-size: 1rem;
    opacity: 0.85;
    margin-top: 0.3rem;
}

.result-main .result-label {
    font-size: 0.9rem;
    opacity: 0.75;
    margin-top: 0.2rem;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

.result-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    border: 1px solid #e9ecef;
}

.result-item .item-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2d6a4f;
}

.result-item .item-label {
    font-size: 0.78rem;
    color: #6c757d;
    margin-top: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.result-note {
    background: #d8f3dc;
    border-left: 4px solid #52b788;
    border-radius: 0 8px 8px 0;
    padding: 0.9rem 1rem;
    font-size: 0.88rem;
    color: #1b4332;
}

/* ===== AD SLOTS ===== */
.ad-slot {
    background: #f1f3f5;
    border: 1px dashed #ced4da;
    border-radius: 8px;
    text-align: center;
    padding: 1.5rem;
    color: #adb5bd;
    font-size: 0.8rem;
    margin: 1.5rem 0;
}

/* ===== CONTENT SECTION ===== */
.content-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

.content-section h2 {
    font-size: 1.25rem;
    color: #1a1a2e;
    margin-bottom: 1rem;
    font-weight: 700;
}

.content-section p {
    color: #495057;
    font-size: 0.95rem;
    margin-bottom: 0.9rem;
    line-height: 1.7;
}

/* ===== RELATED CALCULATORS ===== */
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.related-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 1.2rem;
    text-align: center;
    text-decoration: none;
    border: 2px solid #e9ecef;
    transition: all 0.2s;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}

.related-card:hover {
    border-color: #52b788;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45,106,79,0.12);
}

.related-card .card-icon { font-size: 1.8rem; margin-bottom: 0.5rem; }

.related-card .card-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #1a1a2e;
}

/* ===== FOOTER ===== */
footer {
    text-align: center;
    padding: 2rem;
    color: #adb5bd;
    font-size: 0.82rem;
    border-top: 1px solid #e9ecef;
    margin-top: 2rem;
}

footer a { color: #6c757d; text-decoration: none; }
footer a:hover { color: #2d6a4f; }

/* FAQ Sections */
.faq-section { margin: 2.5rem 0; padding: 0; }
.faq-section h2 { font-size: 1.4rem; color: #2d6a4f; margin-bottom: 1.5rem; padding-bottom: 0.5rem; border-bottom: 2px solid #52b788; }
.faq-item { margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid #e9ecef; }
.faq-item:last-child { border-bottom: none; }
.faq-item h3 { font-size: 1rem; font-weight: 600; color: #2d6a4f; margin-bottom: 0.5rem; }
.faq-item p { color: #495057; line-height: 1.7; margin: 0; }
