/*
Theme Name: Custom theme Miao  
Author: Miao  
Description: 这是我从零开始创建的第一个WordPress主题 
Version: 1.0  
License: GNU General Public License v2 or later  
License URI: https://www.gnu.org/licenses/gpl-2.0.html  
Text Domain: custom_theme_miao  
*/

/* 全局变量 */
:root {
  /* 主配色 */
  --primary-color: #bbdc47; /* 主题颜色 */
  --secondary-color: #99b52f;
  /* 背景色 */
  --bg-primary: #fff; /* 页面主背景 */
  /* --bg-dark: #f3f3f3;  */
  --bg-dark: #f8f9f5;

  /* 文本色 */
  --text-main-color: #333; /* 正文主色（保留可读性） */
  --text-secondary-color: #607d8b; /* 次要文本 */
  --text-placeholder-color: #c5c5c5; /* 占位/禁用文本 */

  /* 其他颜色 */
  --color-dark-green: #377c0a;
  --color-olive-green: #4a6e19;
  --color-medium-gray: #555555;
  --color-medium-gray-7e: #7e7e7e;
  --color-light-gray: #f3f3f3;
  --color-light-beige-green: #f0f2e8;

  /* 通用尺寸 */
  --container-max-width: 1320px;
  --gutter: 1.5rem; /* 通用间距 */
  --base-font-size: 10px; /* 基础字体尺寸 */
  /* 圆角/阴影 */
  --border-radius: 4px;
  --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 基础重置：统一盒模型、边距、内边距 */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box; /* 宽高包含内边距和边框，更易控制尺寸 */
}

html {
  font-size: var(--base-font-size);
  scroll-behavior: smooth;
}

body {
  font-family:
    'PingFang SC',
    'Microsoft YaHei',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    sans-serif; /* 系统无衬线字体，适配各设备 */
  font-size: 1.6rem;
  line-height: 1;
  color: var(--text-main-color);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased; /* 抗锯齿，字体更清晰 */
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-block;
}

a:hover,
a:focus {
  color: var(--secondary-color);
  text-decoration: none;
  outline: none;
}

ul,
ol {
  list-style: none;
}

/* 如需保留有序/无序列表标记，添加以下类 */
ul.has-list-style {
  list-style: disc;
}
ol.has-list-style {
  list-style: decimal;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.2;
  margin-bottom: var(--gutter);
  font-weight: 600;
  color: var(--text-main-color);
}

h1 {
  font-size: 4.2rem;
}
h2 {
  font-size: 3.2rem;
}
h3 {
  font-size: 2.4rem;
}
h4 {
  font-size: 2rem;
}
h5 {
  font-size: 1.6rem;
}
h6 {
  font-size: 1.4rem;
}

p {
  margin-bottom: var(--gutter);
}

img,
video,
iframe {
  max-width: 100%;
  max-height: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

svg {
  width: 1em;
  height: 1em;
  margin: 0 5px;
  fill: currentColor;
  display: block;
}
/* WordPress特色图片专用样式 */
/* .wp-post-image {
  margin: 1rem 0;
  border-radius: 4px;
} */
.entry-content {
  /* 文章内容区 */
  max-width: 800px;
  margin: 0 auto;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: 1.6rem;
  border: 1px solid var(--text-placeholder-color);
  border-radius: var(--border-radius);
  background-color: #fff;
  color: var(--text-main-color);
  padding: 0.5rem 0.75rem;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-placeholder-color);
}
input:focus-visible,
textarea:focus-visible {
  outline: none;
}
input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(187, 220, 71, 0.2);
}
button,
.btn,
input[type='submit'],
input[type='button'] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-color);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border: none;
  padding: 0.5rem 1.5rem;
  border-radius: var(--border-radius);
}
input[type='search'] {
  -webkit-appearance: none; /* 清除 Safari/Chrome 内置样式 */
  appearance: none;
}

button:hover,
input[type='submit']:hover,
.btn:hover {
  background-color: var(--secondary-color);
  color: #ffffff;
  text-decoration: none;
}

.clearfix::after {
  content: '';
  display: table;
  clear: both;
}

.line-clamp {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
}

.bg-none {
  background: none !important;
}
/* Flex布局通用类（全站可用） */
.flex {
  display: flex;
  flex-wrap: wrap;
}
.flex-col {
  flex-direction: column;
}
.flex-row {
  flex-direction: row;
}
.flex-nowrap {
  flex-wrap: nowrap;
}

.flex-1 {
  flex: 1;
}
.flex-grow {
  flex-grow: 1;
}
.flex-shrink-0 {
  flex-shrink: 0;
}
.flex-gap-row {
  row-gap: var(--gutter);
}
.flex-gap-col {
  column-gap: var(--gutter);
}

.ps-relative {
  position: relative;
}

/* .text-primary {
  color: var(--primary-color);
} */
/* .text-secondary {
  color: var(--secondary-color);
} */
/* .text-placeholder {
  color: var(--text-placeholder-color);
} */
.bg-primary {
  background-color: var(--primary-color);
  color: #fff;
}
.bg-secondary {
  background-color: var(--secondary-color);
  color: #fff;
}
.bg-light {
  background-color: var(--bg-primary);
}
.bg-dark {
  background-color: var(--bg-dark);
}

.text-center {
  text-align: center;
}
.text-left {
  text-align: left;
}
.text-right {
  text-align: right;
}
.hidden {
  display: none !important;
}

.m-0 {
  margin: 0;
}
.m-1 {
  margin: 0.5rem;
}
.m-2 {
  margin: 1rem;
}
.mt-1 {
  margin-top: 0.5rem;
}
.mt-2 {
  margin-top: 1rem;
}
.mt-5 {
  margin-top: 5rem;
}
.mb-1 {
  margin-bottom: 0.5rem;
}
.mb-2 {
  margin-bottom: 1rem;
}

.p-0 {
  padding: 0;
}
.p-1 {
  padding: 1rem;
}
.p-2 {
  padding: 2rem;
}
.pt-3 {
  padding-top: 3rem;
}
.pt-6 {
  padding-top: 6rem;
}
.pb-6 {
  padding-bottom: 6rem;
}
.pb-3 {
  padding-bottom: 3rem;
}

/* 超小屏：手机竖屏 (< 480px) */
@media (max-width: 479.98px) {
  :root {
    --base-font-size: 8px;
  }

  .flex-xs-col {
    flex-direction: column;
  }
  .flex-xs-row {
    flex-direction: row;
  }
  h1 {
    font-size: 2.4rem;
  }
  h2 {
    font-size: 2rem;
  }
  h3 {
    font-size: 1.8rem;
  }
}

/* 小屏：手机横屏 (480px - 575px) */
@media (min-width: 480px) {
  :root {
    --base-font-size: 8px;
  }
  .flex-sm-col {
    flex-direction: column;
  }
  .flex-sm-row {
    flex-direction: row;
  }
}

/* 中屏：平板竖屏 (576px - 767px) */
@media (min-width: 576px) {
  :root {
    --container-max-width: 540px;
  }
  .flex-md-col {
    flex-direction: column;
  }
  .flex-md-row {
    flex-direction: row;
  }
}

/* 大屏：平板横屏/小电脑 (768px - 991px) */
@media (min-width: 768px) {
  :root {
    --base-font-size: 9px;
    --container-max-width: 720px;
  }
  .flex-lg-col {
    flex-direction: column;
  }
  .flex-lg-row {
    flex-direction: row;
  }
}

/* 超大屏：电脑 (992px - 1199px) */
@media (min-width: 992px) {
  :root {
    --container-max-width: 960px;
    --base-font-size: 9px;
  }
  .flex-xl-col {
    flex-direction: column;
  }
  .flex-xl-row {
    flex-direction: row;
  }
}

/* 极大屏：宽屏电脑 (≥ 1200px) */
@media (min-width: 1200px) {
  :root {
    --base-font-size: 10px;
    --container-max-width: 1140px;
  }
  .flex-xxl-col {
    flex-direction: column;
  }
  .flex-xxl-row {
    flex-direction: row;
  }
}

@media (min-width: 1400px) {
  :root {
    --container-max-width: 1320px;
    --base-font-size: 10px;
  }
}

/* 布局样式 */

.container {
  --bs-gutter-x: 1.5rem;
  --bs-gutter-y: 0;
  width: 100%;
  max-width: var(--container-max-width);
  padding-right: calc(var(--bs-gutter-x) * 0.5);
  padding-left: calc(var(--bs-gutter-x) * 0.5);
  margin-right: auto;
  margin-left: auto;
}
.row {
  --bs-gutter-x: 1.5rem;
  --bs-gutter-y: 0;
  display: flex;
  flex-wrap: wrap;
  margin-top: calc(-1 * var(--bs-gutter-y));
  margin-right: calc(-0.5 * var(--bs-gutter-x));
  margin-left: calc(-0.5 * var(--bs-gutter-x));
}
.row > * {
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  padding-right: calc(var(--bs-gutter-x) * 0.5);
  padding-left: calc(var(--bs-gutter-x) * 0.5);
  margin-top: var(--bs-gutter-y);
}
.col {
  flex: 1 0 0%;
}
.col-auto {
  flex: 0 0 auto;
  width: auto;
}

.col-1 {
  flex: 0 0 auto;
  width: 8.33333333%;
}

.col-2 {
  flex: 0 0 auto;
  width: 16.66666667%;
}

.col-3 {
  flex: 0 0 auto;
  width: 25%;
}

.col-4 {
  flex: 0 0 auto;
  width: 33.33333333%;
}

.col-5 {
  flex: 0 0 auto;
  width: 41.66666667%;
}

.col-6 {
  flex: 0 0 auto;
  width: 50%;
}

.col-7 {
  flex: 0 0 auto;
  width: 58.33333333%;
}

.col-8 {
  flex: 0 0 auto;
  width: 66.66666667%;
}

.col-9 {
  flex: 0 0 auto;
  width: 75%;
}

.col-10 {
  flex: 0 0 auto;
  width: 83.33333333%;
}

.col-11 {
  flex: 0 0 auto;
  width: 91.66666667%;
}

.col-12 {
  flex: 0 0 auto;
  width: 100%;
}

.d-inline {
  display: inline !important;
}

.d-inline-block {
  display: inline-block !important;
}

.d-block {
  display: block !important;
}
.d-flex {
  display: flex !important;
}
.d-none {
  display: none !important;
}
.justify-start {
  justify-content: flex-start;
}
.justify-center {
  justify-content: center;
}
.justify-end {
  justify-content: flex-end;
}
.justify-between {
  justify-content: space-between;
}
.align-start {
  align-items: flex-start;
}
.align-center {
  align-items: center;
}
.align-end {
  align-items: flex-end;
}
.align-stretch {
  align-items: stretch;
}
.flex-wrap {
  flex-wrap: wrap !important;
}

.flex-nowrap {
  flex-wrap: nowrap !important;
}
