/**
 * ShowcaseX Blog Design System
 * 
 * High-fidelity styles for the blog archive and post cards.
 * Blueprint: EcoSonic (Modern, Professional, High-Performance)
 */

/* --- Blog Hero Section --- */
.sx-blog-hero {
    background: linear-gradient(135deg, var(--sx-secondary) 0%, #1a2a4a 100%);
    padding: 80px 0;
    color: white;
    position: relative;
    overflow: hidden;
    margin-bottom: 60px;
}

.sx-blog-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.sx-blog-hero .page-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: white;
    line-height: 1.1;
}

.sx-blog-hero .breadcrumb {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    display: block;
}

.sx-blog-hero .breadcrumb a {
    color: white;
    font-weight: 500;
}

.sx-blog-hero .breadcrumb span {
    margin: 0 10px;
    opacity: 0.5;
}

/* --- Blog Grid --- */
.sx-blog-grid {
    display: grid;
    grid-template-columns: repeat(var(--sx-blog-archive-cols, 3), 1fr);
    gap: 30px;
    padding-bottom: 80px;
}

@media (max-width: 1024px) {
    .sx-blog-grid {
        grid-template-columns: repeat(min(2, var(--sx-blog-archive-cols, 3)), 1fr);
    }
}

@media (max-width: 768px) {
    .sx-blog-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Blog Card --- */
.sx-blog-card {
    background: #fff;
    border-radius: var(--sx-radius-lg);
    border: 1px solid var(--sx-border);
    overflow: hidden;
    transition: var(--sx-transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.sx-blog-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--sx-shadow-lg);
    border-color: rgba(34, 197, 94, 0.2);
}

.sx-blog-thumbnail {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.sx-blog-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.sx-blog-card:hover .sx-blog-thumbnail img {
    transform: scale(1.1);
}

.sx-blog-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--sx-primary);
    color: white;
    padding: 6px 14px;
    border-radius: var(--sx-radius-full);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(34, 197, 94, 0.3);
}

.sx-blog-content {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.sx-blog-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 13px;
    color: var(--sx-text-light);
    margin-bottom: 15px;
}

.sx-blog-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sx-blog-meta .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: var(--sx-primary);
}

.sx-blog-title {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 15px;
}

.sx-blog-title a:hover {
    color: var(--sx-primary);
}

.sx-blog-excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: var(--sx-text-light);
    margin-bottom: 25px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sx-blog-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--sx-border);
}

.sx-blog-link {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 14px;
    color: var(--sx-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sx-blog-link .dashicons {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.sx-blog-link:hover {
    color: var(--sx-primary);
}

.sx-blog-link:hover .dashicons {
    transform: translateX(5px);
}

/* --- Pagination --- */
.sx-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.sx-pagination .page-numbers {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--sx-border);
    font-weight: 600;
    transition: var(--sx-transition);
}

.sx-pagination .page-numbers:hover,
.sx-pagination .page-numbers.current {
    background: var(--sx-primary);
    color: white;
    border-color: var(--sx-primary);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

/* --- Mobile Adjustments --- */
@media (max-width: 768px) {
    .sx-blog-hero {
        padding: 60px 0;
    }

    .sx-blog-hero .page-title {
        font-size: 2.5rem;
    }

    .sx-blog-grid {
        grid-template-columns: 1fr;
    }

    .sx-blog-content {
        padding: 25px;
    }
}

.sx-single-hero {
    position: relative;
    padding: 120px 0 100px;
    background-color: var(--sx-secondary);
    color: white;
    overflow: hidden;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sx-single-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.4;
    filter: blur(30px);
    transform: scale(1.1);
    background-size: cover;
    background-position: center;
}

.sx-hero-fallback {
    background: linear-gradient(135deg, var(--sx-secondary) 0%, #1a2a4a 100%);
    opacity: 1;
    filter: none;
}

.sx-single-hero .wt-container {
    position: relative;
    z-index: 5;
}

.sx-single-hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.sx-single-hero .sx-blog-badge {
    position: relative;
    top: 0;
    left: 0;
    margin-bottom: 30px;
    display: inline-block;
    box-shadow: 0 10px 20px rgba(34, 197, 94, 0.3);
}

.sx-single-hero .page-title {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 25px;
    color: white;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.sx-single-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px;
    font-size: 16px;
    font-weight: 500;
    opacity: 0.95;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 12px 30px;
    border-radius: var(--sx-radius-full);
    display: inline-flex;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sx-meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sx-single-meta .dashicons {
    color: var(--sx-primary);
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* --- Content Reading Experience --- */
.sx-single-content-wrap {
    max-width: 1000px;
    margin: -60px auto 100px;
    background: white;
    padding: 60px 80px;
    border-radius: var(--sx-radius-lg);
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 10;
}

@media (max-width: 1024px) {
    .sx-single-content-wrap {
        margin: -40px 20px 60px;
        padding: 40px 60px;
    }
}

@media (max-width: 768px) {
    .sx-single-content-wrap {
        padding: 30px 40px;
    }

    .sx-single-hero .page-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .sx-single-content-wrap {
        padding: 25px 20px;
        margin-top: -30px;
    }
}

.sx-single-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #4a5568;
}

.sx-single-content h2,
.sx-single-content h3 {
    color: var(--sx-secondary);
    margin: 2.5rem 0 1.5rem;
    font-weight: 800;
}

.sx-single-content p {
    margin-bottom: 2rem;
}

.sx-single-content blockquote {
    background: #f8fafc;
    border-left: 5px solid var(--sx-primary);
    padding: 30px 40px;
    margin: 40px 0;
    background: var(--sx-primary-light);
    border-radius: 0 var(--sx-radius-lg) var(--sx-radius-lg) 0;
    font-style: italic;
    font-size: 1.3rem;
    color: var(--sx-secondary);
}

.sx-single-content img {
    border-radius: var(--sx-radius-lg);
    box-shadow: var(--sx-shadow-lg);
    margin: 30px 0;
}

/* --- Post Navigation --- */
.sx-post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 60px;
    margin-bottom: 60px;
}

.sx-nav-link {
    background: white;
    padding: 30px;
    border-radius: var(--sx-radius-lg);
    border: 1px solid var(--sx-border);
    transition: var(--sx-transition);
    display: flex;
    flex-direction: column;
}

.sx-nav-link:hover {
    border-color: var(--sx-primary);
    box-shadow: var(--sx-shadow);
}

.sx-nav-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--sx-text-light);
    margin-bottom: 10px;
}

.sx-nav-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--sx-secondary);
}

/* --- Comments Area --- */
.sx-comments-area {
    max-width: 850px;
    margin: 0 auto 100px;
    padding: 0 20px;
}

.sx-comments-title {
    margin-bottom: 40px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--sx-border);
    font-size: 1.8rem;
    color: var(--sx-secondary);
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment-body {
    padding: 30px;
    background: #f8fafc;
    border-radius: var(--sx-radius-lg);
    margin-bottom: 20px;
    position: relative;
}

.comment-author .avatar {
    border-radius: 50%;
    margin-right: 15px;
    float: left;
}

.comment-meta {
    font-size: 14px;
    color: var(--sx-text-light);
    margin-bottom: 10px;
}

.comment-reply-link {
    display: inline-block;
    margin-top: 15px;
    font-weight: 700;
    font-size: 13px;
    color: var(--sx-primary);
}

/* Comment Form */
.comment-respond {
    background: white;
    padding: 60px;
    border-radius: var(--sx-radius-lg);
    border: 1px solid var(--sx-border);
    margin-top: 60px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.sx-comment-form-title {
    margin-bottom: 5px;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--sx-secondary);
}

.comment-notes {
    margin-bottom: 30px;
    font-size: 14px;
    color: var(--sx-text-light);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 18px 25px;
    border: 2px solid #f1f5f9;
    border-radius: 12px;
    background: #f8fafc;
    margin-bottom: 20px;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 15px;
    color: var(--sx-secondary);
}

.comment-form input::placeholder,
.comment-form textarea::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

.comment-form input:focus,
.comment-form textarea:focus {
    background: #fff;
    border-color: var(--sx-primary);
    box-shadow: 0 10px 20px rgba(34, 197, 94, 0.08);
}

.comment-form-cookies-consent {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 30px;
    font-size: 15px;
    color: var(--sx-text);
    line-height: 1.4;
}

.comment-form-cookies-consent input {
    margin-top: 4px;
}

.comment-form .submit {
    background: var(--sx-secondary);
    color: white;
    padding: 18px 45px;
    border-radius: 30px;
    border: none;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 20px rgba(13, 27, 61, 0.2);
}

.comment-form .submit:hover {
    background: var(--sx-primary);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(34, 197, 94, 0.3);
}

@media (max-width: 768px) {
    .sx-single-hero .page-title {
        font-size: 2.2rem;
    }

    .sx-single-content-wrap {
        padding: 30px 20px;
        margin-top: -20px;
    }

    .sx-post-nav {
        grid-template-columns: 1fr;
    }

    .comment-respond {
        padding: 30px 20px;
    }
}

/* --- Empty State (No Content Found) --- */
.sx-no-content {
    padding: 100px 0;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--sx-radius-lg);
    border: 2px dashed var(--sx-border);
    margin: 40px 0;
}

.sx-no-content-inner {
    max-width: 500px;
    margin: 0 auto;
    padding: 0 20px;
}

.sx-no-content-icon {
    width: 100px;
    height: 100px;
    background: var(--sx-primary-light);
    color: var(--sx-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
}

.sx-no-content-icon .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
}

.sx-no-content-title {
    font-size: 2rem;
    color: var(--sx-secondary);
    font-weight: 800;
    margin-bottom: 15px;
}

.sx-no-content-text {
    font-size: 1.1rem;
    color: var(--sx-text-light);
    margin-bottom: 35px;
    line-height: 1.6;
}

.sx-no-content-actions .wt-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 40px;
    border-radius: var(--sx-radius-full);
    background: var(--sx-secondary);
    color: white;
    font-weight: 700;
    text-decoration: none;
    transition: var(--sx-transition);
}

.sx-no-content-actions .wt-btn-primary:hover {
    background: var(--sx-primary);
    transform: translateY(-2px);
    box-shadow: var(--sx-shadow-lg);
}