/*
Theme Name: gzlxtz
Theme URI: https://www.jingrui16888.com
Description: 拓展训练企业网站响应式WordPress主题（基于Tailwind CSS v3）
Author: k神
Author URI: https://www.jingrui16888.com
Version: 1.0
Tags: 拓展训练,企业网站,响应式,tailwind,团队建设
*/

/* ================================================================== */
/*                   页面模板：index.php（首页）                        */
/* ================================================================== */

/* 英雄轮播区块：让幻灯片叠加并控制过渡 */
.hero-slide {
  transition: opacity 0.7s ease-in-out;
}

/* 轮播圆点样式增强 */
.hero-dot {
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}
.hero-dot:hover {
  transform: scale(1.3);
}

/* ================================================================== */
/*             页面模板：header.php（头部导航）                         */
/* ================================================================== */

/* 导航菜单基础：移动端默认隐藏（由JS控制显隐） */
.nav-menu {
  display: none;
}
@media (min-width: 768px) {
  .nav-menu {
    display: flex;
  }
}

/* 导航菜单当前页高亮 */
.nav-menu .current-menu-item > a,
.nav-menu .current_page_item > a {
  background-color: rgba(0, 0, 0, 0.2);
}

/* Logo 图片约束：原始图540×180，显示限制180px宽以确保Retina清晰 */
.custom-logo-link img {
  width: 180px;
  max-width: 100%;
  height: auto;
}

/* ================================================================== */
/*                   页面模板：about.php（关于我们）                     */
/* ================================================================== */

/* 发展历程时间线——左侧竖线装饰 */
@media (min-width: 768px) {
  .about-timeline {
    position: relative;
    padding-left: 2rem;
  }
  .about-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #d70b14, #ffcccc);
  }
}

/* ================================================================== */
/*            页面模板：category-news.php / single-news.php              */
/*            （行业资讯——侧边栏 aside 样式）                           */
/* ================================================================== */

/* 侧边栏 sticky 吸附 */
@media (min-width: 1024px) {
  aside {
    position: sticky;
    top: 80px;
    align-self: flex-start;
  }
}

/* 侧边栏分类链接 hover 效果增强 */
aside a:hover {
  text-decoration: underline;
}

/* 侧边栏标签云圆角标签 */
aside .tag-cloud-link {
  font-size: 0.75rem !important;
}

/* ================================================================== */
/*             页面模板：contact.php（联系我们）                         */
/* ================================================================== */

/* 表单输入框聚焦红框 */
.contact-form input:focus,
.contact-form textarea:focus {
  box-shadow: 0 0 0 3px rgba(215, 11, 20, 0.15);
}

/* ================================================================== */
/*          页面模板：category-courses.php（拓展课程分类页）             */
/* ================================================================== */

/* 课程卡片图片缩放过渡——使用 Tailwind 类，此处无额外样式 */

/* ================================================================== */
/*          页面模板：single-courses.php（拓展课程文章页）               */
/* ================================================================== */

/* 文章内容区域排版优化 */
.content-area h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}
.content-area h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}
.content-area p {
  margin-bottom: 1rem;
  line-height: 1.8;
}
.content-area img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 1rem 0;
}
.content-area ul,
.content-area ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.content-area ul li {
  list-style: disc;
}
.content-area ol li {
  list-style: decimal;
}

/* ================================================================== */
/*             页面模板：category-cases.php（客户案例分类页）            */
/* ================================================================== */

/* 案例图片遮罩 hover 效果 */
.category-cases-figure {
  position: relative;
  overflow: hidden;
}
.category-cases-figure::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(215, 11, 20, 0);
  transition: background 0.3s ease;
}
.category-cases-figure:hover::after {
  background: rgba(215, 11, 20, 0.3);
}

/* ================================================================== */
/*            首页区块：拓展项目（水平滚动轮播）                         */
/* ================================================================== */
.project-scroll-wrap {
  position: relative;
}
.project-scroll-container {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: #d70b14 transparent;
}
.project-scroll-container::-webkit-scrollbar {
  height: 6px;
}
.project-scroll-container::-webkit-scrollbar-thumb {
  background: #d70b14;
  border-radius: 3px;
}
.project-scroll-container::-webkit-scrollbar-track {
  background: transparent;
}
.project-scroll-item {
  flex: 0 0 calc((100% - 1.25rem) / 2);
  scroll-snap-align: start;
  min-width: 200px;
}
@media (min-width: 1024px) {
  .project-scroll-item {
    flex: 0 0 calc((100% - 3.75rem) / 4);
  }
}
.project-scroll-btn {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  color: #d70b14;
  border: 2px solid #d70b14;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.2s ease;
}
.project-scroll-btn:hover {
  background: #d70b14;
  color: #fff;
}
@media (min-width: 1024px) {
  .project-scroll-btn {
    display: flex;
  }
}
.project-scroll-left {
  left: -12px;
}
.project-scroll-right {
  right: -12px;
}

/* ================================================================== */
/*            页面模板：single-news.php（行业资讯文章页）                */
/* ================================================================== */

/* 打印按钮样式——由 JS 精确提取 <article> 内容再打印，此处无需 @media print */

/* ================================================================== */
/*            页面模板：single-cases.php（客户案例文章页）              */
/* ================================================================== */

/* 引用块样式（客户感言） */
blockquote {
  border-left: 4px solid #d70b14;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: #fdf2f2;
  border-radius: 0 0.5rem 0.5rem 0;
  font-style: italic;
  color: #4a4a4a;
}

/* ================================================================== */
/*            页面模板：footer.php（底部）                               */
/* ================================================================== */

/* 底部链接统一风格 */
footer a {
  transition: color 0.2s ease;
}

/* ---------- PC端右侧悬浮联系按钮 ---------- */
.side-contact-bar {
  position: fixed;
  right: 16px;
  bottom: 160px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ================================================================== */
/*            页面模板：page-base.php（拓展基地聚合页）                  */
/* ================================================================== */
.base-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.5rem 0;
}
.base-card-image {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #f3f4f6;
  flex-shrink: 0;
}
.base-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.base-card-body {
  flex: 1;
  min-width: 0;
}
.base-card-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.75rem;
}
.base-card-desc {
  font-size: 0.95rem;
  line-height: 1.8;
  color: #6b7280;
  margin-bottom: 1.25rem;
}
.base-card-btn {
  display: inline-block;
  background: #d70b14;
  color: #fff;
  padding: 0.6rem 1.6rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s ease;
  text-decoration: none;
  border: none;
  cursor: pointer;
  line-height: 1.5;
}
.base-card-btn:hover {
  background: #b50910;
  color: #fff;
}
.base-card-btn.alt {
  background: #1e80ff;
}
.base-card-btn.alt:hover {
  background: #1666d0;
}
.base-card-btn.outline {
  background: transparent;
  border: 2px solid #d70b14;
  color: #d70b14;
}
.base-card-btn.outline:hover {
  background: #d70b14;
  color: #fff;
}

/* 视频弹窗遮罩 */
.base-video-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.75);
  align-items: center;
  justify-content: center;
}
.base-video-overlay.show {
  display: flex;
}
.base-video-modal {
  position: relative;
  width: 90vw;
  max-width: 960px;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}
.base-video-close {
  position: absolute;
  top: 8px;
  right: 12px;
  z-index: 10;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  font-size: 28px;
  line-height: 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.base-video-close:hover {
  background: rgba(0,0,0,0.85);
}
.base-video-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
}
.base-video-wrapper iframe {
  width: 100%;
  height: 100%;
  display: block;
}

@media (max-width: 767px) {
  .base-video-modal {
    width: 100vw;
    border-radius: 0;
  }
}

@media (min-width: 768px) {
  .base-card {
    flex-direction: row;
  }
  .base-card-image {
    width: 360px;
    max-width: 40%;
    aspect-ratio: 4 / 3;
  }
}

/* 分页导航 */
.base-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}
.base-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #374151;
  background: #fff;
  text-decoration: none;
  transition: all 0.2s ease;
}
.base-page-link:hover {
  border-color: #d70b14;
  color: #d70b14;
  background: #fff5f5;
}
.base-page-link.current {
  background: #d70b14;
  border-color: #d70b14;
  color: #fff;
  font-weight: 700;
}
.base-page-link.disabled {
  color: #d1d5db;
  cursor: not-allowed;
  background: #f9fafb;
}
.base-page-link.dots {
  border: none;
  min-width: auto;
  color: #9ca3af;
}

/* ================================================================== */
/*            页面模板：single-news.php（行业资讯文章页）                */

/* 移动端隐藏PC悬浮条 */
@media (max-width: 767px) {
  .side-contact-bar {
    display: none;
  }
}

.side-contact-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #d70b14;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(215, 11, 20, 0.35);
  transition: transform 0.2s ease, background 0.2s ease;
  position: relative;
  font-size: 0;
}
.side-contact-btn:hover {
  transform: scale(1.1);
  background: #b50910;
}
.side-contact-btn svg {
  width: 20px;
  height: 20px;
}

/* 回顶按钮默认隐藏 */
#side-back-top {
  display: none;
}

/* POP弹窗——电话号/二维码 */
.side-popup {
  display: none;
  position: absolute;
  right: 54px;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  padding: 12px 16px;
  white-space: nowrap;
  z-index: 1000;
}
.side-popup.show {
  display: block;
}
/* 气泡小三角 */
.side-popup::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: #fff;
}
.side-popup .phone-number {
  font-size: 15px;
  color: #d70b14;
  font-weight: 700;
  letter-spacing: 1px;
}
.side-popup .qrcode-img {
  width: 140px;
  height: 140px;
  max-width: none;
  display: block;
}

/* ---------- 手机端底部固定联系栏 ---------- */
.mobile-contact-bar {
  display: none;
}
@media (max-width: 767px) {
  .mobile-contact-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
  }
}
.mobile-contact-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: #fff;
  transition: background 0.2s;
}
.mobile-contact-btn:active {
  background: #f3f4f6;
}
.mobile-contact-btn svg {
  width: 20px;
  height: 20px;
}
.mobile-contact-btn.tel-btn {
  color: #d70b14;
}
.mobile-contact-btn.wechat-btn {
  color: #07c160;
}

/* 手机端：复制微信号成功提示 */
.copy-toast {
  display: none;
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 13px;
  z-index: 2000;
}
.copy-toast.show {
  display: block;
  animation: toastFade 2s forwards;
}
@keyframes toastFade {
  0%   { opacity: 1; }
  70%  { opacity: 1; }
  100% { opacity: 0; }
}

/* ================================================================== */
/*                         通用全局样式                                  */
/* ================================================================== */

/* 文章内图片自适应 */
img {
  max-width: 100%;
  height: auto;
}

/* 响应式表格 */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}
table th,
table td {
  border: 1px solid #e5e7eb;
  padding: 0.75rem 1rem;
  text-align: left;
}
table th {
  background: #f9fafb;
  font-weight: 600;
}

/* WordPress 默认对齐样式 */
.alignleft {
  float: left;
  margin-right: 1.5rem;
  margin-bottom: 1rem;
}
.alignright {
  float: right;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}
.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1rem;
}

/* 清除浮动 */
.clearfix::after {
  content: '';
  display: table;
  clear: both;
}

/* 无障碍：屏幕阅读器专用 */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal;
}
