/*--------------------------------------------------------------
 * xTheme - Blog Styles
 *--------------------------------------------------------------*/

/* =============================================
   Blog Grid / List Layout
   ============================================= */
.xtheme-posts--grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
}

.xtheme-posts--list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* =============================================
   Post Card
   ============================================= */
.xtheme-card {
    background: var(--xtheme-white);
    border-radius: var(--xtheme-radius-lg);
    overflow: hidden;
    border: 1px solid var(--xtheme-border);
    transition: transform var(--xtheme-transition), box-shadow var(--xtheme-transition);
}

.xtheme-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--xtheme-shadow-lg);
}

/* Card image */
.xtheme-card__image {
    position: relative;
    overflow: hidden;
}

.xtheme-card__image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.xtheme-card:hover .xtheme-card__image img {
    transform: scale(1.05);
}

.xtheme-card__image .cat-links {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
}

.xtheme-card__image .cat-links a {
    display: inline-block;
    background: var(--xtheme-accent);
    color: var(--xtheme-white);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Card content */
.xtheme-card__content {
    padding: 22px;
}

/* Card meta */
.xtheme-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: var(--xtheme-text-light);
}

.xtheme-card__meta a {
    color: var(--xtheme-text-light);
}

.xtheme-card__meta a:hover {
    color: var(--xtheme-accent);
}

.xtheme-card__meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Card title */
.xtheme-card__title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.xtheme-card__title a {
    color: var(--xtheme-primary);
}

.xtheme-card__title a:hover {
    color: var(--xtheme-accent);
}

/* Card excerpt */
.xtheme-card__excerpt {
    color: var(--xtheme-text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.xtheme-card__excerpt p {
    margin: 0;
}

/* Read more */
.xtheme-card__readmore {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--xtheme-accent);
    font-weight: 600;
    font-size: 0.9rem;
    transition: gap var(--xtheme-transition);
}

.xtheme-card__readmore:hover {
    color: var(--xtheme-primary);
    gap: 10px;
}

/* =============================================
   List Layout Card
   ============================================= */
.xtheme-posts--list .xtheme-card {
    display: flex;
}

.xtheme-posts--list .xtheme-card__image {
    width: 300px;
    flex-shrink: 0;
}

.xtheme-posts--list .xtheme-card__image img {
    height: 100%;
    min-height: 220px;
}

.xtheme-posts--list .xtheme-card__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* =============================================
   Single Post
   ============================================= */
.xtheme-single__header {
    margin-bottom: 30px;
}

.xtheme-single__title {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.xtheme-single__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    color: var(--xtheme-text-light);
    font-size: 0.9rem;
}

.xtheme-single__meta a {
    color: var(--xtheme-text-light);
}

.xtheme-single__meta a:hover {
    color: var(--xtheme-accent);
}

.xtheme-single__thumbnail {
    margin-bottom: 30px;
    border-radius: var(--xtheme-radius-lg);
    overflow: hidden;
}

.xtheme-single__thumbnail img {
    width: 100%;
    height: auto;
}

.xtheme-single__content {
    font-size: 1.05rem;
    line-height: 1.8;
}

.xtheme-single__footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--xtheme-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.xtheme-single__tags {
    font-size: 0.9rem;
}

.xtheme-single__tags a {
    display: inline-block;
    padding: 4px 12px;
    background: var(--xtheme-light-bg);
    border-radius: 50px;
    color: var(--xtheme-text);
    font-size: 0.85rem;
    margin: 2px;
    transition: all var(--xtheme-transition);
}

.xtheme-single__tags a:hover {
    background: var(--xtheme-accent);
    color: var(--xtheme-white);
}

/* =============================================
   Social Share
   ============================================= */
.xtheme-social-share {
    display: flex;
    align-items: center;
    gap: 10px;
}

.xtheme-social-share__label {
    font-weight: 600;
    font-size: 0.9rem;
}

.xtheme-social-share__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--xtheme-light-bg);
    color: var(--xtheme-text);
    font-size: 0.85rem;
    transition: all var(--xtheme-transition);
}

.xtheme-social-share__link:hover {
    background: var(--xtheme-accent);
    color: var(--xtheme-white);
    transform: translateY(-2px);
}

/* =============================================
   Author Box
   ============================================= */
.xtheme-author-box {
    display: flex;
    gap: 20px;
    padding: 30px;
    margin-top: 30px;
    background: var(--xtheme-light-bg);
    border-radius: var(--xtheme-radius-lg);
}

.xtheme-author-box__avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.xtheme-author-box__name {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.xtheme-author-box__name a {
    color: var(--xtheme-primary);
}

.xtheme-author-box__bio {
    color: var(--xtheme-text-light);
    font-size: 0.95rem;
    margin: 0;
}

/* =============================================
   Related Posts
   ============================================= */
.xtheme-related-posts {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--xtheme-border);
}

.xtheme-related-posts__title {
    margin-bottom: 20px;
}

.xtheme-related-posts__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.xtheme-related-posts__item {
    border: 1px solid var(--xtheme-border);
    border-radius: var(--xtheme-radius);
    overflow: hidden;
    transition: transform var(--xtheme-transition), box-shadow var(--xtheme-transition);
}

.xtheme-related-posts__item:hover {
    transform: translateY(-3px);
    box-shadow: var(--xtheme-shadow);
}

.xtheme-related-posts__image img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.xtheme-related-posts__item h4 {
    padding: 12px 15px 5px;
    font-size: 0.95rem;
    margin: 0;
}

.xtheme-related-posts__item h4 a {
    color: var(--xtheme-primary);
}

.xtheme-related-posts__item h4 a:hover {
    color: var(--xtheme-accent);
}

.xtheme-related-posts__date {
    display: block;
    padding: 0 15px 12px;
    font-size: 0.8rem;
    color: var(--xtheme-text-light);
}

/* =============================================
   Comments
   ============================================= */
.xtheme-comments {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--xtheme-border);
}

.xtheme-comments__title {
    margin-bottom: 25px;
}

.xtheme-comments__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.xtheme-comment {
    margin-bottom: 20px;
}

.xtheme-comment__body {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: var(--xtheme-light-bg);
    border-radius: var(--xtheme-radius);
}

.xtheme-comment__avatar img {
    border-radius: 50%;
}

.xtheme-comment__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.xtheme-comment__author {
    font-weight: 600;
    color: var(--xtheme-primary);
}

.xtheme-comment__date {
    font-size: 0.85rem;
    color: var(--xtheme-text-light);
}

.xtheme-comment__text {
    font-size: 0.95rem;
    line-height: 1.6;
}

.xtheme-comment__text p:last-child {
    margin-bottom: 0;
}

.xtheme-comment__actions {
    margin-top: 8px;
    font-size: 0.85rem;
}

.xtheme-comment__actions a {
    color: var(--xtheme-accent);
    font-weight: 500;
}

.xtheme-comment .children {
    list-style: none;
    padding-left: 40px;
    margin-top: 15px;
}

/* Comment form */
.xtheme-comments__form .comment-form {
    display: grid;
    gap: 15px;
}

.xtheme-comments__form .comment-form p {
    margin: 0;
}

/* Post navigation */
.post-navigation {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid var(--xtheme-border);
    border-bottom: 1px solid var(--xtheme-border);
}

.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
}

.post-navigation .nav-subtitle {
    display: block;
    font-size: 0.8rem;
    color: var(--xtheme-text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.post-navigation .nav-title {
    font-weight: 600;
    color: var(--xtheme-primary);
}

.post-navigation a:hover .nav-title {
    color: var(--xtheme-accent);
}

/* Search result */
.xtheme-search-result {
    margin-bottom: 20px;
    padding: 20px;
    border: 1px solid var(--xtheme-border);
    border-radius: var(--xtheme-radius);
    transition: box-shadow var(--xtheme-transition);
}

.xtheme-search-result:hover {
    box-shadow: var(--xtheme-shadow);
}

.xtheme-search-result__inner {
    display: flex;
    gap: 20px;
}

.xtheme-search-result__image {
    width: 100px;
    flex-shrink: 0;
}

.xtheme-search-result__image img {
    border-radius: var(--xtheme-radius-sm);
}

.xtheme-search-result__title {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.xtheme-search-result__title a {
    color: var(--xtheme-primary);
}

.xtheme-search-result__title a:hover {
    color: var(--xtheme-accent);
}

.xtheme-search-result__meta {
    display: flex;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--xtheme-text-light);
    margin-bottom: 8px;
}

.xtheme-search-result__type {
    background: var(--xtheme-light-bg);
    padding: 2px 8px;
    border-radius: var(--xtheme-radius-sm);
    font-size: 0.8rem;
}

.xtheme-search-result__excerpt {
    font-size: 0.95rem;
    color: var(--xtheme-text-light);
}