:root {
    --primary-color: #317BC3;
    --primary-light: #eff6fc;
    --primary-dark: #245d94;
    --text-main: #2d3748;
    --text-muted: #718096;
    --bg-main: #ffffff;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);

    /* Medical Status Colors */
    --status-underweight: #8B5CF6;
    --status-normal: #10B981;
    --status-overweight: #F59E0B;
    --status-obese: #EF4444;

    --radius-md: 12px;
    --radius-lg: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.bg-light {
    background-color: var(--bg-light);
}

.text-center {
    text-align: center;
}

.mt-3 {
    margin-top: 1.5rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    color: var(--text-main);
}

a {
    text-decoration: none;
    color: var(--text-main);
    transition: color 0.3s;
}

a:hover {
    color: var(--primary-color);
}

/* Header */
.main-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo-image {
    height: 40px;
    width: auto;
    object-fit: contain;
}

nav {
    display: flex;
    align-items: center;
    gap: 24px;
    font-weight: 500;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(49, 123, 195, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(49, 123, 195, 0.4);
    color: white;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 10px 24px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-block {
    width: 100%;
}

/* Hero Section */
.hero-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #ffffff 0%, var(--primary-light) 100%);
    position: relative;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.hero-content h1 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-content h1 span {
    color: var(--primary-color);
}

.hero-content p {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 480px;
}

/* Calculator Card */
.calculator-card {
    background: white;
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.calculator-units {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.unit-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.unit-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.unit-toggle {
    display: flex;
    gap: 4px;
    background: var(--bg-light);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.radio-label {
    flex: 1;
    cursor: pointer;
}

.radio-label input[type="radio"] {
    display: none;
}

.custom-radio {
    display: block;
    text-align: center;
    padding: 6px;
    border-radius: 8px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.3s;
    font-size: 0.9rem;
}

.radio-label input[type="radio"]:checked+.custom-radio {
    background: white;
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.height-ft-in-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-main);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
    background: var(--bg-light);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(49, 123, 195, 0.1);
}

.height-imperial-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.hidden {
    display: none !important;
}

/* Results Display */
.hero-results {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
}

.empty-state i {
    width: 64px;
    height: 64px;
    color: var(--border-color);
    margin-bottom: 16px;
}

.results-card {
    background: white;
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    width: 100%;
    max-width: 400px;
    border-top: 6px solid var(--border-color);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-up {
    animation: scaleUp 0.5s ease;
}

@keyframes scaleUp {
    0% {
        transform: scale(0.95);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.results-card h3 {
    font-size: 1.25rem;
    margin-bottom: 24px;
    color: var(--text-muted);
}

.bmi-value-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-main);
    box-shadow: inset var(--shadow-sm);
    border: 8px solid var(--border-color);
    transition: border-color 0.5s ease;
}

.results-card h4 {
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.health-risk {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 24px;
    font-weight: 500;
}

.health-tips {
    background: rgba(245, 158, 11, 0.1);
    /* fallback */
    padding: 20px;
    border-radius: var(--radius-md);
    text-align: left;
    margin-top: 24px;
}

.health-tips h5 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 1rem;
}

.health-tips h5 i {
    width: 20px;
    height: 20px;
}

.health-tips p {
    font-size: 0.9rem;
    color: var(--text-main);
}

/* Sections Global */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    font-size: 2.25rem;
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Consultation Banner */
.cta-banner {
    background: var(--primary-color);
    border-radius: var(--radius-lg);
    padding: 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    box-shadow: var(--shadow-lg);
    background-image: radial-gradient(circle at top right, var(--primary-light) 0%, transparent 40%);
    overflow: hidden;
    position: relative;
}

.cta-content {
    max-width: 500px;
    position: relative;
    z-index: 2;
}

.cta-content h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 24px;
}

.features {
    list-style: none;
    margin-bottom: 32px;
}

.features li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 1.1rem;
    font-weight: 500;
}

.cta-content .btn-outline {
    border-color: white;
    color: white;
}

.cta-content .btn-outline:hover {
    background: white;
    color: var(--primary-color);
}

.cta-content .btn-primary {
    background: white;
    color: var(--primary-color);
}

.cta-content .btn-primary:hover {
    background: var(--bg-light);
}

.action-buttons {
    display: flex;
    gap: 16px;
}

.action-buttons.centered {
    justify-content: center;
}

.cta-image .large-icon {
    width: 160px;
    height: 160px;
    color: rgba(255, 255, 255, 0.2);
    transform: rotate(15deg);
}

/* AI Report Area */
.upload-area {
    margin-top: 32px;
    padding: 64px 32px;
    border: 2px dashed var(--primary-color);
    background: white;
    border-radius: var(--radius-lg);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    transition: all 0.3s ease;
}

.upload-area:hover {
    background: var(--primary-light);
}

.upload-area i {
    width: 48px;
    height: 48px;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.upload-area p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 32px;
}

.blog-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.blog-img {
    height: 180px;
    background-color: var(--bg-light);
    background-size: cover;
    background-position: center;
}

.blog-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-content h3 {
    font-size: 1.125rem;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.read-more {
    font-weight: 600;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.read-more i {
    width: 16px;
    height: 16px;
}

/* FAQ Accordion */
.accordion {
    max-width: 800px;
    margin: 0 auto;
}

.accordion-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    text-align: left;
    transition: background 0.3s;
}

.accordion-header:hover {
    background: var(--bg-light);
}

.accordion-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-body {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: var(--text-muted);
}

.accordion-item.active .accordion-body {
    padding: 0 24px 20px;
    max-height: 400px;
}

/* Footer */
.main-footer {
    background: var(--text-main);
    color: white;
    padding: 60px 0 20px;
    margin-top: auto;
}

.main-footer h3 {
    color: white;
}

.footer-bottom {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 768px) {

    .hero-container,
    .cta-banner {
        grid-template-columns: 1fr;
        padding: 32px;
    }

    nav {
        display: none;
    }

    .hero-content h1 {
        font-size: 2.25rem;
    }
}