Files
wordpress-theme-aksrt/assets/css/frontend/header-components/widget-device-visibility.css
T
kate522 188611b075 fix(visual): 1:1 banner/hero/modal + strip non-zibll card chrome
Align banner s-desc caption/scale-height, hero search pill and -40px cards, modal colorful header/spring scale; remove white/pink card borders and hover lifts across mainline surfaces.
2026-07-10 23:37:20 +08:00

303 lines
7.4 KiB
CSS

/* Widget device visibility */
@media (max-width: 767.98px) {
.aksrt-widget--mobile-only {
display: none !important;
}
}
@media (min-width: 768px) {
.aksrt-widget--pc-only {
display: none !important;
}
}
/* 首页首屏模块:向上抵消导航占位,保证 Hero 与导航重叠显示 */
.home-modules > .header-components-container:first-child,
.home-modules--fullbleed > .header-components-container:first-child {
margin-top: calc(var(--nav-height, 60px) * -1);
}
/* WordPress Admin Bar 已全局禁用,无需偏移规则 */
/* ============================================================
* Layer 1: Swiper 轮播
* ============================================================ */
.header-components {
position: relative;
width: 100%;
--pc-height: 550px;
--m-height: 280px;
height: var(--pc-height);
max-height: none;
overflow: hidden;
background: #111;
}
/* slide-header 模式:背景保持满铺,仅将文本层下移避开导航 */
.header-components.slide-header {
padding-top: 0;
}
.header-components.slide-header .header-components__content.slide-text {
padding-top: var(--nav-height, 60px);
}
/* WordPress Admin Bar 已全局禁用,无需偏移规则 */
/* 渐变兜底 */
.header-components--gradient {
background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-active, var(--color-primary-dark)) 100%);
display: flex;
align-items: center;
justify-content: center;
}
.header-components--gradient::before {
content: "";
position: absolute;
inset: 0;
background: radial-gradient(ellipse 80% 60% at 20% 20%, rgba(255, 255, 255, 0.15), transparent),
radial-gradient(ellipse 50% 50% at 80% 80%, rgba(0, 0, 0, 0.2), transparent);
pointer-events: none;
}
/* Swiper 内部 */
.header-components .swiper-wrapper {
position: absolute;
inset: 0;
height: 100%;
width: 100%;
}
.header-components .swiper-slide {
position: relative;
height: 100%;
overflow: hidden;
cursor: pointer;
}
/* 幻灯片背景图 */
.header-components__slide-bg {
position: absolute;
inset: 0;
overflow: hidden;
}
.header-components__slide-bg img,
.header-components__slide-bg .fit-cover {
width: 100%;
height: 100%;
object-fit: cover;
}
.header-components__slide-fallback {
width: 100%;
height: 100%;
background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
}
/* 视频背景 */
.header-components__video {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: cover;
z-index: 0;
}
/* 图片图层(视差叠加) */
.header-components__layer {
position: absolute;
inset: 0;
background-size: cover;
background-repeat: no-repeat;
background-position: center;
pointer-events: none;
}
.header-components__layer--free-size {
background-size: auto;
}
.header-components__layer--parallax {
will-change: transform, opacity;
opacity: var(--layer-parallax-opacity, 0.6);
transform: translateY(calc(var(--scroll-y, 0) * var(--layer-parallax-scale, 0.3) * 1px));
}
/* 文字视差 */
.has-text-parallax {
will-change: transform;
transform: translate(-50%, calc(-50% + var(--scroll-y, 0) * var(--hero-text-parallax, 0) * 0.15px));
}
/* 文字尺寸覆盖 */
.header-components__content[style*="--hero-text-size-pc"] .slide-title {
font-size: var(--hero-text-size-pc);
}
/* 幻灯片遮罩 — 轻量压暗(zibll 以 .s-desc 底条为主) */
.header-components__slide-overlay {
position: absolute;
inset: 0;
background: linear-gradient(
to bottom,
rgba(0, 0, 0, 0.05) 0%,
rgba(0, 0, 0, 0.12) 55%,
rgba(0, 0, 0, 0.28) 100%
);
z-index: 1;
pointer-events: none;
}
/* zibll .s-desc 底条文案 */
.header-components__content.s-desc,
.header-components__content.slide-text.s-desc {
top: auto;
bottom: 0;
left: 0;
right: 0;
transform: none;
width: 100%;
max-width: none;
text-align: left;
padding: 1.8em 2.5em;
background: linear-gradient(0deg, rgba(0, 0, 0, 0.2), transparent);
border-radius: 0 0 var(--main-radius, 8px) var(--main-radius, 8px);
text-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
font-size: 16px;
}
.header-components__content.s-desc .header-components__title,
.header-components__content.s-desc .slide-title {
font-size: 16px;
font-weight: normal;
text-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
letter-spacing: 0;
}
.header-components__content.slide-text {
background: unset;
}
/* 搜索层 — header-slider-search */
.header-components-search {
position: absolute;
left: 50%;
top: calc(50% - 10px);
transform: translate(-50%, -50%);
max-width: 840px;
width: calc(100% - 40px);
margin: auto;
padding: 0 20px;
font-size: 17px;
z-index: 2;
color: #fff;
}
.card-0 .header-components-search {
top: calc(50% + 20px);
}
.header-components-search .line-form {
background: rgba(255, 255, 255, 0.8);
border-radius: 100px;
padding: 0.5em 1.2em;
z-index: 1;
color: #555;
border: none;
box-shadow: none;
}
.has-blur-pc .header-components-search .line-form,
.has-blur-mobile .header-components-search .line-form,
.filter-blur .header-components-search .line-form {
-webkit-backdrop-filter: saturate(5) blur(20px);
backdrop-filter: saturate(5) blur(20px);
}
.header-components-search .line-form .icon,
.header-components-search .line-form a {
color: #555;
}
/* 图标卡 — header-slider-card margin-top:-40px */
.header-components-card {
position: relative;
margin-top: -40px;
z-index: 1;
}
.header-components-card .zib-widget,
.header-components-card .aksrt-theme-box,
.header-components-card .icon-cover-card {
margin-bottom: 0;
}
.has-blur-pc .header-components-card .zib-widget,
.has-blur-pc .header-components-card .aksrt-theme-box,
.has-blur-mobile .header-components-card .zib-widget,
.filter-blur .header-components-card .zib-widget {
-webkit-backdrop-filter: saturate(5) blur(20px);
backdrop-filter: saturate(5) blur(20px);
background: var(--blur-bg);
}
.header-components.slide-header {
border-radius: 0;
}
.header-components.slide-header .swiper-slide img,
.header-components.slide-header .header-components__slide-bg img {
border-radius: 0 !important;
}
/* 幻灯片文字内容 */
.header-components__content {
position: absolute;
bottom: auto;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 2;
width: calc(100% - 32px);
max-width: 920px;
text-align: center;
color: #fff;
}
.header-components__title,
.header-components .slide-title {
font-family: var(--font-ui);
font-size: clamp(1.5rem, 3.2vw, 2.25rem);
font-weight: 600;
margin: 0 0 12px;
line-height: 1.25;
letter-spacing: 0;
color: #fff;
text-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}
.header-components__subtitle {
font-size: clamp(0.9rem, 1.4vw, 1.125rem);
margin: 0;
max-width: 680px;
margin-left: auto;
margin-right: auto;
line-height: 1.6;
color: rgba(255, 255, 255, 0.9);
text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
.header-components__description {
font-size: clamp(0.8rem, 1.2vw, 0.95rem);
margin: 8px auto 0;
max-width: 600px;
line-height: 1.5;
color: rgba(255, 255, 255, 0.8);
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}