/* Blog-specific styles */
.blog-header {
    padding: 100px 0 50px 0;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    margin-bottom: 30px;
}


.blog-post-item {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.blog-post {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, border-color 0.35s ease;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.blog-post:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35), 0 0 30px rgba(77, 171, 247, 0.15);
    border-color: rgba(77, 171, 247, 0.2);
}

.blog-post .card-img-top {
    height: 200px;
    object-fit: cover;
    display: block;
    width: calc(100% - 24px);
    max-width: calc(100% - 24px);
    margin: 12px 12px 0;
    border-radius: 8px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-sizing: border-box;
}

/* Blog cards use a light Bootstrap surface; override global dark-theme outline button text */
.blog-post .btn-outline-primary {
    color: #1e293b;
    background-color: #fff;
    border-color: rgba(77, 171, 247, 0.45);
}

.blog-post .btn-outline-primary:hover {
    color: #0f172a;
    background-color: rgba(77, 171, 247, 0.08);
    border-color: rgba(77, 171, 247, 0.75);
}

.blog-post .btn-outline-primary:focus-visible {
    color: #0f172a;
    box-shadow: 0 0 0 0.25rem rgba(77, 171, 247, 0.35);
}

.blog-post .card-title a.blog-post-card-title {
    color: #000;
}

.blog-post .card-title a.blog-post-card-title:hover {
    color: #1e293b;
}

.blog-post .card-body {
    display: flex;
    flex-direction: column;
}

.blog-post .card-text {
    flex-grow: 1;
}

.blog-meta {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
}

/* White card surfaces: dates must stay readable */
.blog-post .blog-meta {
    color: #475569;
}

.tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    margin-right: 5px;
    background-color: rgba(77, 171, 247, 0.2);
    color: #4dabf7;
    transition: all 0.2s ease;
}

.tag:hover {
    background-color: rgba(77, 171, 247, 0.4);
}

.featured-post {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 30px;
}

.featured-post img {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.featured-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0));
}


.featured-post-title {
    background: linear-gradient(90deg, #fff 0%, #4dabf7 50%, #fff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer-text 5s linear infinite;
}

.featured-post-title a {
    color: inherit !important;
}

.pagination .page-item .page-link {
    color: #4dabf7;
    background-color: rgba(33, 37, 41, 0.8);
    border-color: rgba(33, 37, 41, 0.9);
}

.pagination .page-item.active .page-link {
    background-color: #4dabf7;
    border-color: #4dabf7;
    color: white;
}

.blog-sidebar .card {
    margin-bottom: 20px;
    background-color: rgba(33, 37, 41, 0.8);
    backdrop-filter: blur(10px);
}

.blog-sidebar .card .card-title {
    color: #fff;
}

.blog-sidebar .category-list > li > span {
    color: rgba(255, 255, 255, 0.95);
}

.blog-sidebar .category-filter-btn {
    color: #fff;
}

.blog-sidebar .tag {
    color: rgba(255, 255, 255, 0.95);
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.blog-sidebar .tag:hover {
    background-color: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.popular-post {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.popular-post:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.popular-post img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 15px;
}

.popular-post-title {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.popular-post-date {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.category-list li:last-child {
    border-bottom: none;
}


.category-filter-btn {
    background: none;
    border: none;
    padding: 0;
    color: white;
    text-decoration: none;
    cursor: pointer;
    font-size: inherit;
    display: flex;
    justify-content: space-between;
    width: 100%;
    text-align: left;
    transition: color 0.2s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.category-filter-btn:hover,
.category-filter-btn:focus-visible,
.category-filter-btn.active {
    color: #4dabf7;
}

.category-filter-btn.active {
    animation: category-pulse 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.category-count {
    background-color: rgba(77, 171, 247, 0.2);
    color: #4dabf7;
    border-radius: 20px;
    padding: 2px 8px;
    font-size: 0.75rem;
}

#search-results-count {
    font-size: 0.9rem;
}

.blog-post-content {
    line-height: 1.8;
}

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

.blog-post-content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.blog-app-icon {
    display: block;
    width: 140px;
    height: 140px;
    border-radius: 28px !important;
    margin: 0 auto 2rem auto !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45) !important;
    object-fit: cover;
}

.blog-screenshot {
    display: block;
    max-width: 280px !important;
    margin: 0 auto !important;
    border-radius: 20px !important;
}

.blog-post-header {
    margin-bottom: 2rem;
}

.share-buttons {
    margin-top: 30px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.share-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 600;
}

.share-btn {
    background-color: rgba(77, 171, 247, 0.2);
    color: #4dabf7;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.share-btn:hover,
.share-btn:focus-visible {
    background-color: #4dabf7;
    color: white;
    transform: translateY(-3px);
}

.share-copy-btn.copied {
    background-color: rgba(34, 197, 94, 0.2);
    color: #86efac;
}

.author-bio {
    display: flex;
    align-items: center;
    background-color: rgba(33, 37, 41, 0.8);
    border-radius: 10px;
    padding: 20px;
    margin: 30px 0;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-right: 20px;
}

.author-info {
    margin-left: 15px;
}

.author-info h4 {
    margin-bottom: 5px;
}

.author-info p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
}

@media (max-width: 767px) {
    .blog-header {
        padding: 80px 0 40px 0;
    }

    .featured-post img {
        height: 250px;
    }

    .author-bio {
        flex-direction: column;
        text-align: center;
    }

    .author-avatar {
        margin-right: 0;
        margin-bottom: 20px;
    }
}


/* Sidebar search: full-width field (filter runs on input; no submit control) */
.blog-sidebar form[role="search"] .blog-search-input.form-control {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.blog-search-input.form-control:focus {
    box-shadow: 0 0 0 3px rgba(77, 171, 247, 0.2), 0 4px 20px rgba(77, 171, 247, 0.1);
    border-color: rgba(77, 171, 247, 0.5);
}

@keyframes category-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .blog-post-item,
    .blog-post,
    .blog-search-input.form-control,
    .category-filter-btn,
    .featured-post-title {
        transition: none !important;
        animation: none !important;
    }

    .blog-post-item,
    .blog-post:hover {
        transform: none !important;
    }

    .blog-post:hover {
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    }

    .blog-sidebar form[role="search"] .blog-search-input.form-control,
    .blog-sidebar form[role="search"] .blog-search-input.form-control:focus {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .blog-sidebar form[role="search"] .blog-search-input.form-control,
    .blog-sidebar form[role="search"] .blog-search-input.form-control:focus {
        width: 100%;
        max-width: 100%;
    }
}
