/* ============================================
   Body Fat Calculator - Styles
   ============================================ */

/* Main Container */
.body-fat-calculator-tool {
    min-height: 100vh;
    padding: 1.5rem 1rem;
    background: #ffffff;
}

.tool-container {
    max-width: 900px;
    margin: 0 auto;
}

/* Tool Header */
.tool-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.tool-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    color: #2d3748;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.tool-header h1 i {
    color: #4299e1;
}

.tool-description {
    font-size: 0.95rem;
    color: #718096;
    line-height: 1.5;
    max-width: 600px;
    margin: 0 auto;
}

/* Calculator Card */
.calculator-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
}

/* Section Labels */
.section-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.8rem;
}

.section-label i {
    color: #4299e1;
}

/* Gender Selection */
.gender-selection {
    margin-bottom: 1.5rem;
}

.gender-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.gender-btn {
    padding: 1rem;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.gender-btn i {
    font-size: 1.2rem;
}

.gender-btn:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.gender-btn.active {
    background: #4299e1;
    color: white;
    border-color: #4299e1;
    box-shadow: 0 2px 8px rgba(66, 153, 225, 0.3);
}

/* Unit Selection */
.unit-selection {
    margin-bottom: 1.5rem;
}

.unit-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.unit-btn {
    padding: 1rem;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.unit-btn i {
    font-size: 1.1rem;
}

.unit-btn:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.unit-btn.active {
    background: #48bb78;
    color: white;
    border-color: #48bb78;
    box-shadow: 0 2px 8px rgba(72, 187, 120, 0.3);
}

/* Calculator Form */
.calculator-form {
    margin-top: 1.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.input-label i {
    color: #4299e1;
}

.optional {
    font-size: 0.85rem;
    color: #a0aec0;
    font-weight: 400;
}

.unit-label-text {
    font-weight: 400;
    color: #718096;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.3s ease;
    color: #2d3748;
}

.form-input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.form-input::placeholder {
    color: #a0aec0;
}

.input-hint {
    font-size: 0.8rem;
    color: #a0aec0;
    margin-top: 0.3rem;
}

/* Calculate Button */
.calculate-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(66, 153, 225, 0.4);
}

.calculate-btn:active {
    transform: translateY(0);
}

.calculate-btn i {
    font-size: 1.1rem;
}

/* Results Section */
.results-section {
    background: white;
    border-radius: 12px;
    padding: 2rem 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.results-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2d3748;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

/* Main Result Display */
.main-result {
    text-align: center;
    margin-bottom: 2rem;
}

.result-percentage {
    font-size: 4rem;
    font-weight: 800;
    color: #4299e1;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.result-label {
    font-size: 1.1rem;
    color: #718096;
    font-weight: 500;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 2rem;
}

.progress-bar {
    position: relative;
    height: 30px;
    background: linear-gradient(to right, #48bb78 0%, #ecc94b 33%, #ed8936 66%, #e53e3e 100%);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    transition: width 0.5s ease;
}

.progress-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 36px;
    background: white;
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: left 0.5s ease;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #718096;
}

/* Category Card */
.category-card {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    border: 2px solid #e2e8f0;
}

.category-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-badge.essential {
    background: #e6fffa;
    color: #047857;
}

.category-badge.athletes {
    background: #d1fae5;
    color: #065f46;
}

.category-badge.fitness {
    background: #bfdbfe;
    color: #1e40af;
}

.category-badge.average {
    background: #fef3c7;
    color: #92400e;
}

.category-badge.obese {
    background: #fee2e2;
    color: #991b1b;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.category-description {
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.6;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.metric-item {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    text-align: center;
    transition: all 0.3s ease;
}

.metric-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.metric-label {
    font-size: 0.8rem;
    color: #718096;
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d3748;
}

/* Action Buttons */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.action-btn {
    padding: 0.9rem 1.2rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.copy-btn {
    background: #4299e1;
    color: white;
}

.copy-btn:hover {
    background: #3182ce;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.copy-btn.copied {
    background: #48bb78;
}

.reset-btn {
    background: #f7fafc;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.reset-btn:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

/* Reference Section */
.reference-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
}

.reference-section h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.reference-section h3 i {
    color: #4299e1;
}

.reference-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.reference-card {
    background: #f7fafc;
    padding: 1.2rem;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.reference-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reference-card ul {
    list-style: none;
    padding: 0;
}

.reference-card li {
    padding: 0.5rem 0;
    color: #4a5568;
    font-size: 0.9rem;
    line-height: 1.5;
    border-bottom: 1px solid #e2e8f0;
}

.reference-card li:last-child {
    border-bottom: none;
}

.reference-card strong {
    color: #2d3748;
    font-weight: 600;
}

/* Guide Section */
.guide-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
}

.guide-section h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.guide-section h3 i {
    color: #4299e1;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.guide-item {
    background: #f7fafc;
    padding: 1.2rem;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.guide-icon {
    font-size: 2rem;
    color: #4299e1;
    margin-bottom: 0.8rem;
}

.guide-item h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.6rem;
}

.guide-item p {
    font-size: 0.9rem;
    color: #4a5568;
    line-height: 1.6;
}

/* Related Tools Section */
.related-tools-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
}

.related-tools-header {
    text-align: center;
    margin-bottom: 1.2rem;
}

.related-tools-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.related-tools-header p {
    color: #718096;
    font-size: 0.9rem;
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.8rem;
}

.related-tool-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1.2rem;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    color: #2d3748;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.related-tool-link:hover {
    background: #4299e1;
    color: white;
    border-color: #4299e1;
    transform: translateX(3px);
}

.related-tool-link i {
    font-size: 1.1rem;
}

/* SEO Content Section */
.seo-content {
    background: white;
    margin-top: 3rem;
    padding: 2rem 1rem;
}

.seo-content .container {
    max-width: 900px;
    margin: 0 auto;
}

.seo-content h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 1rem;
}

.seo-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d3748;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.seo-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #4a5568;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
}

.seo-content p {
    color: #4a5568;
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.seo-content ul {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.seo-content li {
    color: #4a5568;
    line-height: 1.8;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.seo-content strong {
    color: #2d3748;
    font-weight: 600;
}

.mb-10 {
    margin-bottom: 2rem;
}

/* ============================================
   RESPONSIVE DESIGN - Mobile Optimization
   ============================================ */

@media (max-width: 768px) {
    .body-fat-calculator-tool {
        padding: 1rem 0.8rem;
    }

    .tool-header h1 {
        font-size: 1.5rem;
    }

    .tool-description {
        font-size: 0.9rem;
    }

    .calculator-card {
        padding: 1.2rem;
    }

    .gender-buttons,
    .unit-buttons {
        gap: 0.8rem;
    }

    .gender-btn,
    .unit-btn {
        padding: 0.9rem;
        font-size: 0.9rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .result-percentage {
        font-size: 3rem;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .action-buttons {
        grid-template-columns: 1fr;
    }

    .reference-grid,
    .guide-grid {
        grid-template-columns: 1fr;
    }

    .related-tools-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .tool-header h1 {
        font-size: 1.3rem;
    }

    .calculator-card {
        padding: 1rem;
    }

    .gender-btn,
    .unit-btn {
        flex-direction: column;
        gap: 0.3rem;
        padding: 0.8rem;
    }

    .result-percentage {
        font-size: 2.5rem;
    }

    .category-title {
        font-size: 1.2rem;
    }

    .results-section {
        padding: 1.5rem 1rem;
    }

    .reference-section,
    .guide-section,
    .related-tools-section {
        padding: 1.2rem;
    }
}

/* Print Styles */
@media print {
    .body-fat-calculator-tool {
        background: white;
    }

    .calculator-card,
    .action-buttons,
    .related-tools-section {
        display: none;
    }

    .results-section {
        box-shadow: none;
        border: 1px solid #e2e8f0;
    }
}

