/* ==================================================
   Wheelox Blog Styles (Complete)
   Includes: Blog List, Blog Single, Gallery, Inquiry Form
   ================================================== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin: 40px 0;
}
.blog-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}
.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}
.blog-card-thumb img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.blog-card-content {
    padding: 20px;
}
.blog-card-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
}
.blog-card-title a {
    color: #000;
    text-decoration: none;
}
.blog-card-title a:hover {
    color: var(--red, #e63946);
}
.blog-card-meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
}
.blog-card-meta i {
    margin-right: 5px;
}
.blog-card-excerpt {
    font-size: 0.9rem;
    color: #444;
    margin-bottom: 15px;
    line-height: 1.5;
}
.read-more {
    font-weight: 600;
    color: var(--red, #e63946);
    font-size: 0.9rem;
    text-decoration: none;
}
.read-more:hover {
    text-decoration: underline;
}

.pagination-wrapper {
    text-align: center;
    margin: 40px 0;
}
.pagination-wrapper ul.page-numbers {
    list-style: none;
    display: inline-flex;
    gap: 8px;
    padding: 0;
}
.pagination-wrapper .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    background: #f0f0f0;
    border-radius: 30px;
    transition: 0.2s;
    text-decoration: none;
    color: #333;
}
.pagination-wrapper .page-numbers.current {
    background: var(--red, #e63946);
    color: white;
}
.pagination-wrapper .page-numbers:hover:not(.current) {
    background: var(--black, #000);
    color: white;
}

/* ---------- Blog Single Page Layout ---------- */
.blog-single-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px;
}
.blog-single-layout {
    display: flex;
    gap: 40px;
}
.blog-single-main {
    flex: 3;
}
.blog-single-sidebar {
    flex: 1;
    position: sticky;
    top: 100px;
    align-self: flex-start;
}

/* Entry Content & TOC */
.entry-content {
    font-size: 1rem;
    line-height: 1.7;
}
.blog-toc {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 30px;
    border-left: 4px solid var(--red, #e63946);
}
.toc-title {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 12px;
}
.toc-list {
    list-style: none;
    padding-left: 0;
}
.toc-list li {
    margin-bottom: 8px;
}
.toc-list a {
    text-decoration: none;
    color: #333;
    font-size: 0.95rem;
}
.toc-list a:hover {
    color: var(--red, #e63946);
}

/* ---------- Latest Vehicle Gallery (Horizontal Scroll) ---------- */
.latest-vehicle-gallery {
    margin-top: 50px;
    overflow: hidden;
}
.gallery-section-title {
    font-size: 1.6rem;
    margin-bottom: 20px;
    text-align: center;
}
.gallery-scroll-wrapper-mini {
    position: relative;
    width: 100%;
}
.gallery-scroll-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 10px;
    cursor: grab;
}
.gallery-scroll-container:active {
    cursor: grabbing;
}
/* 桌面端：4列 */
@media (min-width: 992px) {
    .gallery-card-mini {
        flex: 0 0 calc(25% - 15px);
        min-width: 0;
    }
}
/* 平板端：3列 */
@media (min-width: 768px) and (max-width: 991px) {
    .gallery-card-mini {
        flex: 0 0 calc(33.333% - 14px);
    }
}
/* 手机端：1列居中，支持滑动快照 */
@media (max-width: 767px) {
    .gallery-scroll-container {
        scroll-snap-type: x mandatory;
        justify-content: center;
    }
    .gallery-card-mini {
        flex: 0 0 80%;
        max-width: 280px;
        scroll-snap-align: center;
        margin: 0 auto;
    }
    .gallery-card-mini:first-child {
        margin-left: auto;
    }
    .gallery-card-mini:last-child {
        margin-right: auto;
    }
    /* 隐藏滚动条但保留滚动功能 */
    .gallery-scroll-container::-webkit-scrollbar {
        display: none;
    }
    .gallery-scroll-container {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
}
.gallery-card-mini {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}
.gallery-card-mini:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.gallery-card-img {
    height: 220px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}
.gallery-card-info {
    padding: 12px;
}
.gallery-card-info h4 {
    font-size: 1rem;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gallery-date {
    font-size: 0.75rem;
    color: #888;
}
.scroll-arrows-mini {
    text-align: center;
    margin-top: 20px;
}
.scroll-arrows-mini button {
    background: var(--black, #000);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    margin: 0 8px;
    font-size: 1.2rem;
    transition: background 0.2s;
}
.scroll-arrows-mini button:hover {
    background: var(--red, #e63946);
}

/* ---------- Inquiry Form Widget (Sidebar / Floating) ---------- */
.inquiry-form-widget {
    background: #f9f9f9;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}
.inquiry-form-widget h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--black, #000);
}
.inquiry-form-widget .form-group {
    margin-bottom: 15px;
}
.inquiry-form-widget input,
.inquiry-form-widget textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-size: 0.9rem;
    transition: 0.2s;
}
.inquiry-form-widget textarea {
    border-radius: 20px;
    resize: vertical;
}
.inquiry-form-widget input:focus,
.inquiry-form-widget textarea:focus {
    border-color: var(--red, #e63946);
    outline: none;
}
.btn-submit {
    width: 100%;
    background: var(--black, #000);
    border: none;
    border-radius: 30px;
    padding: 12px;
    font-weight: 600;
    transition: 0.2s;
    color: white;
    cursor: pointer;
}
.btn-submit:hover {
    background: var(--red, #e63946);
}
.form-message {
    margin-top: 15px;
    font-size: 0.85rem;
    text-align: center;
}

/* ---------- Responsive Adjustments ---------- */
/* 平板及以下：博客列表两列 */
@media (max-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .blog-single-layout {
        flex-direction: column;
    }
    .blog-single-sidebar {
        position: static;
        margin: 40px auto;
    }
}
/* 手机横屏 & 小屏：博客列表单列，画廊卡片高度微调 */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    .blog-card-thumb img {
        height: 180px;
    }
    /* 画廊图片高度保持适中，避免过高 */
    .gallery-card-img {
        height: 220px;
    }
}
/* ===== 移动端留言框完全居中、宽度适配 ===== */
@media (max-width: 767px) {
    /* 留言框容器居中 */
    .blog-single-sidebar {
        display: flex;
        justify-content: center;
        margin-top: 40px auto;
    }
    .inquiry-form-widget {
        width: 100%;                 /* 相对宽度，灵活适应 */
        max-width: 450px;           /* 最大宽度450px，美观 */
        margin: 0 auto;
        padding: 28px 24px;
        border-radius: 28px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.1);
        text-align: center;
    }
    /* 标题放大 */
    .inquiry-form-widget h3 {
        font-size: 1.8rem;
        margin-bottom: 24px;
        text-align: center;
    }
    /* 输入框更大更易点 */
    .inquiry-form-widget .form-group {
        margin-bottom: 20px;
        text-align: left;           /* 标签左对齐，符合阅读习惯 */
    }
    .inquiry-form-widget input,
    .inquiry-form-widget textarea {
        font-size: 16px;            /* 避免iOS自动缩放 */
        padding: 14px 18px;
        border-radius: 40px;
    }
    .inquiry-form-widget textarea {
        border-radius: 24px;
    }
    /* 提交按钮居中放大 */
    .btn-submit {
        font-size: 1.1rem;
        padding: 14px 20px;
        max-width: 320px;
        margin: 8px auto 0;
        display: block;
        width: 100%;
        border-radius: 40px;
    }
    /* 提示消息 */
    .form-message {
        font-size: 0.95rem;
        margin-top: 18px;
    }
}