/**
 * Blog & Archive Styles
 * 
 * @package GrowthSheriff
 * @since 1.0.0
 */

/* ==========================================================================
   Archive Header
   ========================================================================== */
.archive-header {
    text-align: center;
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--gs-border, #eee);
}

.archive-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--gs-heading, #1a1a2e);
    margin: 0 0 15px;
}

.archive-description {
    max-width: 600px;
    margin: 0 auto;
    font-size: 16px;
    color: var(--gs-text, #666);
    line-height: 1.7;
}

/* ==========================================================================
   Archive Content Wrapper
   ========================================================================== */
.archive-content-wrapper {
    display: grid;
    gap: 40px;
}

.archive-content-wrapper.sidebar-none {
    grid-template-columns: 1fr;
}

.archive-content-wrapper.sidebar-left {
    grid-template-columns: 300px 1fr;
}

.archive-content-wrapper.sidebar-right {
    grid-template-columns: 1fr 300px;
}

.archive-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

/* ==========================================================================
   Posts Grid
   ========================================================================== */
.posts-grid {
    display: grid;
    gap: 30px;
}

.posts-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.posts-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.posts-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

/* List Layout */
.posts-grid--list {
    grid-template-columns: 1fr;
}

.posts-grid--list .post-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
}

.posts-grid--list .post-card__thumbnail {
    aspect-ratio: 4/3;
}

/* ==========================================================================
   Post Card
   ========================================================================== */
.post-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.post-card__thumbnail {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.post-card__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-card__thumbnail img {
    transform: scale(1.05);
}

.post-card__categories {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.post-card__categories a {
    display: inline-block;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--gs-primary, #6254E7);
    color: #fff;
    border-radius: 20px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.post-card__categories a:hover {
    background: var(--gs-secondary, #F2295B);
}

.post-card__content {
    padding: 25px;
}

.post-card__meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--gs-text-light, #999);
}

.post-card__author a {
    color: var(--gs-primary, #6254E7);
    text-decoration: none;
}

.post-card__author a:hover {
    text-decoration: underline;
}

.post-card__title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 12px;
}

.post-card__title a {
    color: var(--gs-heading, #1a1a2e);
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-card__title a:hover {
    color: var(--gs-primary, #6254E7);
}

.post-card__excerpt {
    font-size: 14px;
    line-height: 1.7;
    color: var(--gs-text, #666);
    margin-bottom: 20px;
}

.post-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.post-card__read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gs-primary, #6254E7);
    text-decoration: none;
    transition: gap 0.3s ease;
}

.post-card__read-more:hover {
    gap: 10px;
}

.post-card__comments {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--gs-text-light, #999);
}

/* ==========================================================================
   Search Results
   ========================================================================== */
.search-header {
    text-align: center;
    margin-bottom: 50px;
}

.search-header .page-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 20px;
}

.search-query {
    color: var(--gs-primary, #6254E7);
}

.search-form-wrapper {
    max-width: 500px;
    margin: 0 auto;
}

.search-result-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 25px;
    padding: 25px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.search-result-thumbnail {
    border-radius: 8px;
    overflow: hidden;
}

.search-result-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 12px;
}

.search-result-meta .post-type {
    padding: 3px 10px;
    background: var(--gs-light-bg, #f5f5f5);
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.search-result-meta .post-date {
    color: var(--gs-text-light, #999);
}

.search-result-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 10px;
}

.search-result-title a {
    color: var(--gs-heading, #1a1a2e);
    text-decoration: none;
    transition: color 0.3s ease;
}

.search-result-title a:hover {
    color: var(--gs-primary, #6254E7);
}

.search-result-excerpt {
    font-size: 14px;
    color: var(--gs-text, #666);
    line-height: 1.6;
    margin-bottom: 15px;
}

/* ==========================================================================
   No Results
   ========================================================================== */
.no-results,
.no-posts {
    text-align: center;
    padding: 80px 20px;
}

.no-results-icon {
    margin-bottom: 30px;
    color: var(--gs-text-light, #999);
}

.no-results-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 15px;
    color: var(--gs-heading, #1a1a2e);
}

.no-results-text {
    max-width: 500px;
    margin: 0 auto 30px;
    font-size: 16px;
    color: var(--gs-text, #666);
}

.no-results-search {
    max-width: 400px;
    margin: 0 auto;
}

/* ==========================================================================
   Search Form
   ========================================================================== */
.search-form__inner {
    display: flex;
    position: relative;
}

.search-form__input {
    flex: 1;
    padding: 15px 50px 15px 20px;
    font-size: 15px;
    border: 2px solid var(--gs-border, #eee);
    border-radius: 50px;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-form__input:focus {
    border-color: var(--gs-primary, #6254E7);
}

.search-form__button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gs-primary, #6254E7);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-form__button:hover {
    background: var(--gs-primary-dark, #5044c7);
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination-wrapper {
    margin-top: 50px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 15px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gs-text, #666);
    background: #fff;
    border: 1px solid var(--gs-border, #eee);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination .page-numbers:hover {
    border-color: var(--gs-primary, #6254E7);
    color: var(--gs-primary, #6254E7);
}

.pagination .page-numbers.current {
    background: var(--gs-primary, #6254E7);
    border-color: var(--gs-primary, #6254E7);
    color: #fff;
}

.pagination .dots {
    background: none;
    border: none;
}

/* ==========================================================================
   Comments
   ========================================================================== */
.comments-area {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--gs-border, #eee);
}

.comments-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 30px;
}

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment-list .comment {
    margin-bottom: 30px;
}

.comment-list .children {
    list-style: none;
    margin: 30px 0 0;
    padding-left: 50px;
}

.comment-body {
    background: var(--gs-light-bg, #f9f9f9);
    padding: 25px;
    border-radius: 12px;
}

.comment-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.comment-author img {
    border-radius: 50%;
}

.comment-author .fn {
    font-size: 16px;
    font-weight: 600;
    color: var(--gs-heading, #1a1a2e);
}

.comment-metadata {
    font-size: 13px;
    color: var(--gs-text-light, #999);
}

.comment-metadata a {
    color: inherit;
    text-decoration: none;
}

.comment-content {
    font-size: 15px;
    line-height: 1.7;
    color: var(--gs-text, #666);
}

.comment-content p:last-child {
    margin-bottom: 0;
}

.reply {
    margin-top: 15px;
}

.reply-link a {
    font-size: 13px;
    font-weight: 600;
    color: var(--gs-primary, #6254E7);
    text-decoration: none;
}

/* Comment Form */
.comment-respond {
    margin-top: 40px;
}

.comment-respond .comment-reply-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 25px;
}

.comment-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gs-heading, #1a1a2e);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 18px;
    font-size: 15px;
    border: 2px solid var(--gs-border, #eee);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--gs-primary, #6254E7);
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

.comment-form p {
    margin-bottom: 20px;
}

.comment-form .form-submit {
    margin-bottom: 0;
}

.comment-form .submit {
    display: inline-block;
    padding: 14px 35px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: var(--gs-primary, #6254E7);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.comment-form .submit:hover {
    background: var(--gs-primary-dark, #5044c7);
    transform: translateY(-2px);
}

/* ==========================================================================
   Sidebar / Widget Area
   ========================================================================== */
.widget-area {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.widget {
    padding: 25px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gs-primary, #6254E7);
    color: var(--gs-heading, #1a1a2e);
}

.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--gs-border, #eee);
}

.widget ul li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.widget ul li a {
    color: var(--gs-text, #666);
    text-decoration: none;
    transition: color 0.3s ease;
}

.widget ul li a:hover {
    color: var(--gs-primary, #6254E7);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1199px) {
    .archive-content-wrapper.sidebar-left,
    .archive-content-wrapper.sidebar-right {
        grid-template-columns: 1fr;
    }
    
    .archive-sidebar {
        position: static;
    }
}

@media (max-width: 991px) {
    .posts-grid--cols-3,
    .posts-grid--cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .posts-grid--cols-2,
    .posts-grid--cols-3,
    .posts-grid--cols-4 {
        grid-template-columns: 1fr;
    }
    
    .posts-grid--list .post-card {
        grid-template-columns: 1fr;
    }
    
    .search-result-item {
        grid-template-columns: 1fr;
    }
    
    .comment-list .children {
        padding-left: 20px;
    }
    
    .archive-title {
        font-size: 28px;
    }
}

/* ==========================================================================
   SINGLE POST STYLES
   ========================================================================== */
.single-post {
    max-width: 800px;
    margin: 0 auto;
}

.single-post__header {
    text-align: center;
    margin-bottom: 2rem;
}

.single-post__categories {
    margin-bottom: 1rem;
}

.single-post__categories a {
    display: inline-block;
    background: var(--gs-primary, #6254E7);
    color: #fff;
    padding: 0.35rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    margin: 0 0.25rem 0.5rem;
    transition: background 0.3s ease;
}

.single-post__categories a:hover {
    background: var(--gs-primary-dark, #4a3db8);
}

.single-post__title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 1.5rem;
    color: var(--gs-heading, #1a1a2e);
}

.single-post__meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    color: var(--gs-gray-600, #6c757d);
    font-size: 0.875rem;
}

.single-post__author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.single-post__author img {
    border-radius: 50%;
}

.single-post__author a {
    color: var(--gs-primary, #6254E7);
    text-decoration: none;
    font-weight: 600;
}

.single-post__featured-image {
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
}

.single-post__featured-image img {
    width: 100%;
    height: auto;
}

.single-post__image-caption {
    text-align: center;
    font-size: 0.875rem;
    color: var(--gs-gray-600);
    margin-top: 0.75rem;
    font-style: italic;
}

.single-post__content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--gs-text, #333);
}

.single-post__content h2,
.single-post__content h3,
.single-post__content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--gs-heading, #1a1a2e);
}

.single-post__content p {
    margin-bottom: 1.5rem;
}

.single-post__content blockquote {
    border-left: 4px solid var(--gs-primary, #6254E7);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--gs-gray-700);
}

.single-post__content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.single-post__content ul,
.single-post__content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.single-post__content li {
    margin-bottom: 0.5rem;
}

/* Tags */
.single-post__footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gs-gray-200, #e9ecef);
}

.single-post__tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.single-post__tags-label {
    font-weight: 600;
    color: var(--gs-heading, #1a1a2e);
}

.single-post__tags a {
    display: inline-block;
    background: var(--gs-gray-100, #f8f9fa);
    color: var(--gs-gray-700, #495057);
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8125rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.single-post__tags a:hover {
    background: var(--gs-primary, #6254E7);
    color: #fff;
}

/* Share Buttons */
.single-post__share {
    margin-top: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.single-post__share-label {
    font-weight: 600;
    color: var(--gs-heading, #1a1a2e);
}

.single-post__share-buttons {
    display: flex;
    gap: 0.5rem;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.share-btn:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

.share-btn--facebook { background: #1877f2; }
.share-btn--twitter { background: #000; }
.share-btn--linkedin { background: #0a66c2; }
.share-btn--whatsapp { background: #25d366; }

/* Author Bio */
.single-post__author-bio {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--gs-gray-100, #f8f9fa);
    border-radius: 12px;
    display: flex;
    gap: 1.5rem;
}

.author-bio__avatar img {
    border-radius: 50%;
}

.author-bio__content {
    flex: 1;
}

.author-bio__name {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--gs-heading, #1a1a2e);
}

.author-bio__description {
    margin: 0 0 1rem;
    color: var(--gs-gray-600);
    line-height: 1.6;
}

.author-bio__link {
    color: var(--gs-primary, #6254E7);
    text-decoration: none;
    font-weight: 600;
}

/* Post Navigation */
.single-post__navigation {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gs-gray-200, #e9ecef);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.post-nav {
    padding: 1.5rem;
    background: var(--gs-gray-100, #f8f9fa);
    border-radius: 8px;
    transition: background 0.3s ease;
}

.post-nav:hover {
    background: var(--gs-gray-200, #e9ecef);
}

.post-nav--next {
    text-align: right;
}

.post-nav__label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--gs-gray-500);
    margin-bottom: 0.5rem;
}

.post-nav__link {
    color: var(--gs-heading, #1a1a2e);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.4;
}

/* Single Post Responsive */
@media (max-width: 767px) {
    .single-post__title {
        font-size: 1.75rem;
    }
    
    .single-post__meta {
        gap: 1rem;
    }
    
    .single-post__author-bio {
        flex-direction: column;
        text-align: center;
    }
    
    .single-post__navigation {
        grid-template-columns: 1fr;
    }
    
    .post-nav--next {
        text-align: left;
    }
}
