/* Blog Page Styles */
@import url('./style.css');

/* Blog View Controls */
.blog-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-3xl);
    padding: var(--space-xl);
    background: var(--glassmorphism-background);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glassmorphism-border);
    border-radius: var(--card-border-radius);
    box-shadow: var(--glassmorphism-shadow);
}

.blog-view-toggle {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.view-toggle-btn {
    background: transparent;
    border: 1px solid var(--glassmorphism-border);
    color: var(--text-secondary);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.view-toggle-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.view-toggle-btn.active {
    background: var(--accent-color);
    color: var(--black);
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(255, 166, 0, 0.3);
}

.view-toggle-btn i {
    font-size: 1rem;
}

.blog-stats {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/*
 * Crawl-only mirror of article links for search engines.
 * Visually hidden (clip), not display:none — anchors stay discoverable.
 * Sighted users use the grid/list below.
 */
.blog-all-articles.blog-all-articles--crawl-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.blog-all-articles.blog-all-articles--crawl-only .blog-all-articles-heading,
.blog-all-articles.blog-all-articles--crawl-only .blog-all-articles-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Blog List View (Table Layout) */
.blog-list {
    margin-top: var(--space-2xl);
    background: var(--glassmorphism-background);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glassmorphism-border);
    border-radius: var(--card-border-radius);
    box-shadow: var(--glassmorphism-shadow);
    overflow: hidden;
}

.blog-table {
    width: 100%;
    border-collapse: collapse;
}

.blog-table thead {
    background: var(--glassmorphism-gradient);
    border-bottom: 1px solid var(--glassmorphism-border);
}

.blog-table th {
    padding: var(--space-lg) var(--space-xl);
    text-align: left;
    font-weight: 600;
    color: var(--text-color);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-table tbody tr {
    border-bottom: 1px solid var(--glassmorphism-border);
    transition: background-color 0.3s ease;
}

.blog-table tbody tr:hover {
    background: var(--glassmorphism-gradient);
}

.blog-table tbody tr:last-child {
    border-bottom: none;
}

.blog-table td {
    padding: var(--space-lg) var(--space-xl);
    vertical-align: top;
}

.blog-table .blog-title {
    font-weight: 600;
    color: var(--text-color);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    line-height: 1.4;
}

.blog-table .blog-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-table .blog-title a:hover {
    color: var(--primary-color);
}

.blog-table .blog-meta {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-family: var(--font-secondary);
    margin-top: var(--space-xs);
}

.blog-table .blog-summary {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    font-family: var(--font-secondary);
    margin-top: var(--space-sm);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-table .blog-actions {
    text-align: right;
    white-space: nowrap;
}

.blog-table .btn {
    padding: var(--space-xs) var(--space-md);
    font-size: 0.85rem;
}

/* Enhanced Blog Grid View */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: var(--space-2xl);
    margin-top: var(--space-2xl);
    padding: var(--space-md);
}

.blog-grid .blog-card {
    display: flex;
    flex-direction: column;
    background: var(--glassmorphism-background);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glassmorphism-border);
    border-radius: calc(var(--card-border-radius) + 4px);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.08),
        0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
    min-height: 420px;
}

.blog-grid .blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 166, 0, 0.05) 0%, 
        rgba(255, 166, 0, 0.02) 50%, 
        rgba(255, 166, 0, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.blog-grid .blog-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), rgba(255, 166, 0, 0.6));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.blog-grid .blog-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 8px 16px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 166, 0, 0.1);
    border-color: rgba(255, 166, 0, 0.2);
}

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

.blog-grid .blog-card:hover::after {
    transform: scaleX(1);
}

.blog-grid .blog-card > * {
    position: relative;
    z-index: 1;
}

.blog-grid .blog-thumbnail {
    width: 100%;
    height: 200px;
    border-radius: calc(var(--border-radius) + 2px) calc(var(--border-radius) + 2px) 0 0;
    overflow: hidden;
    background: var(--background-color);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0;
    padding: 0;
}

.blog-grid .blog-thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, 
        rgba(0, 0, 0, 0) 0%, 
        rgba(0, 0, 0, 0.1) 100%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-grid .blog-card:hover .blog-thumbnail::before {
    opacity: 1;
}

.blog-grid .blog-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0;
    padding: 0;
}

.blog-grid .blog-card:hover .blog-thumbnail img {
    transform: scale(1.08);
}

.blog-grid .blog-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: var(--space-lg);
    gap: var(--space-sm);
}

.blog-grid .blog-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.blog-grid .blog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-md);
    margin-bottom: var(--space-xs);
}

.blog-grid .blog-card h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-color);
    font-family: var(--font-heading);
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.blog-grid .blog-card h2 a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-grid .blog-card h2 a:hover {
    color: var(--primary-color);
}

.blog-grid .blog-meta {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-family: var(--font-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    line-height: 1.4;
    margin-bottom: var(--space-sm);
}

.blog-grid .blog-meta::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: var(--radius-full);
    opacity: 0.6;
}

.blog-grid .blog-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-family: var(--font-secondary);
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    font-size: 0.9rem;
}

.blog-grid .blog-card .btn {
    align-self: stretch;
    padding: var(--space-sm) var(--space-md);
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    text-align: center;
    margin-top: auto;
}

.blog-card {
    padding: 0;
}

.blog-grid .blog-card .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.blog-grid .blog-card .btn:hover::before {
    left: 100%;
}

.blog-grid .blog-card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 166, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: var(--space-xl);
    }
}

@media (max-width: 1000px) {
    .blog-controls {
        flex-direction: column;
        gap: var(--space-md);
        align-items: stretch;
        margin-bottom: var(--space-2xl);
    }
    
    .blog-view-toggle {
        justify-content: center;
    }
    
    .blog-table {
        font-size: 0.9rem;
    }
    
    .blog-table th,
    .blog-table td {
        padding: var(--space-md) var(--space-lg);
    }
    
    .blog-table .blog-title {
        font-size: 1rem;
    }
    
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: var(--space-lg);
        padding: var(--space-sm);
    }
    
    .blog-grid .blog-card {
        min-height: 400px;
    }
    
    .blog-grid .blog-thumbnail {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .blog-table {
        display: block;
        overflow-x: auto;
    }
    
    .blog-table thead {
        display: none;
    }
    
    .blog-table tbody tr {
        display: block;
        padding: var(--space-lg);
        border-bottom: 1px solid var(--glassmorphism-border);
    }
    
    .blog-table tbody tr:last-child {
        border-bottom: none;
    }
    
    .blog-table td {
        display: block;
        padding: var(--space-xs) 0;
        border: none;
    }
    
    .blog-table .blog-title {
        font-size: 1.1rem;
        margin-bottom: var(--space-xs);
    }
    
    .blog-table .blog-meta {
        margin-bottom: var(--space-xs);
    }
    
    .blog-table .blog-summary {
        margin-bottom: var(--space-md);
        -webkit-line-clamp: 3;
    }
    
    .blog-table .blog-actions {
        text-align: left;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .blog-grid .blog-card {
        min-height: 380px;
    }
    
    .blog-grid .blog-card h2 {
        font-size: 1.3rem;
    }
    
    .blog-grid .blog-content {
        padding: var(--space-md);
    }
}

@media (max-width: 480px) {
    .blog-controls {
        padding: var(--space-md);
    }
    
    .view-toggle-btn {
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.8rem;
    }
    
    .blog-table tbody tr {
        padding: var(--space-md);
    }
    
    .blog-table .blog-title {
        font-size: 1rem;
    }
    
    .blog-grid .blog-card {
        min-height: 360px;
    }
    
    .blog-grid .blog-card h2 {
        font-size: 1.2rem;
    }
    
    .blog-grid .blog-content {
        padding: var(--space-sm);
    }
    
    .blog-grid .blog-thumbnail {
        height: 160px;
    }
}

/* Loading state */
.blog-loading {
    text-align: center;
    padding: var(--space-4xl);
    color: var(--text-secondary);
}

.blog-loading i {
    font-size: 2rem;
    margin-bottom: var(--space-md);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty state */
.blog-empty {
    text-align: center;
    padding: var(--space-4xl);
    color: var(--text-secondary);
}

.blog-empty i {
    font-size: 3rem;
    margin-bottom: var(--space-lg);
    opacity: 0.5;
}

.blog-empty h3 {
    margin-bottom: var(--space-md);
    color: var(--text-color);
}

.blog-empty p {
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto;
} 

/* Responsive adjustments */
@media (max-width: 768px) {
    .blog-grid .blog-card h2 {
        -webkit-line-clamp: 3;
    }
    
    .blog-grid .blog-content {
        padding: var(--space-md);
    }
} 