/* Blog-specific styles that extend styles.css */

/* Blog Hero Section */
.blog-hero {
    padding: 8rem 0 4rem;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.92));
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(37, 99, 235, 0.3), transparent 35%),
        radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.2), transparent 35%);
    top: 0;
    left: 0;
    z-index: 0;
}

.blog-hero .container {
    position: relative;
    z-index: 1;
}

.blog-hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.blog-hero-title span {
    color: var(--primary-light);
    position: relative;
}

.blog-hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 700px;
    margin: 0 auto;
}

/* Featured Post Section */
.featured-post-section {
    padding: 4rem 0;
    background: var(--light-color);
}

.featured-post {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.featured-post-image {
    width: 100%;
    height: 400px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9), rgba(59, 130, 246, 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-post-image::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.2), transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.15), transparent 50%);
    top: 0;
    left: 0;
}

.featured-post-image::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.03),
        rgba(255, 255, 255, 0.03) 10px,
        transparent 10px,
        transparent 20px
    );
    top: -50%;
    left: -50%;
    animation: slidePattern 20s linear infinite;
}

@keyframes slidePattern {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.featured-post:hover .featured-post-image {
    background: linear-gradient(135deg, rgba(29, 78, 216, 0.95), rgba(37, 99, 235, 0.85));
}

.featured-badge {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.featured-post-content {
    padding: 2.5rem;
}

.featured-post-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.featured-post-category {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
}

.featured-post-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.featured-post-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.featured-post-excerpt {
    font-size: 1.05rem;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.featured-post-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1rem;
    transition: gap 0.3s ease;
}

.featured-post-link:hover {
    gap: 0.75rem;
    color: var(--primary-dark);
}

/* Blog Filters */
.blog-filters-section {
    padding: 2rem 0;
    background: var(--light-gray);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.blog-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.filter-btn {
    padding: 0.65rem 1.5rem;
    background: white;
    border: 2px solid transparent;
    border-radius: 25px;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.filter-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Blog Posts Grid */
.blog-posts-section {
    padding: 4rem 0;
    background: var(--light-color);
}

.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.blog-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    animation: fadeInUp 0.5s 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 fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.blog-card-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.85), rgba(96, 165, 250, 0.75));
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-card-image::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.15), transparent 40%),
        radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.1), transparent 40%);
    top: 0;
    left: 0;
}

.blog-card-image::after {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    background: repeating-linear-gradient(
        -45deg,
        rgba(255, 255, 255, 0.05),
        rgba(255, 255, 255, 0.05) 15px,
        transparent 15px,
        transparent 30px
    );
    top: -25%;
    left: -25%;
}

.blog-card:hover .blog-card-image {
    background: linear-gradient(135deg, rgba(29, 78, 216, 0.9), rgba(59, 130, 246, 0.8));
}

.blog-card:hover .blog-card-image::after {
    animation: rotatePattern 15s linear infinite;
}

@keyframes rotatePattern {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.blog-card-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.4rem 0.9rem;
    background: var(--primary-color);
    color: white;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.blog-card-content {
    padding: 1.75rem;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

.blog-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.blog-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-excerpt {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
    transition: gap 0.3s ease;
}

.blog-card-link:hover {
    gap: 0.75rem;
    color: var(--primary-dark);
}

/* No Posts Message */
.no-posts-message {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.no-posts-message i {
    font-size: 3rem;
    color: var(--medium-gray);
    margin-bottom: 1rem;
}

.no-posts-message p {
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .blog-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .featured-post {
        grid-template-columns: 1fr;
    }
    
    .featured-post-image {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 6rem 0 3rem;
    }
    
    .blog-hero-title {
        font-size: 2.2rem;
    }
    
    .blog-hero-subtitle {
        font-size: 1rem;
    }
    
    .blog-posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .blog-filters {
        gap: 0.5rem;
    }
    
    .filter-btn {
        font-size: 0.85rem;
        padding: 0.55rem 1.2rem;
    }
    
    .featured-post-content {
        padding: 1.5rem;
    }
    
    .featured-post-title {
        font-size: 1.6rem;
    }
}

@media (max-width: 576px) {
    .blog-hero-title {
        font-size: 1.8rem;
    }
    
    .featured-post-image {
        height: 250px;
    }
    
    .blog-card-image {
        height: 200px;
    }
}

/* ===================================
   BLOG POST PAGE STYLES
   =================================== */

/* Blog Post Hero */
.blog-post-hero {
    padding: 8rem 0 3rem;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.92));
    color: white;
    position: relative;
    overflow: hidden;
}

.blog-post-hero::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(37, 99, 235, 0.3), transparent 35%),
        radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.2), transparent 35%);
    top: 0;
    left: 0;
    z-index: 0;
}

.blog-post-hero .container {
    position: relative;
    z-index: 1;
}

.blog-post-breadcrumb {
    margin-bottom: 2rem;
}

.blog-post-breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.blog-post-breadcrumb a:hover {
    color: white;
}

.blog-post-header {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.blog-post-category {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: var(--primary-color);
    color: white;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.blog-post-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: white;
}

.blog-post-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
}

.blog-post-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-post-featured-image {
    display: none;
}

/* Blog Post Content Section */
.blog-post-content-section {
    padding: 5rem 0;
    background: var(--light-color);
}

.blog-post-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.blog-post-content {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-bottom: 3rem;
    line-height: 1.8;
    color: var(--text-color);
}

/* Markdown content styling */
.blog-post-content h1,
.blog-post-content h2,
.blog-post-content h3,
.blog-post-content h4,
.blog-post-content h5,
.blog-post-content h6 {
    color: var(--dark-color);
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.blog-post-content h1 { font-size: 2.2rem; }
.blog-post-content h2 { font-size: 1.9rem; }
.blog-post-content h3 { font-size: 1.6rem; }
.blog-post-content h4 { font-size: 1.4rem; }
.blog-post-content h5 { font-size: 1.2rem; }
.blog-post-content h6 { font-size: 1.1rem; }

.blog-post-content h2::before {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background: var(--primary-color);
    margin-bottom: 1rem;
    border-radius: 2px;
}

.blog-post-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.blog-post-content a {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: underline;
}

.blog-post-content a:hover {
    color: var(--primary-dark);
}

.blog-post-content ul,
.blog-post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.blog-post-content li {
    margin-bottom: 0.75rem;
    font-size: 1.05rem;
}

.blog-post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    background: var(--light-gray);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-light);
}

.blog-post-content code {
    background: var(--light-gray);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    color: var(--primary-dark);
}

.blog-post-content pre {
    background: var(--darker-color);
    color: #f8f8f2;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
}

.blog-post-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.blog-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: var(--shadow-md);
}

.blog-post-content hr {
    border: none;
    height: 2px;
    background: var(--light-gray);
    margin: 3rem 0;
}

.blog-post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

.blog-post-content table th,
.blog-post-content table td {
    padding: 1rem;
    border: 1px solid var(--light-gray);
    text-align: left;
}

.blog-post-content table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.blog-post-content table tr:nth-child(even) {
    background: var(--light-gray);
}

/* Author Bio */
.blog-post-author {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.author-image {
    flex-shrink: 0;
}

.author-image img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-light);
    box-shadow: var(--shadow-md);
}

.author-info h4 {
    font-size: 1.4rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.author-info p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.author-socials {
    display: flex;
    gap: 0.75rem;
}

.author-socials a {
    width: 36px;
    height: 36px;
    background: var(--light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-color);
    transition: all 0.3s ease;
}

.author-socials a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* Share Section */
.blog-post-share {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-bottom: 3rem;
    text-align: center;
}

.blog-post-share h4 {
    font-size: 1.2rem;
    color: var(--dark-color);
    margin-bottom: 1.25rem;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.share-btn.twitter {
    background: #1DA1F2;
    color: white;
}

.share-btn.linkedin {
    background: #0077B5;
    color: white;
}

.share-btn.facebook {
    background: #4267B2;
    color: white;
}

.share-btn.copy {
    background: var(--light-gray);
    color: var(--dark-color);
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.share-btn.copy:hover {
    background: var(--primary-color);
    color: white;
}

/* Related Posts */
.related-posts-section {
    margin-top: 4rem;
}

.related-posts-section h3 {
    font-size: 1.8rem;
    color: var(--dark-color);
    margin-bottom: 2rem;
    text-align: center;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.related-post-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
}

.related-post-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.related-post-card-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.8), rgba(96, 165, 250, 0.7));
    position: relative;
    overflow: hidden;
}

.related-post-card-image::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 40% 60%, rgba(255, 255, 255, 0.12), transparent 35%),
        radial-gradient(circle at 60% 40%, rgba(255, 255, 255, 0.08), transparent 35%);
    top: 0;
    left: 0;
}

.related-post-card:hover .related-post-card-image {
    background: linear-gradient(135deg, rgba(29, 78, 216, 0.85), rgba(59, 130, 246, 0.75));
}

.related-post-info {
    padding: 1.5rem;
}

.related-post-category {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.related-post-info h4 {
    font-size: 1.1rem;
    color: var(--dark-color);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Responsive Design for Blog Post */
@media (max-width: 1024px) {
    .blog-post-title {
        font-size: 2.5rem;
    }
    
    .blog-post-featured-image {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .blog-post-hero {
        padding: 6rem 0 2rem;
    }
    
    .blog-post-title {
        font-size: 2rem;
    }
    
    .blog-post-meta {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .blog-post-featured-image {
        height: 300px;
    }
    
    .blog-post-content {
        padding: 2rem;
    }
    
    .blog-post-content h1 { font-size: 1.8rem; }
    .blog-post-content h2 { font-size: 1.6rem; }
    .blog-post-content h3 { font-size: 1.4rem; }
    
    .blog-post-author {
        flex-direction: column;
        text-align: center;
    }
    
    .author-socials {
        justify-content: center;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .share-buttons {
        flex-direction: column;
    }
    
    .share-btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .blog-post-title {
        font-size: 1.6rem;
    }
    
    .blog-post-content {
        padding: 1.5rem;
    }
    
    .blog-post-content p,
    .blog-post-content li {
        font-size: 1rem;
    }
    
    .blog-post-featured-image {
        height: 250px;
    }
}

/* FORCE SHARE BUTTONS TO SHOW - DEBUG */
.blog-post-share {
    background: white !important;
    padding: 2rem !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08) !important;
    margin-bottom: 3rem !important;
    text-align: center !important;
    display: block !important;
    visibility: visible !important;
}

.blog-post-share h4 {
    font-size: 1.2rem !important;
    color: var(--dark-color) !important;
    margin-bottom: 1.25rem !important;
    display: block !important;
}

.share-buttons {
    display: flex !important;
    justify-content: center !important;
    gap: 1rem !important;
    flex-wrap: wrap !important;
    visibility: visible !important;
}

.share-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    font-size: 0.95rem !important;
    transition: all 0.3s ease !important;
    border: none !important;
    cursor: pointer !important;
    text-decoration: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 10 !important;
}

.share-btn.twitter {
    background: #1DA1F2 !important;
    color: white !important;
}

.share-btn.linkedin {
    background: #0077B5 !important;
    color: white !important;
}

.share-btn.facebook {
    background: #4267B2 !important;
    color: white !important;
}

.share-btn.copy {
    background: #e2e8f0 !important;
    color: #1e293b !important;
}

.share-btn:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15) !important;
}