/* ==============================================
   Logity Dispatch Blog Template Styles
   ============================================== */

:root {
    --lbt-primary: #ef4444;
    --lbt-primary-dark: #dc2626;
    --lbt-secondary: #1f2937;
    --lbt-text: #374151;
    --lbt-text-light: #6b7280;
    --lbt-border: #e5e7eb;
    --lbt-bg-light: #f9fafb;
    --lbt-white: #ffffff;
    --lbt-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --lbt-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --lbt-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --lbt-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==============================================
   Blog Header Section
   ============================================== */
.lbt-blog-header {
    padding: 60px 0 40px;
    background: linear-gradient(135deg, var(--lbt-secondary) 0%, #111827 100%);
    position: relative;
    overflow: hidden;
}

.lbt-blog-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,%3Csvg width="60" height="60" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M0 0h60v60H0z" fill="none"/%3E%3Cpath d="M30 0v60M0 30h60" stroke="rgba(255,255,255,0.03)" stroke-width="1"/%3E%3C/svg%3E');
    opacity: 0.5;
}

.lbt-blog-header-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.lbt-blog-title {
    font-size: 56px;
    font-weight: 800;
    color: var(--lbt-white);
    margin: 0 0 20px 0;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.lbt-blog-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==============================================
   Filter Section
   ============================================== */
.lbt-filter-section {
    background: var(--lbt-white);
    padding: 30px 0;
    border-bottom: 1px solid var(--lbt-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.lbt-filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
}

.lbt-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.lbt-filter-tab {
    padding: 10px 20px;
    background: var(--lbt-bg-light);
    border: 2px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--lbt-text);
    cursor: pointer;
    transition: var(--lbt-transition);
    white-space: nowrap;
}

.lbt-filter-tab:hover {
    background: var(--lbt-primary);
    color: var(--lbt-white);
    border-color: var(--lbt-primary);
    transform: translateY(-2px);
}

.lbt-filter-tab.active {
    background: var(--lbt-primary);
    color: var(--lbt-white);
    border-color: var(--lbt-primary);
}

.lbt-filter-sort {
    display: flex;
    gap: 15px;
    align-items: center;
}

.lbt-sort-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--lbt-text);
}

.lbt-sort-buttons {
    display: flex;
    gap: 10px;
}

.lbt-sort-btn {
    padding: 8px 16px;
    background: var(--lbt-white);
    border: 2px solid var(--lbt-border);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--lbt-text);
    cursor: pointer;
    transition: var(--lbt-transition);
}

.lbt-sort-btn:hover {
    border-color: var(--lbt-primary);
    color: var(--lbt-primary);
}

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

.lbt-clear-filters {
    padding: 8px 16px;
    background: transparent;
    border: 2px solid var(--lbt-border);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--lbt-text);
    cursor: pointer;
    transition: var(--lbt-transition);
}

.lbt-clear-filters:hover {
    border-color: var(--lbt-primary);
    color: var(--lbt-primary);
}

/* ==============================================
   Blog Grid
   ============================================== */
.lbt-blog-grid {
    padding: 60px 0;
    background: var(--lbt-bg-light);
}

.lbt-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Blog Card */
.lbt-blog-card {
    background: var(--lbt-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--lbt-shadow-sm);
    transition: var(--lbt-transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.lbt-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.lbt-card-image {
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* 3:2 Aspect Ratio */
    overflow: hidden;
    background: var(--lbt-bg-light);
}

.lbt-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.lbt-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.lbt-card-meta {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.lbt-date {
    font-size: 13px;
    color: var(--lbt-text-light);
    font-weight: 500;
}

.lbt-category {
    font-size: 12px;
    font-weight: 600;
    color: var(--lbt-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lbt-card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--lbt-secondary);
    margin: 0 0 20px 0;
    line-height: 1.4;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lbt-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--lbt-primary);
    font-size: 14px;
    font-weight: 600;
    transition: var(--lbt-transition);
}

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

.lbt-blog-card:hover .lbt-read-more::after {
    transform: translateX(5px);
}

/* Loading State */
.lbt-loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--lbt-text-light);
}

.lbt-loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--lbt-border);
    border-top-color: var(--lbt-primary);
    border-radius: 50%;
    animation: lbt-spin 1s linear infinite;
}

@keyframes lbt-spin {
    to { transform: rotate(360deg); }
}

/* No Posts */
.lbt-no-posts {
    text-align: center;
    padding: 80px 20px;
    color: var(--lbt-text-light);
    font-size: 18px;
}

/* ==============================================
   Pagination
   ============================================== */
.lbt-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 40px 20px;
}

.lbt-page-btn,
.lbt-page-number {
    padding: 10px 16px;
    background: var(--lbt-white);
    border: 2px solid var(--lbt-border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--lbt-text);
    cursor: pointer;
    transition: var(--lbt-transition);
    min-width: 44px;
    text-align: center;
}

.lbt-page-btn:hover,
.lbt-page-number:hover {
    border-color: var(--lbt-primary);
    color: var(--lbt-primary);
}

.lbt-page-number.active {
    background: var(--lbt-primary);
    border-color: var(--lbt-primary);
    color: var(--lbt-white);
}

.lbt-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: var(--lbt-border);
    color: var(--lbt-text-light);
}

.lbt-page-btn:disabled:hover {
    border-color: var(--lbt-border);
    color: var(--lbt-text-light);
}

/* ==============================================
   CTA Section
   ============================================== */
.lbt-cta-section {
    background: linear-gradient(135deg, var(--lbt-primary) 0%, var(--lbt-primary-dark) 100%);
    padding: 80px 20px;
    position: relative;
    overflow: hidden;
}

.lbt-cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,%3Csvg width="100" height="100" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M100 50L50 100 0 50 50 0z" fill="rgba(255,255,255,0.05)"/%3E%3C/svg%3E');
    opacity: 0.1;
}

.lbt-cta-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.lbt-cta-title {
    font-size: 42px;
    font-weight: 800;
    color: var(--lbt-white);
    margin: 0 0 20px 0;
    line-height: 1.2;
}

.lbt-cta-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 30px 0;
    line-height: 1.6;
}

.lbt-cta-button {
    display: inline-block;
    padding: 16px 40px;
    background: var(--lbt-white);
    color: var(--lbt-primary);
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none;
    transition: var(--lbt-transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.lbt-cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* ==============================================
   Responsive Design
   ============================================== */
@media (max-width: 1200px) {
    .lbt-grid-container {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .lbt-blog-title {
        font-size: 42px;
    }
    
    .lbt-filter-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .lbt-filter-tabs {
        order: 2;
    }
    
    .lbt-filter-sort {
        order: 1;
        justify-content: space-between;
        width: 100%;
    }
    
    .lbt-grid-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .lbt-cta-title {
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    .lbt-blog-title {
        font-size: 32px;
    }
    
    .lbt-blog-subtitle {
        font-size: 16px;
    }
    
    .lbt-filter-tab {
        flex: 1;
        text-align: center;
    }
    
    .lbt-card-title {
        font-size: 18px;
    }
    
    .lbt-pagination {
        flex-wrap: wrap;
    }
}

/* ==============================================
   Animations
   ============================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lbt-blog-card {
    animation: fadeInUp 0.6s ease backwards;
}

.lbt-blog-card:nth-child(1) { animation-delay: 0.05s; }
.lbt-blog-card:nth-child(2) { animation-delay: 0.1s; }
.lbt-blog-card:nth-child(3) { animation-delay: 0.15s; }
.lbt-blog-card:nth-child(4) { animation-delay: 0.2s; }
.lbt-blog-card:nth-child(5) { animation-delay: 0.25s; }
.lbt-blog-card:nth-child(6) { animation-delay: 0.3s; }
.lbt-blog-card:nth-child(7) { animation-delay: 0.35s; }
.lbt-blog-card:nth-child(8) { animation-delay: 0.4s; }

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}
