@import 'design-system.css';
@import 'components.css';
@import 'header-footer.css';

/* -------------------------------------------------------------------------- */
/* UI/UX Pro Max Design System - Swiss Modernism 2.0                         */
/* Typography: Lora (Headings) / Raleway (Body)                              */
/* Mood: Calm, wellness, health, natural, organic                            */
/* -------------------------------------------------------------------------- */

/* Blog Specific Styles */

/* Typography Override for Blog */
.blog-grid,
.blog-controls,
.blog-post {
    font-family: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.article-title,
.blog-title,
h1,
h2,
h3 {
    font-family: 'Lora', Georgia, serif;
    font-weight: 600;
}

/* Blog Index - Swiss Grid System */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    /* Mathematical spacing */
    margin-top: 2rem;
}

@media (min-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(12, 1fr);
        gap: 2rem;
    }

    .article-card {
        grid-column: span 4;
        /* 3 columns on desktop */
    }
}

@media (min-width: 1024px) {
    .blog-grid {
        gap: 2.5rem;
    }
}

/* Article Card - Clean Modernist Design */
.article-card {
    background: #FFFFFF;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(30, 41, 59, 0.08);
    transition: transform 200ms ease, box-shadow 200ms ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #E2E8F0;
    cursor: pointer;
    /* UI/UX Pro Max: cursor-pointer on clickable elements */
}

.article-card:hover {
    transform: translateY(-2px);
    /* Subtle hover - no layout shift */
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.12);
    border-color: #3B82F6;
    /* Primary color */
}

.article-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: #F8FAFC;
}

.article-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-meta {
    font-size: 0.875rem;
    color: #64748B;
    /* Muted text - sufficient contrast */
    margin-bottom: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-title {
    font-size: 1.25rem;
    color: #1E293B;
    /* Text color from design system */
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.article-title:hover {
    color: #3B82F6;
    /* Primary color on hover */
    transition: color 200ms ease;
}

.article-excerpt {
    color: #475569;
    /* Better contrast than default */
    margin-bottom: 1rem;
    flex-grow: 1;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Single Article */
.blog-post {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 0;
}

.blog-header {
    text-align: center;
    margin-bottom: 3rem;
}

.blog-title {
    font-size: 2.5rem;
    color: #1E293B;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.blog-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: #64748B;
    font-size: 0.875rem;
}

.blog-content {
    background: #FFFFFF;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(30, 41, 59, 0.08);
    font-size: 1.125rem;
    line-height: 1.7;
    /* Optimal reading line-height */
}

.blog-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1E293B;
    border-bottom: 2px solid #E2E8F0;
    padding-bottom: 0.5rem;
    font-family: 'Lora', Georgia, serif;
}

.blog-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #3B82F6;
    font-family: 'Lora', Georgia, serif;
}

.blog-content p {
    margin-bottom: 1rem;
}

.blog-content ul,
.blog-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.blog-content li {
    margin-bottom: 0.5rem;
}

/* Related Posts Section */
.related-posts {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #E2E8F0;
}

/* -------------------------------------------------------------------------- */
/* Filter, Search, and Pagination - Modernist Controls                       */
/* -------------------------------------------------------------------------- */

.blog-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
}

@media (min-width: 768px) {
    .blog-controls {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.filter-btn {
    background: #FFFFFF;
    border: 1.5px solid #3B82F6;
    /* Primary color */
    color: #3B82F6;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 200ms ease;
    /* UI/UX Pro Max: 150-300ms */
    letter-spacing: 0.3px;
}

.filter-btn:hover {
    background: #EFF6FF;
    /* Light blue background */
    border-color: #2563EB;
}

.filter-btn.active {
    background: #3B82F6;
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.filter-btn:focus-visible {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

.search-container {
    position: relative;
    min-width: 280px;
}

.search-input {
    width: 100%;
    padding: 0.65rem 1rem;
    border: 1.5px solid #CBD5E1;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: 'Raleway', sans-serif;
    transition: border-color 200ms ease, box-shadow 200ms ease;
    color: #1E293B;
}

.search-input:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-input::placeholder {
    color: #94A3B8;
}

.load-more-container {
    text-align: center;
    margin-top: 3rem;
    margin-bottom: 2rem;
}

.load-more-container .btn {
    cursor: pointer;
    /* UI/UX Pro Max checklist */
    transition: all 200ms ease;
}

.hidden {
    display: none !important;
}

/* -------------------------------------------------------------------------- */
/* Accessibility & Motion Preferences                                        */
/* -------------------------------------------------------------------------- */

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {

    .article-card,
    .filter-btn,
    .search-input,
    .article-title {
        transition: none;
    }
}

/* Enhanced focus states for keyboard navigation */
.article-card:focus-within,
.filter-btn:focus,
.search-input:focus {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

/* Ensure minimum touch target size on mobile - 44x44px */
@media (max-width: 767px) {
    .filter-btn {
        min-height: 44px;
        min-width: 44px;
    }
}

/* -------------------------------------------------------------------------- */
/* Premium Accordion (FAQ) - UI/UX Pro Max                                   */
/* -------------------------------------------------------------------------- */

.faq-accordion {
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    background: #FFFFFF;
    margin-top: 2rem;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.faq-accordion__item {
    border-bottom: 1px solid #E2E8F0;
}

.faq-accordion__item:last-child {
    border-bottom: none;
}

.faq-accordion__question {
    width: 100%;
    background: none;
    border: none;
    padding: 1.25rem 1.5rem;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: #1E293B;
    display: flex;
    justify-content: flex-start;
    /* Changed from space-between to keep text together */
    align-items: center;
    cursor: pointer;
    transition: background-color 200ms ease;
    font-family: 'Raleway', sans-serif;
    gap: 0.5rem;
    /* Small gap between text parts if they wrap, though usually they flow */
}

.faq-accordion__question:hover {
    background-color: #F8FAFC;
    color: #3B82F6;
}

.faq-accordion__icon {
    width: 24px;
    height: 24px;
    position: relative;
    flex-shrink: 0;
    margin-left: auto;
    /* This PUSHES the icon to the far right */
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-accordion__icon::before,
.faq-accordion__icon::after {
    content: '';
    position: absolute;
    background-color: #94A3B8;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: background-color 200ms ease;
}

.faq-accordion__icon::before {
    width: 2px;
    height: 12px;
}

.faq-accordion__icon::after {
    width: 12px;
    height: 2px;
}

.faq-accordion__item.active .faq-accordion__icon {
    transform: rotate(45deg);
}

.faq-accordion__item.active .faq-accordion__icon::before,
.faq-accordion__item.active .faq-accordion__icon::after {
    background-color: #3B82F6;
}

.faq-accordion__answer {
    height: 0;
    overflow: hidden;
    transition: height 300ms cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #F8FAFC;
}

.faq-accordion__item.active .faq-accordion__answer {
    height: auto;
    border-top: 1px solid #E2E8F0;
}

.faq-accordion__answer-content {
    padding: 1.25rem 1.5rem;
    color: #475569;
    line-height: 1.6;
    font-size: 0.95rem;
}