/* =============================================
   BLOG STYLES — melnykauto.it
   Prefix: bl-* (listing), bp-* (post)
============================================= */

/* ── Hero (stile pagine servizi) ── */
.bl-hero {
    background: linear-gradient(135deg, #0f2340 0%, #1a4a7a 60%, #2E86DE 100%);
    padding: 130px 0 50px;
    position: relative;
}
.bl-hero-inner { position: relative; z-index: 1; }
.bl-hero h1 { color: #fff; font-size: 36px; margin-bottom: 8px; text-transform: uppercase;}
.bl-hero p { color: rgba(255,255,255,0.8); font-size: 18px; line-height: 1.7; max-width: 600px; margin: 0; }
.bl-hero-post h1 { font-size: 36px; line-height: 1.3; max-width: 700px; text-transform: none; }
.bl-hero-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 15px; margin-top: 15px;
    color: rgba(255,255,255,0.7); font-size: 13px;
}
.bl-hero-meta i { margin-right: 4px; }
.bl-hero-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 12px; border-radius: 20px;
    color: #fff; font-size: 11px; font-weight: 600; text-transform: uppercase;
}

/* ── Section ── */
.bl-section, .bp-section { padding: 60px 0 80px; }

/* ── Sidebar ── */
.bl-sidebar { position: sticky; top: 170px; }
.bl-sidebar-widget {
    background: #fff; border: 1px solid #eee; border-radius: 12px;
    padding: 25px; margin-bottom: 25px;
}
.bl-sidebar-title {
    font-size: 17px; font-weight: 700; color: var(--base-headingfont-color);
    margin-bottom: 18px; padding-bottom: 10px;
    border-bottom: 2px solid var(--base-skin);
}

/* Search */
.bl-search-form { display: flex; position: relative; }
.bl-search-form input {
    width: 100%; height: 46px; border: 1px solid #e0e0e0; border-radius: 8px 0 0 8px;
    padding: 0 15px; font-size: 14px; background: #f9f9f9;
    transition: .3s;
}
.bl-search-form input:focus { border-color: var(--base-skin); background: #fff; outline: none; }
.bl-search-form button {
    width: 46px; min-width: 46px; height: 46px;
    background: var(--base-skin); color: #fff; border: none; border-radius: 0 8px 8px 0;
    cursor: pointer; font-size: 16px; transition: .3s;
    display: flex; align-items: center; justify-content: center;
}
.bl-search-form button:hover { background: var(--base-dark); }

/* Type filter */
.bl-type-list { list-style: none; padding: 0; margin: 0; }
.bl-type-list li { border-bottom: 1px solid #f0f0f0; }
.bl-type-list li:last-child { border-bottom: none; }
.bl-type-list li a {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 12px; color: #555; font-size: 14px; text-decoration: none;
    border-radius: 6px; transition: .3s;
}
.bl-type-list li a:hover { background: rgba(46,134,222,0.06); color: var(--base-skin); }
.bl-type-list li.active a { background: rgba(46,134,222,0.1); color: var(--base-skin); font-weight: 600; }
.bl-type-list li a i { width: 18px; text-align: center; }
.bl-type-count {
    margin-left: auto; background: #f0f0f0; padding: 2px 8px;
    border-radius: 10px; font-size: 12px; color: #888;
}

/* Recent articles */
.bl-recent-list { display: flex; flex-direction: column; gap: 15px; }
.bl-recent-item {
    display: flex; gap: 12px; text-decoration: none; color: inherit;
    padding: 8px; border-radius: 8px; transition: .3s;
}
.bl-recent-item:hover { background: #f8f8f8; }
.bl-recent-img { width: 70px; height: 55px; border-radius: 6px; overflow: hidden; flex-shrink: 0; }
.bl-recent-img img { width: 100%; height: 100%; object-fit: cover; }
.bl-recent-info h6 { font-size: 13px; line-height: 1.4; margin: 0; color: var(--base-headingfont-color); }
.bl-recent-date { font-size: 11px; color: #999; display: block; margin-bottom: 4px; }
.bl-recent-date i { margin-right: 3px; }

/* Tags */
.bl-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.bl-tag {
    display: inline-block; padding: 5px 14px; border: 1px solid #e0e0e0;
    border-radius: 20px; font-size: 12px; color: #666; text-decoration: none; transition: .3s;
}
.bl-tag:hover { background: var(--base-skin); color: #fff; border-color: var(--base-skin); }

/* ── Filter Info ── */
.bl-filter-info {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 20px; background: rgba(46,134,222,0.06); border-radius: 8px;
    margin-bottom: 25px; flex-wrap: wrap; gap: 10px;
}
.bl-filter-text { font-size: 14px; color: #555; }
.bl-filter-text span { color: #999; }
.bl-filter-clear {
    color: var(--base-skin); font-size: 13px; text-decoration: none;
    display: flex; align-items: center; gap: 5px;
}
.bl-filter-clear:hover { color: var(--base-dark); }

/* ── Article Cards ── */
.bl-articles-grid { display: flex; flex-direction: column; gap: 30px; }
.bl-card {
    background: #fff; border-radius: 12px; overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06); border: 1px solid #eee;
    transition: .3s;
}
.bl-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.1); transform: translateY(-2px); }
.bl-card-image {
    display: block; position: relative; overflow: hidden;
}
.bl-card-image img { width: 100%; height: auto; display: block; transition: .5s; }
.bl-card:hover .bl-card-image img { transform: scale(1.05); }
.bl-card-play {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
    width: 60px; height: 60px; background: rgba(255,255,255,0.9);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: var(--base-skin); transition: .3s;
}
.bl-card:hover .bl-card-play { background: #fff; transform: translate(-50%,-50%) scale(1.1); }
.bl-card-body { padding: 22px 25px 25px; }
.bl-card-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px;
    font-size: 12px; color: #999;
}
.bl-card-meta .bl-card-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: 20px;
    color: #fff; font-size: 11px; font-weight: 600; text-transform: uppercase;
}
.bl-card-meta i { margin-right: 3px; }
.bl-card-body h3 { font-size: 20px; margin-bottom: 10px; line-height: 1.3; }
.bl-card-body h3 a { color: var(--base-headingfont-color); text-decoration: none; }
.bl-card-body h3 a:hover { color: var(--base-skin); }
.bl-card-body p { font-size: 14px; color: #666; line-height: 1.6; margin-bottom: 15px; }
.bl-card-link {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--base-skin); font-weight: 600; font-size: 14px; text-decoration: none;
}
.bl-card-link:hover { gap: 12px; color: var(--base-dark); }

/* ── Pagination ── */
.bl-pagination {
    display: flex; justify-content: center; align-items: center; gap: 6px;
    margin-top: 40px;
}
.bl-page-btn {
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    border: 1px solid #e0e0e0; border-radius: 8px; font-size: 14px;
    color: #555; text-decoration: none; transition: .3s; background: #fff;
}
.bl-page-btn:hover { border-color: var(--base-skin); color: var(--base-skin); }
.bl-page-btn.active { background: var(--base-skin); color: #fff; border-color: var(--base-skin); }
.bl-page-dots { color: #ccc; padding: 0 4px; }

/* No results */
.bl-no-results {
    text-align: center; padding: 80px 20px; color: #999;
}
.bl-no-results i { font-size: 48px; color: #ddd; margin-bottom: 20px; display: block; }
.bl-no-results h3 { color: #555; margin-bottom: 10px; }
.bl-no-results p { margin-bottom: 25px; }

/* =============================================
   BLOG POST STYLES
============================================= */

/* ── Content ── */
.bp-content { background: #fff; border-radius: 12px; padding: 30px; border: 1px solid #eee; }
.bp-image { margin-bottom: 30px; }
.bp-image img { width: 100%; border-radius: 10px; }

/* Video */
.bp-video {
    position: relative; width: 100%; padding-bottom: 56.25%;
    margin-bottom: 30px; border-radius: 10px; overflow: hidden;
    background: #000; box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}
.bp-video iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }

/* Gallery grid */
.bp-gallery {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
    margin-bottom: 30px;
}
.bp-gallery-item {
    position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 8px; cursor: pointer;
}
.bp-gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: .3s; }
.bp-gallery-item:hover img { transform: scale(1.1); }
.bp-gallery-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); opacity: 0; transition: .3s;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 24px;
}
.bp-gallery-item:hover .bp-gallery-overlay { opacity: 1; }
.bp-gallery-caption {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff; padding: 15px 10px 8px; font-size: 12px; text-align: center;
}

/* Article text */
.bp-text { line-height: 1.8; font-size: 15px; color: #444; margin-bottom: 30px; }
.bp-text h2, .bp-text h3, .bp-text h4, .bp-text h5 { color: var(--base-headingfont-color); margin: 25px 0 15px; }
.bp-text ul, .bp-text ol { padding-left: 25px; margin-bottom: 20px; }
.bp-text li { margin-bottom: 8px; }
.bp-text img { max-width: 100%; border-radius: 8px; margin: 15px 0; }
.bp-text blockquote, .bp-text .quote-box {
    background: rgba(46,134,222,0.05); border-left: 4px solid var(--base-skin);
    padding: 20px 25px; margin: 25px 0; border-radius: 0 8px 8px 0;
    font-style: italic;
}
.bp-text .quote-box h6 { font-style: normal; color: var(--base-skin); margin-top: 10px; }

/* Tags */
.bp-tags {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
    padding: 20px 0; border-top: 1px solid #eee; border-bottom: 1px solid #eee;
    margin-bottom: 25px;
}
.bp-tags-label { font-weight: 600; color: #555; font-size: 14px; margin-right: 5px; }

/* Share buttons */
.bp-share {
    display: flex; align-items: center; gap: 10px;
    padding: 15px 0; margin-bottom: 30px;
}
.bp-share > span { font-weight: 600; color: #555; font-size: 14px; }
.bp-share-btn {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 16px; text-decoration: none; transition: .3s;
}
.bp-share-btn:hover { transform: scale(1.15); }
.bp-share-fb { background: #1877f2; }
.bp-share-wa { background: #25d366; }
.bp-share-tg { background: #0088cc; }

/* Related */
.bp-related { margin-bottom: 30px; padding-top: 10px; }
.bp-related h4 {
    font-size: 18px; margin-bottom: 20px; padding-bottom: 10px;
    border-bottom: 2px solid var(--base-skin);
}
.bp-related-card { margin-bottom: 20px; }
.bp-related-card a { display: block; position: relative; margin-bottom: 10px; border-radius: 8px; overflow: hidden; }
.bp-related-card img { width: 100%; height: 120px; object-fit: cover; }
.bp-related-type {
    position: absolute; top: 8px; right: 8px;
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 12px;
}
.bp-related-card h6 { font-size: 13px; line-height: 1.4; margin-bottom: 4px; }
.bp-related-card h6 a { color: var(--base-headingfont-color); text-decoration: none; }
.bp-related-card h6 a:hover { color: var(--base-skin); }
.bp-related-date { font-size: 11px; color: #999; }

/* ── Comments ── */
.bp-comments { padding-top: 10px; }
.bp-comments > h4 {
    font-size: 18px; margin-bottom: 25px; color: var(--base-headingfont-color);
    display: flex; align-items: center; gap: 8px;
}
.bp-comment {
    display: flex; gap: 12px; padding: 18px; margin-bottom: 15px;
    background: #f8f9fa; border-radius: 10px;
}
.bp-comment-reply { margin-left: 40px; background: #f0f2f4; }
.bp-comment-avatar { flex-shrink: 0; font-size: 32px; color: #ccc; }
.bp-comment-body { flex: 1; }
.bp-comment-header {
    display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap;
}
.bp-comment-header strong { color: #333; font-size: 14px; }
.bp-comment-admin {
    background: #28a745; color: #fff; padding: 1px 8px; border-radius: 10px; font-size: 10px;
}
.bp-comment-date { color: #999; font-size: 12px; margin-left: auto; }
.bp-comment-text { font-size: 14px; line-height: 1.6; color: #555; }
.bp-reply-toggle {
    background: none; border: none; color: var(--base-skin); font-size: 13px;
    cursor: pointer; padding: 5px 0; margin-top: 5px;
}
.bp-reply-toggle:hover { text-decoration: underline; }

/* Reply form */
.bp-reply-form {
    margin-top: 15px; padding: 18px; background: #fff;
    border: 1px solid #e0e0e0; border-radius: 8px;
}
.bp-reply-form input, .bp-reply-form textarea {
    width: 100%; border: 1px solid #e0e0e0; border-radius: 6px;
    padding: 10px 14px; font-size: 14px; margin-bottom: 10px; font-family: inherit;
}
.bp-reply-form input:focus, .bp-reply-form textarea:focus { border-color: var(--base-skin); outline: none; }
.bp-reply-actions { display: flex; gap: 10px; }
.bp-btn-submit {
    background: var(--base-skin); color: #fff; border: none; border-radius: 6px;
    padding: 8px 18px; font-size: 13px; cursor: pointer; transition: .3s;
}
.bp-btn-submit:hover { background: var(--base-dark); }
.bp-btn-cancel {
    background: none; border: 1px solid #ccc; border-radius: 6px;
    padding: 8px 18px; font-size: 13px; cursor: pointer; color: #666;
}
.bp-btn-cancel:hover { background: #f0f0f0; }

/* No comments */
.bp-no-comments {
    text-align: center; padding: 35px; background: #f8f9fa; border-radius: 10px; margin-bottom: 25px;
}
.bp-no-comments i { font-size: 36px; color: #ddd; margin-bottom: 10px; display: block; }
.bp-no-comments p { color: #999; margin: 0; }

/* Comment form */
.bp-comment-form {
    background: #f8f9fa; padding: 25px; border-radius: 10px; margin-top: 25px;
}
.bp-comment-form h5 { margin-bottom: 18px; color: var(--base-headingfont-color); }
.bp-comment-form input, .bp-comment-form textarea {
    width: 100%; border: 1px solid #e0e0e0; border-radius: 8px;
    padding: 12px 15px; font-size: 14px; margin-bottom: 12px; font-family: inherit;
    background: #fff;
}
.bp-comment-form input:focus, .bp-comment-form textarea:focus { border-color: var(--base-skin); outline: none; }
.bp-form-note { font-size: 12px; color: #999; font-style: italic; margin-bottom: 15px; }

/* Alerts */
.bp-alert {
    padding: 12px 18px; border-radius: 8px; margin-bottom: 15px; font-size: 14px;
    transition: opacity .3s;
}
.bp-alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.bp-alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ── Lightbox ── */
.bp-lightbox {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95); z-index: 9999;
    justify-content: center; align-items: center; padding: 20px;
}
.bp-lightbox.active { display: flex; }
.bp-lightbox-content {
    position: relative; width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
}
.bp-lightbox-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.bp-lightbox-nav {
    position: fixed; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.15); border: none; color: #fff;
    width: 48px; height: 48px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: .3s;
    backdrop-filter: blur(6px); font-size: 18px;
    padding: 0; min-width: 48px; min-height: 48px; aspect-ratio: 1; flex-shrink: 0;
}
.bp-lightbox-nav:hover { background: rgba(255,255,255,0.3); transform: translateY(-50%) scale(1.1); }
.bp-lightbox-prev { left: 20px; }
.bp-lightbox-next { right: 20px; }
.bp-lightbox-counter {
    position: fixed; top: 20px; left: 20px; color: #fff;
    background: rgba(0,0,0,0.6); padding: 6px 14px; border-radius: 20px; font-size: 14px;
}
.bp-lightbox-controls {
    position: fixed; top: 20px; right: 20px; display: flex; gap: 8px;
}
.bp-lightbox-controls button {
    background: rgba(255,255,255,0.15); border: none; color: #fff;
    width: 42px; height: 42px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: .3s;
    backdrop-filter: blur(6px); font-size: 16px;
    padding: 0; min-width: 42px; min-height: 42px; aspect-ratio: 1; flex-shrink: 0;
}
.bp-lightbox-controls button:hover { background: rgba(255,255,255,0.3); transform: scale(1.1); }

/* ── Responsive ── */
@media (max-width: 991px) {
    .bl-hero { padding: 100px 0 30px; }
    .bl-hero h1 { font-size: 28px; }
    .bl-sidebar { position: static; margin-top: 30px; }
    .bp-comment-reply { margin-left: 20px; }
}
@media (max-width: 767px) {
    .bl-hero { padding: 80px 0 30px; }
    .bl-hero h1 { font-size: 24px; }
    .bl-card-body h3 { font-size: 17px; }
    .bp-gallery { grid-template-columns: repeat(2, 1fr); }
    .bp-content { padding: 20px; }
    .bl-hero-post h1 { font-size: 32px; }
    .bp-comment { flex-direction: column; gap: 8px; }
    .bp-comment-date { margin-left: 0; }
    .bp-related-card img { height: 100px; }
}
@media (max-width: 480px) {
    .bl-card-body { padding: 16px 18px 20px; }
    .bp-gallery { grid-template-columns: 1fr; }
    .bp-share { flex-wrap: wrap; }
}