/* ============================================
   aiwarden Blog - Grid Layout
   Inspired by 0din.ai design
   ============================================ */

/* === Blog Listing Page === */
.blog-listing {
    padding: 10rem 0 6rem;
    background: var(--bg-darker);
    min-height: 100vh;
}

.blog-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.blog-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--text-primary);
    font-style: italic;
}

.blog-title-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-style: normal;
}

.blog-title-brand img {
    opacity: 0.7;
}

/* === Search Bar === */
.blog-search {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.blog-search input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.blog-search input::placeholder {
    color: var(--text-muted);
}

.blog-search input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.blog-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* === Filter Tabs - aiwarden Premium Style === */
.blog-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.filter-tab {
    position: relative;
    padding: 0.7rem 1.4rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    overflow: hidden;
}

.filter-tab::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 76, 70, 0.1) 0%, rgba(255, 76, 70, 0.05) 100%);
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.filter-tab:hover {
    color: var(--text-primary);
}

.filter-tab:hover::before {
    opacity: 1;
}

.filter-tab.active {
    background: linear-gradient(135deg, #ff4c46 0%, #e63946 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 76, 70, 0.3);
}

.filter-tab.active::before {
    display: none;
}

/* === Articles Grid === */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 4rem;
}

/* === Article Card === */
.article-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.article-card:hover {
    transform: translateY(-4px);
}

.article-card-image {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1rem;
    transition: opacity 0.3s ease;
}

.article-card:hover .article-card-image {
    opacity: 0.9;
}

.article-card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.article-card-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    transition: color 0.2s ease;
}

.article-card:hover .article-card-title {
    color: var(--primary);
}

/* === Pagination - aiwarden style === */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 4rem;
}

.page-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 76, 70, 0.05);
    border: 1px solid rgba(255, 76, 70, 0.2);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
}

.page-btn:hover {
    border-color: rgba(255, 76, 70, 0.5);
    background: rgba(255, 76, 70, 0.1);
    color: #ff4c46;
    transform: translateY(-2px);
}

.page-btn.active {
    background: linear-gradient(135deg, #ff4c46 0%, #e63946 100%);
    border-color: #ff4c46;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 76, 70, 0.3);
}

.page-btn.nav-arrow {
    font-size: 1.2rem;
    font-weight: 600;
}

.page-btn.nav-arrow:hover {
    background: rgba(255, 76, 70, 0.15);
}

/* === Article Page Styles === */
.article-hero {
    padding: 10rem 0 3rem;
    background: var(--bg-darker);
}

.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    transition: color 0.2s ease;
}

.back-to-blog:hover {
    color: var(--primary);
}

.article-hero-content {
    max-width: 800px;
}

.article-hero .article-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.article-hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.article-hero .article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.article-hero .article-source {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.meta-dot {
    width: 4px;
    height: 4px;
    background: var(--text-muted);
    border-radius: 50%;
}

/* === Article Content === */
.article-content {
    padding: 0 0 6rem;
    background: var(--bg-darker);
}

.article-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.article-featured-image {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 3rem;
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.article-body h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 3rem 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-body h2:first-child {
    margin-top: 0;
}

.inline-logo {
    opacity: 0.9;
    flex-shrink: 0;
}

.article-body p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.article-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

.article-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.article-author {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.article-author img {
    opacity: 0.8;
}

/* Red Button for Articles */
.btn-article-red {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #ff4c46 0%, #e63946 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(255, 76, 70, 0.25);
}

.btn-article-red:hover {
    background: linear-gradient(135deg, #e63946 0%, #d32f2f 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 76, 70, 0.35);
}

/* === Blog Contact CTA - Premium aiwarden Style === */
.blog-contact-cta {
    position: relative;
    text-align: center;
    padding: 5rem 3rem;
    background: linear-gradient(180deg, rgba(10, 10, 15, 0.95) 0%, rgba(15, 15, 20, 0.98) 100%);
    border-radius: 24px;
    border: 1px solid rgba(255, 76, 70, 0.15);
    margin-top: 0;
    overflow: hidden;
}

.blog-contact-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 76, 70, 0.5) 50%, transparent 100%);
}

.blog-contact-cta::after {
    content: '';
    position: absolute;
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 76, 70, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.blog-contact-cta .cta-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 76, 70, 0.15) 0%, rgba(255, 76, 70, 0.05) 100%);
    border-radius: 16px;
    border: 1px solid rgba(255, 76, 70, 0.2);
}

.blog-contact-cta .cta-icon img {
    width: 28px;
    height: 28px;
    opacity: 0.9;
}

.blog-contact-cta h3 {
    position: relative;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    z-index: 1;
}

.blog-contact-cta h3 span {
    background: linear-gradient(135deg, #ff4c46 0%, #ff6b6b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-contact-cta p {
    position: relative;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    z-index: 1;
}

.blog-contact-cta .btn-contact {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.25rem;
    background: linear-gradient(135deg, #ff4c46 0%, #e63946 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 30px rgba(255, 76, 70, 0.35);
    z-index: 1;
}

.blog-contact-cta .btn-contact:hover {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff4c46 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(255, 76, 70, 0.45);
}

.blog-contact-cta .btn-contact svg {
    transition: transform 0.3s ease;
}

.blog-contact-cta .btn-contact:hover svg {
    transform: translateX(4px);
}

/* === Search Filter States === */
.article-card.hidden {
    display: none;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.no-results span {
    display: block;
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* === Responsive === */
@media (max-width: 1200px) {
    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .blog-header {
        flex-direction: column;
        align-items: stretch;
    }

    .blog-search {
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .blog-listing {
        padding: 8rem 0 4rem;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .blog-filters {
        gap: 0.4rem;
        padding: 0.4rem;
    }

    .filter-tab {
        padding: 0.5rem 0.9rem;
        font-size: 0.75rem;
    }

    .article-card-title {
        font-size: 1.1rem;
    }

    .article-hero {
        padding: 8rem 0 2rem;
    }

    .article-hero h1 {
        font-size: 1.75rem;
    }

    .article-body {
        font-size: 1rem;
    }

    .article-body h2 {
        font-size: 1.25rem;
    }

    .blog-contact-cta {
        padding: 3rem 1.5rem;
        border-radius: 16px;
    }

    .blog-contact-cta h3 {
        font-size: 1.5rem;
    }

    .blog-contact-cta p {
        font-size: 1rem;
    }

    .blog-contact-cta .btn-contact {
        padding: 0.85rem 1.75rem;
        font-size: 0.95rem;
    }
}
