/* Blog Specific Styles */

.blog-hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #4c1d95 100%);
    color: var(--white);
    padding: 6rem 0 4rem;
    text-align: center;
}

.blog-hero h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.blog-hero p {
    font-size: 1.25rem;
    opacity: 0.95;
}

.blog-posts {
    padding: 4rem 0;
    background: var(--bg-light);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.blog-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.blog-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e3a8a 0%, #4c1d95 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-icon {
    width: 60px;
    height: 60px;
    color: var(--white);
    stroke-width: 1.5;
}

.blog-content {
    padding: 1.5rem;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.blog-category {
    background: #1e3a8a;
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
}

/* Category Colors */
.category-finops {
    background: #f59e0b;
    color: #78350f;
}

.category-aiml {
    background: #8b5cf6;
    color: var(--white);
}

.category-architecture {
    background: #3b82f6;
    color: var(--white);
}

.category-security {
    background: #ef4444;
    color: var(--white);
}

.category-reinvent {
    background: #10b981;
    color: var(--white);
}

.category-app-dev {
    background: #10b981;
    color: var(--white);
}

.blog-date {
    color: var(--text-light);
}

.blog-content h2 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.blog-content h2 a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s;
}

.blog-content h2 a:hover {
    color: #1e3a8a;
}

.blog-content p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.read-more {
    color: #1e3a8a;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
}

.read-more:hover {
    color: #4c1d95;
}

.blog-cta {
    background: linear-gradient(135deg, #1e3a8a 0%, #4c1d95 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.blog-cta h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.blog-cta p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* Responsive */
@media (max-width: 768px) {
    .blog-hero {
        padding: 4rem 0 3rem;
    }

    .blog-hero h1 {
        font-size: 2rem;
    }

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

    .blog-grid {
        grid-template-columns: 1fr;
    }

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

/* Blog Search Section */
.blog-search-section {
    background: #ffffff;
    padding: 2rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.blog-search-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    width: 22px;
    height: 22px;
    color: #667eea;
    pointer-events: none;
    transition: color 0.3s ease;
}

#blogSearch {
    width: 100%;
    padding: 1rem 3.5rem 1rem 3.5rem;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    background: #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    font-family: inherit;
    color: #1e293b;
}

#blogSearch::placeholder {
    color: #94a3b8;
}

#blogSearch:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

#blogSearch:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15), 0 0 0 4px rgba(102, 126, 234, 0.1);
    background: #ffffff;
}

.clear-search {
    position: absolute;
    right: 1.25rem;
    background: #f1f5f9;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.2s ease;
    border-radius: 8px;
}

.clear-search:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.clear-search svg {
    width: 18px;
    height: 18px;
}

.search-results {
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.08);
    max-height: 500px;
    overflow-y: auto;
    z-index: 100;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-result-item {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-result-item:first-child {
    border-radius: 16px 16px 0 0;
}

.search-result-item:last-child {
    border-bottom: none;
    border-radius: 0 0 16px 16px;
}

.search-result-item:hover {
    background: linear-gradient(to right, #f8fafc, #ffffff);
    padding-left: 1.75rem;
}

.search-result-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.25rem 0;
}

.search-result-meta {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin: 0.25rem 0;
    font-size: 0.875rem;
    color: #64748b;
}

.search-result-category {
    padding: 0.125rem 0.5rem;
    background: #f1f5f9;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.search-result-description {
    font-size: 0.875rem;
    color: #475569;
    margin: 0.5rem 0 0 0;
    line-height: 1.5;
}

.search-no-results {
    padding: 2rem;
    text-align: center;
    color: #64748b;
}

.search-no-results-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    color: #cbd5e1;
}

.search-no-results h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
}

.search-no-results p {
    font-size: 0.875rem;
    margin: 0;
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .blog-search-section {
        padding: 1.75rem 0;
    }

    .blog-search-container {
        max-width: 700px;
        padding: 0 1.5rem;
    }

    #blogSearch {
        font-size: 0.9375rem;
        padding: 0.9375rem 3.25rem 0.9375rem 3.25rem;
    }

    .search-icon {
        left: 1.125rem;
        width: 20px;
        height: 20px;
    }

    .clear-search {
        right: 1.125rem;
        padding: 0.4375rem;
    }

    .search-results {
        max-height: 450px;
    }

    .search-result-item {
        padding: 1.125rem 1.375rem;
    }

    .search-result-title {
        font-size: 0.9375rem;
    }

    .search-result-description {
        font-size: 0.8125rem;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .blog-search-section {
        padding: 1.25rem 0;
    }

    .blog-search-container {
        padding: 0 1rem;
    }

    #blogSearch {
        font-size: 0.875rem;
        padding: 0.875rem 2.75rem 0.875rem 2.75rem;
        border-radius: 12px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    }

    #blogSearch:hover {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    }

    #blogSearch:focus {
        box-shadow: 0 2px 12px rgba(102, 126, 234, 0.15), 0 0 0 3px rgba(102, 126, 234, 0.1);
    }

    .search-icon {
        left: 0.875rem;
        width: 18px;
        height: 18px;
    }

    .clear-search {
        right: 0.875rem;
        padding: 0.375rem;
    }

    .clear-search svg {
        width: 16px;
        height: 16px;
    }

    .search-results {
        max-height: 350px;
        border-radius: 12px;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 2px 12px rgba(0, 0, 0, 0.08);
    }

    .search-result-item {
        padding: 1rem 1rem;
    }

    .search-result-item:hover {
        padding-left: 1rem;
        background: #f8fafc;
    }

    .search-result-title {
        font-size: 0.875rem;
        line-height: 1.4;
    }

    .search-result-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
        font-size: 0.75rem;
    }

    .search-result-category {
        font-size: 0.6875rem;
    }

    .search-result-description {
        font-size: 0.8125rem;
        line-height: 1.4;
    }

    .search-no-results {
        padding: 1.5rem 1rem;
    }

    .search-no-results-icon {
        width: 40px;
        height: 40px;
    }

    .search-no-results h3 {
        font-size: 1rem;
    }

    .search-no-results p {
        font-size: 0.8125rem;
    }
}

/* Responsive - Small Mobile */
@media (max-width: 480px) {
    .blog-search-section {
        padding: 1rem 0;
    }

    .blog-search-container {
        padding: 0 0.75rem;
    }

    #blogSearch {
        font-size: 0.875rem;
        padding: 0.75rem 2.5rem 0.75rem 2.5rem;
        border-radius: 10px;
    }

    #blogSearch::placeholder {
        font-size: 0.8125rem;
    }

    .search-icon {
        left: 0.75rem;
        width: 16px;
        height: 16px;
    }

    .clear-search {
        right: 0.75rem;
        padding: 0.3125rem;
    }

    .search-results {
        max-height: 300px;
        top: calc(100% + 0.5rem);
    }

    .search-result-item {
        padding: 0.875rem 0.875rem;
    }

    .search-result-title {
        font-size: 0.8125rem;
    }

    .search-result-meta {
        font-size: 0.6875rem;
        gap: 0.375rem;
    }

    .search-result-description {
        font-size: 0.75rem;
        margin-top: 0.375rem;
    }
}
