/* Blogs Page Styles */

.blogs-page {
    padding-top: 80px;
}
.blogs-page-post {
    padding-top: 0px;
}
/* Hero Section */
.blogs-hero {
    padding: 4rem 1rem;
    background: linear-gradient(180deg, #f9fafb 0%, #ffffff 100%);
}

.blogs-hero-container {
    max-width: 72rem;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.blogs-hero-content {
    max-width: 42rem;
    text-align: center;
}

.blogs-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #111827;
}

@media (min-width: 768px) {
    .blogs-title {
        font-size: 3rem;
    }
}

.blogs-title-gradient {
    background: linear-gradient(90deg, #9333ea 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blogs-subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    margin-bottom: 2rem;
}

/* Search Form */
.blogs-search-form {
    max-width: 32rem;
    margin: 0 auto;
}

.blogs-search-container {
    display: flex;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.blogs-search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: #111827;
    border: 1px solid #d1d5db;
    border-right: none;
    border-radius: 0.5rem 0 0 0.5rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.blogs-search-input:focus {
    border-color: #9333ea;
    box-shadow: 0 0 0 2px rgba(147, 51, 234, 0.2);
}

.blogs-search-input::placeholder {
    color: #9ca3af;
}

.blogs-search-clear {
    padding: 0.75rem 1rem;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-left: none;
    border-right: none;
    color: #6b7280;
    cursor: pointer;
    transition: background 0.2s;
}

.blogs-search-clear:hover {
    background: #e5e7eb;
}

.blogs-search-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(90deg, #9333ea 0%, #ec4899 100%);
    color: white;
    font-weight: 600;
    border: none;
    border-radius: 0 0.5rem 0.5rem 0;
    cursor: pointer;
    transition: opacity 0.2s;
}

.blogs-search-btn:hover {
    opacity: 0.9;
}

/* Category Filters */
.blogs-filters {
    padding: 1rem;
    background: #f3f4f6;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.blogs-filters-container {
    max-width: 72rem;
    margin: 0 auto;
}

.blogs-filters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    padding: 0;
    margin: 0;
    list-style: none;
}

.blogs-filter-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s;
}

.blogs-filter-btn--active {
    background: #9333ea;
    color: white;
    border: 1px solid #9333ea;
}

.blogs-filter-btn--inactive {
    background: white;
    color: #9333ea;
    border: 1px solid #9333ea;
}

.blogs-filter-btn--inactive:hover {
    background: #faf5ff;
}

/* Blog Posts Section */
.blogs-posts-section {
    padding: 3rem 1rem;
    background: white;
}

.blogs-posts-container {
    max-width: 72rem;
    margin: 0 auto;
}

/* Search Results Info */
.blogs-search-info {
    margin-bottom: 1.5rem;
    color: #6b7280;
}

.blogs-search-info button {
    color: #9333ea;
    text-decoration: underline;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 0.5rem;
}

/* Loading State */
.blogs-loading {
    text-align: center;
    padding: 3rem 0;
}

.blogs-spinner {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 4px solid #9333ea;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* No Posts */
.blogs-empty {
    text-align: center;
    padding: 3rem 0;
}

.blogs-empty h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.blogs-empty p {
    color: #6b7280;
    margin-bottom: 1rem;
}

.blogs-empty-btn {
    padding: 0.5rem 1.5rem;
    background: #9333ea;
    color: white;
    font-weight: 500;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.2s;
}

.blogs-empty-btn:hover {
    background: #7c22ce;
}

/* Posts Grid */
.blogs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .blogs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .blogs-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Blog Card */
.blog-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.blog-card-img {
    width: 100%;
    height: 12rem;
    object-fit: cover;
}

.blog-card-img-placeholder {
    width: 100%;
    height: 12rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #9333ea 0%, #ec4899 100%);
    font-size: 3rem;
}

.blog-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.blog-card-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.blog-card-date {
    font-size: 0.875rem;
    color: #6b7280;
}

.blog-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.blog-card-title a {
    color: #111827;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-card-title a:hover {
    color: #9333ea;
}

.blog-card-excerpt {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
    flex: 1;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
    margin-top: auto;
}

.blog-card-author {
    font-size: 0.875rem;
    color: #6b7280;
}

.blog-card-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: #9333ea;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-card-link:hover {
    color: #7c22ce;
}

/* Badge Colors */
.badge-software-development {
    background: #2563eb;
    color: white;
}

.badge-data-ai-solutions {
    background: #16a34a;
    color: white;
}

.badge-analytics-ai-reporting {
    background: #0891b2;
    color: white;
}

.badge-chatbots-automation {
    background: #eab308;
    color: #1f2937;
}

.badge-design-digital-media {
    background: #db2777;
    color: white;
}

.badge-default {
    background: #4b5563;
    color: white;
}

/* Pagination */
.blogs-pagination {
    margin-top: 3rem;
}

.blogs-pagination-list {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.blogs-page-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.blogs-page-btn--active {
    background: linear-gradient(90deg, #9333ea 0%, #ec4899 100%);
    color: white;
    border: 1px solid transparent;
}

.blogs-page-btn--inactive {
    background: white;
    color: #9333ea;
    border: 1px solid #e9d5ff;
}

.blogs-page-btn--inactive:hover {
    background: #faf5ff;
}

.blogs-page-btn--disabled {
    background: #f3f4f6;
    color: #9ca3af;
    border: 1px solid #e5e7eb;
    cursor: not-allowed;
}

/* Blog Post Page */
.blog-post-page {
    background: white;
}

.blog-post-hero {
    padding-bottom: 3rem;
}

.blog-post-container {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1rem;
}

.blog-post-container--narrow {
    max-width: 56rem;
}

.blog-post-back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: #9333ea;
    font-weight: 500;
    text-decoration: none;
}

.blog-post-back-link:hover {
    text-decoration: underline;
}

.blog-post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.blog-post-meta-separator {
    color: #d1d5db;
}

.blog-post-title {
    max-width: 48rem;
    margin-bottom: 1.25rem;
    line-height: 1.15;
}

.blog-post-excerpt {
    max-width: 44rem;
    margin-bottom: 0;
}

.blog-post-featured {
    padding: 0 0 1.5rem;
}

.blog-post-featured-image {
    width: 100%;
    max-height: 32rem;
    object-fit: cover;
    border-radius: 1rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.blog-post-body {
    padding-top: 2.5rem;
}

.blog-post-share {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.blog-post-share-label {
    font-weight: 500;
    color: #6b7280;
}

.blog-post-share-links {
    display: flex;
    gap: 0.5rem;
}

.blog-post-share-link {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.blog-post-share-link:hover {
    transform: scale(1.08);
    filter: brightness(0.96);
}

.blog-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.blog-content h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.blog-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: #1a1a1a;
}

.blog-content p {
    margin-bottom: 1.5rem;
}

.blog-content ul,
.blog-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.blog-content li {
    margin-bottom: 0.5rem;
}

.blog-content li::before {
    display: none;
}

.blog-content blockquote {
    border-left: 4px solid #9333ea;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #6c757d;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.blog-content a {
    color: #9333ea;
}

.blog-content a:hover {
    text-decoration: underline;
}

.blog-content strong {
    font-weight: 600;
}

.blog-content code {
    background: #f3f4f6;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.blog-content pre {
    background: #1f2937;
    color: #e5e7eb;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

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

.blog-post-share-cta {
    margin-top: 4rem;
    padding: 2rem;
    border-radius: 1rem;
    background: #f9fafb;
    text-align: center;
}

.blog-post-share-cta-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #111827;
}

.blog-post-share-cta-copy {
    margin-bottom: 1rem;
    color: #6b7280;
}

.blog-post-share-cta-links {
    display: flex;
    justify-content: center;
}

.blog-post-share-cta-links .blog-post-share {
    justify-content: center;
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.blog-post-bottom-cta {
    padding: 4rem 1rem;
    background: linear-gradient(90deg, #9333ea 0%, #ec4899 100%);
    color: white;
}

.blog-post-bottom-cta-inner {
    text-align: center;
}

.blog-post-bottom-cta-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.blog-post-bottom-cta-copy {
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.82);
}

.blog-post-bottom-cta-link {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    background: white;
    color: #9333ea;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease;
}

.blog-post-bottom-cta-link:hover {
    background: #f3f4f6;
}

@media (max-width: 767px) {
    .blog-post-title {
        line-height: 1.2;
    }

    .blog-post-share {
        flex-direction: column;
        align-items: flex-start;
    }

    .blog-post-share-cta {
        padding: 1.5rem;
    }

    .blog-post-bottom-cta-title {
        font-size: 1.5rem;
    }
}
