/* ============================================================
   BLOG / FORUM / REVIEWS — Premium FleetCart style
   Indexable par Google — SEO content enrichment
   ============================================================ */

/* --- Page layout --- */
.blog-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 20px 60px;
}

/* --- Header avec filtres --- */
.blog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 24px;
}
.blog-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--gsmone-page-color, #dee2e6);
    display: flex;
    align-items: center;
    gap: 10px;
}
.blog-title i {
    color: var(--gsmone-accent, #4680ff);
}

.blog-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.blog-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s;
    border: none;
    cursor: pointer;
}
.blog-btn-primary {
    background: linear-gradient(135deg, #4680ff, #667eea);
    color: #fff;
}
.blog-btn-primary:hover { opacity: .9; color: #fff; text-decoration: none; }

.blog-btn-outline {
    background: var(--gsmone-card-bg, #1d2630);
    border: 1px solid var(--gsmone-card-border, #2e3840);
    color: var(--gsmone-page-color, #dee2e6);
}
.blog-btn-outline:hover {
    border-color: var(--gsmone-accent, #4680ff);
    color: var(--gsmone-accent, #4680ff);
    text-decoration: none;
}
.blog-btn-outline.active {
    background: var(--gsmone-accent-soft, rgba(70,128,255,.15));
    border-color: var(--gsmone-accent, #4680ff);
    color: var(--gsmone-accent, #4680ff);
}

/* --- Filter tabs --- */
.blog-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.blog-filter {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    color: var(--gsmone-page-secondary, #8b949e);
    background: var(--gsmone-input-bg, #131920);
    border: 1px solid var(--gsmone-card-border, #2e3840);
    transition: all .2s;
}
.blog-filter:hover, .blog-filter.active {
    color: #fff;
    text-decoration: none;
}
.blog-filter[data-type="all"].active       { background: var(--gsmone-accent); border-color: var(--gsmone-accent); }
.blog-filter[data-type="review"].active    { background: #f59e0b; border-color: #f59e0b; color: #1a1a1a; }
.blog-filter[data-type="discussion"].active { background: #1b9e8f; border-color: #1b9e8f; }
.blog-filter[data-type="question"].active  { background: #8b5cf6; border-color: #8b5cf6; }

/* --- Search bar --- */
.blog-search {
    position: relative;
    max-width: 280px;
}
.blog-search input {
    width: 100%;
    height: 36px;
    padding: 0 12px 0 34px;
    background: var(--gsmone-input-bg, #131920);
    border: 1px solid var(--gsmone-card-border, #2e3840);
    border-radius: 8px;
    color: var(--gsmone-input-color, #dee2e6);
    font-size: 13px;
    outline: none;
    transition: border-color .2s;
}
.blog-search input:focus { border-color: var(--gsmone-accent, #4680ff); }
.blog-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--gsmone-page-secondary, #8b949e);
    pointer-events: none;
}

/* --- Post cards grid --- */
.blog-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.blog-card {
    background: var(--gsmone-card-bg, #1d2630);
    border: 1px solid var(--gsmone-card-border, #2e3840);
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    gap: 16px;
    text-decoration: none;
    color: var(--gsmone-page-color, #dee2e6);
    transition: border-color .2s, box-shadow .2s;
}
.blog-card:hover {
    border-color: rgba(70, 128, 255, .3);
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    text-decoration: none;
    color: var(--gsmone-page-color, #dee2e6);
}

.blog-card-avatar {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--gsmone-accent-soft, rgba(70,128,255,.15));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--gsmone-accent, #4680ff);
}

.blog-card-body { flex: 1; min-width: 0; }

.blog-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.blog-card-type {
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    padding: 2px 8px;
    border-radius: 4px;
    line-height: 1.5;
}
.blog-card-type.review    { background: #f59e0b; color: #1a1a1a; }
.blog-card-type.discussion { background: #1b9e8f; color: #fff; }
.blog-card-type.question  { background: #8b5cf6; color: #fff; }

.blog-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--gsmone-page-color, #dee2e6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.blog-card-excerpt {
    font-size: 13px;
    color: var(--gsmone-page-secondary, #8b949e);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 11.5px;
    color: var(--gsmone-page-secondary, #8b949e);
}
.blog-card-meta i {
    font-size: 10px;
    margin-right: 3px;
    opacity: .7;
}

.blog-card-stars {
    display: flex;
    gap: 2px;
}
.blog-card-stars i {
    font-size: 11px;
    margin-right: 0;
    opacity: 1;
}
.blog-card-stars i.active { color: #f5a623; }
.blog-card-stars i:not(.active) { color: #3a4550; }

.blog-card-service {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: var(--gsmone-accent-soft, rgba(70,128,255,.15));
    border-radius: 4px;
    font-size: 10.5px;
    color: var(--gsmone-accent, #4680ff);
    font-weight: 600;
}

/* --- Stats sidebar --- */
.blog-card-stats {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 60px;
}
.blog-stat {
    text-align: center;
}
.blog-stat-num {
    font-size: 16px;
    font-weight: 700;
    color: var(--gsmone-page-color, #dee2e6);
}
.blog-stat-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .3px;
    color: var(--gsmone-page-secondary, #8b949e);
}

/* === SINGLE POST PAGE === */
.post-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px 20px 60px;
}

.post-header {
    margin-bottom: 24px;
}
.post-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--gsmone-page-secondary, #8b949e);
    text-decoration: none;
    margin-bottom: 16px;
    transition: color .2s;
}
.post-back:hover { color: var(--gsmone-accent, #4680ff); text-decoration: none; }

.post-type-badge {
    display: inline-flex;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 10px;
}
.post-type-badge.review    { background: rgba(245,158,11,.15); color: #f59e0b; border: 1px solid rgba(245,158,11,.3); }
.post-type-badge.discussion { background: rgba(27,158,143,.15); color: #1b9e8f; border: 1px solid rgba(27,158,143,.3); }
.post-type-badge.question  { background: rgba(139,92,246,.15); color: #8b5cf6; border: 1px solid rgba(139,92,246,.3); }

.post-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--gsmone-page-color, #dee2e6);
    margin: 0 0 12px;
    line-height: 1.3;
}

.post-meta-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--gsmone-page-secondary, #8b949e);
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gsmone-card-border, #2e3840);
}
.post-meta-bar i { font-size: 12px; margin-right: 4px; }
.post-author {
    display: flex;
    align-items: center;
    gap: 8px;
}
.post-author-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gsmone-accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--gsmone-accent);
}

.post-rating-stars {
    display: flex;
    gap: 2px;
}
.post-rating-stars i { font-size: 14px; }
.post-rating-stars i.active { color: #f5a623; }
.post-rating-stars i:not(.active) { color: #3a4550; }

.post-service-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    background: var(--gsmone-accent-soft);
    border: 1px solid rgba(70,128,255,.2);
    border-radius: 6px;
    color: var(--gsmone-accent);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s;
}
.post-service-link:hover {
    background: var(--gsmone-accent);
    color: #fff;
    text-decoration: none;
}

/* Post body */
.post-body {
    background: var(--gsmone-card-bg, #1d2630);
    border: 1px solid var(--gsmone-card-border, #2e3840);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 28px;
    font-size: 14.5px;
    line-height: 1.7;
    color: var(--gsmone-page-color, #dee2e6);
}
.post-body p { margin-bottom: 12px; }
.post-body p:last-child { margin-bottom: 0; }

/* Post body — images */
.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 8px 0;
}

/* Post body — responsive video embeds */
.post-body .responsive-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: 16px 0;
    border-radius: 8px;
    background: #000;
}
.post-body .responsive-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}
.post-body iframe {
    max-width: 100%;
    border-radius: 8px;
    margin: 12px 0;
}
.post-body video,
.post-body audio {
    max-width: 100%;
    border-radius: 8px;
    margin: 12px 0;
}

/* Post body — tables */
.post-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 13px;
}
.post-body td, .post-body th {
    border: 1px solid var(--gsmone-card-border, #2e3840);
    padding: 8px 12px;
}
.post-body th {
    background: rgba(0,105,148,0.1);
    font-weight: 600;
}

/* Post body — code blocks */
.post-body pre {
    background: #1e1e2e;
    color: #cdd6f4;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 12px 0;
    font-size: 13px;
}
.post-body code {
    background: rgba(0,105,148,0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}
.post-body pre code {
    background: none;
    padding: 0;
}

/* Post body — blockquotes */
.post-body blockquote {
    border-left: 3px solid var(--gsmone-accent, #006994);
    margin: 12px 0;
    padding: 8px 16px;
    color: var(--gsmone-muted, #adb5bd);
    background: rgba(0,105,148,0.04);
    border-radius: 0 8px 8px 0;
}

/* Post body — links */
.post-body a {
    color: var(--gsmone-accent, #006994);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}
.post-body a:hover {
    color: var(--gsmone-accent-hover, #004d6e);
}

/* Comments section */
.comments-section {
    margin-bottom: 32px;
}
.comments-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--gsmone-page-color, #dee2e6);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.comments-title .count {
    background: var(--gsmone-accent-soft);
    color: var(--gsmone-accent);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.comment-item {
    background: var(--gsmone-card-bg, #1d2630);
    border: 1px solid var(--gsmone-card-border, #2e3840);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 10px;
}
.comment-item.reply {
    margin-left: 40px;
    background: var(--gsmone-input-bg, #131920);
    border-color: rgba(70,128,255,.1);
}

.comment-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.comment-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--gsmone-accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--gsmone-accent);
    flex-shrink: 0;
}
.comment-author {
    font-size: 13px;
    font-weight: 600;
    color: var(--gsmone-page-color, #dee2e6);
}
.comment-date {
    font-size: 11px;
    color: var(--gsmone-page-secondary, #8b949e);
}
.comment-body {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--gsmone-page-color, #dee2e6);
    margin-bottom: 6px;
}
.comment-reply-btn {
    font-size: 11px;
    color: var(--gsmone-page-secondary, #8b949e);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: color .2s;
}
.comment-reply-btn:hover { color: var(--gsmone-accent, #4680ff); }

/* Comment form */
.comment-form {
    background: var(--gsmone-card-bg, #1d2630);
    border: 1px solid var(--gsmone-card-border, #2e3840);
    border-radius: 12px;
    padding: 18px;
}
.comment-form-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gsmone-page-color);
    margin-bottom: 12px;
}
.comment-textarea {
    width: 100%;
    min-height: 90px;
    padding: 12px;
    background: var(--gsmone-input-bg, #131920);
    border: 1px solid var(--gsmone-card-border, #2e3840);
    border-radius: 8px;
    color: var(--gsmone-input-color, #dee2e6);
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    outline: none;
    margin-bottom: 10px;
    transition: border-color .2s;
}
.comment-textarea:focus { border-color: var(--gsmone-accent, #4680ff); }

/* Related posts sidebar */
.related-section {
    margin-top: 32px;
}
.related-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--gsmone-page-color);
    margin-bottom: 12px;
}
.related-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--gsmone-card-border, #2e3840);
    text-decoration: none;
    color: var(--gsmone-page-color);
    transition: color .2s;
}
.related-item:last-child { border-bottom: none; }
.related-item:hover { color: var(--gsmone-accent); text-decoration: none; }
.related-item .type-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}
.related-item .type-dot.review { background: #f59e0b; }
.related-item .type-dot.discussion { background: #1b9e8f; }
.related-item .type-dot.question { background: #8b5cf6; }
.related-item span {
    font-size: 13px;
    line-height: 1.4;
}

/* === CREATE POST PAGE === */
.create-post-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 20px 60px;
}
.create-post-card {
    background: var(--gsmone-card-bg, #1d2630);
    border: 1px solid var(--gsmone-card-border, #2e3840);
    border-radius: 14px;
    overflow: hidden;
}
.create-post-header {
    background: linear-gradient(135deg, #4680ff 0%, #667eea 50%, #764ba2 100%);
    padding: 22px 24px;
    color: #fff;
}
.create-post-header h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 4px;
}
.create-post-header p {
    font-size: 12.5px;
    opacity: .8;
    margin: 0;
}

.create-post-body {
    padding: 24px;
}
.form-group {
    margin-bottom: 18px;
}
.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--gsmone-page-secondary, #8b949e);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 6px;
}
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--gsmone-input-bg, #131920);
    border: 1px solid var(--gsmone-card-border, #2e3840);
    border-radius: 8px;
    color: var(--gsmone-input-color, #dee2e6);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color .2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--gsmone-accent, #4680ff);
}
.form-textarea {
    min-height: 150px;
    resize: vertical;
}
.form-select {
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

/* Rating stars in form */
.form-stars {
    display: flex;
    gap: 4px;
}
.form-star {
    font-size: 22px;
    color: #3a4550;
    cursor: pointer;
    transition: color .15s, transform .15s;
}
.form-star.active { color: #f5a623; }
.form-star:hover { color: #f5a623; transform: scale(1.15); }

.form-service-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--gsmone-accent-soft);
    border: 1px solid rgba(70,128,255,.2);
    border-radius: 8px;
    color: var(--gsmone-accent);
    font-size: 13px;
    font-weight: 600;
}
.form-service-badge i { font-size: 12px; }

/* Pagination */
.blog-pagination {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

/* Empty state */
.blog-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--gsmone-page-secondary, #8b949e);
}
.blog-empty i {
    font-size: 42px;
    opacity: .4;
    margin-bottom: 12px;
}
.blog-empty p {
    font-size: 14px;
    margin-bottom: 16px;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .blog-header { flex-direction: column; align-items: flex-start; }
    .blog-card { flex-direction: column; gap: 10px; }
    .blog-card-stats { flex-direction: row; }
    .post-title { font-size: 20px; }
    .comment-item.reply { margin-left: 20px; }
    .blog-search { max-width: 100%; }
}

/* === LIGHT MODE === */
:is(body, html).light-mode .blog-card { background: #fff; border-color: #e9ecef; }
:is(body, html).light-mode .blog-card:hover { border-color: rgba(70,128,255,.2); box-shadow: 0 4px 16px rgba(0,0,0,.05); }
:is(body, html).light-mode .blog-card-title { color: #24292f; }
:is(body, html).light-mode .post-title { color: #24292f; }
:is(body, html).light-mode .post-body { background: #fff; border-color: #e9ecef; }
:is(body, html).light-mode .comment-item { background: #fff; border-color: #e9ecef; }
:is(body, html).light-mode .comment-item.reply { background: #f6f8fa; }
:is(body, html).light-mode .create-post-card { background: #fff; border-color: #e9ecef; }
:is(body, html).light-mode .blog-card-stars i:not(.active) { color: #d0d4d8; }
:is(body, html).light-mode .post-rating-stars i:not(.active) { color: #d0d4d8; }
:is(body, html).light-mode .form-star:not(.active) { color: #d0d4d8; }
