/* 
* Cotonsladzo - Blog Stylesheet
* Version: 1.0
*/

/* =================== 
   Table of Contents
   1. Blog Header
   2. Blog Grid Layout
   3. Blog Sidebar
   4. Article Page
   5. Related Articles
   6. Responsive Adjustments
=================== */

/* =================== 
   1. Blog Header
=================== */
.blog-header {
    background-color: #1a73e8;
    color: #fff;
    padding: 4rem 0;
    text-align: center;
}

.blog-header h1 {
    color: #fff;
    margin-bottom: 1rem;
}

.blog-header p {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.125rem;
}

/* =================== 
   2. Blog Grid Layout
=================== */
.blog-grid .container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    padding: 4rem 20px;
}

.blog-posts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.blog-card {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-8px);
}

.blog-image {
    height: 225px;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #666;
}

.blog-meta i {
    color: #1a73e8;
    margin-right: 0.25rem;
}

.blog-content h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.blog-content p {
    margin-bottom: 1.5rem;
}

.blog-content .btn {
    margin-top: auto;
    align-self: flex-start;
}

/* =================== 
   3. Blog Sidebar
=================== */
.blog-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.sidebar-widget {
    background-color: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.sidebar-widget h3 {
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #eee;
}

.category-list li {
    margin-bottom: 0.75rem;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    color: #333;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.category-list a:hover {
    color: #1a73e8;
    padding-left: 5px;
}

.popular-posts li {
    margin-bottom: 1.25rem;
}

.popular-posts li:last-child {
    margin-bottom: 0;
}

.popular-posts a {
    display: flex;
    gap: 0.75rem;
    color: #333;
}

.popular-posts a:hover {
    color: #1a73e8;
}

.popular-posts img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.popular-posts h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.popular-posts span {
    font-size: 0.875rem;
    color: #666;
}

.cta-widget {
    background-color: #f7f9fc;
    text-align: center;
}

.cta-widget h3 {
    border-bottom: none;
    padding-bottom: 0;
}

.cta-widget p {
    margin-bottom: 1.25rem;
}

.sidebar-newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-newsletter-form input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* =================== 
   4. Article Page
=================== */
.blog-article .container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    padding: 4rem 20px;
}

.article-header {
    margin-bottom: 2.5rem;
}

.blog-breadcrumbs {
    margin-bottom: 1.5rem;
    color: #666;
    font-size: 0.875rem;
}

.blog-breadcrumbs a {
    color: #1a73e8;
}

.blog-breadcrumbs a:hover {
    text-decoration: underline;
}

.article-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: #666;
}

.article-meta i {
    color: #1a73e8;
    margin-right: 0.25rem;
}

.article-featured-image {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.article-featured-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.article-intro {
    font-size: 1.125rem;
    color: #444;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.article-body {
    line-height: 1.8;
    color: #333;
}

.article-body h2 {
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    color: #1a73e8;
}

.article-body h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-body ul, 
.article-body ol {
    margin-bottom: 1.5rem;
    margin-left: 1.5rem;
}

.article-body ul {
    list-style-type: disc;
}

.article-body ol {
    list-style-type: decimal;
}

.article-body li {
    margin-bottom: 0.5rem;
}

.article-image {
    margin: 2rem 0;
    text-align: center;
}

.article-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.image-caption {
    font-size: 0.875rem;
    color: #666;
    text-align: center;
}

.article-callout {
    background-color: #f7f9fc;
    border-left: 4px solid #1a73e8;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
}

.article-callout h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #1a73e8;
}

.article-callout p:last-child {
    margin-bottom: 0;
}

.article-cta {
    background-color: #f7f9fc;
    border-radius: 8px;
    padding: 2rem;
    margin: 3rem 0;
    text-align: center;
}

.article-cta h3 {
    margin-bottom: 1rem;
}

.article-cta p {
    margin-bottom: 1.5rem;
}

.article-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.article-tags span,
.article-share span {
    font-weight: 600;
    margin-right: 0.75rem;
}

.article-tags a {
    display: inline-block;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0.75rem;
    background-color: #f0f4f8;
    color: #1a73e8;
    border-radius: 3px;
    font-size: 0.875rem;
    transition: background-color 0.3s ease;
}

.article-tags a:hover {
    background-color: #e3f2fd;
}

.article-share a {
    display: inline-block;
    width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    background-color: #f0f4f8;
    color: #1a73e8;
    border-radius: 50%;
    margin-right: 0.5rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.article-share a:hover {
    background-color: #1a73e8;
    color: #fff;
}

.article-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.author-widget {
    text-align: center;
}

.author-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.author-info h4 {
    margin-bottom: 0.75rem;
}

.sidebar-posts {
    list-style: none;
}

.sidebar-posts li {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #eee;
}

.sidebar-posts li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sidebar-posts a {
    color: #333;
    transition: color 0.3s ease;
}

.sidebar-posts a:hover {
    color: #1a73e8;
}

/* =================== 
   5. Related Articles
=================== */
.article-related {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.article-related h3 {
    margin-bottom: 1.5rem;
}

.related-posts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.related-post {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.related-post:hover {
    transform: translateY(-5px);
}

.related-post a {
    display: block;
    color: #333;
}

.related-post img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.related-post h4 {
    padding: 1rem;
    font-size: 1rem;
    line-height: 1.4;
}

/* =================== 
   6. Responsive Adjustments
=================== */
@media (max-width: 992px) {
    .blog-grid .container,
    .blog-article .container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .blog-sidebar,
    .article-sidebar {
        position: static;
    }

    .article-header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .blog-header {
        padding: 3rem 0;
    }

    .blog-grid .container,
    .blog-article .container {
        padding: 3rem 20px;
    }

    .article-footer {
        flex-direction: column;
        gap: 1.5rem;
    }

    .related-posts {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 576px) {
    .blog-card {
        flex-direction: column;
    }

    .blog-image {
        height: 200px;
    }

    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}
