/* public/css/style.css - RECOVERED STABLE VERSION */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* --- COLOR & FONT VARIABLES --- */
:root {
    --primary-yellow: #a6ffb7bf;
    --dark-yellow: #92400e;
    --light-gray: #f9fafb;
    --medium-gray: #e5e7eb;
    --dark-gray: #374151;
    --text-color: #1f2937;
    --card-bg: white;
    --section-bg: #f8fbfb;
}

/* --- BASE STYLES & LAYOUT --- */
html {
    scroll-behavior: smooth;
}
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--card-bg);
    color: var(--text-color);
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
main {
    flex-grow: 1;
}
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* --- HEADER & NAVIGATION --- */
.site-header {
    background: linear-gradient(90deg, var(--primary-yellow) 0%, #fbbf24 100%);
    padding: 1.2rem 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-header .container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 700; text-decoration: none; color: white; text-shadow: 1px 1px 2px rgba(0,0,0,0.2); }
.main-nav { display: flex; align-items: center; }
.main-nav a { color: var(--dark-gray); text-decoration: none; margin-left: 1.5rem; font-weight: 600; transition: opacity 0.2s; } /* ACCESSIBILITY FIX */
.main-nav a:hover { opacity: 0.8; }

.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}
.hamburger-line {
    width: 2rem;
    height: 0.25rem;
    background: white;
    border-radius: 10px;
}

/* --- CTA SECTION --- */
.cta-section {
    padding: 3rem 1rem;
    background-color: var(--card-bg);
}
.cta-box {
    max-width: 700px;
    margin: 0 auto;
    padding: 2.5rem 3rem;
    background-color: var(--light-gray);
    border: 1px solid var(--medium-gray);
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 20px -5px rgba(0,0,0,0.05);
}
.cta-box h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-gray);
    margin: 0 0 1rem 0;
}
.cta-box p {
    font-size: 1rem;
    color: #4b5563;
    line-height: 1.7;
    margin: 0 0 2rem 0;
}
.cta-button {
    display: inline-block;
    background-color: #c9ff629c; /* A soft yellow */
    color: #374151;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.8rem 2.5rem;
    border-radius: 99px;
    text-decoration: none;
    border: 1px solid #b4ffc873;
    transition: all 0.2s ease-in-out;
}
.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px -5px rgba(245, 158, 11, 0.4);
    background-color: #fef3c7;
}


/* --- HOMEPAGE BLOG STYLES --- */
#articles-section { padding-top: 3rem; }
.page-header { text-align: center; margin: 0 auto 3rem auto; }
.page-header h1 { font-size: 2.5rem; font-weight: 700; color: var(--dark-gray); margin-bottom: 0.5rem; }
.page-header p { font-size: 1.1rem; color: #6b7280; }
.page-intro {
    font-size: 1.1rem;
    color: var(--text-color);
    line-height: 1.8;
    max-width: 800px;
    margin: -1.5rem auto 3rem auto; /* Pulls it closer to the title */
    text-align: center;
}
.articles-container { max-width: 1000px; margin: 0 auto 4rem auto; }
.article-post-block { background-color: var(--card-bg); border: 1px solid var(--medium-gray); border-radius: 16px; margin-bottom: 3rem; box-shadow: 0 4px 20px -5px rgba(0,0,0,0.08); overflow: hidden; }
.post-image-container { position: relative; width: 100%; background-color: var(--light-gray); }
.post-image-container a { display: block; }
.post-image { display: block; width: 100%; height: auto; max-height: 400px; object-fit: cover; }
.post-meta-overlay { position: absolute; bottom: 0; left: 0; width: 100%; padding: 1rem 1.5rem; color: white; font-weight: 500; font-size: 0.9rem; background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%); box-sizing: border-box; }
.post-content-container { padding: 2rem 2.5rem 2.5rem; }
.post-title { font-size: 2rem; font-weight: 700; margin-top: 0; margin-bottom: 1.5rem; }
.post-title a { color: var(--dark-gray); text-decoration: none; transition: color 0.2s; }
.post-title a:hover { color: var(--dark-yellow); }
.article-post-block .article-content { line-height: 1.8; font-size: 1.1rem; }
.article-post-block .article-content h3 { font-size: 1.5rem; margin-top: 2rem; }

/* --- ARTICLE EXCERPT & LINK --- */
.article-excerpt p {
    line-height: 1.8;
    font-size: 1.1rem;
    color: var(--text-color);
    margin: 0;
}
.read-full-article-link {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.6rem 1.5rem;
    border: 2px solid var(--medium-gray);
    border-radius: 99px;
    color: var(--dark-gray);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}
.read-full-article-link:hover {
    background-color: var(--dark-yellow);
    border-color: var(--dark-yellow);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* --- FEATURES SECTION --- */
.features-section { background-color: var(--section-bg); padding: 5rem 1rem; text-align: center; }
.features-header { max-width: 800px; margin: 0 auto 3.5rem auto; }
.features-header h2 { font-size: 3rem; font-weight: 700; color: var(--dark-gray); line-height: 1.2; margin: 0; } /* CHANGED FROM H1 */
.features-header h2 strong { font-size: 3.5rem; } /* CHANGED FROM H1 */
.features-header p { font-size: 1.1rem; color: #4b5563; line-height: 1.8; max-width: 700px; margin: 1.5rem auto 0 auto; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; max-width: 1100px; margin: 0 auto; text-align: left; }
.feature-card { background: var(--card-bg); border-radius: 16px; border: 1px solid var(--medium-gray); box-shadow: 0 10px 30px -10px rgba(0,0,0,0.1); overflow: hidden; }
.feature-card img { width: 100%; height: auto; object-fit: cover; display: block; aspect-ratio: 400 / 220; } /* CLS FIX */
.feature-card-content { padding: 1.5rem; }
.feature-category { font-size: 0.8rem; color: #6b7280; font-weight: 500; }
.feature-card h3 { font-size: 1.4rem; font-weight: 600; color: var(--dark-gray); margin: 0.25rem 0 0.75rem 0; }
.feature-card p { font-size: 0.95rem; color: #4b5563; line-height: 1.7; margin: 0; }

/* --- STATIC & SINGLE ARTICLE PAGE STYLES --- */
.page-wrapper { background: white; padding: 3rem 4rem; border-radius: 12px; border: 1px solid var(--medium-gray); margin: 2.5rem auto; max-width: 900px; box-shadow: 0 10px 30px -10px rgba(0,0,0,0.1); }
.page-wrapper h1, .article-page .article-header h1 { font-size: 2.8rem; font-weight: 700; color: var(--dark-gray); text-align: center; margin: 0; }
.page-wrapper p, .page-wrapper li { color: #4b5563; line-height: 1.8; }
.article-page .article-featured-image { width: 100%; height: auto; max-height: 450px; object-fit: cover; border-radius: 8px; margin-bottom: 2.5rem; }
.article-page .article-header { text-align: center; border-bottom: 1px solid var(--medium-gray); padding-bottom: 2rem; margin-bottom: 2.5rem; }
.article-page .article-header p { color: #6b7280; font-size: 0.9rem; margin-top: 1rem; }
.article-page .article-content { font-size: 1.1rem; line-height: 1.9; color: var(--text-color); }
.article-page .article-content h2, .article-page .article-content h3 { color: var(--dark-gray); font-weight: 600; margin-top: 2.5rem; margin-bottom: 1rem; }
.article-page .article-content h2 { font-size: 1.8rem; }
.article-page .article-content h3 { font-size: 1.5rem; }
.article-page .article-content p { margin-bottom: 1.5rem; }
.article-page .article-content a { color: var(--dark-yellow); text-decoration: underline; }
.article-page .article-content ul, .article-page .article-content ol { padding-left: 2rem; margin-bottom: 1.5rem; }
.article-page .article-content li { margin-bottom: 1rem; }

/* --- RELATED ARTICLES --- */
.related-articles-section {
    margin-top: 4rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--medium-gray);
}
.related-articles-title {
    text-align: center;
    font-size: 1.8rem;
    color: var(--dark-gray);
    margin-bottom: 2.5rem;
}
.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}
.related-article-card {
    text-decoration: none;
    color: var(--text-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px -5px rgba(0,0,0,0.07);
    border: 1px solid var(--medium-gray);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.related-article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px -8px rgba(0,0,0,0.15);
}
.related-article-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}
.related-article-card h4 {
    font-size: 1rem;
    font-weight: 600;
    padding: 1rem;
    margin: 0;
    line-height: 1.5;
}

/* --- 404 ERROR PAGE --- */
.error-page-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 3rem 1rem;
    min-height: 50vh;
}
.error-page-container h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 1rem;
}
.error-page-container p {
    font-size: 1.1rem;
    color: #4b5563;
    max-width: 500px;
    margin-bottom: 2rem;
}
.error-page-button {
    margin-top: 1rem;
}


/* --- FOOTER --- */
.site-footer { background-color: #f3f4f6; padding: 3rem 1rem; border-top: 1px solid var(--medium-gray); margin-top: auto; }
.site-footer .container { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 2rem; }
.footer-about, .footer-links { flex: 1; min-width: 250px; }
.footer-title { font-size: 1rem; font-weight: 600; color: var(--dark-gray); margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 0.05em; margin-block-start: 0; margin-block-end: 1rem; }
.footer-about p, .footer-links a { color: #6b7280; text-decoration: none; }
.footer-links ul { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a:hover { color: var(--dark-yellow); }
.footer-copyright { width: 100%; text-align: center; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--medium-gray); color: #6b7280; }

/* --- LANGUAGE SWITCHER --- */
.language-switcher { position: relative; display: inline-block; margin-left: 1rem; }
.language-switcher-button { background-color: transparent; border: 1px solid rgba(255, 255, 255, 0.5); color: white; padding: 0.5rem 1rem; font-size: 0.9rem; font-weight: 500; border-radius: 99px; cursor: pointer; display: flex; align-items: center; transition: background-color 0.2s; }
.language-switcher-button svg { margin-left: 0.25rem; }
.language-switcher-menu { display: none; position: absolute; top: calc(100% + 8px); right: 0; background-color: white; min-width: 100px; box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2); z-index: 101; border-radius: 8px; padding: 0.5rem 0; border: 1px solid var(--medium-gray); }
.language-switcher:hover .language-switcher-menu { display: block; }
.language-switcher-menu a { color: var(--dark-gray); padding: 0.75rem 1.5rem; text-decoration: none; display: block; margin: 0 !important; font-weight: 500; font-size: 0.9rem; text-shadow: none; }
.language-switcher-menu a:hover { background-color: #f1f1f1; color: var(--dark-gray); opacity: 1; }

/* --- WHERE TO START SECTION (TEXT-ONLY FINAL STYLES) --- */
.where-to-start-section {
    background-color: var(--card-bg);
    padding: 4rem 1rem;
    border-top: 1px solid var(--medium-gray);
    border-bottom: 1px solid var(--medium-gray);
}
.where-to-start-section .page-header {
    margin-bottom: 2.5rem;
}
.where-to-start-section .page-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-gray);
}
.featured-article-standalone {
    max-width: 800px; /* Optimal reading width */
    margin: 0 auto;
}
.featured-article-standalone .featured-article-title {
    font-size: 2.8rem;
    font-weight: 700;
    text-align: center; /* Centered title now looks better */
    color: var(--dark-gray);
    margin-bottom: 2.5rem;
}
/* Re-use the existing article content styles */
.featured-article-standalone .article-content {
    font-size: 1.1rem; line-height: 1.9; color: var(--text-color);
}
.featured-article-standalone .article-content h2, .featured-article-standalone .article-content h3 {
    color: var(--dark-gray); font-weight: 600; margin-top: 2.5rem; margin-bottom: 1rem; text-align: left;
}
.featured-article-standalone .article-content h2 { font-size: 1.8rem; }
.featured-article-standalone .article-content h3 { font-size: 1.5rem; }
.featured-article-standalone .article-content p { margin-bottom: 1.5rem; text-align: left; }
.featured-article-standalone .article-content a { color: var(--dark-yellow); text-decoration: underline; }
.featured-article-standalone .article-content ul, .featured-article-standalone .article-content ol { padding-left: 2rem; margin-bottom: 1.5rem; text-align: left; }
.featured-article-standalone .article-content li { margin-bottom: 1rem; }


/* --- RESPONSIVE STYLES --- */
@media (max-width: 820px) {
    .container { padding: 0 1.5rem; }
    .logo { font-size: 1.3rem; }
    .site-header .container {
        flex-wrap: wrap;
    }
    .hamburger-menu {
        display: flex;
    }
    .main-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        order: 3;
        align-items: center;
        padding: 1rem 0;
    }
    .main-nav.active {
        display: flex;
    }
    .main-nav a {
        font-size: 1.2rem;
        margin: 0.75rem 0;
        margin-left: 0;
    }
    .language-switcher {
        margin-left: 0;
        margin-top: 0.75rem;
    }
    .language-switcher-button {
        padding: 0.6rem 1.2rem;
        font-size: 1rem;
    }
    .language-switcher-menu {
        right: 50%;
        transform: translateX(50%);
    }

    /* Other responsive styles */
    .features-section { padding: 3rem 1rem; }
    .features-header h2 { font-size: 2.2rem; }
    .features-header h2 strong { font-size: 2.5rem; }
    .page-header h1 { font-size: 2rem; }
    .post-content-container { padding: 1.5rem; }
    .post-title { font-size: 1.6rem; }
    .page-wrapper { padding: 2rem 1.5rem; margin: 1.5rem auto; }
    .page-wrapper h1, .article-page .article-header h1 { font-size: 2.2rem; }
    .article-page .article-content { font-size: 1rem; }
    .site-footer .container { flex-direction: column; text-align: center; }
    .footer-about, .footer-links { min-width: 100%; text-align: center; }
    .footer-links ul { display: inline-block; text-align: center; }
    
    /* Responsive "Where to Start" */
    .where-to-start-section { padding: 3rem 1rem; }
    .where-to-start-section .page-header h2 { font-size: 2rem; }
    .featured-article-standalone .featured-article-title { font-size: 2.2rem; }
    .featured-article-standalone .article-content { font-size: 1rem; }
}