/**
 * Blogs Listing Page Styles - Premium Design
 * Sharp edges, modern typography, responsive layout
 */

:root {
    --blogs-primary: #212529;
    --blogs-accent: #212529;
    --blogs-accent-hover: #000000;
    --blogs-bg-primary: #ffffff;
    --blogs-bg-secondary: #f8f9fa;
    --blogs-text-primary: #1a1a1a;
    --blogs-text-secondary: #6c757d;
    --blogs-border: #e5e5e5;
    --blogs-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    --blogs-shadow-lg: 0 15px 40px rgba(0, 0, 0, 0.12);
    --blogs-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.blogs-page-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    background: var(--blogs-bg-primary);
}

/* ============================================
   HERO SECTION
   ============================================ */
.blogs-hero {
    background: linear-gradient(135deg, #212529 0%, #000000 100%);
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blogs-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.blogs-hero-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.blogs-hero-title {
    font-size: 56px;
    font-weight: 800;
    color: white;
    margin: 0 0 20px;
    letter-spacing: -1.5px;
    line-height: 1.1;
    text-transform: uppercase;
}

.blogs-hero-subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* ============================================
   LISTING SECTION
   ============================================ */
.blogs-listing {
    padding: 70px 0 100px;
}

.blogs-listing .container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 30px;
}

/* ============================================
   FILTERS
   ============================================ */
.blogs-filters {
    margin-bottom: 50px;
}

.blogs-search-form {
    margin-bottom: 35px;
}

.search-wrapper {
    display: flex;
    max-width: 550px;
    margin: 0 auto;
    border: 2px solid var(--blogs-border);
    overflow: hidden;
    background: white;
    transition: var(--blogs-transition);
}

.search-wrapper:focus-within {
    border-color: var(--blogs-primary);
    box-shadow: 0 0 0 3px rgba(33, 37, 41, 0.1);
}

.blogs-search-input {
    flex: 1;
    padding: 16px 24px;
    border: none;
    outline: none;
    font-size: 16px;
    font-weight: 400;
    color: var(--blogs-text-primary);
}

.blogs-search-input::placeholder {
    color: var(--blogs-text-secondary);
}

.blogs-search-btn {
    padding: 16px 28px;
    background: var(--blogs-primary);
    color: white;
    border: none;
    cursor: pointer;
    transition: var(--blogs-transition);
    font-size: 18px;
}

.blogs-search-btn:hover {
    background: var(--blogs-accent-hover);
}

.blogs-tags-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.tag-filter {
    padding: 10px 22px;
    background: white;
    border: 2px solid var(--blogs-border);
    text-decoration: none;
    color: var(--blogs-text-primary);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--blogs-transition);
}

.tag-filter:hover {
    border-color: var(--blogs-primary);
    color: var(--blogs-primary);
}

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

/* ============================================
   BLOGS GRID
   ============================================ */
.blogs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

/* ============================================
   BLOG CARD - PREMIUM DESIGN
   ============================================ */
.blog-card {
    background: white;
    overflow: hidden;
    border: 1px solid var(--blogs-border);
    transition: var(--blogs-transition);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--blogs-shadow-lg);
    border-color: var(--blogs-primary);
}

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

.blog-card-image {
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: var(--blogs-bg-secondary);
    position: relative;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

/* Date Badge on Image */
.blog-card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, rgba(0,0,0,0.4), transparent);
    pointer-events: none;
}

/* ============================================
   BLOG CARD CONTENT
   ============================================ */
.blog-card-content {
    padding: 28px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-meta {
    display: flex;
    gap: 18px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--blogs-text-secondary);
}

.blog-date,
.blog-views {
    display: flex;
    align-items: center;
    gap: 6px;
}

.blog-date i,
.blog-views i {
    font-size: 12px;
}

.blog-card-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 14px;
    color: var(--blogs-text-primary);
    line-height: 1.4;
    letter-spacing: -0.3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.blog-card:hover .blog-card-title {
    color: var(--blogs-text-secondary);
}

.blog-card-excerpt {
    color: var(--blogs-text-secondary);
    line-height: 1.7;
    margin: 0 0 18px;
    font-size: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.blog-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.blog-tag {
    padding: 5px 14px;
    background: var(--blogs-bg-secondary);
    font-size: 11px;
    font-weight: 600;
    color: var(--blogs-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid var(--blogs-border);
}

.blog-card-read-more {
    color: var(--blogs-primary);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--blogs-transition);
    margin-top: auto;
}

.blog-card:hover .blog-card-read-more {
    gap: 15px;
}

.blog-card-read-more i {
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-read-more i {
    transform: translateX(3px);
}

[dir="rtl"] .blog-card:hover .blog-card-read-more i {
    transform: translateX(-3px);
}

/* ============================================
   PAGINATION
   ============================================ */
.blogs-pagination {
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

.blogs-pagination .pagination {
    display: flex;
    gap: 8px;
}

.blogs-pagination .page-link {
    padding: 12px 18px;
    border: 2px solid var(--blogs-border);
    background: white;
    color: var(--blogs-text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--blogs-transition);
}

.blogs-pagination .page-link:hover,
.blogs-pagination .page-item.active .page-link {
    background: var(--blogs-primary);
    border-color: var(--blogs-primary);
    color: white;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.blogs-empty {
    text-align: center;
    padding: 100px 20px;
    color: var(--blogs-text-secondary);
}

.blogs-empty i {
    font-size: 80px;
    margin-bottom: 30px;
    opacity: 0.3;
}

.blogs-empty h3 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 15px;
    color: var(--blogs-text-primary);
}

.blogs-empty p {
    font-size: 18px;
    margin: 0;
}

/* ============================================
   RESPONSIVE - TABLET (1024px)
   ============================================ */
@media (max-width: 1024px) {
    .blogs-hero {
        padding: 80px 0;
    }

    .blogs-hero-title {
        font-size: 44px;
    }

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

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

    .blog-card-content {
        padding: 24px;
    }

    .blog-card-title {
        font-size: 18px;
    }
}

/* ============================================
   RESPONSIVE - TABLET (768px)
   ============================================ */
@media (max-width: 768px) {
    .blogs-hero {
        padding: 70px 0;
        margin-top: 20px;
    }

    .blogs-hero-title {
        font-size: 36px;
    }

    .blogs-hero-subtitle {
        font-size: 17px;
    }

    .blogs-listing {
        padding: 50px 0 70px;
    }

    .blogs-listing .container {
        padding: 0 20px;
    }

    .blogs-filters {
        margin-bottom: 40px;
    }

    .search-wrapper {
        max-width: 100%;
    }

    .blogs-search-input {
        padding: 14px 18px;
        font-size: 15px;
    }

    .blogs-search-btn {
        padding: 14px 20px;
    }

    .blogs-tags-filter {
        gap: 10px;
    }

    .tag-filter {
        padding: 8px 16px;
        font-size: 12px;
    }

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

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

    .blog-card-content {
        padding: 20px;
    }

    .blog-card-meta {
        font-size: 12px;
        gap: 12px;
        margin-bottom: 12px;
    }

    .blog-card-title {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .blog-card-excerpt {
        font-size: 14px;
        -webkit-line-clamp: 2;
        margin-bottom: 14px;
    }

    .blog-tag {
        font-size: 10px;
        padding: 4px 10px;
    }

    .blog-card-read-more {
        font-size: 11px;
    }
}

/* ============================================
   RESPONSIVE - MOBILE (480px)
   ============================================ */
@media (max-width: 480px) {
    .blogs-hero {
        padding: 60px 0;
        margin-top: 25px;
    }

    .blogs-hero-title {
        font-size: 28px;
        letter-spacing: -0.5px;
    }

    .blogs-hero-subtitle {
        font-size: 15px;
    }

    .blogs-listing {
        padding: 40px 0 60px;
    }

    .blogs-listing .container {
        padding: 0 15px;
    }

    .blogs-filters {
        margin-bottom: 30px;
    }

    .blogs-search-form {
        margin-bottom: 25px;
    }

    .blogs-search-input {
        padding: 12px 15px;
        font-size: 14px;
    }

    .blogs-search-btn {
        padding: 12px 16px;
        font-size: 16px;
    }

    .tag-filter {
        padding: 7px 14px;
        font-size: 11px;
    }

    .blogs-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

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

    .blog-card-content {
        padding: 22px;
    }

    .blog-card-meta {
        flex-wrap: wrap;
        gap: 10px;
    }

    .blog-card-title {
        font-size: 18px;
        -webkit-line-clamp: 2;
    }

    .blog-card-excerpt {
        font-size: 14px;
        -webkit-line-clamp: 3;
        line-height: 1.6;
    }

    .blog-card-tags {
        gap: 6px;
        margin-bottom: 15px;
    }

    .blog-tag {
        font-size: 10px;
        padding: 4px 10px;
    }

    .blogs-empty {
        padding: 70px 20px;
    }

    .blogs-empty i {
        font-size: 60px;
    }

    .blogs-empty h3 {
        font-size: 22px;
    }

    .blogs-empty p {
        font-size: 15px;
    }
}

/* ============================================
   RTL SUPPORT
   ============================================ */
[dir="rtl"] .blog-card-meta {
    flex-direction: row-reverse;
}

[dir="rtl"] .blog-date,
[dir="rtl"] .blog-views {
    flex-direction: row-reverse;
}

[dir="rtl"] .blog-card-content {
    text-align: right;
}

[dir="rtl"] .blog-card-read-more {
    margin-right: auto;
    margin-left: 0;
}

[dir="rtl"] .blogs-tags-filter {
    flex-direction: row-reverse;
}

[dir="rtl"] .search-wrapper {
    flex-direction: row-reverse;
}

[dir="rtl"] .blog-card-tags {
    flex-direction: row-reverse;
}
