/*
Theme Name: YNFWeb Custom
Theme URI: https://ynfweb.top/
Author: ynfweb
Author URI: https://ynfweb.top/
Description: 基于 Twenty Twenty-Five 深度定制的个性化主题，专为 YNFWeb 博客优化设计。保留了原主题的简洁性和适应性，同时针对指数估值监测等专业内容进行了特别优化，提供了更灵活的布局控制和自定义样式支持。适合个人博客、专业内容展示和数据分析类网站。
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 7.2
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ynfweb-custom
Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready, wide-blocks, block-styles, style-variations, accessibility-ready, blog, portfolio, news, custom-layout, data-visualization, financial-data
*/

/*
 * IMPORTANT: This file is only served on the frontend when `SCRIPT_DEBUG` is enabled;
 * in most instances, the `style.min.css` file will be served. It is not recommended that you
 * use the Theme File Editor to modify this stylesheet. Instead, add the necessary style
 * overrides via "Additional CSS" in the Site Editor.
 */

/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */
a {
	text-decoration-thickness: 1px !important;
	text-underline-offset: .1em;
}

/* Focus styles */
:where(.wp-site-blocks *:focus) {
	outline-width: 2px;
	outline-style: solid;
}

/* Increase the bottom margin on submenus, so that the outline is visible. */
.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation-item:not(:last-child) {
	margin-bottom: 3px;
}

/* Increase the outline offset on the parent menu items, so that the outline does not touch the text. */
.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content {
	outline-offset: 4px;
}

/* Remove outline offset from the submenus, otherwise the outline is visible outside the submenu container. */
.wp-block-navigation .wp-block-navigation-item ul.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	outline-offset: 0;
}

/*
 * Progressive enhancement to reduce widows and orphans
 * https://github.com/WordPress/gutenberg/issues/55190
 */
h1, h2, h3, h4, h5, h6, blockquote, caption, figcaption, p {
	text-wrap: pretty;
}

/*
 * Change the position of the more block on the front, by making it a block level element.
 * https://github.com/WordPress/gutenberg/issues/65934
*/
.more-link {
	display: block;
}

/*
 * Prevents unnecessary scrollbars while handling long lines of preformatted text.
 * https://core.trac.wordpress.org/ticket/63875
 */
:where(pre) {
	overflow-x: auto;
}

/* ============================================
 * 专门针对估值文章的CSS修正
 * 不影响页面其他部分
 * ============================================ */

/* ============================================
 * 指数估值监测文章专用样式
 * 针对包含valuation-article类的文章容器
 * ============================================ */

/* 指数估值文章容器 - 突破主题宽度限制 */
.valuation-article-container {
    max-width: 1200px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 20px;
    box-sizing: border-box;
}

/* 当文章容器在alignfull容器内时 */
.wp-block-group.alignfull:has(.valuation-article-container) {
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    width: 100%;
}

/* 移除文章容器内部的多余padding */
.valuation-article-container .wp-block-group.has-global-padding {
    padding-left: 0;
    padding-right: 0;
    margin-left: auto;
    margin-right: auto;
}

/* 确保表格可以正常显示 */
.valuation-article-container .valuation-table,
.valuation-article-container .fund-table {
    min-width: 800px;
    width: 100%;
    table-layout: auto;
}

/* 覆盖主题的宽度限制 */
.entry-content .valuation-article-container,
.wp-block-post-content .valuation-article-container,
.has-global-padding .valuation-article-container {
    max-width: 1200px;
    width: 100%;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .valuation-article-container {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .valuation-article-container .valuation-table,
    .valuation-article-container .fund-table {
        min-width: 700px;
    }
}

@media (max-width: 768px) {
    .valuation-article-container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .valuation-article-container .valuation-table,
    .valuation-article-container .fund-table {
        min-width: 600px;
        font-size: 14px;
    }
    
    .valuation-article-container .valuation-table th,
    .valuation-article-container .valuation-table td,
    .valuation-article-container .fund-table th,
    .valuation-article-container .fund-table td {
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .valuation-article-container .valuation-table,
    .valuation-article-container .fund-table {
        min-width: 400px;
        font-size: 13px;
    }
    
    .valuation-article-container .valuation-table th,
    .valuation-article-container .valuation-table td,
    .valuation-article-container .fund-table th,
    .valuation-article-container .fund-table td {
        padding: 8px 10px;
    }
}
