/* ===== BLOG PAGE STYLES ===== */

/* Blog Hero */
.blog-hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
    padding: 60px 20px;
}

.blog-hero h1 {
    font-size: 48px;
    margin-bottom: 10px;
}

.blog-hero p {
    font-size: 20px;
    opacity: 0.9;
}

/* Container */
.page-blog .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Filters */
.filters {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    align-items: stretch;
}

.filter-search {
    flex: 1;
    min-width: 250px;
}

.filter-search input {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    font-size: 16px;
    transition: all 0.3s;
}

.filter-search input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-categories {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.category-tag {
    padding: 8px 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: all 0.3s;
    white-space: nowrap;
    font-size: 14px;
}

.category-tag:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.category-tag.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.blog-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.blog-card-image-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.blog-card:hover .blog-card-image {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-category {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.blog-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #1a1a1a;
    line-height: 1.3;
}

.blog-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    flex: 1;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #999;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 10px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.page-link {
    padding: 10px 18px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: all 0.3s;
}

.page-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.page-link.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state h2 {
    font-size: 28px;
    color: #666;
    margin-bottom: 10px;
}

.empty-state p {
    color: #999;
    font-size: 16px;
}

/* ===== BANNER GRID LAYOUT ===== */
.page-with-banners {
    display: grid !important;
    grid-template-columns: 160px 1fr 160px !important;
    gap: 20px !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 20px !important;
}

.banner-sidebar {
    width: 160px !important;
    min-height: 100px !important;
}

.banner-left {
    grid-column: 1 !important;
}

.main-content {
    grid-column: 2 !important;
}

.banner-right {
    grid-column: 3 !important;
}

.desktop-banner {
    position: sticky !important;
    top: 100px !important;
}

.page-with-banners .container {
    max-width: 100% !important;
    width: 100% !important;
}

/* Tablet/Mobile - hide desktop banners */
@media (max-width: 1200px) {
    .page-with-banners {
        grid-template-columns: 1fr !important;
    }

    .banner-sidebar {
        display: none !important;
    }
}

/* ===== BLOG DETAIL STYLES ===== */

/* Breadcrumb */
.breadcrumb {
    max-width: 800px;
    margin: 30px auto;
    padding: 0 20px;
    font-size: 14px;
    color: #6b7280;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: var(--secondary-color);
}

/* Article */
.article-container {
    max-width: 800px;
    margin: 0 auto 60px;
    padding: 0 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.article-header {
    padding: 40px 40px 30px;
    text-align: center;
}

.article-category {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: all 0.3s;
}

.article-category:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.article-title {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.2;
    color: #1a1a1a;
    margin-bottom: 20px;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 14px;
    color: #999;
    flex-wrap: wrap;
}

.article-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-featured-image {
    width: 100%;
    height: auto;
    border-radius: 0;
    display: block;
}

.article-content {
    padding: 40px;
    font-size: 18px;
    line-height: 1.8;
    color: #374151;
}

.article-content h2 {
    font-size: 32px;
    margin: 40px 0 20px;
    color: #1a1a1a;
    font-weight: 700;
}

.article-content h3 {
    font-size: 26px;
    margin: 30px 0 15px;
    color: #1a1a1a;
    font-weight: 600;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content ul, .article-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.article-content li {
    margin-bottom: 10px;
}

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
    margin: 30px 0;
    font-style: italic;
    color: #6b7280;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 30px 0;
}

.article-content a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid var(--primary-color);
    transition: all 0.3s;
}

.article-content a:hover {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
}

.article-content pre {
    background: #1a1a1a;
    color: #e0e0e0;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

.article-content code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 14px;
}

.article-content pre code {
    background: none;
    padding: 0;
}

/* Share Section */
.share-section {
    padding: 30px 40px 40px;
    border-top: 1px solid #e5e7eb;
}

.share-section h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #1a1a1a;
    font-weight: 600;
}

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

/* Share Buttons (Article) */
.share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.share-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.share-button:hover::before {
    width: 200px;
    height: 200px;
}

.share-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.share-button svg {
    width: 20px;
    height: 20px;
    position: relative;
    z-index: 1;
}

.share-button span {
    position: relative;
    z-index: 1;
}

.share-x { background: linear-gradient(135deg, #000000, #1a1a1a); }
.share-facebook { background: linear-gradient(135deg, #1877f2, #0d5dbf); }
.share-whatsapp { background: linear-gradient(135deg, #25D366, #1da851); }
.share-linkedin { background: linear-gradient(135deg, #0077b5, #005885); }
.share-telegram { background: linear-gradient(135deg, #0088cc, #006699); }
.share-email { background: linear-gradient(135deg, #666, #444); }

/* Related Posts */
.related-posts {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
}

.related-posts h2 {
    font-size: 32px;
    margin-bottom: 30px;
    text-align: center;
    color: #1a1a1a;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.related-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.related-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.related-card-content {
    padding: 20px;
    flex: 1;
}

.related-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.related-card-meta {
    font-size: 13px;
    color: #6b7280;
}

/* ===== MOBILE RESPONSIVE (Blog) ===== */
@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 32px;
    }

    .blog-hero p {
        font-size: 16px;
    }

    .blog-hero {
        padding: 40px 20px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-search {
        min-width: 100%;
    }

    .filter-categories {
        justify-content: flex-start;
    }

    .blog-card-image-wrapper {
        height: 180px;
    }

    .page-blog .container {
        padding: 30px 15px;
    }

    .article-container {
        border-radius: 0;
        margin-bottom: 40px;
    }

    .article-header {
        padding: 30px 20px 20px;
    }

    .article-title {
        font-size: 28px;
    }

    .article-content {
        padding: 30px 20px;
        font-size: 16px;
    }

    .article-content h2 {
        font-size: 24px;
    }

    .article-content h3 {
        font-size: 20px;
    }

    .share-section {
        padding: 20px;
    }

    .share-buttons {
        gap: 8px;
    }

    .share-button {
        padding: 10px 18px;
        font-size: 13px;
    }

    .share-button svg {
        width: 18px;
        height: 18px;
    }

    .breadcrumb {
        font-size: 12px;
        margin: 20px auto;
    }

    .article-meta {
        gap: 15px;
        font-size: 13px;
    }

    .related-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .related-posts {
        margin: 40px auto;
    }

    .related-posts h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .category-tag {
        font-size: 12px;
        padding: 6px 15px;
    }

    .pagination {
        gap: 5px;
    }

    .page-link {
        padding: 8px 12px;
        font-size: 14px;
    }

    .article-title {
        font-size: 24px;
    }

    .share-button {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
        justify-content: center;
    }
}
