/* ========================================
   PAGE-SPECIFIC STYLES
   Corporate, Minimalist, Modern Design
   ======================================== */

/* Main Content Spacing for all pages */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    padding-top: 0;
}

/* ========================================
   BLOG LISTING PAGE - REFINED CARDS
   ======================================== */

.blog-posts-section {
    padding: var(--spacing-xxl) 0;
    background: var(--light-color);
}

.blog-posts-section .blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--spacing-xl);
    margin-top: 0;
    padding: 0;
}

.blog-posts-section .blog-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.blog-posts-section .blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1e3a5f, #2d6a9f);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.blog-posts-section .blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08), 0 4px 16px rgba(0, 0, 0, 0.06);
    border-color: rgba(30, 58, 95, 0.15);
}

.blog-posts-section .blog-card:hover::before {
    opacity: 1;
}

.blog-posts-section .blog-image {
    position: relative;
    overflow: hidden;
    background: #f0f2f5;
    display: block;
}

.blog-posts-section .blog-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.blog-posts-section .blog-card:hover .blog-image img {
    transform: scale(1.06);
}

.blog-posts-section .blog-content {
    padding: var(--spacing-lg);
}

.blog-posts-section .blog-meta {
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.blog-posts-section .blog-date {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: var(--font-weight-medium);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.blog-posts-section .blog-date::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    background: #1e3a5f;
    border-radius: 50%;
}

.blog-posts-section .blog-content h3 {
    font-size: 1.25rem;
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-sm);
    line-height: 1.35;
}

.blog-posts-section .blog-content h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-posts-section .blog-card:hover .blog-content h3 a {
    color: #1e3a5f;
}

.blog-posts-section .blog-excerpt {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-posts-section .read-more {
    display: inline-flex;
    align-items: center;
    color: #1e3a5f;
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    gap: 6px;
}

.blog-posts-section .read-more::after {
    content: '→';
    transition: transform 0.3s ease;
}

.blog-posts-section .read-more:hover {
    color: #2d6a9f;
}

.blog-posts-section .read-more:hover::after {
    transform: translateX(4px);
}

/* No posts / search results */
.blog-posts-section .search-results-header {
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--border-color);
}

.blog-posts-section .search-results-header h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.blog-posts-section .pagination {
    margin-top: var(--spacing-xxl);
    text-align: center;
}

.blog-posts-section .pagination li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    background: var(--white);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    font-weight: var(--font-weight-medium);
}

.blog-posts-section .pagination li.active a {
    background: #1e3a5f;
    color: var(--white);
    border-color: #1e3a5f;
}

.blog-posts-section .pagination li a:hover {
    background: var(--light-color);
    border-color: #1e3a5f;
    color: #1e3a5f;
}

/* Blog image placeholder fallback */
.blog-posts-section .blog-image img[src*="blog-placeholder"] {
    object-fit: contain;
    padding: 2rem;
    background: linear-gradient(135deg, #e8ecf1 0%, #d5dbe3 100%);
    box-sizing: border-box;
}

/* Responsive */
@media (max-width: 768px) {
    .blog-posts-section {
        padding: var(--spacing-xl) 0;
    }

    .blog-posts-section .blog-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        padding: 0;
    }

    .blog-posts-section .blog-image img {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .blog-posts-section .blog-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .blog-posts-section .blog-image img {
        height: 160px;
    }

    .blog-posts-section .blog-content {
        padding: var(--spacing-md);
    }

    .blog-posts-section .blog-content h3 {
        font-size: 1.1rem;
    }
}

/* ========================================
   BLOG POST PAGE - NO THUMBNAIL FALLBACK
   ======================================== */

.blog-post-page .blog-post-hero {
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.92) 0%, rgba(45, 106, 159, 0.88) 100%), 
                url('../media/pexels-mikael-blomkvist-6476248.jpg');
    background-size: cover;
    background-position: center;
}

/* ========================================
   HOMEPAGE BLOG PREVIEW - BROKEN IMAGE FIX
   ======================================== */

.homepage-content .blog-image img[src="media/"] {
    content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='220' viewBox='0 0 400 220'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' style='stop-color:%231e3a5f'/%3E%3Cstop offset='100%25' style='stop-color:%232d6a9f'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='400' height='220' fill='url(%23g)'/%3E%3Ctext x='200' y='100' text-anchor='middle' dominant-baseline='middle' font-family='Inter,sans-serif' font-size='18' fill='rgba(255,255,255,0.65)' font-weight='600'%3EBlog G%C3%B6rseli%3C/text%3E%3Ctext x='200' y='130' text-anchor='middle' dominant-baseline='middle' font-family='Inter,sans-serif' font-size='12' fill='rgba(255,255,255,0.4)'%3EASP Dijital%3C/text%3E%3C/svg%3E");
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
} /* ========================================
   BLOG SEARCH PAGE - PROFESSIONAL REDESIGN
   ======================================== */

/* Blog Search Bar */
.blog-search-bar {
    margin-bottom: var(--spacing-xl, 2rem);
}

.blog-search-form {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 720px;
    margin: 0 auto;
}

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

.search-input-wrapper .search-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-secondary, #6c757d);
    pointer-events: none;
    z-index: 2;
}

.search-input-wrapper input[type="text"] {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 2.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary, #1a202c);
    background: #ffffff;
    transition: all 0.25s ease;
    outline: none;
}

.search-input-wrapper input[type="text"]:focus {
    border-color: #1e3a5f;
    box-shadow: 0 0 0 4px rgba(30, 58, 95, 0.08);
}

.search-input-wrapper input[type="text"]::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

.search-btn {
    padding: 0.9rem 1.75rem;
    background: linear-gradient(135deg, #1e3a5f, #2d6a9f);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 58, 95, 0.3);
    background: linear-gradient(135deg, #243d66, #336fa3);
}

.search-btn:active {
    transform: translateY(0);
}

.clear-search-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.9rem 1.25rem;
    background: #f1f5f9;
    color: #475569;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.clear-search-btn:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #334155;
    transform: translateY(-1px);
}

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

/* Search Error Message */
.search-error-message {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    background: linear-gradient(135deg, #fef2f2, #fff1f2);
    border: 1px solid #fecdd3;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: var(--spacing-xl, 2rem);
    color: #9f1239;
}

.search-error-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #ffe4e6;
    border-radius: 10px;
    flex-shrink: 0;
}

.search-error-icon svg {
    width: 20px;
    height: 20px;
    stroke: #e11d48;
}

.search-error-content {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.search-error-content strong {
    font-weight: 600;
    font-size: 0.95rem;
}

.search-error-content span {
    font-size: 0.9rem;
    color: #be123c;
}

/* Search Results Header */
.search-results-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: var(--spacing-xl, 2rem);
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
}

.search-results-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #1e3a5f, #2d6a9f);
    border-radius: 14px;
    color: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.2);
}

.search-results-icon svg {
    width: 26px;
    height: 26px;
}

.search-results-info h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary, #1a202c);
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.search-results-info p {
    font-size: 0.95rem;
    color: var(--text-secondary, #4a5568);
    margin: 0;
    font-weight: 500;
}

/* Search Highlight */
mark.search-highlight {
    background: linear-gradient(180deg, rgba(0, 147, 222, 0.15) 0%, rgba(0, 147, 222, 0.25) 100%);
    color: #1e3a5f;
    padding: 0.05em 0.15em;
    border-radius: 4px;
    font-weight: 600;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

/* Enhanced No Results */
.no-results-enhanced {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 3.5rem 1.5rem;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 2px dashed #e2e8f0;
    border-radius: 20px;
    margin: 1rem 0;
}

.no-results-enhanced .no-results-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    margin-bottom: 1.5rem;
    color: #94a3b8;
}

.no-results-enhanced .no-results-icon svg {
    width: 40px;
    height: 40px;
    stroke: #94a3b8;
}

.no-results-enhanced h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary, #1a202c);
    margin-bottom: 0.5rem;
}

.no-results-enhanced p {
    font-size: 1rem;
    color: var(--text-secondary, #4a5568);
    max-width: 420px;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.btn-view-all {
    display: inline-flex;
    align-items: center;
    padding: 0.8rem 1.75rem;
    background: linear-gradient(135deg, #1e3a5f, #2d6a9f);
    color: #ffffff;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.25s ease;
}

.btn-view-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 58, 95, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .blog-search-form {
        flex-wrap: wrap;
    }
    
    .search-input-wrapper {
        width: 100%;
    }
    
    .search-btn,
    .clear-search-btn {
        flex: 1;
        justify-content: center;
    }
    
    .search-results-header {
        padding: 1rem;
    }
    
    .search-results-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }
    
    .search-results-icon svg {
        width: 22px;
        height: 22px;
    }
    
    .search-results-info h2 {
        font-size: 1.15rem;
    }
    
    .no-results-enhanced {
        padding: 2.5rem 1rem;
    }
    
    .no-results-enhanced h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .search-btn,
    .clear-search-btn {
        padding: 0.8rem 1rem;
        font-size: 0.85rem;
    }
    
    .search-input-wrapper input[type="text"] {
        padding: 0.8rem 1rem 0.8rem 2.5rem;
        font-size: 0.95rem;
    }
    
    .search-input-wrapper .search-icon {
        left: 0.8rem;
        width: 18px;
        height: 18px;
    }
    
    .search-results-header {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .search-error-message {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
}
