/* Blog-specific styles */

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

.blog-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 60px 20px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Download App Box */
.download-app-box {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(82, 125, 156, 0.15);
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.download-app-box h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.download-app-box p {
    font-size: 1rem;
    margin-bottom: 24px;
    opacity: 0.95;
    line-height: 1.6;
}

.download-app-box .app-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.download-app-box .app-buttons a {
    display: inline-block;
    width: 100%;
    max-width: 200px;
}

.download-app-box .app-badge {
    height: 50px;
    width: auto;
    transition: transform .3s;
}

.download-app-box .app-badge:hover {
    transform: translateY(-3px);
}

/* Main Content Area */
.blog-main-content {
    flex: 1;
}

.blog-header {
    margin-bottom: 40px;
}

.blog-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 12px;
    font-weight: 700;
    display: flex;
    align-items: start;
    gap: 12px;
    line-height: 1.2;
}

.blog-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    flex-shrink: 0;
    margin-top: 2px;
}

.blog-header p {
    font-size: 1.1rem;
    color: var(--text-light);
}

/* Search Bar */
.search-container {
    margin-bottom: 40px;
}

.search-box {
    position: relative;
    max-width: 100%;
}

.search-box input {
    width: 100%;
    padding: 16px 50px 16px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s;
    background: white;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(82, 125, 156, 0.1);
}

.search-box .search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.2rem;
}

.search-results-info {
    margin-top: 12px;
    font-size: 0.95rem;
    color: var(--text-light);
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 50px;
}

.blog-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    border: 1px solid #f0f0f0;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(82, 125, 156, 0.15);
}

.blog-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    position: relative;
}

.blog-card-image-link {
    display: block;
    text-decoration: none;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-image .placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: white;
    font-size: 3rem;
}

.blog-card-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.blog-title-link {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

.blog-card h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 12px;
    line-height: 1.3;
    font-weight: 700;
    transition: color 0.3s;
}

.blog-card-excerpt {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.6;
    flex: 1;
}

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

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.3s;
}

.read-more:hover {
    gap: 12px;
}

.blog-card-date {
    color: var(--text-light);
    font-size: 0.9rem;
}

.read-time {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 10px 16px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
}

.pagination-btn:hover:not(.disabled) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.pagination-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-ellipsis {
    padding: 10px 8px;
    color: var(--text-light);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.no-results p {
    font-size: 1.1rem;
    color: var(--text-light);
}

/* Desktop Layout */
@media (min-width: 768px) {
    .blog-container {
        grid-template-columns: 1fr 350px;
        gap: 50px;
    }

    .download-app-box {
        position: sticky;
        top: 100px;
        height: fit-content;
        margin-bottom: 0;
        order: 2;
    }

    .blog-main-content {
        order: 1;
    }

    .blog-header h1 {
        font-size: 3rem;
    }

    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 35px;
    }

    .blog-card-image {
        height: 220px;
    }
}

@media (min-width: 1024px) {
    .blog-container {
        grid-template-columns: 1fr 380px;
    }

    .download-app-box h3 {
        font-size: 1.7rem;
    }

    .download-app-box p {
        font-size: 1.05rem;
    }

    .download-app-box .app-buttons {
        flex-direction: row;
        justify-content: center;
    }
}

@media (max-width: 767px) {
    .blog-header h1 {
        font-size: 2rem;
    }

    .blog-header-icon {
        width: 40px;
        height: 40px;
        margin-top: 0px;
    }

    .blog-card h2 {
        font-size: 1.3rem;
    }

    .pagination {
        gap: 6px;
    }

    .pagination-btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 0.9rem;
    overflow: hidden;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
    flex-shrink: 0;
}

.breadcrumb a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.breadcrumb .separator {
    color: #999;
    user-select: none;
    flex-shrink: 0;
}

.breadcrumb .current {
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

/* Blog header icon link */
.blog-header a {
    transition: opacity 0.3s;
}

.blog-header a:hover {
    opacity: 0.8;
}

@media (max-width: 768px) {
    .breadcrumb {
        font-size: 0.85rem;
        gap: 6px;
        margin-bottom: 20px;
    }
}