/* Blog general */
.blog-main {
    padding: 60px 20px;
    background-color: #f9f9f9;
    min-height: 80vh;
}
.blog-container, .post-container {
    max-width: 1000px;
    margin: 0 auto;
}
.blog-title {
    text-align: left;
    font-size: 2.5rem;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 3px solid #ff4b72;
    color: #222;
    display: flex;
    flex-direction: column;
}
.blog-title .subtitle {
    font-size: 1rem;
    color: #888;
    margin-top: 5px;
    font-weight: normal;
}

/* Sub header */
.sub-header {
    background-color: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(to right, #ff4b72, #ff8fa3) 1;
    position: sticky;
    top: 0;
    z-index: 100;
}
.sub-header-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.sub-header-logo {
    display: flex;
    align-items: center;
}
.logo-sub {
    max-height: 40px;
    width: auto;
}
.sub-header-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}
.sub-header-nav a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    font-size: 0.95rem;
    transition: color 0.3s;
}
.sub-header-nav a:hover, .sub-header-nav a.active {
    color: #ff4b72;
}
.sub-header-nav .nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #222;
}
.sub-header-nav .nav-icon:hover {
    color: #000;
}

/* Categories */
.blog-categories {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}
.cat-btn {
    display: inline-block;
    padding: 8px 20px;
    background-color: #fff;
    color: #555;
    text-decoration: none;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid transparent;
}
.cat-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    color: #ff4b72;
}
.cat-btn.active {
    background: linear-gradient(135deg, #ff4b72, #ff758c);
    color: #fff;
    box-shadow: 0 6px 15px rgba(255, 75, 114, 0.3);
}

/* Blog grid & cards */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}
.blog-card {
    background-color: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s ease;
}
.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}
.blog-thumb-wrap {
    position: relative;
    height: 200px;
    overflow: hidden;
}
.blog-thumb {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-color: #f4f4f4;
    transition: transform 0.5s ease;
}
.blog-card:hover .blog-thumb {
    transform: scale(1.06);
}
.blog-cat {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: rgba(255, 75, 114, 0.95);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.blog-info {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.blog-meta {
    margin-bottom: 12px;
}
.blog-date {
    color: #888;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}
.blog-item-title {
    font-size: 1.25rem;
    line-height: 1.5;
    margin: 0 0 15px;
    color: #222;
    font-weight: bold;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #666;
    margin-bottom: 20px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}
.tag {
    font-size: 0.8rem;
    color: #ff4b72;
    background-color: #fff0f3;
    padding: 4px 10px;
    border-radius: 15px;
    font-weight: 500;
}
.blog-readmore {
    font-size: 0.9rem;
    font-weight: bold;
    color: #ff4b72;
    text-align: right;
    margin-top: auto;
    transition: color 0.3s;
}
.blog-card:hover .blog-readmore {
    color: #d13658;
}

/* Post single */
.post-article {
    background-color: #fff;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    margin-bottom: 40px;
}
.post-header {
    margin-bottom: 30px;
    text-align: center;
}
.post-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}
.post-meta .blog-cat {
    position: static;
    display: inline-block;
}
.post-title {
    font-size: 2.2rem;
    line-height: 1.4;
    margin: 0 0 20px;
    color: #222;
    font-weight: bold;
}
.post-header .blog-tags {
    justify-content: center;
}
.post-thumbnail {
    margin-bottom: 40px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

/* Post Content Formatting */
.post-content {
    font-size: 1.05rem;
    line-height: 1.85;
    color: #333;
}
.post-content p {
    margin-bottom: 25px;
}
.post-content h2 {
    font-size: 1.6rem;
    color: #222;
    margin: 50px 0 25px;
    padding: 10px 15px;
    background-color: #fff9fa;
    border-left: 5px solid #ff4b72;
    border-radius: 0 5px 5px 0;
}
.post-content h3 {
    font-size: 1.3rem;
    color: #333;
    margin: 40px 0 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid #eaeaea;
    position: relative;
}
.post-content h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: #ff4b72;
}
.post-content ul, .post-content ol {
    margin: 0 0 25px 20px;
    padding-left: 20px;
}
.post-content li {
    margin-bottom: 10px;
}
.post-content ul li::marker {
    color: #ff4b72;
}
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 20px 0;
}
.post-content blockquote {
    margin: 30px 0;
    padding: 20px 25px;
    background-color: #f5f5f5;
    border-left: 4px solid #aaa;
    border-radius: 5px;
    font-style: italic;
    color: #555;
}

/* Share Area */
.post-actions {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #eaeaea;
    text-align: center;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95rem;
    color: #fff;
    transition: transform 0.3s, box-shadow 0.3s;
}
.x-share {
    background-color: #000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.x-share:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

/* Navigation Buttons */
.back-link-wrap, .back-to-top-wrap {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 50px;
}
.back-btn, .back-to-top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 35px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s;
}
.back-btn-primary, .back-to-top {
    background: linear-gradient(135deg, #ff4b72, #ff758c);
    color: #fff;
    box-shadow: 0 6px 15px rgba(255, 75, 114, 0.3);
}
.back-btn-primary:hover, .back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 75, 114, 0.4);
    color: #fff;
}
.back-btn-outline {
    background-color: #fff;
    color: #555;
    border: 2px solid #ddd;
}
.back-btn-outline:hover {
    border-color: #ff4b72;
    color: #ff4b72;
    transform: translateY(-3px);
}

.not-found {
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}
.not-found h2 {
    margin-bottom: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .blog-main {
        padding: 30px 15px;
    }
    .post-article {
        padding: 30px 20px;
    }
    .post-title {
        font-size: 1.6rem;
    }
    .blog-title {
        font-size: 2rem;
    }
    .sub-header-nav a:not(.nav-icon) {
        display: none; /* Hide text links on mobile, keep icon */
    }
    .blog-grid {
        gap: 20px;
    }
}
