/* download styles */

/* Wider container for large screens */
@media (min-width: 1200px) {
    .container { max-width: 1400px; }
}
@media (min-width: 1600px) {
    .container { max-width: 1560px; }
}


/* =============================================
   Archive / Category - 2-column grid (Vevor style)
   ============================================= */

.lwf-archive-header {
    margin-bottom: 36px;
}
.lwf-archive-title {
    font-size: 32px;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 12px;
    line-height: 1.2;
}
.lwf-archive-desc {
    color: #555;
    font-size: 15px;
    line-height: 1.7;
    margin: 0;
}

/* Grid row - Vevor uses a horizontal divider between rows, not card borders */
.lwf-posts-grid {
    margin: 0;
}
.lwf-posts-row {
    display: flex;
    border-top: 1px solid #e8e8e8;
    padding: 30px 0;
    gap: 30px;
}
.lwf-posts-row:last-child {
    border-bottom: 1px solid #e8e8e8;
}

/* Card - no border, no shadow */
.lwf-grid-card {
    background: #fff;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

/* Card image */
.lwf-card-img-wrap {
    display: block;
    overflow: hidden;
    height: 210px;
    background: #f5f5f5;
    flex-shrink: 0;
    margin-bottom: 18px;
}
.lwf-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}
.lwf-grid-card:hover .lwf-card-img-wrap img {
    transform: scale(1.03);
}
.lwf-card-no-img {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0f4ff 0%, #dce8fb 100%);
}

/* Card body */
.lwf-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Meta */
.lwf-card-meta {
    font-size: 13px;
    color: #888;
    margin-bottom: 10px;
    line-height: 1.5;
}
.lwf-card-meta a {
    color: #888;
    text-decoration: none;
}
.lwf-card-meta a:hover {
    color: #333;
    text-decoration: underline;
}
.lwf-meta-sep { margin: 0 4px; color: #ccc; }

/* Title */
.lwf-card-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 12px;
    color: #1a1a1a;
}
.lwf-card-title a {
    color: inherit;
    text-decoration: none;
}
.lwf-card-title a:hover { color: #0066cc; }

/* Excerpt */
.lwf-card-excerpt {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    margin: 0 0 14px;
    flex: 1;
}

/* Read More */
.lwf-card-readmore {
    display: inline-block;
    font-size: 14px;
    color: #0066cc;
    text-decoration: none;
    margin-top: auto;
    font-weight: 400;
}
.lwf-card-readmore:hover {
    color: #004499;
    text-decoration: underline;
}

/* Pagination */
.lwf-pagination {
    margin-top: 10px;
    padding-top: 10px;
}

/* =============================================
   Sidebar - Vevor style
   ============================================= */
.blog-sidebar .widget {
    margin-bottom: 36px;
}
.blog-sidebar .widget-title,
.blog-sidebar .widgettitle {
    font-size: 20px;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 16px;
    padding: 0;
    border: none;
    line-height: 1.2;
}

/* Search */
.blog-sidebar .widget_search .search-form {
    display: flex;
}
.blog-sidebar .widget_search input[type="search"],
.blog-sidebar .widget_search input[type="text"] {
    flex: 1;
    border: 1px solid #ddd;
    border-right: none;
    padding: 10px 14px;
    font-size: 14px;
    outline: none;
    border-radius: 0;
    box-shadow: none;
    -webkit-appearance: none;
}
.blog-sidebar .widget_search .search-submit,
.blog-sidebar .widget_search button[type="submit"] {
    background: #e85d04;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 0;
    transition: background 0.2s;
}
.blog-sidebar .widget_search .search-submit:hover { background: #c94e00; }

/* Categories */
.blog-sidebar .widget_categories ul,
.blog-sidebar .widget_categories ol {
    list-style: none;
    padding: 0;
    margin: 0;
}
.blog-sidebar .widget_categories li {
    border-bottom: 1px solid #f0f0f0;
    padding: 9px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}
.blog-sidebar .widget_categories li:first-child { border-top: 1px solid #f0f0f0; }
.blog-sidebar .widget_categories li a { color: #333; text-decoration: none; }
.blog-sidebar .widget_categories li a:hover { color: #0066cc; }
.blog-sidebar .widget_categories li .post-count { color: #999; font-size: 13px; }

/* Recent Posts */
.blog-sidebar .widget_recent_entries ul {
    list-style: none; padding: 0; margin: 0;
}
.blog-sidebar .widget_recent_entries li {
    border-bottom: 1px solid #f0f0f0;
    padding: 10px 0;
}
.blog-sidebar .widget_recent_entries li:first-child { border-top: 1px solid #f0f0f0; }
.blog-sidebar .widget_recent_entries li a {
    color: #333;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
    display: block;
}
.blog-sidebar .widget_recent_entries li a:hover { color: #0066cc; }
.blog-sidebar .widget_recent_entries li .post-date {
    font-size: 12px;
    color: #999;
    margin-top: 3px;
    display: block;
}

/* Recent Comments */
.blog-sidebar .widget_recent_comments ul {
    list-style: none; padding: 0; margin: 0;
}
.blog-sidebar .widget_recent_comments li {
    border-bottom: 1px solid #f0f0f0;
    padding: 10px 0;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}
.blog-sidebar .widget_recent_comments li:first-child { border-top: 1px solid #f0f0f0; }
.blog-sidebar .widget_recent_comments li a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
}
.blog-sidebar .widget_recent_comments li a:hover {
    color: #0066cc;
    text-decoration: underline;
}

/* Archives */
.blog-sidebar .widget_archive ul,
.blog-sidebar .widget_archives ul {
    list-style: none; padding: 0; margin: 0;
}
.blog-sidebar .widget_archive li,
.blog-sidebar .widget_archives li {
    border-bottom: 1px solid #f0f0f0;
    padding: 9px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}
.blog-sidebar .widget_archive li:first-child,
.blog-sidebar .widget_archives li:first-child { border-top: 1px solid #f0f0f0; }
.blog-sidebar .widget_archive li a,
.blog-sidebar .widget_archives li a { color: #333; text-decoration: none; }
.blog-sidebar .widget_archive li a:hover,
.blog-sidebar .widget_archives li a:hover { color: #0066cc; }

/* Tags */
.blog-sidebar .widget_tag_cloud .tagcloud a {
    display: inline-block;
    padding: 5px 12px;
    margin: 3px 3px 3px 0;
    border: 1px solid #ddd;
    font-size: 13px !important;
    color: #555;
    text-decoration: none;
    transition: all 0.2s;
    background: #fafafa;
}
.blog-sidebar .widget_tag_cloud .tagcloud a:hover {
    background: #0066cc;
    border-color: #0066cc;
    color: #fff;
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 767px) {
    .lwf-posts-row {
        flex-direction: column;
        gap: 24px;
    }
    .lwf-card-img-wrap { height: 190px; }
    .lwf-archive-title { font-size: 24px; }
    .lwf-card-title { font-size: 17px; }
}

/* =============================================
   Single Post Sidebar - Categories / Archives shortcodes
   ============================================= */
.lwf-sc-list {
    list-style: none;
    padding: 0;
    margin: 0 0 10px;
}
.lwf-sc-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    padding: 9px 0;
    font-size: 14px;
}
.lwf-sc-list li:first-child { border-top: 1px solid #f0f0f0; }
.lwf-sc-list li a {
    color: #333;
    text-decoration: none;
    flex: 1;
    line-height: 1.4;
}
.lwf-sc-list li a:hover { color: #0066cc; }
.lwf-sc-list li .lwf-sc-count {
    color: #999;
    font-size: 13px;
    margin-left: 8px;
    white-space: nowrap;
}

/* Recent Posts (Elementor posts widget) - text only, hide thumbnail */
.lwf-recent-posts-text .elementor-post__thumbnail__link,
.lwf-recent-posts-text .elementor-post__thumbnail,
.lwf-recent-posts-text img {
    display: none !important;
}
.lwf-recent-posts-text .elementor-post {
    border-bottom: 1px solid #f0f0f0;
    padding: 10px 0;
    margin: 0;
}
.lwf-recent-posts-text .elementor-post:first-child { border-top: 1px solid #f0f0f0; }
.lwf-recent-posts-text .elementor-post__title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    margin: 0;
}
.lwf-recent-posts-text .elementor-post__title a {
    color: #333;
    text-decoration: none;
}
.lwf-recent-posts-text .elementor-post__title a:hover { color: #0066cc; }
.lwf-recent-posts-text .elementor-post__meta-data,
.lwf-recent-posts-text .elementor-post__excerpt,
.lwf-recent-posts-text .elementor-post__read-more {
    display: none !important;
}

/* =============================================
   Related Posts - single post bottom (Vevor style)
   ============================================= */
.lwf-related-posts {
    padding: 40px 0 20px;
    border-top: 1px solid #e8e8e8;
    margin-top: 30px;
}
.lwf-related-title {
    font-size: 26px;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 28px;
}
.lwf-related-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}
.lwf-related-card { display: flex; flex-direction: column; }
.lwf-related-img-wrap {
    display: block;
    overflow: hidden;
    height: 200px;
    background: #f5f5f5;
    margin-bottom: 14px;
}
.lwf-related-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}
.lwf-related-card:hover .lwf-related-img-wrap img { transform: scale(1.03); }
.lwf-related-no-img {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #f0f4ff 0%, #dce8fb 100%);
}
.lwf-related-body { flex: 1; }
.lwf-related-card-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 8px;
    color: #1a1a1a;
}
.lwf-related-card-title a { color: inherit; text-decoration: none; }
.lwf-related-card-title a:hover { color: #0066cc; }
.lwf-related-meta { font-size: 13px; color: #888; margin: 0; }

@media (max-width: 767px) {
    .lwf-related-grid { grid-template-columns: 1fr; }
    .lwf-related-img-wrap { height: 170px; }
}

/* Fix: Elementor widget-container flex overriding related posts grid */
.elementor-element-lwf_related_sc .elementor-widget-container,
.elementor-element-lwf_related_sc .elementor-shortcode {
    display: block !important;
    width: 100%;
}
.elementor-element-lwf_related_sc .lwf-related-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 28px;
}

/* Force 2-col grid for related posts regardless of Elementor wrapping */
.lwf-related-posts .lwf-related-grid,
.elementor-shortcode .lwf-related-grid,
.lwf-related-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 28px !important;
    width: 100% !important;
}
.lwf-related-posts {
    display: block !important;
    width: 100% !important;
}
@media (max-width: 767px) {
    .lwf-related-grid { grid-template-columns: 1fr !important; }
}

/* =============================================
   Global Download Modal (#global_download-form-modal)
   ============================================= */
#global_download-form-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
}
#global_download-form-modal .modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 99999;
}
#global_download-form-modal .modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 12px;
    padding: 36px 40px 32px;
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 100000;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
}
#global_download-form-modal .closed-btn {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 22px;
    font-weight: bold;
    color: #555;
    cursor: pointer;
    line-height: 1;
    background: none;
    border: none;
    padding: 0;
}
#global_download-form-modal .closed-btn:hover { color: #111; }
#global_download-form-modal h3 {
    margin: 0 0 6px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
}
#global_download-form-modal .modal-subtitle {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
}
#global_download-form-modal .wpcf7-form p { margin-bottom: 14px; }
#global_download-form-modal .wpcf7-form label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}
#global_download-form-modal input[type="text"],
#global_download-form-modal input[type="email"],
#global_download-form-modal input[type="tel"],
#global_download-form-modal textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #d0d5dd;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #333;
    background: #fff;
    box-sizing: border-box;
    transition: border-color .2s;
    outline: none;
}
#global_download-form-modal input[type="text"]:focus,
#global_download-form-modal input[type="email"]:focus,
#global_download-form-modal input[type="tel"]:focus,
#global_download-form-modal textarea:focus {
    border-color: #1a4fa0;
}
#global_download-form-modal textarea { min-height: 90px; resize: vertical; }
#global_download-form-modal input[type="submit"] {
    width: 100%;
    background: #1a4fa0;
    color: #fff;
    border: none;
    padding: 13px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 6px;
    transition: background .2s;
}
#global_download-form-modal input[type="submit"]:hover { background: #153d80; }
#global_download-form-modal .modal-note {
    font-size: 0.78rem;
    color: #999;
    margin-top: 14px;
    text-align: center;
}

/* =============================================
   Modal 内 Elementor 表单样式覆盖
   替换原 .wpcf7-form 规则，兼容 Elementor Pro Form
   ============================================= */

#global_download-form-modal .elementor-widget-container {
    padding: 0 !important;
    margin: 0 !important;
}
#global_download-form-modal .elementor-form {
    margin: 0 !important;
}
#global_download-form-modal .elementor-field-group {
    margin-bottom: 14px !important;
    padding: 0 !important;
}
#global_download-form-modal .elementor-field-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}
#global_download-form-modal .elementor-field-textual,
#global_download-form-modal .elementor-field {
    width: 100% !important;
    padding: 10px 14px !important;
    border: 1.5px solid #d0d5dd !important;
    border-radius: 6px !important;
    font-size: 0.95rem !important;
    color: #333 !important;
    background: #fff !important;
    box-sizing: border-box !important;
    transition: border-color .2s !important;
    outline: none !important;
    box-shadow: none !important;
}
#global_download-form-modal .elementor-field-textual:focus,
#global_download-form-modal .elementor-field:focus {
    border-color: #1a4fa0 !important;
}
#global_download-form-modal textarea.elementor-field {
    min-height: 90px !important;
    resize: vertical !important;
}
#global_download-form-modal .elementor-button[type="submit"],
#global_download-form-modal .e-form__buttons .elementor-button {
    width: 100% !important;
    background: #1a4fa0 !important;
    color: #fff !important;
    border: none !important;
    padding: 13px 28px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    margin-top: 6px !important;
    transition: background .2s !important;
    box-shadow: none !important;
}
#global_download-form-modal .elementor-button[type="submit"]:hover,
#global_download-form-modal .e-form__buttons .elementor-button:hover {
    background: #153d80 !important;
}
#global_download-form-modal .e-form__buttons {
    padding: 0 !important;
    margin: 0 !important;
}

/* Fix: keep pasted category/archive descriptions from overflowing the screen
   (ChatGPT-pasted text can contain non-breaking spaces that never wrap). 2026-07-14 */
.lwf-archive-desc,
.lwf-archive-header .animate-markdown {
    max-width: 900px;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.lwf-archive-header .animate-markdown + .animate-markdown { margin-top: 12px; }
