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

/* Blog Header */
.blog-header {
    padding: 140px 0 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    text-align: center;
}

.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    font-size: 0.95rem;
    opacity: 0.9;
}

.breadcrumb a {
    color: var(--white);
    transition: var(--transition);
}

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

.breadcrumb i {
    font-size: 0.75rem;
}

.blog-header h1 {
    font-size: 3rem;
    color: var(--white);
    margin-bottom: 16px;
    font-weight: 900;
}

.blog-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
}

/* Blog Filter */
.blog-filter {
    padding: 40px 0;
    background: var(--off-white);
    border-bottom: 1px solid var(--gray-lighter);
}

.blog-filter .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
}

.filter-tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    background: var(--white);
    color: var(--gray);
    border: 2px solid var(--gray-lighter);
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background: var(--primary-gradient);
    color: var(--white);
    border-color: var(--primary-color);
}

.search-box {
    display: flex;
    gap: 8px;
}

.search-box input {
    padding: 12px 20px;
    border: 2px solid var(--gray-lighter);
    border-radius: 50px;
    font-size: 0.95rem;
    width: 300px;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-box button {
    padding: 12px 24px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
}

.search-box button:hover {
    background: var(--primary-dark);
}

/* Featured Post */
.featured-post {
    padding: 60px 0;
    background: var(--white);
    position: relative;
}

.featured-badge {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 24px;
    background: var(--gold);
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 50px;
    text-transform: uppercase;
    z-index: 1;
}

.featured-article {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
    align-items: center;
    background: var(--off-white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.featured-image {
    position: relative;
    height: 100%;
    min-height: 400px;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-content {
    padding: 48px 48px 48px 0;
}

.post-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.post-meta .category {
    padding: 6px 16px;
    background: var(--primary-color);
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 50px;
}

.post-meta .date,
.post-meta .read-time {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--gray);
    font-size: 0.9rem;
}

.featured-content h2 {
    font-size: 2rem;
    margin-bottom: 16px;
    color: var(--dark);
    line-height: 1.3;
}

.featured-content p {
    color: var(--gray);
    line-height: 1.8;
    margin-bottom: 24px;
}

/* Blog Grid */
.blog-grid {
    padding: 80px 0;
    background: var(--off-white);
}

.blog-posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 32px;
    margin-bottom: 60px;
}

.blog-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.blog-card-image {
    position: relative;
    height: 240px;
    overflow: hidden;
}

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

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

.blog-category {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 16px;
    background: var(--primary-color);
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 50px;
    z-index: 1;
}

.blog-card-content {
    padding: 24px;
}

.blog-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    color: var(--gray);
    font-size: 0.875rem;
}

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

.blog-card-content h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--dark);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-content p {
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--gray-lighter);
}

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

.author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.author span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark);
}

.read-more {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.read-more:hover {
    gap: 10px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 60px;
}

.page-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    color: var(--dark);
    border: 2px solid var(--gray-lighter);
    border-radius: 50%;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.page-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

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

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Newsletter Section */
.newsletter-section {
    padding: 80px 0;
    background: var(--primary-gradient);
    color: var(--white);
}

.newsletter-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 48px;
}

.newsletter-text h2 {
    font-size: 2rem;
    color: var(--white);
    margin-bottom: 12px;
}

.newsletter-text p {
    font-size: 1.125rem;
    opacity: 0.95;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    flex: 1;
    max-width: 500px;
}

.newsletter-form input {
    flex: 1;
    padding: 14px 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    backdrop-filter: blur(10px);
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--gold);
}

.newsletter-form button {
    padding: 14px 32px;
    background: var(--white);
    color: var(--primary-color);
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.newsletter-form button:hover {
    background: var(--gold);
    color: var(--white);
    transform: translateY(-2px);
}

/* Logo Link Fix */
.logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .featured-article {
        grid-template-columns: 1fr;
    }
    
    .featured-content {
        padding: 32px;
    }
    
    .blog-posts {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .blog-header h1 {
        font-size: 2rem;
    }
    
    .blog-filter .container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-tabs {
        justify-content: center;
    }
    
    .search-box {
        width: 100%;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .featured-image {
        min-height: 300px;
    }
    
    .featured-content h2 {
        font-size: 1.5rem;
    }
    
    .blog-posts {
        grid-template-columns: 1fr;
    }
    
    .newsletter-content {
        flex-direction: column;
        text-align: center;
    }
    
    .newsletter-form {
        width: 100%;
        max-width: 100%;
        flex-direction: column;
    }
    
    .newsletter-form button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .blog-header {
        padding: 120px 0 40px;
    }
    
    .filter-tabs {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.875rem;
    }
}

/* ========================================
   BLOG POST DETAIL PAGE
   ======================================== */
.blog-post-detail {
    padding: 40px 0 80px;
}

.post-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 50px;
    margin-top: 40px;
}

/* Post Header */
.post-header {
    margin-bottom: 30px;
}

.post-header .post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #666;
}

.post-header .category {
    background: var(--primary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.post-header h1 {
    font-size: 2.5rem;
    line-height: 1.3;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.post-author {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    color: #666;
}

.post-author i {
    font-size: 2rem;
    color: var(--gold);
}

/* Post Thumbnail */
.post-thumbnail {
    margin: 30px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

/* Post Body */
.post-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.post-body h2 {
    font-size: 2rem;
    margin: 40px 0 20px;
    color: var(--primary-color);
    border-bottom: 3px solid var(--gold);
    padding-bottom: 10px;
}

.post-body h3 {
    font-size: 1.5rem;
    margin: 30px 0 15px;
    color: var(--primary-dark);
}

.post-body h4 {
    font-size: 1.25rem;
    margin: 25px 0 12px;
    color: #444;
}

.post-body p {
    margin-bottom: 20px;
}

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

.post-body li {
    margin-bottom: 10px;
}

.post-body blockquote {
    background: #f9f9f9;
    border-left: 5px solid var(--gold);
    padding: 20px 30px;
    margin: 30px 0;
    font-style: italic;
    color: #555;
}

.post-body blockquote footer {
    margin-top: 15px;
    font-size: 0.95rem;
    color: #777;
    font-style: normal;
}

.post-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.post-body table th,
.post-body table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.post-body table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.post-body table tr:hover {
    background: #f9f9f9;
}

.post-body .cta-box {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin: 40px 0;
    text-align: center;
}

.post-body .cta-box h4 {
    color: white;
    margin-bottom: 15px;
}

.post-body .cta-box p {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.post-body .timeline {
    margin: 30px 0;
}

.post-body .timeline-item {
    position: relative;
    padding-left: 40px;
    margin-bottom: 30px;
    border-left: 3px solid var(--gold);
    padding-bottom: 20px;
}

.post-body .timeline-item:before {
    content: '';
    position: absolute;
    left: -8px;
    top: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--gold);
}

.post-body .timeline-item h4 {
    color: var(--primary-color);
    margin: 0 0 10px 0;
}

/* Post Tags */
.post-tags {
    margin: 40px 0;
    padding: 30px 0;
    border-top: 2px solid #eee;
    border-bottom: 2px solid #eee;
}

.post-tags h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #333;
}

.post-tags .tag {
    display: inline-block;
    background: #f5f5f5;
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 20px;
    margin: 5px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.post-tags .tag:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Share Buttons */
.post-share {
    margin: 40px 0;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 12px;
}

.post-share h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #333;
}

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

.share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-btn.facebook {
    background: #1877f2;
    color: white;
}

.share-btn.twitter {
    background: #1da1f2;
    color: white;
}

.share-btn.linkedin {
    background: #0a66c2;
    color: white;
}

.share-btn.copy {
    background: var(--gold);
    color: white;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Sidebar */
.post-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-widget {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.sidebar-widget h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--gold);
    padding-bottom: 10px;
}

/* Recent Posts */
.recent-posts {
    list-style: none;
    padding: 0;
}

.recent-posts li {
    margin-bottom: 20px;
}

.recent-posts a {
    text-decoration: none;
    color: #333;
}

.recent-post-item {
    display: flex;
    gap: 15px;
}

.recent-post-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.recent-post-info h4 {
    font-size: 0.95rem;
    margin-bottom: 5px;
    color: #333;
    line-height: 1.4;
}

.recent-post-info .date {
    font-size: 0.85rem;
    color: #999;
}

.recent-posts a:hover h4 {
    color: var(--primary-color);
}

/* Categories */
.categories {
    list-style: none;
    padding: 0;
}

.categories li {
    margin-bottom: 12px;
}

.categories a {
    display: block;
    padding: 10px 15px;
    background: #f5f5f5;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.categories a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

/* CTA Widget */
.cta-widget {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.cta-widget h3 {
    color: white;
    border-bottom-color: var(--gold);
}

.cta-widget p {
    margin-bottom: 20px;
    line-height: 1.6;
}

.cta-widget .btn {
    width: 100%;
    justify-content: center;
}

.contact-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.3);
    font-size: 0.9rem;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

/* Related Posts */
.related-posts {
    margin-top: 60px;
}

.related-posts h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--primary-color);
    text-align: center;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.related-posts .post-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.related-posts .post-card a {
    text-decoration: none;
    color: inherit;
}

.related-posts .post-image {
    position: relative;
    overflow: hidden;
}

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

.related-posts .post-image .category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.related-posts .post-info {
    padding: 20px;
}

.related-posts .post-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: #999;
}

.related-posts h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #333;
    line-height: 1.4;
}

.related-posts p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.no-results i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

.no-results h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 10px;
}

.no-results p {
    color: #999;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1024px) {
    .post-content-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .post-sidebar {
        position: static;
    }
    
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .post-header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .blog-post-detail {
        padding: 20px 0 40px;
    }
    
    .post-header h1 {
        font-size: 1.75rem;
    }
    
    .post-body {
        font-size: 1rem;
    }
    
    .post-body h2 {
        font-size: 1.5rem;
    }
    
    .post-body h3 {
        font-size: 1.25rem;
    }
    
    .share-buttons {
        flex-direction: column;
    }
    
    .share-btn {
        width: 100%;
        justify-content: center;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar-widget {
        padding: 20px;
    }
}
