/* BMI Calculator Australia - Shared Styles */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --light: #f8fafc;
    --dark: #1e293b;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--dark);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
}

.logo-text span {
    color: var(--primary);
}

/* Main Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-nav a {
    text-decoration: none;
    color: var(--gray);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s;
}

.main-nav a:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.main-nav a.active {
    color: var(--primary);
    background: var(--primary-light);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
}

/* Breadcrumbs */
.breadcrumbs {
    background: var(--light);
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    font-size: 0.875rem;
}

.breadcrumb-list a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb-list a:hover {
    text-decoration: underline;
}

.breadcrumb-list .separator {
    color: var(--gray-light);
}

.breadcrumb-list .current {
    color: var(--gray);
}

/* Hero Section */
.hero {
    padding: 60px 0 40px;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--dark);
}

.hero h1 span {
    color: var(--primary);
}

.hero p {
    font-size: 1.125rem;
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
}

/* Page Hero (for inner pages) */
.page-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.page-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.page-hero p {
    font-size: 1.125rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Contextual Intro */
.contextual-intro {
    background: white;
    padding: 40px 0;
    border-bottom: 1px solid var(--border);
}

.intro-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.intro-content h2 {
    font-size: 1.5rem;
    color: var(--dark);
    margin-bottom: 16px;
}

.intro-content p {
    color: var(--gray);
    line-height: 1.8;
    font-size: 1.05rem;
}

/* Calculator Section */
.calculator-section {
    padding: 40px 0;
}

.calculator-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    margin: 0 auto;
    overflow: hidden;
}

.calculator-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 24px;
    text-align: center;
}

.calculator-header h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.calculator-header p {
    opacity: 0.9;
    font-size: 0.9rem;
}

.calculator-body {
    padding: 32px;
}

.unit-toggle {
    display: flex;
    background: var(--light);
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 24px;
}

.unit-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 600;
    color: var(--gray);
    transition: all 0.2s;
}

.unit-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow);
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark);
}

.input-row {
    display: flex;
    gap: 12px;
}

.input-wrapper {
    position: relative;
    flex: 1;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 50px 14px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
}

.input-wrapper .unit {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 0.9rem;
}

.calculate-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

/* Results */
.results {
    display: none;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid var(--border);
}

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

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

.bmi-display {
    text-align: center;
    margin-bottom: 20px;
}

.bmi-value {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
}

.bmi-label {
    font-size: 0.9rem;
    color: var(--gray);
    margin-top: 4px;
}

.bmi-category {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    margin-top: 12px;
}

.category-underweight { background: #dbeafe; color: #1e40af; }
.category-normal { background: #dcfce7; color: #166534; }
.category-overweight { background: #fef3c7; color: #92400e; }
.category-obese { background: #fee2e2; color: #991b1b; }

/* BMI Scale */
.bmi-scale {
    margin-top: 20px;
    position: relative;
}

.scale-bar {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(to right,
        #3b82f6 0%, #3b82f6 18.5%,
        #22c55e 18.5%, #22c55e 50%,
        #f59e0b 50%, #f59e0b 60%,
        #ef4444 60%, #ef4444 100%);
}

.scale-marker {
    position: absolute;
    top: -8px;
    width: 4px;
    height: 28px;
    background: var(--dark);
    border-radius: 2px;
    transform: translateX(-50%);
    transition: left 0.5s ease;
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--gray);
}

.health-tip {
    margin-top: 20px;
    padding: 16px;
    background: var(--light);
    border-radius: 8px;
    font-size: 0.9rem;
}

.health-tip strong {
    color: var(--primary);
}

/* User Guide Section */
.user-guide {
    padding: 60px 0;
    background: white;
}

.guide-content {
    max-width: 800px;
    margin: 0 auto;
}

.guide-content h2 {
    font-size: 1.75rem;
    color: var(--dark);
    margin-bottom: 24px;
    text-align: center;
}

.guide-content h3 {
    font-size: 1.25rem;
    color: var(--dark);
    margin: 24px 0 12px;
}

.guide-content p {
    color: var(--gray);
    line-height: 1.8;
    margin-bottom: 16px;
}

.guide-content ol,
.guide-content ul {
    color: var(--gray);
    margin-left: 24px;
    margin-bottom: 16px;
}

.guide-content li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.guide-faq {
    margin-top: 40px;
}

.guide-faq-item {
    background: var(--light);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}

.guide-faq-item h4 {
    color: var(--primary);
    margin-bottom: 8px;
    font-size: 1rem;
}

.guide-faq-item p {
    margin-bottom: 0;
}

/* Info Sections */
.info-section {
    padding: 60px 0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.info-card {
    background: white;
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
}

.info-card h3 {
    font-size: 1.25rem;
    margin-bottom: 16px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-card h3 .icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.info-card p {
    color: var(--gray);
    line-height: 1.7;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.section-subtitle {
    text-align: center;
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
}

/* BMI Chart Table */
.bmi-chart-section {
    padding: 60px 0;
    background: white;
}

.bmi-table {
    width: 100%;
    max-width: 600px;
    margin: 40px auto 0;
    border-collapse: collapse;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    overflow: hidden;
}

.bmi-table th,
.bmi-table td {
    padding: 16px 24px;
    text-align: left;
}

.bmi-table th {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.bmi-table tr:nth-child(even) {
    background: var(--light);
}

.bmi-table td:first-child {
    font-weight: 600;
}

.status-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.dot-underweight { background: #3b82f6; }
.dot-normal { background: #22c55e; }
.dot-overweight { background: #f59e0b; }
.dot-obese { background: #ef4444; }

/* FAQ Section */
.faq-section {
    padding: 60px 0;
}

.faq-list {
    max-width: 800px;
    margin: 40px auto 0;
}

.faq-item {
    background: white;
    border-radius: var(--radius);
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 20px 24px;
    background: none;
    border: none;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.faq-question:hover {
    background: var(--light);
}

.faq-question .arrow {
    transition: transform 0.3s;
}

.faq-item.active .faq-question .arrow {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer-content {
    padding: 0 24px 20px;
    color: var(--gray);
    line-height: 1.7;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

/* Latest Articles Section */
.latest-articles {
    padding: 60px 0;
    background: var(--light);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.article-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.article-card-image {
    height: 160px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.article-card-content {
    padding: 24px;
}

.article-card-content h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: var(--dark);
}

.article-card-content h3 a {
    text-decoration: none;
    color: inherit;
}

.article-card-content h3 a:hover {
    color: var(--primary);
}

.article-card-content p {
    color: var(--gray);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.article-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--gray-light);
}

.read-more {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.read-more:hover {
    text-decoration: underline;
}

/* Blog Index */
.blog-list {
    padding: 60px 0;
}

.blog-list-item {
    background: white;
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 24px;
    align-items: center;
}

.blog-list-image {
    width: 100%;
    height: 150px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.blog-list-content h2 {
    font-size: 1.35rem;
    margin-bottom: 12px;
}

.blog-list-content h2 a {
    color: var(--dark);
    text-decoration: none;
}

.blog-list-content h2 a:hover {
    color: var(--primary);
}

.blog-list-content p {
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 16px;
}

.blog-meta {
    font-size: 0.85rem;
    color: var(--gray-light);
}

/* Blog Post */
.blog-post {
    padding: 60px 0;
}

.blog-post-content {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 48px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.blog-post-content h1 {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 16px;
    line-height: 1.3;
}

.blog-post-meta {
    color: var(--gray-light);
    font-size: 0.9rem;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 32px;
}

.blog-post-content h2 {
    font-size: 1.5rem;
    color: var(--dark);
    margin: 32px 0 16px;
}

.blog-post-content h3 {
    font-size: 1.25rem;
    color: var(--dark);
    margin: 24px 0 12px;
}

.blog-post-content p {
    color: var(--gray);
    line-height: 1.8;
    margin-bottom: 16px;
}

.blog-post-content ul,
.blog-post-content ol {
    color: var(--gray);
    margin-left: 24px;
    margin-bottom: 16px;
}

.blog-post-content li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.blog-post-content a {
    color: var(--primary);
}

.blog-post-cta {
    background: var(--primary-light);
    padding: 24px;
    border-radius: 8px;
    margin: 32px 0;
    text-align: center;
}

.blog-post-cta p {
    margin-bottom: 16px;
    color: var(--dark);
}

.cta-button {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.2s;
}

.cta-button:hover {
    background: var(--primary-dark);
}

/* SEO Description Section */
.seo-section {
    padding: 60px 0;
    background: white;
}

.seo-content {
    max-width: 900px;
    margin: 0 auto;
}

.seo-content h2 {
    font-size: 1.75rem;
    margin-bottom: 24px;
    color: var(--dark);
}

.seo-content h3 {
    font-size: 1.25rem;
    margin: 24px 0 12px;
    color: var(--dark);
}

.seo-content p {
    color: var(--gray);
    line-height: 1.8;
    margin-bottom: 16px;
}

.seo-content ul {
    color: var(--gray);
    margin-left: 24px;
    margin-bottom: 16px;
}

.seo-content li {
    margin-bottom: 8px;
    line-height: 1.7;
}

/* Content Pages */
.content-page {
    padding: 60px 0;
}

.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 48px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.content-wrapper h1 {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 24px;
}

.content-wrapper h2 {
    font-size: 1.5rem;
    color: var(--dark);
    margin: 32px 0 16px;
}

.content-wrapper h3 {
    font-size: 1.25rem;
    color: var(--dark);
    margin: 24px 0 12px;
}

.content-wrapper p {
    color: var(--gray);
    line-height: 1.8;
    margin-bottom: 16px;
}

.content-wrapper ul,
.content-wrapper ol {
    color: var(--gray);
    margin-left: 24px;
    margin-bottom: 16px;
}

.content-wrapper li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.content-wrapper a {
    color: var(--primary);
}

/* Contact Form */
.contact-form {
    margin-top: 32px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.submit-btn {
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    padding: 48px 0 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: white;
}

.footer-section p,
.footer-section a {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.8;
}

.footer-section a {
    display: block;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid #334155;
    color: #64748b;
    font-size: 0.85rem;
}

.footer-legal {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
}

.footer-legal a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.85rem;
}

.footer-legal a:hover {
    color: white;
}

.disclaimer {
    max-width: 800px;
    margin: 0 auto 24px;
    padding: 16px;
    background: #334155;
    border-radius: 8px;
    font-size: 0.8rem;
    color: #94a3b8;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1,
    .page-hero h1 {
        font-size: 1.875rem;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 16px;
        box-shadow: var(--shadow);
    }

    .main-nav.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .calculator-body {
        padding: 24px;
    }

    .bmi-value {
        font-size: 2.5rem;
    }

    .info-grid,
    .articles-grid {
        grid-template-columns: 1fr;
    }

    .bmi-table th,
    .bmi-table td {
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .blog-list-item {
        grid-template-columns: 1fr;
    }

    .blog-post-content,
    .content-wrapper {
        padding: 24px;
    }

    .footer-legal {
        flex-direction: column;
        gap: 8px;
    }
}
