@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* 基础移动端样式 - 确保在移动设备上始终应用 */
@media (max-width: 640px) {
    .container {
        max-width: 100% !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    
    /* 移除强制网格布局为1列的样式，以保持HTML中设置的固定列数 */
    
    .flex-col-mobile {
        flex-direction: column !important;
    }
    
    .hidden-mobile {
        display: none !important;
    }
    
    .block-mobile {
        display: block !important;
    }
}

/* 汉堡菜单样式优化 */
#mobile-menu-button {
    transition: all 0.3s ease;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    min-height: 50px;
    z-index: 9999;
    position: relative;
    cursor: pointer;
    background: transparent;
    border: none;
    outline: none;
    padding: 10px;
    margin: 0;
}

#mobile-menu-button:hover {
    background-color: rgba(10, 36, 99, 0.1);
    transform: scale(1.05);
}

#mobile-menu-button:active {
    transform: scale(0.95);
}



/* 确保在中等屏幕及以上显示桌面端导航 */
@media (min-width: 768px) {
    #desktop-nav {
        display: flex;
    }
}

/* 移动端菜单样式优化 */
#mobile-menu {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-top: 2px solid #0A2463;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

#mobile-menu .container {
    padding: 16px;
}

.mobile-nav-link {
    transition: all 0.3s ease;
    border-radius: 8px;
    font-size: var(--font-lg);
    padding: 12px 16px !important;
    margin-bottom: 8px;
    display: block;
}

.mobile-nav-link:hover {
    background-color: rgba(10, 36, 99, 0.05);
    transform: translateX(5px);
    color: #0A2463 !important;
    font-weight: 500;
}

.mobile-nav-link:active {
    transform: translateX(3px);
}

/* 咨询热线按钮样式优化 */
#mobile-menu a[href^="tel:"] {
    font-size: var(--font-lg);
    font-weight: 600;
    padding: 14px !important;
    transition: all 0.3s ease;
    margin-bottom: 12px;
    border-radius: 8px;
    background: linear-gradient(135deg, #0A2463 0%, #1a3a8a 100%);
}

#mobile-menu a[href^="tel:"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(10, 36, 99, 0.3);
}
body { font-family: 'Inter', sans-serif; }
.hero-bg { background: linear-gradient(135deg, rgba(10, 36, 99, 0.9) 0%, rgba(10, 36, 99, 0.7) 100%), url('https://picsum.photos/1920/1080?random=1') center/cover no-repeat; }
.service-card:hover { transform: translateY(-10px); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }
.case-card:hover .case-overlay { opacity: 1; }
.animate-float { animation: float 6s ease-in-out infinite; position: relative; z-index: 10; }
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.tiansxy-logo-container {
    position: relative;
    z-index: 5;
}
.stat-number { font-size: 2.5rem; font-weight: 700; }
.tag { background: rgba(10, 36, 99, 0.1); color: #0A2463; }
.tag:hover { background: rgba(10, 36, 99, 0.2); }
.filter-btn.active { background-color: #0A2463; color: white; }
.filter-btn:hover:not(.active) { background-color: #f3f4f6; }
.testimonial-card { transition: all 0.3s ease; }
.testimonial-card:hover { transform: scale(1.05); }
.newsletter-form input:focus { outline: none; box-shadow: 0 0 0 2px #0A2463; }
/* 竖行文本 */
.vertical-text-container {
    display: flex;
    align-items: center;
    justify-content: center;
}
.vertical-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-weight: bold;
    text-align: center;
    letter-spacing: 0.3em;
    white-space: nowrap;
}
/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}
/* 响应式设计 */
@media (max-width: 640px) {
    .hero-bg {
        background-position: center;
    }
    .hero-bg h1 {
        font-size: clamp(1.8rem, 5vw + 1rem, 2.5rem);
    }
    .hero-bg p {
        font-size: clamp(0.9rem, 2vw + 0.7rem, 1.2rem);
    }
    #about {
        padding: 80px 12px;
    }
    #about .grid {
        gap: 30px;
    }
    #about h2 {
        font-size: clamp(1.5rem, 4vw + 0.8rem, 2rem);
    }
    #about h3 {
        font-size: clamp(1.2rem, 3vw + 0.6rem, 1.5rem);
    }
    #services .grid {
        grid-template-columns: 1fr;
    }
    .service-card {
        padding: 20px;
    }
    
    /* 移动端容器优化 */
    .container {
        max-width: 100%;
        padding-left: 12px;
        padding-right: 12px;
    }
    
    /* 移动端网格布局优化 - 移除强制1列布局 */
    
    /* 移动端flex布局优化 */
    .flex-col {
        flex-direction: column;
    }
    
    /* 移动端页签导航优化 */
    .business-tab {
        font-size: var(--font-base); /* 保持适中字体 */
        min-width: 80px;
        padding: 12px 8px;
    }
}
/* 流式响应字体大小 - 使用clamp实现平滑过渡 */
:root {
    --font-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --font-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
    --font-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
    --font-lg: clamp(1.125rem, 1rem + 0.65vw, 1.25rem);
    --font-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
    --font-2xl: clamp(1.5rem, 1.3rem + 1vw, 2rem);
    --font-3xl: clamp(1.875rem, 1.6rem + 1.4vw, 2.5rem);
    --font-4xl: clamp(2.25rem, 1.9rem + 1.75vw, 3rem);
    --font-5xl: clamp(3rem, 2.5rem + 2.5vw, 4rem);
    --font-6xl: clamp(3.75rem, 3rem + 3.75vw, 5rem);
}

/* 全局字体流式响应 */
html {
    font-size: clamp(12px, 0.8vw + 10px, 18px);
}

body {
    font-size: var(--font-base);
}

h1, .text-4xl, .text-5xl, .text-6xl { font-size: var(--font-4xl); }
h2, .text-3xl { font-size: var(--font-3xl); }
h3, .text-2xl { font-size: var(--font-2xl); }
h4, .text-xl { font-size: var(--font-xl); }
h5, .text-lg { font-size: var(--font-lg); }
h6, .text-base { font-size: var(--font-base); }
p, .text-sm { font-size: var(--font-base); }

/* 小屏幕字体调整 */
@media (max-width: 640px) {
    .text-4xl, .text-5xl, .text-6xl {
        font-size: clamp(1.8rem, 5vw + 1rem, 2.5rem);
    }
    .text-3xl {
        font-size: clamp(1.5rem, 4vw + 0.8rem, 2rem);
    }
    .text-2xl {
        font-size: clamp(1.2rem, 3vw + 0.6rem, 1.5rem);
    }
    .text-xl {
        font-size: clamp(1.1rem, 2.5vw + 0.7rem, 1.25rem);
    }
    .text-lg {
        font-size: clamp(1rem, 2vw + 0.8rem, 1.125rem);
    }
}

/* 移动端字体优化 */
@media (max-width: 480px) {
    html {
        font-size: clamp(11px, 0.8vw + 9px, 14px);
    }
    
    body {
        line-height: 1.5;
    }
    
    h1 { font-size: clamp(1.8rem, 5vw + 1rem, 2.5rem); }
    h2 { font-size: clamp(1.5rem, 4vw + 0.8rem, 2rem); }
    h3 { font-size: clamp(1.2rem, 3vw + 0.6rem, 1.5rem); }
    p { font-size: clamp(0.9rem, 2vw + 0.7rem, 1rem); }
}

/* 设备类型特定样式 - 已移除，使用Tailwind响应式类 */

/* 移动设备流式响应布局 - 统一响应式断点 */
@media (max-width: 640px) {
    body .container {
        max-width: 100% !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    
    body section {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    
    /* 移除强制网格布局为1列的样式，以保持HTML中设置的固定列数 */
    
    body .flex-col {
        flex-direction: column !important;
    }
    
    body .hero-bg h1 {
        font-size: clamp(1.8rem, 5vw + 1rem, 2.5rem) !important;
    }
    
    body .hero-bg p {
        font-size: clamp(0.9rem, 2vw + 0.7rem, 1rem) !important;
    }
    
    body .business-tab {
        font-size: var(--font-base); /* 保持适中字体 */
        min-width: 80px;
        padding: 12px 8px;
    }
    
    body #about {
        padding: 80px 12px !important;
    }
    
    body #about .grid {
        gap: 30px !important;
    }
}

/* 页签内容字体流式响应 */
.business-content {
    font-size: var(--font-lg);
}
.business-content h5 {
    font-size: var(--font-xl);
}
.business-content .text-sm {
    font-size: var(--font-base);
}

/* 页签导航字体流式响应 */
.business-tab {
    /* 移除固定字体大小，使用Tailwind类控制 */
}
.business-tab i {
    font-size: var(--font-lg);
}

/* 导航栏字体流式响应 */
.nav-link {
    font-size: clamp(1rem, 0.8rem + 0.5vw, 1.5rem);
}

/* Logo文本流式响应 */
.logo h1 {
    font-size: clamp(1.5rem, 1.2rem + 0.8vw, 2.5rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}



/* 确保桌面导航在需要时能够隐藏，并且在空间不足时不会换行 */
#desktop-nav {
    display: flex;
    flex-wrap: nowrap;
    white-space: nowrap;
    /* 移除overflow: hidden，确保offsetWidth能够正确计算实际宽度 */
}

/* 天商学院logo顶部样式 - 位于英雄区顶部 */
.tiansxy-logo-top {
    width: 100%;
    padding: 20px 0 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 100px;
}

.tiansxy-logo-img-top {
    height: 90px;
    width: auto;
    max-width: 360px;
    object-fit: contain;
}

.tiansxy-tagline {
    font-size: var(--font-lg);
    color: white;
    text-align: right;
    letter-spacing: 0.3em;
    margin-top: -15px;
    font-weight: 500;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logo-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
}

/* 小屏幕适配 */
@media (max-width: 640px) {
    .tiansxy-logo-img-top {
        height: 60px;
        max-width: 200px;
    }
    
    .tiansxy-logo-top {
        padding: 15px 0 8px;
        margin-top: 70px;
    }
    
    .tiansxy-tagline {
        font-size: var(--font-base);
        margin-top: -8px;
    }
    
    .logo-content {
        max-width: 200px;
    }
}

/* 中等屏幕适配 */
@media (min-width: 641px) and (max-width: 1023px) {
    .tiansxy-logo-img-top {
        height: 80px;
        max-width: 320px;
    }
    
    .tiansxy-logo-top {
        padding: 20px 0 10px;
        margin-top: 90px;
    }
    
    .logo-content {
        max-width: 320px;
    }
}

/* 大屏幕适配 */
@media (min-width: 1024px) {
    .tiansxy-logo-img-top {
        height: 110px;
        max-width: 450px;
    }
    
    .tiansxy-logo-top {
        padding: 30px 0 15px;
        margin-top: 100px;
    }
    
    .logo-content {
        max-width: 450px;
    }
}

/* 原有logo容器样式 - 保留以备后用 */
.tiansxy-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: -2rem;
    width: 50vw;
    max-width: 300px;
    height: 50vw;
    max-height: 300px;
    margin-left: auto;
    margin-right: auto;
}

.tiansxy-logo-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media (min-width: 768px) {
    .tiansxy-logo-container {
        width: 40vw;
        max-width: 450px;
        height: 40vw;
        max-height: 450px;
        margin-bottom: -4rem;
    }
}

@media (min-width: 1200px) {
    .tiansxy-logo-container {
        width: 30vw;
        max-width: 500px;
        height: 30vw;
        max-height: 500px;
        margin-bottom: -4.5rem;
    }
}

/* 英雄区字体流式响应 */
.hero-bg h1 {
    font-size: var(--font-5xl);
}
.hero-bg p {
    font-size: var(--font-xl);
}

/* 统计数字字体流式响应 */
.stat-number {
    font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
}

/* 按钮字体流式响应 */
.btn-text {
    font-size: var(--font-base);
}

@media (max-width: 480px) {
    .nav-container {
        padding: 8px 12px;
    }
    .logo h1 {
        font-size: clamp(1rem, 1rem + 0.5vw, 1.3rem);
    }
    .hero-bg h1 {
        font-size: clamp(1.8rem, 5vw + 1rem, 2.5rem);
    }
    .hero-bg p {
        font-size: clamp(0.9rem, 2vw + 0.7rem, 1rem);
    }
    
    /* 小屏幕下页签导航字体调整 */
    .business-tab {
        font-size: var(--font-base); /* 保持适中字体 */
        min-width: 80px;
        padding: 12px 8px;
    }
    .business-tab i {
        font-size: var(--font-base);
    }
    #about {
        padding: 80px 12px;
    }
    #about .grid {
        gap: 30px;
    }
    #about h2 {
        font-size: clamp(1.5rem, 4vw + 0.8rem, 2rem);
    }
    #about h3 {
        font-size: clamp(1.2rem, 3vw + 0.6rem, 1.5rem);
    }
    
    /* 移动端内容区块间距优化 */
    section {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    /* 移动端按钮大小优化 */
    .btn-text {
        font-size: clamp(0.9rem, 2vw + 0.7rem, 1rem);
        padding: 10px 16px;
    }
    
    /* 移动端卡片间距优化 */
    .service-card,
    .testimonial-card,
    .case-card {
        margin-bottom: 20px;
    }
}