/* ========================================
   The Fit Frontier - Shared Article Styles
   Combines polished post design with readable draft typography
   ======================================== */

/* Reset default browser styles for consistency */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base body styles with modern font stack and light gray background */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background: #f7fafc;
}

/* Centered container for content - 1200px max width with 20px padding */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */

/* Sticky header with white background and subtle shadow */
header {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Flexbox navigation layout */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 0;
    line-height: normal;
}

/* Purple gradient logo text */
.logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

/* Navigation menu list (horizontal layout) */
.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin-top: 1rem;
    margin-bottom: 0.8rem;
}

/* Navigation link styles with hover effect */
.nav-links a {
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #667eea;
}

/* Separator between category links and About */
.nav-sep {
    opacity: 0.5;
    user-select: none;
}

/* Back link for simple navigation pages */
.back-link {
    text-decoration: none;
    color: #667eea;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s;
}

.back-link:hover {
    color: #764ba2;
}

/* ========================================
   ARTICLE CONTAINER
   ======================================== */

/* Main article card with white background, shadow, and 20px padding matching header width */
article {
    background: white;
    margin: 3rem auto;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    max-width: 900px;
}

/* Article header section with bottom border */
.article-header {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #e2e8f0;
}

/* Large emoji icon for article categories */
.article-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* Hero image styling with fixed height and rounded corners */
.article-hero-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 2rem;
}

/* Flexbox container for article tags/metadata */
.article-meta {
    display: flex;
    gap: 0.5rem;
    margin-top: -1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Note: Tag styles moved to css/components/tags.css */

/* Article date styling with italic text */
.article-date {
    font-style: italic;
    color: #718096;
    font-size: 0.95rem;
}

/* ========================================
   TYPOGRAPHY
   Using draft's readable spacing (1.6 line-height)
   ======================================== */

/* Main article heading */
h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1a202c;
    line-height: 1.2;
    margin-bottom: 2rem;
}

/* Section headings */
h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a202c;
    margin: 2rem 0 1rem;
}

/* Subsection headings */
h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2d3748;
    margin: 1.5rem 0 0.75rem;
}

/* Paragraph text with readable spacing */
p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.6;
}

/* Lists with indentation */
ul, ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

/* List items with consistent spacing */
li {
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
    line-height: 1.6;
}

/* Bold text emphasis */
strong {
    font-weight: 700;
    color: #1a202c;
}

/* Italic text emphasis */
em {
    font-style: italic;
}

/* ========================================
   FIGURES & IMAGES
   ======================================== */

/* Figure container constrained to article width */
figure {
    margin: 2rem 0;
}

/* Article images fill the content width */
.article-image {
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
}

/* Figure captions with smaller, muted text */
figcaption {
    font-size: 0.9rem;
    color: #718096;
    line-height: 1.5;
    margin-top: 0.75rem;
}

/* ========================================
   CONTENT BLOCKS
   ======================================== */

/* Highlighted callout boxes with yellow background and orange border */
.highlight {
    background: #f3f0ff;
    padding: 1.5rem;
    padding-bottom: 0.5rem;
    border-left: 4px solid #667eea;
    border-radius: 4px;
    margin: 1.5rem 0;
}

/* Sources/references section with gray background */
.sources {
    margin-top: 2rem;
    margin-left: 0rem;
    padding: 1.5rem;
    padding-left: 3rem;
    padding-bottom: 1rem;
    background: #f5f5f5;
    border-radius: 8px;
    border-top: 2px solid #e2e8f0;
}

/* Sources section headings */
.sources h2, .sources h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #1a202c;
    margin-top: 0;
}

/* Remove bullets from source links list */
.sources ul {
    list-style: none;
    margin-left: 0;
}

/* Source link list items */
.sources li {
    margin-bottom: 0.75rem;
}

/* Source links with purple color matching brand */
.sources a {
    color: #667eea;
    text-decoration: none;
    font-size: 0.95rem;
}

/* .sources a:hover {
    text-decoration: underline;
} */

/* Quality metrics section for draft validation warnings */
.quality-metrics {
    background: #fff3cd;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
    border-left: 4px solid #ffc107;
}

/* Quality metrics heading with warning color */
.quality-metrics h3 {
    color: #856404;
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* Quality metrics text */
.quality-metrics p {
    color: #856404;
    font-size: 0.95rem;
}

/* Quality metrics list */
.quality-metrics ul {
    margin-left: 1.5rem;
}

.quality-metrics li {
    color: #856404;
    font-size: 0.95rem;
}

/* ========================================
   FOOTER
   ======================================== */

/* Footer */
footer {
    background: #2d3748;
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 5rem;
}

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

.footer-section h3 {
    margin-left: 2rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: white;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: #cbd5e0;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #4a5568;
    color: #a0aec0;
    font-size: 0.9rem;
}

/* ========================================
   RESPONSIVE DESIGN
   Mobile-friendly adjustments for screens under 768px
   ======================================== */

@media (max-width: 768px) {
    /* Reduce article padding on mobile */
    article {
        padding: 1.5rem;
        margin: 1.5rem auto;
    }

    /* Smaller headings on mobile */
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    /* Shorter hero images on mobile */
    .article-hero-image {
        height: 250px;
    }

    /* Stack navigation vertically on mobile */
    .nav-links {
        flex-direction: column;
        gap: 1rem;
        display: none; /* Hidden by default, would need JS hamburger menu */
    }
}
