/* Health Tools CSS - Indonesian Version */
/* Mobile-first design matching Spiritual Wellness App */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary-blue: #338BFF;
    --primary-light-blue: #51C7FE;
    --primary-purple: #905DFF;
    --light-purple: #B18DFF;
    --background: #FFFFFF;
    --text-primary: #000000;
    --text-secondary: #666666;
    --text-light: #999999;
    --border-light: #E5E5E5;
    --background-gray: #F5F8FA;
    --background-light-gray: #F8F9FA;
    --card-border: #E5E5E5;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --success-green: #22C55E;
    --warning-yellow: #EAB308;
    --danger-red: #EF4444;
    --info-blue: #3B82F6;
}

body {
    font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    background: var(--background);
    min-height: 100vh;
    position: relative;
}

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--background-gray);
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
    box-shadow: 0 2px 10px var(--shadow-color);
    max-width: 480px;
    margin: 0 auto;
}

.header-left {
    width: 40px;
    display: flex;
    align-items: center;
}

.header-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.header-right {
    width: 40px;
}

.header-logo {
    width: 28px;
    height: 28px;
}

.header-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.back-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.back-btn:hover {
    background: #E8E8E8;
}

.back-btn svg {
    width: 24px;
    height: 24px;
}

/* Main Content */
.main-content {
    padding: 80px 16px 100px;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 24px;
}

.page-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
}

.page-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.3;
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Calculator Card */
.calculator-card {
    background: var(--background);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--border-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.calculator-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

/* Form Elements */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-helper {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    background: var(--background-light-gray);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(51, 139, 255, 0.1);
}

.form-input::placeholder {
    color: var(--text-light);
}

/* Input with unit */
.input-with-unit {
    position: relative;
}

.input-with-unit .form-input {
    padding-right: 50px;
}

.input-unit {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--text-secondary);
    pointer-events: none;
}

/* Select */
.form-select {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    background: var(--background-light-gray) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 12px center;
    color: var(--text-primary);
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(51, 139, 255, 0.1);
}

/* Radio and Toggle Groups */
.toggle-group {
    display: flex;
    gap: 8px;
    background: var(--background-light-gray);
    padding: 4px;
    border-radius: 12px;
}

.toggle-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-btn.active {
    background: var(--background);
    color: var(--primary-blue);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Gender Buttons */
.gender-group {
    display: flex;
    gap: 12px;
}

.gender-btn {
    flex: 1;
    padding: 14px;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    background: var(--background);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.gender-btn:hover {
    border-color: var(--primary-blue);
}

.gender-btn.active {
    background: linear-gradient(135deg, rgba(81, 199, 254, 0.1), rgba(51, 139, 255, 0.1));
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.gender-btn .icon {
    font-size: 18px;
}

/* Primary Button */
.btn-primary {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    color: #FFFFFF;
    background: linear-gradient(135deg, var(--primary-light-blue), var(--primary-blue));
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 8px;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(51, 139, 255, 0.3);
}

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

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Secondary Button */
.btn-secondary {
    width: 100%;
    padding: 14px 24px;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    color: var(--text-secondary);
    background: var(--background);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

/* Results Section */
.results-section {
    display: none;
    margin-top: 24px;
}

.results-section.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.result-card {
    background: linear-gradient(135deg, var(--primary-light-blue), var(--primary-blue));
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    color: #FFFFFF;
    margin-bottom: 16px;
}

.result-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.result-value {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 4px;
}

.result-unit {
    font-size: 18px;
    font-weight: 400;
    opacity: 0.9;
}

.result-category {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    font-size: 14px;
    font-weight: 500;
    margin-top: 12px;
}

/* Result Details */
.result-details {
    background: var(--background-light-gray);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}

.result-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.result-detail-item:last-child {
    border-bottom: none;
}

.result-detail-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.result-detail-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Category Colors */
.category-underweight {
    background: var(--info-blue) !important;
}

.category-normal {
    background: var(--success-green) !important;
}

.category-overweight {
    background: var(--warning-yellow) !important;
    color: var(--text-primary) !important;
}

.category-obese {
    background: var(--danger-red) !important;
}

/* Info Box */
.info-box {
    background: var(--background-light-gray);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
}

.info-box-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-box-content {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.info-box-content ul {
    margin: 8px 0;
    padding-left: 20px;
}

.info-box-content li {
    margin-bottom: 4px;
}

/* BMI Scale */
.bmi-scale {
    margin: 16px 0;
}

.bmi-bar {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(to right, 
        var(--info-blue) 0%, var(--info-blue) 18.5%,
        var(--success-green) 18.5%, var(--success-green) 25%,
        var(--warning-yellow) 25%, var(--warning-yellow) 30%,
        var(--danger-red) 30%, var(--danger-red) 100%
    );
    position: relative;
    margin-bottom: 8px;
}

.bmi-marker {
    position: absolute;
    top: -4px;
    width: 20px;
    height: 20px;
    background: var(--text-primary);
    border: 3px solid #FFFFFF;
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: left 0.3s ease;
}

.bmi-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-light);
}

/* Tools Grid (for index page) */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0;
    margin-bottom: 20px;
}

.tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 12px;
    background: var(--background);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-blue);
}

.tool-card:active {
    transform: translateY(0);
}

.tool-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
}

.tool-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.tool-desc {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 4px;
}

/* Section Title */
.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-top: 8px;
}

/* Footer CTA */
.footer-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--background);
    padding: 16px;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    max-width: 480px;
    margin: 0 auto;
}

.cta-button {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.cta-button.gradient {
    background: linear-gradient(135deg, var(--primary-purple), var(--light-purple));
    color: #FFFFFF;
}

/* Utility */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-16 {
    margin-top: 16px;
}

.mb-16 {
    margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 380px) {
    .page-title {
        font-size: 24px;
    }
    
    .result-value {
        font-size: 40px;
    }
    
    .tools-grid {
        gap: 10px;
    }
    
    .tool-card {
        padding: 16px 10px;
    }
    
    .tool-icon {
        width: 40px;
        height: 40px;
    }
    
    .tool-name {
        font-size: 12px;
    }
}

/* Table Styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th,
.data-table td {
    padding: 10px 8px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.data-table th {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table .highlight {
    background: rgba(51, 139, 255, 0.1);
    font-weight: 600;
}

/* Progress Bar */
.progress-bar {
    height: 8px;
    background: var(--border-light);
    border-radius: 4px;
    overflow: hidden;
    margin: 8px 0;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-fill.blue {
    background: linear-gradient(90deg, var(--primary-light-blue), var(--primary-blue));
}

.progress-fill.green {
    background: var(--success-green);
}

.progress-fill.yellow {
    background: var(--warning-yellow);
}

.progress-fill.red {
    background: var(--danger-red);
}

/* Disclaimer */
.disclaimer {
    font-size: 11px;
    color: var(--text-light);
    text-align: center;
    padding: 16px;
    line-height: 1.5;
}

.disclaimer a {
    color: var(--primary-blue);
    text-decoration: none;
}

/* SEO Content Styles */
.seo-content {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

.seo-content h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 24px 0 12px 0;
    line-height: 1.4;
}

.seo-content h2:first-child {
    margin-top: 0;
}

.seo-content h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 20px 0 10px 0;
    line-height: 1.4;
}

.seo-content p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 12px;
}

.seo-content ul, .seo-content ol {
    margin: 12px 0;
    padding-left: 24px;
}

.seo-content li {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 8px;
}

.seo-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.seo-content .formula-box {
    background: var(--background-light-gray);
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: var(--text-primary);
    text-align: center;
}

.seo-content .highlight-box {
    background: linear-gradient(135deg, rgba(51, 139, 255, 0.1), rgba(144, 93, 255, 0.1));
    border-left: 4px solid var(--primary-blue);
    border-radius: 0 12px 12px 0;
    padding: 16px;
    margin: 16px 0;
}

.seo-content .highlight-box p {
    margin-bottom: 0;
}

.seo-content .seo-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 13px;
}

.seo-content .seo-table th,
.seo-content .seo-table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.seo-content .seo-table th {
    background: var(--background-light-gray);
    font-weight: 600;
    color: var(--text-primary);
}

.seo-content .seo-table tr:last-child td {
    border-bottom: none;
}

.faq-item {
    margin-bottom: 16px;
}

.faq-question {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.faq-answer {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}
