/* CSS Reset & Base Styles */
/* 基于现代CSS重置最佳实践 */

/* Box sizing rules */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Remove default margin and padding */
* {
    margin: 0;
    padding: 0;
}

/* Ensure borders default to solid with 0 width (needed for divide-x/y to be visible) */
*,
*::before,
*::after {
    border-style: solid;
    border-width: 0;
    border-color: #e5e7eb;
    /* Tailwind/Uno default gray-200; overridden by specific utilities like divide-*/
}


/* Remove list styles on ul, ol elements with a list role */
ul[role='list'],
ol[role='list'] {
    list-style: none;
}

/* Set core root defaults */
html:focus-within {
    scroll-behavior: smooth;
}

/* Set core body defaults */
html,
body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden !important;
}

/* 确保html和body元素完全隐藏横向滚动条 */
html {
    overflow-x: hidden !important;
    max-width: 100vw;
}

body {
    overflow-x: hidden !important;
    max-width: 100vw;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
    text-decoration-skip-ink: auto;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
    html:focus-within {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Remove default button styles */
button {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

/* Remove default input styles */
input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    border: none;
    outline: none;
    background: none;
}

/* Remove default fieldset styles */
fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

/* Remove default legend styles */
legend {
    padding: 0;
}

/* Make images easier to work with */
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Remove built-in form typography styles */
input,
button,
textarea,
select {
    font: inherit;
}

/* Avoid text overflows */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Remove default table styles */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* Remove default hr styles */
hr {
    border: none;
    height: 1px;
    background-color: #e5e5e5;
    margin: 1rem 0;
}

/* Global link styles - 移除所有下划线 */
a {
    text-decoration: none !important;
    color: inherit;
    transition: color 0.2s ease;
}

/* Focus styles for accessibility */
:focus {
    outline: 2px solid #ea9427;
    outline-offset: 2px;
}

/* Remove focus outline for mouse users */
:focus:not(:focus-visible) {
    outline: none;
}

/* Ensure focus is visible for keyboard users */
:focus-visible {
    outline: 2px solid #ea9427;
    outline-offset: 2px;
}

/* Create a root stacking context */
#root,
#__next {
    isolation: isolate;
}

/* WordPress specific resets */
.wp-block-image {
    margin: 0;
}

.wp-block-group {
    margin: 0;
}

/* 容器最大宽度设置 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* 响应式容器 */
@media (min-width: 640px) {
    .container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
}

@media (min-width: 1280px) {
    .container {
        padding: 0 2rem;
    }
}

/* 强调色相关的全局样式 */
:root {
    --primary-color: #ea9427;
    --primary-hover: #d18519;
    --primary-light: #f4a94a;
    --primary-dark: #c7791f;
}

/* 全局悬停效果 */
.hover\:text-orange-500:hover,
.hover\:text-primary:hover {
    color: var(--primary-color) !important;
}

.hover\:bg-orange-500:hover,
.hover\:bg-primary:hover {
    background-color: var(--primary-color) !important;
}

.hover\:bg-orange-600:hover,
.hover\:bg-primary-hover:hover {
    background-color: var(--primary-hover) !important;
}

/* 文本选择样式 */
::selection {
    background-color: var(--primary-color);
    color: white;
}

::-moz-selection {
    background-color: var(--primary-color);
    color: white;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* 确保所有元素都没有默认的外边距和内边距 */
blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
figure,
p,
pre {
    margin: 0;
}

/* 列表样式重置 */
ol,
ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* 表单元素重置 */
button,
input,
optgroup,
select,
textarea {
    font-family: inherit;
    font-size: 100%;
    line-height: 1.15;
    margin: 0;
}

/* 按钮重置 */
button,
[type="button"],
[type="reset"],
[type="submit"] {
    -webkit-appearance: button;
    background-color: transparent;
    background-image: none;
}

/* 移除按钮的默认边框 */
button:focus {
    outline: 1px dotted;
    outline: 5px auto -webkit-focus-ring-color;
}