/**
 * Success Digiplus Theme - 自定义样式
 * 基于 Tailwind CSS 的自定义样式
 */

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

html {
    scroll-behavior: smooth;
}

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

/* ========================================
   字体设置 - 匹配原始设计
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;800;900&display=swap');

/* Gotham Font - Bold only */
@font-face {
    font-family: 'Gotham';
    src: url('../fonts/Gotham-Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

:root {
    --delta-blue: #0f2f8e;
    --delta-dark-blue: #17284b;
    --delta-red: #c24e4a;
    --delta-cyan: #34b6d9;
    --delta-light-cyan: #3577c8;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.font-shs {
    font-family: 'source-han-sans-japanese', 'Noto Sans JP', system-ui, -apple-system, sans-serif;
}

.font-gotham {
    font-family: 'Gotham', 'Inter', system-ui, -apple-system, 'Noto Sans JP', sans-serif;
    letter-spacing: 0.02em;
}

/* ========================================
   颜色类
   ======================================== */
.bg-delta-blue {
    background-color: var(--delta-blue);
}

.text-delta-blue {
    color: var(--delta-blue);
}

/* ========================================
   标题样式 - 匹配原始设计
   ======================================== */
.sec-title {
    font-weight: 700;
    font-size: 1.875rem;
    line-height: 1.2;
    font-family: 'Gotham', 'Inter', system-ui, -apple-system, 'Noto Sans JP', sans-serif;
    letter-spacing: 0.02em;
}

@media (min-width: 768px) {
    .sec-title {
        font-size: 44px;
        line-height: 1.4;
    }
}

.sec-title-en {
    font-weight: 700;
    line-height: 0.9;
    font-size: 48px;
}

@media (min-width: 768px) {
    .sec-title-en {
        font-size: 56px;
    }
}

@media (min-width: 1024px) {
    .sec-title-en {
        font-size: 80px;
    }
}

.sec-sub {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1rem;
    letter-spacing: normal;
}

@media (min-width: 768px) {
    .sec-sub {
        font-size: 0.875rem;
        letter-spacing: 0.3em;
    }
}

.read-more-link {
    font-family: 'Gotham', 'Noto Sans JP', sans-serif;
    font-weight: 700;
    font-size: 21px;
    letter-spacing: 0.02em;
}

/* ========================================
   Reveal 动画 - 快速流畅版本
   ======================================== */
[data-reveal] {
    opacity: 0;
    transition: opacity 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}

[data-reveal='up'] {
    transform: translateY(20px);
}

[data-reveal='left'] {
    transform: translateX(-20px);
}

[data-reveal='right'] {
    transform: translateY(20px);
}

[data-reveal='scale'] {
    transform: scale(0.98);
}

[data-reveal].is-inview {
    opacity: 1;
    transform: none;
}

/* ========================================
   跑马灯动画 - 匹配原始设计
   ======================================== */
.marquee-track {
    position: absolute;
    width: 300%;
    overflow: hidden;
    pointer-events: none;
}

.marquee-track.rotate {
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-5deg);
}

.marquee-track.rotate-top {
    top: 52%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-5deg);
}

.marquee-track.rotate-outline {
    top: 84%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-5deg);
}

.marquee-track .marquee-inner {
    display: flex;
    width: 200%;
}

.marquee-inner.animate {
    animation: marquee 40s linear infinite;
}

.marquee-inner.animate-reverse {
    animation: marquee-reverse 40s linear infinite;
}

.marquee-segment {
    white-space: nowrap;
    padding-right: 6rem;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes marquee-reverse {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}

/* ========================================
   链接样式 - 已在标题样式中定义
   ======================================== */
.read-more-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

a {
    text-decoration: none;
    color: inherit;
}

a:hover {
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

/* ========================================
   菜单样式
   ======================================== */
#sidebar-menu.menu-open {
    visibility: visible;
}

#sidebar-menu.menu-open .sidebar-overlay {
    opacity: 0.5;
}

#sidebar-menu.menu-open .sidebar-panel {
    transform: translateX(0);
}

.menu-toggle.active .menu-bar:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active .menu-bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .menu-bar:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ========================================
   侧边栏菜单项样式 - 匹配网站调性
   ======================================== */
.sidebar-menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    opacity: 0;
    transform: translateX(20px);
}

#sidebar-menu.menu-open .sidebar-menu-item {
    opacity: 1;
    transform: translateX(0);
    animation: slideInMenu 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInMenu {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.sidebar-menu-item:hover {
    background: linear-gradient(90deg, rgba(52, 182, 217, 0.15) 0%, rgba(52, 182, 217, 0.05) 100%);
    color: #fff;
}

.sidebar-menu-item:hover .sidebar-menu-indicator {
    transform: scaleY(1);
}

.sidebar-menu-item:hover .sidebar-menu-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* 当前页面高亮 */
.sidebar-menu-item.sidebar-menu-active {
    background: linear-gradient(90deg, rgba(52, 182, 217, 0.2) 0%, transparent 100%);
    color: #fff;
}

.sidebar-menu-item.sidebar-menu-active .sidebar-menu-indicator {
    transform: scaleY(1);
    background: #34b6d9;
}

/* 左侧指示条 */
.sidebar-menu-indicator {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #34b6d9 0%, #3577c8 100%);
    transform: scaleY(0);
    transform-origin: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 菜单内容区域 */
.sidebar-menu-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* 英文标题 */
.sidebar-menu-title {
    font-family: 'Gotham', 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.1em;
    color: #fff;
    transition: color 0.3s ease;
}

/* 日文副标题 */
.sidebar-menu-subtitle {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 11px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.sidebar-menu-item:hover .sidebar-menu-subtitle {
    color: rgba(52, 182, 217, 0.9);
}

/* 箭头图标 */
.sidebar-menu-arrow {
    width: 16px;
    height: 16px;
    color: #34b6d9;
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 侧边栏面板内部优化 */
#sidebar-menu .sidebar-panel {
    background: linear-gradient(180deg, #00205B 0%, #001845 100%);
}

/* 侧边栏Logo区域优化 */
#sidebar-menu .sidebar-panel > div:first-child {
    border-bottom-color: rgba(52, 182, 217, 0.2);
}

/* 侧边栏联系信息区域优化 */
#sidebar-menu .sidebar-panel .mt-8 {
    border-top-color: rgba(52, 182, 217, 0.2);
}

/* 联系链接样式 */
#sidebar-menu .sidebar-panel a[href^="tel"],
#sidebar-menu .sidebar-panel a[href^="mailto"] {
    color: #34b6d9;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#sidebar-menu .sidebar-panel a[href^="tel"]:hover,
#sidebar-menu .sidebar-panel a[href^="mailto"]:hover {
    color: #5fcce8;
    transform: translateX(4px);
}

/* ========================================
   产品幻灯片
   ======================================== */
.product-slide {
    transition: opacity 0.4s ease-in-out;
    opacity: 0;
    display: none;
    /* 触摸优化 */
    touch-action: pan-y pinch-zoom;
    -webkit-user-select: none;
    user-select: none;
}

.product-slide.is-active {
    opacity: 1;
    display: block;
}

@media (min-width: 768px) {
    .product-slide {
        display: auto;
        position: absolute;
    }

    .product-slide.is-active {
        display: auto;
    }
}

.product-slide .slide-image,
.product-slide .slide-content {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 300ms cubic-bezier(0.16, 1, 0.3, 1),
                transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.product-slide.is-active .slide-image {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 50ms;
}

.product-slide.is-active .slide-content {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 100ms;
}

/* 幻灯片容器触摸优化 */
.product-slide img {
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
}

/* 添加视觉反馈 - 移动端点击时减少高亮 */
.product-slide a {
    -webkit-tap-highlight-color: transparent;
}

.slide-indicator {
    cursor: pointer;
    transition: all 0.3s ease;
    /* 触摸优化 */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    /* 增大触摸区域 - 使用伪元素而不是padding/margin */
    position: relative;
}

.slide-indicator::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
}

.slide-indicator:hover {
    opacity: 0.8;
}

@media (hover: hover) {
    .slide-indicator:hover {
        transform: scale(1.2);
    }
}

/* ========================================
   滚动到顶部按钮
   ======================================== */
#scroll-to-top {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

#scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

#scroll-to-top:active {
    transform: scale(0.95);
}

/* ========================================
   视频容器
   ======================================== */
video {
    object-fit: cover;
}

/* ========================================
   响应式容器
   ======================================== */
.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container {
        max-width: 640px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
}

@media (min-width: 1536px) {
    .container {
        max-width: 1536px;
    }
}

/* ========================================
   工具类
   ======================================== */
.aspect-video {
    aspect-ratio: 16 / 9;
}

.object-cover {
    object-fit: cover;
}

.object-contain {
    object-fit: contain;
}

/* ========================================
   过渡效果
   ======================================== */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

.transition-opacity {
    transition-property: opacity;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

.transition-transform {
    transition-property: transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

/* ========================================
   打印样式
   ======================================== */
@media print {
    .no-print {
        display: none !important;
    }
}

/* ========================================
   辅助功能
   ======================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ========================================
   加载动画
   ======================================== */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* ========================================
   渐变背景
   ======================================== */
.gradient-blue {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-cyan {
    background: linear-gradient(135deg, #00BCD4 0%, #2196F3 100%);
}

/* ========================================
   新闻页面分页导航
   ======================================== */
.page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.page-numbers.current {
    background-color: #00205B;
    color: #ffffff;
    border: 2px solid #ffffff;
}

.page-numbers:not(.current):not(.dots) {
    background-color: #ffffff;
    color: #00205B;
    border: 1px solid #e5e7eb;
}

.page-numbers:not(.current):not(.dots):hover {
    background-color: #f3f4f6;
}

.page-numbers.dots {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
}

.page-numbers.prev,
.page-numbers.next {
    font-size: 1.25rem;
}

/* ========================================
   新闻列表项样式
   ======================================== */
.news-list-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1.25rem 0;
    transition: background-color 0.2s ease;
}

.news-list-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* 新闻标签样式 */
.news-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    border-radius: 2px;
    min-width: 90px;
}

.news-tag-info {
    background-color: #D8D8D9;
    color: #333333;
}

.news-tag-recruit {
    background-color: #C5D86D;
    color: #333333;
}

.news-tag-event {
    background-color: #7EB6D9;
    color: #333333;
}

.news-tag-media {
    background-color: #E8A87C;
    color: #333333;
}

/* ========================================
   面包屑导航
   ======================================== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.breadcrumb-item {
    color: #6b7280;
    transition: color 0.2s ease;
}

.breadcrumb-item:hover {
    color: #00205B;
}

.breadcrumb-separator {
    color: #9ca3af;
}

.breadcrumb-current {
    color: #374151;
}

/* ========================================
   Logo 样式
   ======================================== */
.custom-logo-link img,
.custom-logo {
    height: 56px !important;
    width: auto !important;
    max-height: none !important;
}

@media (min-width: 768px) {
    .custom-logo-link img,
    .custom-logo {
        height: 96px !important;
    }
}

/* ========================================
   導入事例 (Case Study) 页面样式
   ======================================== */

/* 案例卡片样式 */
.case-study-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid #f1f5f9;
}

.case-study-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.case-study-card .card-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.case-study-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.case-study-card:hover .card-image img {
    transform: scale(1.1);
}

/* 案例标签样式 */
.case-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    white-space: nowrap;
}

.case-tag-product {
    background-color: rgba(6, 182, 212, 0.9);
    color: white;
}

.case-tag-industry {
    background-color: #f1f5f9;
    color: #475569;
}

/* 案例详情页区块样式 */
.case-section {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
    .case-section {
        padding: 2rem;
    }
}

.case-section-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.case-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
}

/* 客户评价引用框 */
.case-quote {
    position: relative;
    background: linear-gradient(135deg, #00205B 0%, #0E2F8E 100%);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    color: white;
}

.case-quote::before {
    content: '"';
    position: absolute;
    top: 0.5rem;
    left: 1rem;
    font-size: 5rem;
    font-family: Georgia, serif;
    color: rgba(255, 255, 255, 0.1);
    line-height: 1;
}

.case-quote blockquote {
    position: relative;
    z-index: 1;
    font-style: italic;
    font-size: 1.125rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
}

/* 规格表样式 */
.case-specs {
    font-size: 0.875rem;
    line-height: 1.8;
    color: #475569;
    white-space: pre-line;
}

/* 案例筛选器样式 */
.case-filter-select {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.case-filter-select:focus {
    outline: none;
    border-color: #06b6d4;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

/* 案例画廊缩略图 */
.case-thumb {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.case-thumb:hover,
.case-thumb.active {
    border-color: #06b6d4;
}

.case-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 案例 Lightbox */
.case-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.case-lightbox.active {
    display: flex;
}

.case-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
}

.case-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}.case-lightbox-close:hover {
    color: #06b6d4;
}

/* 行数限制工具类 */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.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;
}

/* 案例相关产品卡片 */
.related-case-card {
    background: #f8fafc;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.related-case-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.related-case-card img {
    transition: transform 0.5s ease;
}

.related-case-card:hover img {
    transform: scale(1.05);
}

/* CTA 区块渐变背景 */
.case-cta-gradient {
    background: linear-gradient(135deg, #00205B 0%, #0E2F8E 100%);
    position: relative;
    overflow: hidden;
}.case-cta-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    right: 25%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.2) 0%, transparent 70%);
    filter: blur(60px);
}
