/* ==========================================================================
   MacWk 复刻版 —— 站点自定义补丁
   1) 去掉左侧栏，内容区整体左移并加宽
   2) 补中文字体栈（原站依赖 Dosis，中文回退到系统字体）
   3) 静态化后需要补齐的少量视觉细节
   ========================================================================== */

/* ---------- 字体：原站 @font-face 未内联，这里给出等价栈 ---------- */
body,
.main-header,
.main-footer {
  font-family: Dosis, -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

/* ---------- 核心改动：移除侧边栏占位 ---------- */

/* 原主题 .ioui-main 为侧边栏预留 75px 左边距，去掉侧边栏后归零 */
.ioui-main {
  margin-left: 0 !important;
}

/* 容器左右留白重新分配，使内容区铺满可用宽度 */
.ioui-content.switch-container {
  max-width: 1600px;
  padding-left: 10px;
  padding-right: 10px;
}

/* 隐藏侧边栏本体（即使 HTML 中残留也不会显示） */
.ioui-aside {
  display: none !important;
}

/* ---------- 静态化补齐 ---------- */

/* 首屏轮播：静态版固定显示第一张，禁用自动切换后的空白 */
.carousel-swiper .swiper-wrapper {
  transform: translate3d(0, 0, 0) !important;
  transition: none !important;
}

.carousel-swiper .swiper-slide {
  flex: 0 0 100%;
  width: 100% !important;
}

/* 懒加载图在静态页里直接显示 */
.item-image img[data-ll-status="loaded"],
.item-image img.loaded {
  opacity: 1;
}

/* 轮播分页小圆点保持可见 */
.swiper-pagination-bullet {
  background: #fff;
  opacity: 0.6;
}

.swiper-pagination-bullet-active {
  opacity: 1;
}

/* 右侧悬浮工具条在无 JS 情况下保持可见 */
.io-footer-tools {
  z-index: 900;
}

/* 卡片 hover 过渡（原站由 JS 驱动，这里用纯 CSS 还原观感） */
.posts-item.style-app-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.posts-item.style-app-card:hover {
  transform: translateY(-3px);
  box-shadow: rgba(116, 116, 116, 0.12) 0 0 25px 0 inset,
    rgba(0, 0, 0, 0.12) 0 10px 24px 0;
}

/* 导航激活态下划线（原站用伪元素实现，静态版补一份） */
.navbar-header .current-menu-item > a {
  position: relative;
}

.navbar-header .current-menu-item > a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 18px;
  height: 3px;
  margin-left: -9px;
  border-radius: 2px;
  background: #f1404b;
}

/* ---------- 响应式：窄屏下的容器留白 ---------- */
@media (max-width: 767.98px) {
  .ioui-content.switch-container {
    padding-left: 8px;
    padding-right: 8px;
  }
}
/* ===== 复刻版补充样式 ===== */
.navbar-header .current-menu-item > a::after { display: none; }
.navbar-header .menu-item > a { position: relative; display: block; padding: 15px 10px; font-size: 15px; line-height: 1.5; }
.navbar-header .current-menu-item > a { color: #f1404b; font-weight: 700; }
.io-carousel-max .carousel-swiper { height: 278px; }
.io-carousel-max .swiper-slide { height: 278px; }
.io-carousel-max .swiper-slide .media-content { display: block; width: 100%; height: 100%; background-size: cover; background-position: 50% 50%; position: relative; }
.io-carousel-max .col-xl-3 .media { height: calc(50% - 8px); min-height: 130px; border-radius: 12px; overflow: hidden; position: relative; }
.io-carousel-max .col-xl-3 .media-content { display: block; width: 100%; height: 100%; background-size: cover; background-position: 50% 50%; position: relative; }

/* ===== 文章详情页修正 ===== */
.app-detail-content img { max-width: 100%; height: auto; display: block; margin: 16px auto; border-radius: 8px; }
.app-detail-content { word-break: break-word; overflow: hidden; }
.app-detail-content p { margin-bottom: 14px; }
/* 详情页头部图标固定尺寸，避免被内容撑大 */

/* 详情页主图标：强制固定尺寸，避免被 .item-media 规则撑满 */
.app-detail-ico { flex: 0 0 110px; width: 110px; height: 110px; border-radius: 30%; overflow: hidden;
  background-image: linear-gradient(130deg,#f9f9f9,#e8e8e8); }
.app-detail-ico img { width: 110px; height: 110px; object-fit: cover; display: block; }

/* 导航激活态：彻底移除伪元素装饰，只保留文字变色 */
.navbar-header li.menu-item > a::before,
.navbar-header li.menu-item > a::after,
.navbar-header .current-menu-item > a::before,
.navbar-header .current-menu-item > a::after { content: none; display: none; background: none; border: 0; }
.navbar-header li.menu-item.current-menu-item > a { color: #f1404b; }
.navbar-header li.menu-item > a { color: #484b4f; }
.navbar-header li.menu-item > a:hover { color: #f1404b; }

/* 导航激活态红条：最终覆盖（高优先级） */
html body .navbar-header li.current-menu-item > a::after,
html body .navbar-header li.menu-item.current-menu-item > a::after {
  content: none !important; display: none !important; width: 0 !important; height: 0 !important;
  background: transparent !important;
}

/* 导航激活态下划线：原主题在 li::after 上，这里彻底关闭 */
.navbar-header li::after,
.navbar-header li.current-menu-item::after,
.navbar-header li:not(.io-menu-fold):hover::after {
  content: none !important; display: none !important; opacity: 0 !important;
  width: 0 !important; height: 0 !important; background: transparent !important;
}

/* 修正：不要强制拉伸卡片与轮播，恢复主题原尺寸 */
.posts-item.style-app-card .item-media { width: 70px; height: 70px; }
.posts-item.style-app-card .item-image img { width: 70px; height: 70px; object-fit: cover; }
.io-carousel-max .col-xl-3 .media { min-height: 0; }

/* 卡片尺寸回归：图标 70px，卡片高 90px（与原站一致） */
.posts-item.style-app-card { padding: 10px; border-radius: 12px; align-items: center; }
.posts-item.style-app-card .item-header { flex: 0 0 70px; width: 70px; height: 70px; margin-right: 8px; }
.posts-item.style-app-card .item-media { width: 70px; height: 70px; padding: 0; border-radius: 30%; overflow: hidden; }
.posts-item.style-app-card .item-image { display: block; width: 70px; height: 70px; }
.posts-item.style-app-card .item-image img { width: 70px; height: 70px; object-fit: cover; }
.posts-item.style-app-card .item-body { height: 70px; overflow: hidden; }
.posts-item.style-app-card .item-title { font-size: 14px; line-height: 22px; margin: 0; }
.posts-item.style-app-card .app-content .text-muted { font-size: 12px; line-height: 18px; }
