/* ============================================
   IBISENSE BLOG — Styles
   ============================================ */

/* ---- Blog Listing Page ---- */
.blog-hero {
    padding: 160px 0 80px;
    background: linear-gradient(180deg, var(--gray-50) 0%, #fff 100%);
    text-align: center;
}
.blog-hero h1 { margin-bottom: 16px; }
.blog-hero p {
    font-size: 1.15rem;
    color: var(--gray-600);
    max-width: 640px;
    margin: 0 auto;
}

.blog-grid { padding: 60px 0 100px; }
.blog-grid .container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 32px;
}

.blog-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}
.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.blog-card-cover {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.blog-card-cover .cover-icon {
    width: 64px; height: 64px;
    background: rgba(255,255,255,0.15);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(10px);
    z-index: 1;
}
.blog-card-cover .cover-icon svg {
    width: 32px; height: 32px;
    color: #fff; fill: none; stroke: currentColor;
    stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.blog-card-cover .cover-pattern {
    position: absolute; inset: 0; opacity: 0.08;
    background-image: radial-gradient(circle at 25% 25%, #fff 1px, transparent 1px),
                       radial-gradient(circle at 75% 75%, #fff 1px, transparent 1px);
    background-size: 30px 30px;
}

.blog-card-body { padding: 28px; flex: 1; display: flex; flex-direction: column; }
.blog-card-meta {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 12px; font-size: 0.82rem; color: var(--gray-500);
}
.blog-card-tag {
    display: inline-block; padding: 3px 10px;
    background: rgba(30, 64, 175, 0.08); color: var(--primary);
    border-radius: var(--radius-full); font-weight: 600;
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em;
}
.blog-card-body h3 { margin-bottom: 10px; font-size: 1.2rem; line-height: 1.35; }
.blog-card-body h3 a { color: var(--gray-900); transition: color 0.2s; }
.blog-card-body h3 a:hover { color: var(--primary); }
.blog-card-excerpt { color: var(--gray-600); font-size: 0.92rem; line-height: 1.6; flex: 1; }
.blog-card-footer { margin-top: 20px; display: flex; align-items: center; gap: 10px; }
.blog-card-footer .read-more {
    font-size: 0.88rem; font-weight: 600; color: var(--primary);
    display: inline-flex; align-items: center; gap: 6px; transition: gap 0.2s;
}
.blog-card-footer .read-more:hover { gap: 10px; }

/* ---- Blog Post Page ---- */
.post-header {
    padding: 160px 0 48px;
    background: linear-gradient(180deg, var(--gray-50) 0%, #fff 100%);
}
.post-header .container { max-width: 820px; }
.post-breadcrumb { font-size: 0.85rem; color: var(--gray-500); margin-bottom: 24px; }
.post-breadcrumb a { color: var(--primary); }
.post-breadcrumb a:hover { text-decoration: underline; }
.post-meta-top {
    display: flex; align-items: center; gap: 16px;
    margin-bottom: 20px; flex-wrap: wrap;
}
.post-header h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    margin-bottom: 16px; line-height: 1.25;
}
.post-header .post-subtitle {
    font-size: 1.15rem; color: var(--gray-600); line-height: 1.7;
}

/* Post Content */
.post-content { padding: 48px 0 80px; }
.post-content .container { max-width: 820px; }
.post-content h2 { margin: 48px 0 20px; font-size: 1.6rem; color: var(--gray-900); }
.post-content h3 { margin: 36px 0 16px; font-size: 1.25rem; color: var(--gray-800); }
.post-content p { margin-bottom: 20px; font-size: 1.05rem; line-height: 1.8; color: var(--gray-700); }
.post-content ul, .post-content ol { margin: 16px 0 24px 24px; list-style: disc; }
.post-content li { margin-bottom: 8px; font-size: 1.02rem; line-height: 1.7; color: var(--gray-700); }
.post-content ol { list-style: decimal; }
.post-content strong { color: var(--gray-900); font-weight: 600; }

/* Screenshot/Mockup Blocks */
.post-screenshot {
    margin: 36px 0; border-radius: var(--radius-lg);
    overflow: hidden; border: 1px solid var(--gray-200); box-shadow: var(--shadow-md);
}
.post-screenshot .screenshot-bar {
    background: var(--gray-100); padding: 10px 16px;
    display: flex; align-items: center; gap: 8px;
    border-bottom: 1px solid var(--gray-200);
}
.screenshot-dot { width: 10px; height: 10px; border-radius: 50%; }
.screenshot-dot:nth-child(1) { background: #EF4444; }
.screenshot-dot:nth-child(2) { background: #F59E0B; }
.screenshot-dot:nth-child(3) { background: #10B981; }
.screenshot-bar .screenshot-url {
    margin-left: 12px; font-size: 0.78rem; color: var(--gray-500);
    background: #fff; padding: 4px 12px; border-radius: var(--radius-full);
    flex: 1; max-width: 300px;
}
.post-screenshot .screenshot-body { background: #fff; padding: 32px; min-height: 220px; }
.post-screenshot .screenshot-caption {
    padding: 12px 16px; background: var(--gray-50);
    font-size: 0.85rem; color: var(--gray-500);
    text-align: center; font-style: italic;
    border-top: 1px solid var(--gray-200);
}

/* Mockup dashboard elements */
.mock-stat-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 16px; margin-bottom: 24px;
}
.mock-stat {
    background: var(--gray-50); border-radius: var(--radius);
    padding: 16px; text-align: center;
}
.mock-stat .stat-value { font-size: 1.6rem; font-weight: 800; color: var(--primary); line-height: 1; }
.mock-stat .stat-label { font-size: 0.75rem; color: var(--gray-500); margin-top: 4px; }
.mock-bar-chart {
    display: flex; align-items: flex-end; gap: 8px;
    height: 100px; padding: 0 16px;
}
.mock-bar {
    flex: 1; border-radius: 4px 4px 0 0;
    background: linear-gradient(180deg, var(--primary-light), var(--primary));
    min-height: 12px;
}
.mock-bar:nth-child(even) {
    background: linear-gradient(180deg, var(--accent-light), var(--accent));
}
.mock-table { width: 100%; border-collapse: collapse; }
.mock-table th, .mock-table td {
    padding: 8px 12px; text-align: left; font-size: 0.82rem;
    border-bottom: 1px solid var(--gray-200);
}
.mock-table th {
    background: var(--gray-50); font-weight: 600; color: var(--gray-700);
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em;
}
.mock-table td { color: var(--gray-600); }
.mock-badge {
    display: inline-block; padding: 2px 8px;
    border-radius: var(--radius-full); font-size: 0.72rem; font-weight: 600;
}
.mock-badge.green { background: #D1FAE5; color: #065F46; }
.mock-badge.blue { background: #DBEAFE; color: #1E40AF; }
.mock-badge.amber { background: #FEF3C7; color: #92400E; }
.mock-badge.red { background: #FEE2E2; color: #991B1B; }

/* Customer Quote */
.post-quote {
    margin: 40px 0; padding: 32px 36px;
    background: linear-gradient(135deg, rgba(30,64,175,0.04), rgba(14,165,233,0.04));
    border-left: 4px solid var(--primary);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}
.post-quote blockquote {
    font-size: 1.1rem; line-height: 1.7;
    color: var(--gray-700); font-style: italic; margin-bottom: 16px;
}
.post-quote .quote-author { display: flex; align-items: center; gap: 12px; }
.quote-avatar {
    width: 44px; height: 44px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 1rem;
}
.quote-info .quote-name { font-weight: 600; color: var(--gray-900); font-size: 0.95rem; font-style: normal; }
.quote-info .quote-role { font-size: 0.82rem; color: var(--gray-500); font-style: normal; }

/* Results Box */
.post-results {
    margin: 40px 0; padding: 32px; background: #fff;
    border: 2px solid var(--success); border-radius: var(--radius-lg);
}
.post-results h3 {
    margin: 0 0 20px; color: #065F46;
    display: flex; align-items: center; gap: 10px;
}
.post-results .results-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px;
}
.result-item { text-align: center; }
.result-item .result-number { font-size: 2rem; font-weight: 800; color: var(--success); }
.result-item .result-label { font-size: 0.85rem; color: var(--gray-600); margin-top: 4px; }

/* CTA at bottom of post */
.post-cta {
    margin: 0; padding: 40px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    border-radius: var(--radius-lg); text-align: center; color: #fff;
}
.post-cta h3 { color: #fff; margin: 0 0 12px; font-size: 1.4rem; }
.post-cta p { color: rgba(255,255,255,0.8) !important; margin-bottom: 24px; font-size: 1rem; }
.post-cta .btn {
    background: #fff; color: var(--primary); border-color: #fff; font-weight: 700;
}
.post-cta .btn:hover { background: var(--gray-100); transform: translateY(-2px); }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .blog-hero { padding: 100px 0 40px; }
    .blog-hero h1 { font-size: 1.6rem; line-height: 1.3; }
    .blog-hero p { font-size: 0.95rem; line-height: 1.6; }
    .blog-grid .container { grid-template-columns: 1fr; gap: 20px; }
    .blog-grid { padding: 40px 0 80px; }
    .blog-card-cover { height: 180px; }
    .blog-card-body { padding: 22px 20px; }
    .blog-card-body h3 { font-size: 1.1rem; }
    .blog-card-excerpt { font-size: 0.9rem; line-height: 1.65; }
    .blog-card-meta { font-size: 0.82rem; }
    .blog-card-footer .read-more { font-size: 0.92rem; padding: 4px 0; }
    .post-header { padding: 100px 0 40px; }
    .post-header h1 { font-size: 1.6rem; line-height: 1.3; }
    .post-content h2 { font-size: 1.3rem; }
    .post-content p { font-size: 0.95rem; line-height: 1.75; }
    .post-content li { font-size: 0.95rem; }
    .post-quote { padding: 24px 20px; }
    .post-quote blockquote { font-size: 1rem; }
    .post-results .results-grid { grid-template-columns: 1fr 1fr; }
    .mock-stat-grid { grid-template-columns: 1fr 1fr; }
    .post-cta { padding: 32px 24px; }
    .post-cta h3 { font-size: 1.2rem; }
    .post-cta p { font-size: 0.95rem; }
    .post-cta .btn { min-height: 52px; font-size: 1rem; }
    .post-screenshot .screenshot-body { padding: 16px; }
}

@media (max-width: 480px) {
    .blog-hero { padding: 88px 0 32px; }
    .blog-hero h1 { font-size: 1.3rem; }
    .blog-hero p { font-size: 0.9rem; }
    .blog-card-cover { height: 160px; }
    .blog-card-body { padding: 20px 18px; }
    .blog-card-body h3 { font-size: 1.05rem; }
    .blog-card-meta { font-size: 0.78rem; }
    .post-header { padding: 88px 0 28px; }
    .post-header h1 { font-size: 1.3rem; line-height: 1.3; }
    .post-header .post-meta { font-size: 0.82rem; }
    .post-content { padding: 28px 0; }
    .post-content h2 { font-size: 1.15rem; }
    .post-content p { font-size: 0.9rem; line-height: 1.7; }
    .post-content ul li, .post-content ol li { font-size: 0.9rem; }
    .post-quote { padding: 20px 18px; }
    .post-quote blockquote { font-size: 0.92rem; }
    .post-results .results-grid { grid-template-columns: 1fr; gap: 14px; }
    .result-item .result-number { font-size: 1.5rem; }
    .result-item .result-label { font-size: 0.82rem; }
    .post-cta { padding: 24px 20px; }
    .post-cta h3 { font-size: 1.1rem; }
    .post-cta p { font-size: 0.9rem; }
    .post-cta .btn { width: 100%; text-align: center; min-height: 52px; }
    .mock-stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
}

@media (max-width: 360px) {
    .blog-hero h1 { font-size: 1.2rem; }
    .post-header h1 { font-size: 1.2rem; }
    .post-content h2 { font-size: 1.05rem; }
    .blog-card-cover { height: 140px; }
}
