/* ============================================
   Blog System Styles - New Star Industries
   Uses existing theme colors & Bootstrap grid
   ============================================ */

/* ---- Blog Listing Page ---- */
.blog-listing-area {
    padding: 80px 0 100px;
    background: #f7f7f7;
}

.blog-listing-area .section-title h2 {
    font-size: 36px;
    margin-bottom: 10px;
}

.blog-listing-area .section-title p {
    color: #666;
    font-size: 16px;
    max-width: 650px;
    margin: 0 auto 50px;
}

/* Blog Card */
.blog-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.blog-card-thumb {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.blog-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-thumb img {
    transform: scale(1.08);
}

.blog-card-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #f40e14;
    color: #fff;
    padding: 4px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.blog-card-body {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #888;
}

.blog-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.blog-card-meta span i {
    color: #f40e14;
    font-size: 13px;
}

.blog-card-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 12px;
    color: #141517;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-card-title a:hover {
    color: #f40e14;
}

.blog-card-excerpt {
    font-size: 14px;
    line-height: 1.7;
    color: #666;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.blog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.blog-card-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.blog-card-author img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.blog-card-author-info {
    line-height: 1.3;
}

.blog-card-author-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.blog-card-author-role {
    font-size: 11px;
    color: #999;
}

.blog-card-readmore {
    font-size: 14px;
    font-weight: 600;
    color: #f40e14;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.2s ease;
}

.blog-card-readmore:hover {
    gap: 10px;
    color: #c20a0f;
    text-decoration: none;
}

/* Featured Blog (first post - full width) */
.blog-card-featured {
    display: flex;
    flex-direction: row;
    height: auto;
}

.blog-card-featured .blog-card-thumb {
    width: 50%;
    height: auto;
    min-height: 350px;
}

.blog-card-featured .blog-card-body {
    width: 50%;
    padding: 35px 30px;
    justify-content: center;
}

.blog-card-featured .blog-card-title {
    font-size: 26px;
    -webkit-line-clamp: 3;
}

.blog-card-featured .blog-card-excerpt {
    -webkit-line-clamp: 4;
}

/* ---- Blog Detail Page Enhancements ---- */
.blog-share-section {
    padding: 20px 0;
    margin: 30px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.blog-share-section h5 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.blog-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.blog-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 5px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
}

.blog-share-btn:hover {
    opacity: 0.85;
    transform: translateY(-2px);
    color: #fff;
    text-decoration: none;
}

.blog-share-btn.share-facebook { background: #1877F2; }
.blog-share-btn.share-twitter { background: #1DA1F2; }
.blog-share-btn.share-linkedin { background: #0A66C2; }
.blog-share-btn.share-whatsapp { background: #25D366; }
.blog-share-btn.share-copy {
    background: #555;
}

.blog-share-btn.share-copy.copied {
    background: #28a745;
}

/* Table of Contents */
.blog-toc {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-left: 4px solid #f40e14;
    border-radius: 6px;
    padding: 20px 25px;
    margin-bottom: 30px;
}

.blog-toc h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #333;
}

.blog-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-toc ul li {
    padding: 5px 0;
}

.blog-toc ul li a {
    color: #555;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.blog-toc ul li a:before {
    content: "\f054";
    font-family: "Font Awesome 5 Pro";
    font-size: 10px;
    color: #f40e14;
    font-weight: 900;
}

.blog-toc ul li a:hover {
    color: #f40e14;
}

/* Reading Time Badge */
.blog-reading-time {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f0f0f0;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    color: #666;
    margin-left: 10px;
}

/* ---- Responsive Styles ---- */

/* Large screens (1200px+) */
@media (min-width: 1200px) {
    .blog-card-featured .blog-card-title {
        font-size: 28px;
    }
}

/* Tablets landscape (992px - 1199px) */
@media (max-width: 1199px) {
    .blog-card-featured {
        flex-direction: column;
    }
    .blog-card-featured .blog-card-thumb {
        width: 100%;
        min-height: 260px;
    }
    .blog-card-featured .blog-card-body {
        width: 100%;
    }
    .blog-card-featured .blog-card-title {
        font-size: 22px;
    }
}

/* Tablets portrait (768px - 991px) */
@media (max-width: 991px) {
    .blog-listing-area {
        padding: 60px 0 80px;
    }
    .blog-card-thumb {
        height: 200px;
    }
    .blog-card-title {
        font-size: 18px;
    }
    .blog-card-body {
        padding: 20px;
    }
    .blog-share-buttons {
        gap: 8px;
    }
    .blog-share-btn {
        padding: 7px 14px;
        font-size: 13px;
    }
}

/* Large phones (576px - 767px) */
@media (max-width: 767px) {
    .blog-listing-area {
        padding: 50px 0 60px;
    }
    .blog-listing-area .section-title h2 {
        font-size: 28px;
    }
    .blog-card-thumb {
        height: 180px;
    }
    .blog-card-title {
        font-size: 17px;
    }
    .blog-card-excerpt {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }
    .blog-card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .blog-share-buttons {
        flex-wrap: wrap;
    }
    .blog-share-btn {
        flex: 1 1 calc(50% - 5px);
        justify-content: center;
        padding: 10px 12px;
    }
}

/* Small phones (< 576px) */
@media (max-width: 575px) {
    .blog-listing-area {
        padding: 40px 0 50px;
    }
    .blog-listing-area .section-title h2 {
        font-size: 24px;
    }
    .blog-card-body {
        padding: 18px;
    }
    .blog-card-meta {
        gap: 10px;
        font-size: 12px;
    }
    .blog-card-title {
        font-size: 16px;
    }
    .blog-card-excerpt {
        display: none;
    }
    .blog-card-author img {
        width: 30px;
        height: 30px;
    }
    .blog-share-btn {
        flex: 1 1 100%;
        font-size: 13px;
    }
    .blog-share-btn span.share-label {
        display: none;
    }
}

/* ---- Animations ---- */
.blog-card {
    opacity: 0;
    transform: translateY(30px);
    animation: blogCardFadeIn 0.6s ease forwards;
}

.blog-card:nth-child(1) { animation-delay: 0.1s; }
.blog-card:nth-child(2) { animation-delay: 0.2s; }
.blog-card:nth-child(3) { animation-delay: 0.3s; }
.blog-card:nth-child(4) { animation-delay: 0.4s; }
.blog-card:nth-child(5) { animation-delay: 0.5s; }
.blog-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes blogCardFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Date label on cards */
.date-home {
    color: #f40e14;
    font-size: 13px;
    margin-bottom: 8px;
}

.date-home i {
    margin-right: 5px;
}

/* Blog Newsletter CTA */
.blog-cta-section {
    background: linear-gradient(135deg, #141517 0%, #1a1c20 100%);
    padding: 60px 0;
    text-align: center;
}

.blog-cta-section h3 {
    color: #fff;
    font-size: 28px;
    margin-bottom: 10px;
}

.blog-cta-section p {
    color: #aaa;
    font-size: 16px;
    margin-bottom: 25px;
}

.blog-cta-section .btn {
    background: #f40e14;
    color: #fff;
    padding: 12px 35px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.blog-cta-section .btn:hover {
    background: #c20a0f;
}
