﻿/* ===============================================
   Blog Styles - Tawazun Control
   =============================================== */

/* Blog Listing Page */
.blog-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #003366 100%);
    padding: 120px 20px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.15) 0%, transparent 60%),
        radial-gradient(circle at 70% 50%, rgba(255, 193, 7, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.blog-hero h1 {
    color: #fff;
    font-size: 2.5rem;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.blog-hero p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

/* Category Filter */
.blog-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 30px 20px;
    max-width: 900px;
    margin: 0 auto;
}

.blog-filters .filter-btn {
    padding: 8px 22px;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    background: #fff;
    color: #343a40;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.blog-filters .filter-btn:hover {
    border-color: #0056b3;
    color: #0056b3;
}

.blog-filters .filter-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.3);
}

/* Blog Grid */
.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px 60px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

/* Blog Card */
.blog-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.blog-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card-image .placeholder-icon {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.3);
}

.blog-card-category {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[dir="ltr"] .blog-card-category {
    right: auto;
    left: 15px;
}

.blog-card-category.cat-solar {
    background: var(--accent-color);
    color: var(--secondary-color);
}

.blog-card-category.cat-elevators {
    background: var(--primary-color);
    color: #fff;
}

.blog-card-category.cat-automation {
    background: var(--secondary-color);
    color: #fff;
}

.blog-card-category.cat-smart {
    background: #004494;
    color: #fff;
}

.blog-card-category.cat-general {
    background: #6c757d;
    color: #fff;
}

.blog-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.8rem;
    color: #adb5bd;
    margin-bottom: 12px;
}

.blog-card-meta i {
    margin-left: 4px;
}

[dir="ltr"] .blog-card-meta i {
    margin-left: 0;
    margin-right: 4px;
}

.blog-card-body h3 {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
    line-height: 1.6;
    transition: color 0.3s;
}

.blog-card:hover .blog-card-body h3 {
    color: #0056b3;
}

.blog-card-body p {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 20px;
    flex: 1;
}

.blog-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #0056b3;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: gap 0.3s;
}

.blog-card-link:hover {
    gap: 12px;
}

/* Blog Post Page */
.blog-post-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #003366 100%);
    padding: 120px 20px 50px;
    text-align: center;
    position: relative;
}

.blog-post-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.blog-post-hero .breadcrumb {
    display: flex;
    justify-content: center;
    gap: 8px;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.blog-post-hero .breadcrumb a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.blog-post-hero .breadcrumb a:hover {
    color: #fff;
}

.blog-post-hero .breadcrumb span {
    color: rgba(255, 255, 255, 0.4);
}

.blog-post-hero .breadcrumb .current {
    color: var(--accent-color);
    font-weight: 500;
}

.blog-post-hero h1 {
    color: #fff;
    font-size: 2.2rem;
    max-width: 800px;
    margin: 0 auto 15px;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

.blog-post-hero .post-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

.blog-post-hero .post-meta i {
    margin-left: 5px;
}

[dir="ltr"] .blog-post-hero .post-meta i {
    margin-left: 0;
    margin-right: 5px;
}

/* Post Content */
.blog-post-content {
    max-width: 800px;
    margin: -30px auto 0;
    padding: 50px 40px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 2;
    margin-bottom: 40px;
}

.blog-post-content h2 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin: 30px 0 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.blog-post-content h2:first-child {
    margin-top: 0;
}

.blog-post-content p {
    color: #343a40;
    font-size: 1.05rem;
    line-height: 1.9;
    margin-bottom: 15px;
}

.blog-post-content strong {
    color: var(--secondary-color);
}

.blog-post-content ul,
.blog-post-content ol {
    padding-right: 20px;
    margin-bottom: 15px;
}

[dir="ltr"] .blog-post-content ul,
[dir="ltr"] .blog-post-content ol {
    padding-right: 0;
    padding-left: 20px;
}

.blog-post-content li {
    color: #343a40;
    line-height: 1.8;
    margin-bottom: 5px;
}

.blog-post-content img {
    max-width: 100%;
    border-radius: 10px;
    margin: 20px 0;
}

/* Share Buttons */
.blog-share {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px solid #e2e8f0;
}

.blog-share span {
    font-weight: 600;
    color: #343a40;
    font-size: 0.9rem;
}

.blog-share a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
    font-size: 1rem;
}

.blog-share a:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.blog-share .share-facebook {
    background: #0056b3;
}

.blog-share .share-twitter {
    background: #0056b3;
}

.blog-share .share-linkedin {
    background: #0056b3;
}

.blog-share .share-whatsapp {
    background: #25d366;
}

/* Related Posts */
.related-posts {
    max-width: 1200px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

.related-posts h2 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 25px;
    text-align: center;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

/* Empty State */
.blog-empty {
    text-align: center;
    padding: 80px 20px;
    color: #adb5bd;
}

.blog-empty i {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
    color: #cbd5e1;
}

.blog-empty h3 {
    color: #6c757d;
    margin-bottom: 10px;
}

/* Back to blog link */
.back-to-blog {
    max-width: 800px;
    margin: 0 auto 30px;
    padding: 0 20px;
}

.back-to-blog a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0056b3;
    text-decoration: none;
    font-weight: 500;
    transition: gap 0.3s;
}

.back-to-blog a:hover {
    gap: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 1.8rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-post-hero h1 {
        font-size: 1.6rem;
    }

    .blog-post-content {
        padding: 30px 20px;
        margin-left: 10px;
        margin-right: 10px;
    }

    .blog-post-hero .post-meta {
        flex-direction: column;
        gap: 8px;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
    }

    .blog-filters .filter-btn {
        padding: 6px 16px;
        font-size: 0.8rem;
    }
}
