/*
Theme Name: BayouLok
Theme URI: http://beiyao_test/
Author: Bayou-Lok Fluid Control
Author URI: http://beiyao_test/
Description: 贝垚流体控制设备（上海）有限公司企业官网主题，基于 TailwindCSS CLI 构建。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Proprietary
Text Domain: bayoulok
*/

/* 主题基础样式，详细样式由 TailwindCSS CLI 生成的 assets/css/main.css 控制 */

html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at 82% 8%, rgba(0, 51, 102, 0.08), transparent 28rem),
    linear-gradient(180deg, #ffffff 0%, #f7f9fb 42%, #ffffff 100%);
}

.technical-grid {
  background-image:
    linear-gradient(rgba(0, 51, 102, 0.052) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 51, 102, 0.052) 1px, transparent 1px);
  background-size: 36px 36px;
}

.section-kicker {
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #003366;
}

.media-shade::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(8, 37, 63, .78));
}

.news-date {
  background: linear-gradient(180deg, #fff, #eef3f8);
}

.case-tab.is-active {
  background: #003366;
  color: #fff;
  border-color: #003366;
  box-shadow: 0 14px 30px rgba(0, 51, 102, .16);
}

.case-card {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .22s ease, transform .22s ease;
}

.case-card.is-switching {
  opacity: .35;
  transform: translateY(6px);
}

.fa-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 640px) {
  .hero-title { font-size: clamp(2.35rem, 14vw, 3.7rem); }
}

/* ---------------------------------------------------------------
 * 文章正文排版（替代 Tailwind Typography CDN 不支持的 prose 类）
 * --------------------------------------------------------------- */
.post-content { color: #475569; line-height: 2; }
.post-content h2 { font-size: 1.85rem; line-height: 1.25; font-weight: 700; color: #0f172a; margin-top: 2.5rem; margin-bottom: 1rem; }
.post-content h3 { font-size: 1.2rem; line-height: 1.45; font-weight: 700; color: #0f172a; margin-top: 2rem; margin-bottom: 0.75rem; }
.post-content h4 { font-size: 1rem; font-weight: 700; color: #1e293b; margin-top: 1.5rem; margin-bottom: 0.5rem; }
.post-content p { margin-top: 0; margin-bottom: 1.25rem; }
.post-content a { color: #003366; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.post-content a:hover { color: #08253f; }
.post-content strong { color: #1e293b; font-weight: 700; }
.post-content ul, .post-content ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.post-content ul { list-style-type: disc; }
.post-content ol { list-style-type: decimal; }
.post-content li { margin-bottom: 0.5rem; }
.post-content blockquote { border-left: 3px solid #003366; padding-left: 1.25rem; margin: 1.5rem 0; color: #64748b; font-style: italic; }
.post-content img { max-width: 100%; height: auto; border-radius: 2px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin: 1.5rem 0; object-fit: contain; }
.post-content figure { max-width: 100%; margin: 1.5rem 0; }
.post-content figure img { margin: 0; }
.post-content figcaption { text-align: center; font-size: 0.85rem; color: #94a3b8; margin-top: 0.5rem; }
.post-content iframe, .post-content video { max-width: 100%; height: auto; aspect-ratio: 16/9; }
.post-content table { width: 100%; border-collapse: collapse; margin-bottom: 1.25rem; font-size: 0.9rem; }
.post-content th { background: #f4f7fa; color: #003366; font-weight: 700; padding: 0.6rem 1rem; border: 1px solid #dbe4ee; text-align: left; }
.post-content td { padding: 0.6rem 1rem; border: 1px solid #dbe4ee; }
.post-content tr:nth-child(even) td { background: #f8fafc; }
.post-content code { background: #f1f5f9; color: #003366; padding: 0.15em 0.4em; border-radius: 3px; font-size: 0.88em; font-family: 'Courier New', monospace; }
.post-content pre { background: #0f172a; color: #e2e8f0; padding: 1.25rem; border-radius: 3px; overflow-x: auto; margin-bottom: 1.25rem; }
.post-content pre code { background: none; color: inherit; padding: 0; font-size: 0.88rem; }
.post-content hr { border: none; border-top: 1px solid #dbe4ee; margin: 2rem 0; }

/* 分页导航：兼容 the_posts_pagination() 和 paginate_links(type=list) 两种结构 */
.bayou-pagination .nav-links,
.bayou-pagination > .page-numbers { display: flex; justify-content: center; gap: 0.5rem; flex-wrap: wrap; }
.bayou-pagination > .page-numbers { list-style: none; margin: 0; padding: 0; }
.bayou-pagination .page-numbers li { margin: 0; padding: 0; }
.bayou-pagination .page-numbers a,
.bayou-pagination .page-numbers span { display: inline-flex; align-items: center; justify-content: center; min-width: 2.75rem; min-height: 2.75rem; padding: 0 0.625rem; border: 1px solid #e2e8f0; background: #fff; font-size: 0.875rem; font-weight: 600; color: #475569; text-decoration: none; transition: border-color 0.15s, color 0.15s, background-color 0.15s; }
.bayou-pagination .page-numbers a:hover,
.bayou-pagination .page-numbers a:focus-visible { border-color: #003366; color: #003366; }
.bayou-pagination .page-numbers a:focus-visible { outline: 2px solid #2271b1; outline-offset: 2px; }
.bayou-pagination .page-numbers.current { background: #003366; border-color: #003366; color: #fff; }
.bayou-pagination .page-numbers.dots { border: none; background: none; }

/* line-clamp 工具 */
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bayou-nav-item {
  position: relative;
}

.bayou-nav-item::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 0.75rem;
}

.bayou-nav-dropdown {
  transform: translateY(0.5rem);
}

.bayou-nav-item:hover .bayou-nav-dropdown,
.bayou-nav-item:focus-within .bayou-nav-dropdown {
  transform: translateY(0);
}

.bayou-mobile-submenu summary::-webkit-details-marker {
  display: none;
}

.bayou-mobile-submenu[open] summary i {
  transform: rotate(180deg);
}

.bayou-header-contact {
  white-space: nowrap;
}

.bayou-contact-float {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bayou-contact-float__item {
  display: inline-flex;
  min-width: 7.25rem;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 1px solid rgba(219, 228, 238, 0.95);
  background: rgba(255, 255, 255, 0.96);
  color: #003366;
  padding: 0.85rem 1rem;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  backdrop-filter: blur(10px);
}

.bayou-contact-float__item:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
}

.bayou-contact-float__item--wa {
  color: #047857;
}

.bayou-contact-float__item--primary {
  background: #003366;
  color: #fff;
  border-color: #003366;
}

@media (max-width: 1023px) {
  .bayou-contact-float {
    right: 0;
    left: 0;
    bottom: 0;
    flex-direction: row;
    gap: 0;
    padding: 0;
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid #dbe4ee;
    box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.12);
  }

  .bayou-contact-float__item {
    min-width: 0;
    flex: 1 1 0;
    border: 0;
    box-shadow: none;
    padding: 0.9rem 0.75rem;
    border-radius: 0;
  }

  .bayou-contact-float__item + .bayou-contact-float__item {
    border-left: 1px solid #e2e8f0;
  }
}
