/**
 * Tianyuan Mobile Responsive Styles
 * 移动端适配样式 - 不影响PC端样式
 * 使用媒体查询实现响应式布局
 */

/* ========================================
   全局移动端适配
   ======================================== */

/* 移动端基础样式重置 */
@media (max-width: 767px) {
    html {
        font-size: 14px;
    }

    body {
        font-size: 14px;
        -webkit-text-size-adjust: 100%;
    }

    .auto-container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 15px !important;
    }

    .container {
        padding: 0 15px;
    }

    .container1440 {
        padding: 0 15px;
    }

    /* 隐藏PC端特定元素 */
    .hidden-mobile {
        display: none !important;
    }

    /* 显示移动端特定元素 */
    .visible-mobile {
        display: block !important;
    }
}

/* ========================================
   头部导航移动端适配
   ======================================== */

@media (max-width: 767px) {
    .main-header {
        position: relative;
    }

    .header-upper {
        padding: 10px 0;
    }

    .header-upper .inner-container {
        flex-wrap: wrap;
        position: relative;
    }

    .logo-outer {
        float: none !important;
        width: auto;
        margin-bottom: 0;
    }

    .logo img {
        max-height: 40px;
    }

    .upper-right {
        float: none !important;
        width: 100%;
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        width: auto;
    }

    /* 导航菜单移动端样式 */
    .main-menu {
        width: 100%;
    }

    .navbar-header {
        display: block;
    }

    .navbar-toggle {
        display: block !important;
        background: transparent;
        border: 1px solid rgba(255, 255, 255, 0.5);
        border-radius: 4px;
        padding: 8px 12px;
        cursor: pointer;
        position: relative;
        z-index: 1001;
    }

    .navbar-toggle .icon-bar {
        display: block;
        width: 22px;
        height: 2px;
        background-color: #ffffff;
        margin: 4px 0;
        border-radius: 1px;
        transition: all 0.3s ease;
    }

    /* 汉堡菜单激活状态 - X形状 */
    .navbar-toggle.active .icon-bar:nth-child(1) {
        transform: rotate(45deg) translate(4px, 4px);
    }

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

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

    /* 导航菜单容器 */
    .navbar-collapse {
        display: none !important;
        width: 100%;
        background: rgba(0, 0, 0, 0.95);
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 1000;
        padding: 15px 0;
        max-height: 80vh;
        overflow-y: auto;
    }

    .navbar-collapse.in,
    .navbar-collapse.collapse.in,
    .navbar-collapse.show {
        display: block !important;
    }

    .nav-outer {
        width: 100%;
    }

    .navigation {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .navigation li {
        display: block;
        width: 100%;
        margin: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .navigation li a {
        display: block;
        padding: 15px 20px;
        font-size: 16px;
        color: #ffffff !important;
        text-align: left;
        border-bottom: none !important;
    }

    .navigation li a:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #0099ff !important;
    }

    /* 下拉菜单移动端样式 */
    .dropdown {
        position: relative;
    }

    .dropdown > a {
        position: relative;
        padding-right: 40px !important;
    }

    /* 下拉箭头指示器 */
    .dropdown > a::after {
        content: '+';
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 20px;
        font-weight: bold;
        color: #ffffff;
        transition: transform 0.3s ease;
    }

    .dropdown.open > a::after {
        content: '-';
    }

    .dropdown ul {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        background: rgba(255, 255, 255, 0.05) !important;
        box-shadow: none !important;
        padding-left: 0;
        display: none;
        width: 100%;
    }

    .dropdown.open ul {
        display: block !important;
    }

    .dropdown ul li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .dropdown ul li a {
        padding: 12px 20px 12px 35px;
        font-size: 14px;
        color: rgba(255, 255, 255, 0.8) !important;
        text-align: left;
    }

    .dropdown ul li a:hover {
        background: rgba(0, 153, 255, 0.3);
        color: #ffffff !important;
    }

    /* 防止下拉菜单hover自动展开 */
    .dropdown:hover ul {
        display: none;
    }

    .dropdown.open:hover ul {
        display: block;
    }
}

/* ========================================
   Banner区域移动端适配
   ======================================== */

@media (max-width: 767px) {
    .banner-header {
        min-height: 300px !important;
        height: auto !important;
    }

    .banner-header .banner-content {
        padding: 40px 15px;
    }

    .banner-header .title {
        font-size: 24px !important;
        line-height: 1.3;
    }

    .banner-header .desc {
        font-size: 14px !important;
        line-height: 1.6;
    }

    .swiper-container {
        height: auto !important;
        min-height: 300px;
    }

    .swiper-slide {
        height: auto !important;
        min-height: 300px;
    }

    .swiper-slide-content {
        padding: 20px 15px;
    }

    .swiper-slide-content h1 {
        font-size: 2rem !important;
    }

    .swiper-slide-content p {
        font-size: 1.2rem !important;
    }

    .tianyuan {
        width: 90% !important;
        left: 5% !important;
        top: 25% !important;
    }
}

/* ========================================
   Tab导航移动端适配
   ======================================== */

@media (max-width: 767px) {
    .top-tab-section {
        height: auto !important;
        min-height: 50px;
        position: relative !important;
    }

    .nav-tabs {
        flex-direction: row;
        flex-wrap: wrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        padding-bottom: 5px;
    }

    .tab-item {
        flex: 0 0 auto;
        min-width: 80px;
        font-size: 14px !important;
        padding: 10px 15px;
    }

    .tab-item a {
        font-size: 14px !important;
        padding: 8px 12px;
        white-space: nowrap;
    }

    .center-tab-nav {
        height: auto;
        min-height: 50px;
    }

    .center-nav-tabs {
        flex-wrap: wrap;
        justify-content: center;
    }

    .center-nav-tabs .tab-item {
        flex: 0 0 auto;
        min-width: 80px;
        font-size: 14px;
    }

    /* 吸顶导航 */
    .sticky-nav-tab {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1000;
        background: #ffffff;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .nav-tab-section {
        height: auto !important;
        min-height: 60px;
    }
}

/* ========================================
   内容区域移动端适配
   ======================================== */

@media (max-width: 767px) {
    .section-title {
        font-size: 1.8rem !important;
        margin-bottom: 15px;
    }

    .section-content {
        font-size: 1.2rem !important;
        line-height: 1.6;
    }

    .section-subtitle {
        font-size: 1.4rem !important;
    }

    /* 关于我们页面 */
    .about-haitian {
        padding: 30px 0;
    }

    .about-haitian h2 {
        font-size: 1.8rem;
    }

    .about-haitian p {
        font-size: 1rem;
    }

    /* 时间轴移动端适配 */
    .timeline-container {
        height: auto !important;
        min-height: 400px;
        padding: 20px 0;
    }

    .timeline-wrapper {
        height: 350px;
    }

    .timeline-date {
        font-size: 2rem !important;
        padding: 0 20px;
    }

    .timeline-events {
        padding: 0 20px;
    }

    .timeline-title {
        font-size: 14px !important;
    }

    .timeline-event div {
        font-size: 12px !important;
        line-height: 1.5;
    }

    .timeline-point {
        width: 10px;
        height: 10px;
        left: calc(50% - 15px) !important;
    }

    .timeline-connector {
        width: 60px !important;
    }

    /* 成员企业 */
    .company-title {
        font-size: 1.6rem !important;
        margin-bottom: 15px;
    }

    .company-content {
        font-size: 14px !important;
        line-height: 1.6;
    }

    .swiper-tabs {
        flex-wrap: wrap;
        gap: 5px;
    }

    .swiper-tab {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* ========================================
   新闻列表移动端适配
   ======================================== */

@media (max-width: 767px) {
    .news-section {
        padding: 30px 0;
    }

    .news-grid {
        flex-direction: column;
    }

    .news-left {
        width: 100%;
        margin-bottom: 20px;
    }

    .news-item {
        flex-direction: column;
        padding: 15px;
        margin-top: 15px;
    }

    .news-item-img {
        width: 100% !important;
        height: 180px;
        margin-right: 0;
        margin-bottom: 15px;
    }

    .news-item-text {
        margin-left: 0;
    }

    .news-item-title {
        font-size: 1.4rem;
    }

    .news-item-summary {
        font-size: 1.2rem;
        margin-top: 10px;
    }

    .news-top-time {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        font-size: 1.2rem;
    }

    .news-container {
        height: 200px;
    }

    .news-container-banner {
        font-size: 14px;
        height: 50px;
        line-height: 50px;
    }

    /* 头条新闻 */
    .top-container {
        height: auto !important;
        padding: 15px;
    }

    .top-news-item {
        flex-direction: column;
    }

    .top-news-img {
        width: 100%;
        height: 200px;
    }

    .top-news-content {
        padding: 15px 0;
    }

    .top-news-content h3 {
        font-size: 1.4rem;
    }

    .top-news-content p {
        font-size: 1.2rem;
    }

    .header-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .more-link {
        font-size: 1.2rem;
    }
}

/* ========================================
   产品展示移动端适配
   ======================================== */

@media (max-width: 767px) {
    .product-container {
        padding: 20px 0;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .product-item {
        height: 180px;
    }

    .product-item img {
        height: 140px;
    }

    .product-item .product-name {
        font-size: 1.2rem;
        padding: 8px;
    }

    .product-title {
        font-size: 1.6rem;
    }

    .product-description {
        font-size: 1.2rem;
    }

    /* 搜索框 */
    .search-container {
        margin: 15px 0;
    }

    .search-form {
        flex-direction: column;
        max-width: 100%;
    }

    .search-form input {
        width: 100%;
        border-radius: 4px;
        margin-bottom: 10px;
    }

    .search-form button {
        width: 100%;
        border-radius: 4px;
    }

    /* 子分类选择 */
    .tab_select .con {
        padding: 0 15px;
        height: 40px;
        line-height: 40px;
        font-size: 14px;
    }

    .child-area {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab_select {
        white-space: nowrap;
    }
}

/* ========================================
   联系我们移动端适配
   ======================================== */

@media (max-width: 767px) {
    .contact-section {
        padding: 20px 0;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .contact-grid2 {
        grid-template-columns: 1fr;
    }

    .contact-card {
        padding: 15px;
    }

    .contact-card h4 {
        font-size: 1.4rem;
    }

    .contact-card p {
        font-size: 1.2rem;
    }

    .card-contact-item {
        height: auto;
        min-height: 150px;
        padding: 20px;
    }

    .card-contact-item h3 {
        font-size: 18px;
    }

    .card-contact-item p {
        font-size: 14px;
    }

    .contact-item-content {
        padding: 20px;
    }

    /* 地图 */
    #container {
        min-height: 300px !important;
        height: 300px !important;
    }
}

/* ========================================
   Footer移动端适配
   ======================================== */

@media (max-width: 767px) {
    .main-footer {
        padding: 30px 15px;
    }

    .widgets-section .row {
        display: flex;
        flex-direction: column;
    }

    .big-column {
        width: 100% !important;
        margin-bottom: 20px;
        text-align: center;
    }

    .footer-widget h2 {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .footer-widget ul.list li {
        margin-bottom: 8px;
    }

    .footer-widget ul.list li a {
        font-size: 14px;
    }

    .footer-link-box {
        text-align: center;
        width: 100%;
        height: auto;
    }

    .footer-link-box img {
        width: 100px;
        height: auto;
    }

    .footer-bottom {
        margin-top: 20px;
        padding: 15px 0;
    }

    .copyright {
        font-size: 12px;
    }

    .copyright p {
        font-size: 12px;
        line-height: 1.6;
        margin-bottom: 5px;
    }

    /* 返回顶部按钮 */
    .back-to-top-btn {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
    }
}

/* ========================================
   表单移动端适配
   ======================================== */

@media (max-width: 767px) {
    .form-group {
        margin-bottom: 15px;
    }

    .form-control {
        font-size: 16px;
        padding: 12px 15px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .view-more-btn,
    .learn-more-btn {
        padding: 10px 20px;
        font-size: 14px;
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   分页移动端适配
   ======================================== */

@media (max-width: 767px) {
    .pagination {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }

    .pagination li {
        margin: 2px;
    }

    .pagination li a {
        padding: 8px 12px;
        font-size: 14px;
    }
}

/* ========================================
   荣誉资质移动端适配
   ======================================== */

@media (max-width: 767px) {
    .honors-section {
        padding: 30px 0;
    }

    .honors-swiper {
        margin-top: 20px;
    }

    .honors-item {
        padding: 10px;
    }

    .honors-img {
        width: 100% !important;
        height: auto !important;
        max-height: 250px;
    }

    .honors-caption {
        font-size: 14px;
    }
}

/* ========================================
   合作伙伴移动端适配
   ======================================== */

@media (max-width: 767px) {
    .hezuoItem {
        margin-bottom: 15px;
    }

    .hezuoItem img {
        width: 100%;
        height: auto;
    }
}

/* ========================================
   股票信息移动端适配
   ======================================== */

@media (max-width: 767px) {
    .stock-info-main {
        flex-direction: column;
        gap: 15px;
        padding: 20px 0 !important;
    }

    .company-info {
        font-size: 1.4rem;
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .stock-price .price {
        font-size: 28px !important;
    }

    .stock-price .change {
        font-size: 16px !important;
    }

    .market-cap {
        font-size: 16px;
    }

    .real-time-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* ========================================
   产业导航移动端适配
   ======================================== */

@media (max-width: 767px) {
    .industry-nav {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
        padding: 15px 0;
    }

    .nav-item {
        font-size: 1.2rem;
        padding: 8px 12px;
    }

    .nav-item img {
        width: 20px;
        height: 20px;
    }

    .nav-item span {
        font-size: 12px;
    }

    .product-list {
        justify-content: center;
    }

    .product-item-tag {
        font-size: 1.2rem;
        padding: 5px 12px;
        margin: 5px;
    }
}

/* ========================================
   数据统计移动端适配
   ======================================== */

@media (max-width: 767px) {
    .stats-grid {
        flex-wrap: wrap;
        gap: 15px;
    }

    .stat-item {
        flex: 1 1 calc(50% - 10px);
        min-width: 120px;
    }

    .stat-number {
        font-size: 1.4rem;
    }

    .stat-number span {
        font-size: 2.4rem;
    }

    .stat-label {
        font-size: 1.2rem;
    }

    .data-stats {
        flex-wrap: wrap;
        gap: 15px;
    }

    .data-item {
        flex: 1 1 calc(33.33% - 10px);
    }

    .data-value {
        font-size: 1.4rem;
    }

    .data-label {
        font-size: 1rem;
    }
}

/* ========================================
   时间线首页移动端适配
   ======================================== */

@media (max-width: 767px) {
    .timeline-item .year {
        font-size: 1.6rem !important;
    }

    .timeline-item .year span {
        font-size: 2.8rem !important;
    }

    .timeline-item .description {
        font-size: 1.2rem !important;
    }
}

/* ========================================
   小屏幕手机适配 (480px以下)
   ======================================== */

@media (max-width: 480px) {
    html {
        font-size: 12px;
    }

    .section-title {
        font-size: 1.6rem !important;
    }

    .section-content {
        font-size: 1rem !important;
    }

    .logo img {
        max-height: 30px;
    }

    .banner-header {
        min-height: 250px !important;
    }

    .banner-header .title {
        font-size: 20px !important;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .product-item {
        height: 200px;
    }

    .product-item img {
        height: 160px;
    }

    .stat-item {
        flex: 1 1 100%;
    }

    .nav-item span {
        display: none;
    }

    .nav-item img {
        width: 24px;
        height: 24px;
    }

    .footer-widget h2 {
        font-size: 14px;
    }

    .copyright {
        font-size: 11px;
    }
}

/* ========================================
   横屏手机适配
   ======================================== */

@media (max-width: 767px) and (orientation: landscape) {
    .banner-header {
        min-height: 200px !important;
    }

    .swiper-slide {
        min-height: 200px;
    }

    .top-news-img {
        height: 150px;
    }

    #container {
        min-height: 250px !important;
        height: 250px !important;
    }
}

/* ========================================
   平板适配 (768px - 1024px)
   ======================================== */

@media (min-width: 768px) and (max-width: 1024px) {
    .auto-container {
        max-width: 100%;
        padding: 0 20px;
    }

    .section-title {
        font-size: 2.4rem;
    }

    .section-content {
        font-size: 1.4rem;
    }

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .navigation li {
        margin: 0 8px;
    }

    .navigation li a {
        font-size: 14px;
    }
}

/* ========================================
   触摸设备优化
   ======================================== */

@media (hover: none) and (pointer: coarse) {
    /* 增大可点击区域 */
    .navigation li a {
        padding: 15px 20px;
    }

    .tab-item a {
        padding: 12px 15px;
    }

    .btn {
        min-height: 44px;
    }

    /* 移除hover效果 */
    .news-item:hover,
    .product-item:hover,
    .contact-card:hover {
        transform: none;
    }
}

/* ========================================
   高分辨率屏幕适配
   ======================================== */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* 确保图片在高分辨率屏幕上清晰 */
    img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* ========================================
   打印样式
   ======================================== */

@media print {
    .main-header,
    .main-footer,
    .back-to-top-btn,
    .swiper-button-prev,
    .swiper-button-next {
        display: none !important;
    }

    .banner-header {
        min-height: auto !important;
        background: #fff !important;
    }

    .section-title {
        color: #000 !important;
    }
}
