/*
Theme Name: Senden Smart Display
Theme URI: https://wordpress.local
Author: Your Name
Author URI: https://example.com
Description: 我的第一个自定义主题 - 使用 Bootstrap 5 和 Font Awesome 构建的智能显示行业站点
Version: 2.0.0
Requires at least: 5.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mytheme
Domain Path: /languages
Tags: custom-menu, custom-logo, featured-images, threaded-comments, translation-ready, blog
*/

/* ================================
   基础重置
================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}
/* Fredoka 本地字体 */
@font-face{
    font-family:'Fredoka';
    src:url('./assets/fonts/Fredoka-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Fredoka';
    src:url('./assets/fonts/Fredoka-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

body {
    font-family: 'Fredoka',-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ================================
   导航栏固定占位
================================ */
.header-spacer {
    height: 0;
}

/* 有顶部联系栏时的占位 */
.site-header.has-topbar .header-spacer {
    /* 由 Bootstrap navbar 的高度自动处理 */
}

/* ================================
   顶部联系栏
================================ */
.top-bar {
    font-size: 13px;
}

.top-bar-info li {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.top-bar-info i {
    color: #007bff;
}

/* ================================
   主导航栏（透明覆盖式）
================================ */
.site-header {
    background: transparent;
    z-index: 1030;
    transition: all 0.3s ease;
}

.header-transparent {
    background: transparent !important;
    padding: 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 100%;
    padding: 18px 40px;
    position: relative;
}

/* 左侧菜单 */
.header-nav-left {
    flex: 1;
    display: flex;
    justify-content: flex-start;
}

.header-nav-list,
.header-nav-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 32px;
}

.header-nav-list > li {
    position: relative;
}

.header-nav-list > li > a {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 8px 0;
    position: relative;
    transition: color 0.3s ease;
    text-decoration: none;
}

.header-nav-list > li > a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: #fff;
    transition: width 0.3s ease;
}

.header-nav-list > li > a:hover::after,
.header-nav-list > li.current-menu-item > a::after {
    width: 100%;
}

/* 中间 LOGO */
.header-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    z-index: 5;
}

.logo-mark {
    width: 44px;
    height: 44px;
    border: 2px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    font-family: Georgia, serif;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
}

.logo-sub {
    font-size: 10px;
    letter-spacing: 2px;
    opacity: 0.9;
}

/* 右侧工具 */
.header-tools {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0;
}

.header-tool-btn {
    background: transparent;
    border: none;
    color: #fff;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: opacity 0.3s ease;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    text-decoration: none;
}

.header-tool-btn:first-of-type {
    border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.header-tool-btn:hover {
    opacity: 0.7;
}

.header-stock {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    padding: 0 16px;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    line-height: 1.2;
}

.stock-label {
    font-size: 9px;
    letter-spacing: 1px;
    opacity: 0.85;
}

.stock-code {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
}

.header-toggler {
    color: #fff;
    font-size: 18px;
    margin-left: 12px;
    padding: 8px 10px;
    border: 1px solid rgba(255,255,255,0.3);
}

.header-toggler:focus {
    box-shadow: none;
}

/* 移动端菜单 */
.header-mobile-menu {
    background: rgba(0, 0, 0, 0.9);
    padding: 20px;
    width: 100%;
}

.header-mobile-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.header-mobile-list li a {
    color: #fff;
    display: block;
    padding: 12px 0;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

@media (max-width: 991px) {
    .header-nav-left { display: none; }
    .header-inner { padding: 14px 20px; }
    .header-stock { display: none; }
}

@media (max-width: 576px) {
    .logo-sub { display: none; }
    .logo-title { font-size: 14px; }
    .logo-mark { width: 36px; height: 36px; font-size: 18px; }
}

/* 品牌文字（旧样式保留兼容） */
.brand-text {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
}

/* 移动端菜单按钮 */
.navbar-toggler {
    padding: 8px 12px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.navbar-toggler:hover {
    border-color: #007bff;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

/* 移动端菜单 */
@media (max-width: 991px) {
    .navbar-collapse {
        background: #fff;
        border-radius: 8px;
        padding: 16px;
        margin-top: 12px;
        box-shadow: 0 10px 40px rgba(0,0,0,0.1);
        max-height: 70vh;
        overflow-y: auto;
    }
    
    .navbar-nav .nav-link {
        padding: 12px 16px !important;
        border-bottom: 1px solid #eee;
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
    
    .navbar-nav .nav-link.active::after {
        display: none;
    }
    
    .dropdown-menu {
        box-shadow: none;
        padding-left: 20px;
        background: #f8f9fa;
    }
    
    .navbar .btn {
        width: 100%;
        margin-top: 10px;
    }
}

/* ================================
   全屏轮播图（参考图风格）
================================ */
.hero-slider {
    position: relative;
    height: 100vh;
    min-height: 600px;
    max-height: 900px;
    overflow: hidden;
    background: #1a1a2e;
}

.hero-slider.hero-placeholder {
    display: flex;
    align-items: center;
}

.slider-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #333;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.1);
    animation: slowZoom 15s ease-in-out infinite alternate;
}

@keyframes slowZoom {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.1);
    }
}

.slider-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.35) 0%,
        rgba(0, 0, 0, 0.15) 50%,
        rgba(0, 0, 0, 0.55) 100%
    );
    z-index: 1;
}

/* 轮播内容 */
.carousel-inner {
    height: 100%;
}

.carousel-item {
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.hero-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
}

.carousel-caption.hero-caption {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    text-align: left;
    padding: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.hero-caption-inner {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 60px 140px;
    color: #fff;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 4px 30px rgba(0,0,0,0.4);
    margin-bottom: 18px;
    letter-spacing: 2px;
    line-height: 1.05;
    max-width: 720px;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 36px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    max-width: 600px;
    line-height: 1.6;
}

/* 按钮（参考图 LEARN MORE 样式） */
.hero-buttons {
    display: flex;
    gap: 12px;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 12px 0;
    transition: all 0.3s ease;
}

.hero-btn-line {
    display: inline-block;
    width: 60px;
    height: 2px;
    background: #fff;
    position: relative;
    transition: width 0.3s ease;
}

.hero-btn-line::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    width: 8px;
    height: 8px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
    transform: translateY(-50%) rotate(45deg);
}

.hero-btn:hover .hero-btn-line {
    width: 80px;
}

/* 底部居中分页点 */
.hero-pagination {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 5;
}

.hero-dot {
    width: 30px;
    height: 3px;
    border: none;
    background: rgba(255,255,255,0.4);
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-dot.active,
.hero-dot:hover {
    background: #fff;
}

/* 左下 SCROLL DOWN */
.hero-scroll-down {
    position: absolute;
    bottom: 30px;
    left: 60px;
    z-index: 5;
}

.scroll-down-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
    font-size: 11px;
    letter-spacing: 2px;
    font-weight: 500;
    text-transform: uppercase;
}

.scroll-down-line {
    display: inline-block;
    width: 50px;
    height: 1px;
    background: rgba(255,255,255,0.6);
    position: relative;
    animation: scrollLineMove 2s ease-in-out infinite;
}

.scroll-down-line::after {
    content: "";
    position: absolute;
    left: 0;
    top: -3px;
    width: 6px;
    height: 6px;
    border-left: 1px solid rgba(255,255,255,0.6);
    border-bottom: 1px solid rgba(255,255,255,0.6);
    transform: rotate(-45deg);
}

@keyframes scrollLineMove {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; transform: translateX(8px); }
}

/* 右下页码 */
.hero-counter {
    position: absolute;
    bottom: 30px;
    right: 60px;
    z-index: 5;
    color: #fff;
    font-size: 14px;
    letter-spacing: 2px;
    font-weight: 500;
    font-family: Georgia, serif;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.counter-current {
    font-size: 18px;
    font-weight: 600;
}

.counter-sep {
    opacity: 0.5;
    margin: 0 2px;
}

.counter-total {
    opacity: 0.7;
    font-size: 13px;
}

/* 响应式 */
@media (max-width: 991px) {
    .hero-slider {
        height: 70vh;
        min-height: 500px;
    }
    .hero-title { font-size: 2.8rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero-caption-inner { padding: 0 30px 120px; }
    .hero-scroll-down { left: 30px; }
    .hero-counter { right: 30px; }
}

@media (max-width: 767px) {
    .hero-slider {
        height: 60vh;
        min-height: 400px;
    }
    .hero-title { font-size: 1.9rem; letter-spacing: 1px; }
    .hero-subtitle { font-size: 0.95rem; display: none; }
    .hero-caption-inner { padding: 0 20px 100px; }
    .hero-scroll-down { display: none; }
}

/* ================================
   其他区块
================================ */
   主内容区域
================================ */
.main-content {
    padding: 60px 0;
}

/* ================================
   文章卡片样式
================================ */
.post-item {
    background: #fff;
    padding: 30px;
    margin-bottom: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.post-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.post-title {
    font-size: 22px;
    margin-bottom: 15px;
}

.post-title a {
    color: #1a1a1a;
    transition: color 0.3s;
}

.post-title a:hover {
    color: #007bff;
}

.post-content {
    color: #555;
    line-height: 1.8;
}

.post-content p {
    margin-bottom: 15px;
}

/* ================================
   底部样式
================================ */
.site-footer {
    background: #1a1a1a;
    color: #fff;
    padding: 50px 0 30px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-info p {
    margin: 0;
    color: #888;
    font-size: 14px;
}

.footer-info a {
    color: #fff;
}

.footer-info a:hover {
    color: #007bff;
}

.footer-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 20px;
}

.footer-menu a {
    color: #888;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-menu a:hover {
    color: #fff;
}

@media (max-width: 768px) {
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

/* ================================
   滚动进度条
================================ */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #007bff, #00d4ff);
    z-index: 9999;
    transition: width 0.1s;
}

/* ================================
   回到顶部按钮
   已迁移至 side-contact 容器内，样式见 assets/css/components/side-contact.css
   保留注释以避免破坏其他主题自定义
================================ */

/* ================================
   动画类
================================ */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* ================================
   工具类
================================ */
.text-primary {
    color: #007bff !important;
}

.bg-primary {
    background-color: #007bff !important;
}

.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004494 100%);
}

/* Bootstrap 覆盖 */
.navbar-light .navbar-toggler {
    border-color: rgba(0,0,0,0.1);
}
