/* ============================
   BLOG PAGE STYLES
   Page-specific styles for blogs.html
   ============================ */

/* Import shared styles */
@import url('./shared.css');

/* ============================
   BLOGS PAGE HERO
   ============================ */

/* Hero Section */
.blogs-hero {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
    text-align: center;
}

.back-link {
    display: inline-block;
    color: #4a9eff; /* Match existing accents */
    text-decoration: none;
    margin-bottom: 20px;
    font-size: 0.95rem;
    transition: transform 0.3s;
    font-weight: 600;
}

.back-link:hover {
    transform: translateX(-5px);
}

.blogs-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: #fff;
}

.blogs-hero .subtitle {
    font-size: 1.2rem;
    color: #a0a0a0;
    max-width: 600px;
    margin: 0 auto;
}

/* Blogs Grid */
.all-blogs {
    padding: 80px 0;
    background: #0a0a0a;
    min-height: 60vh;
}

.blogs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Blog Card Large */
.blog-card-large {
    background: #1a1a2e;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #2a2a3e;
    display: flex;
    flex-direction: column;
}

.blog-card-large:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 217, 255, 0.2);
}

.blog-card-large a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    width: 100%;
    background: #0a0a0a;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s;
}

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

.blog-tag {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(0, 217, 255, 0.2);
    color: #00d9ff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.coming-soon-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 165, 0, 0.2);
    color: #ffa500;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.blog-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: #888;
}

.blog-content h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: #fff;
    font-weight: 700;
}

.blog-content p {
    color: #b0b0b0;
    line-height: 1.6;
    margin-bottom: 16px;
    flex-grow: 1;
}

.read-more {
    color: #00d9ff;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.read-more::after {
    content: '→';
    font-family: inherit;
    transition: transform 0.2s;
}

.blog-card-large:hover .read-more::after {
    transform: translateX(5px);
}

/* Coming Soon Cards */
.coming-soon-card {
    opacity: 0.7;
    cursor: not-allowed;
}

.coming-soon-card:hover {
    transform: none;
    box-shadow: none;
}

/* Blog CTA Button */
.blog-cta {
    text-align: center;
    margin-top: 50px;
}

.btn-primary {
    display: inline-block;
    padding: 14px 32px;
    background: linear-gradient(135deg, #00d9ff, #0099cc);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 217, 255, 0.4);
}

/* Code Block Copy Button */
.code-block-wrapper {
    position: relative;
}

.copy-code-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    backdrop-filter: blur(10px);
    z-index: 10;
}

.copy-code-btn:hover {
    background: rgba(0, 217, 255, 0.2);
    border-color: #00d9ff;
    transform: translateY(-2px);
}

.copy-code-btn.copied {
    background: rgba(0, 217, 255, 0.3);
    border-color: #00d9ff;
}

.copy-code-btn i {
    font-size: 0.9rem;
}

/* Mermaid Diagram Styles */
.mermaid {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 16px;
    padding: 3rem 2rem;
    margin: 2.5rem 0;
    border: 1px solid rgba(0, 217, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    overflow-x: auto;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mermaid svg {
    max-width: 100%;
    height: auto !important;
    min-height: 250px;
    font-size: 16px !important;
}

/* Make mermaid text more readable */
.mermaid .node rect,
.mermaid .node circle,
.mermaid .node polygon {
    stroke-width: 2px !important;
}

.mermaid text {
    font-size: 14px !important;
    font-weight: 500 !important;
    fill: #fff !important;
}

/* Add spacing after diagram labels */
h3 + p + .mermaid,
p + .mermaid {
    margin-top: 1.5rem;
}

.mermaid + p {
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .blogs-hero {
        padding: 100px 0 40px;
    }
    
    .blogs-hero h1 {
        font-size: 2.5rem;
    }
    
    .blogs-hero .subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .blogs-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 1rem;
    }
    
    .blog-image {
        height: 220px;
        width: 100%;
    }
    
    .blog-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
    
    .blog-content {
        padding: 20px;
    }
    
    .blog-content h3 {
        font-size: 1.3rem;
    }
    
    .copy-code-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .blogs-hero h1 {
        font-size: 2rem;
    }
    
    .blogs-hero .subtitle {
        font-size: 0.9rem;
    }
    
    .back-link {
        font-size: 0.85rem;
    }
    
    .blog-card-large {
        min-height: auto;
        width: 100%;
    }
    
    .blog-image {
        height: 200px;
    }
    
    .blog-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
    
    .blog-content h3 {
        font-size: 1.2rem;
    }
    
    .blog-meta {
        font-size: 0.8rem;
        gap: 12px;
    }
}