/* ========================================
   上海田道商网络科技有限公司 - 移动端适配样式
   设计尺寸：宽度9高16（移动端竖屏）
   字体规范：正文不小于28rpx(14pt)，标题不小于40rpx
   ======================================== */

/* 移动端基础设置 */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 120px;
    }

    :root {
        --mobile-padding: 20px;
        --mobile-gap: 24px;
        --mobile-radius: 16px;
    }

    .container {
        padding: 0 var(--mobile-padding);
    }

    /* ========================================
       顶部导航栏 - 移动端
       ======================================== */
    .header-top-bar {
        height: 30px;
    }

    .header-top-content {
        gap: 15px;
        font-size: 11px;
    }

    .header-top-content .welcome-text {
        display: none;
    }

    .header-main {
        padding: 12px 0;
        background: var(--bg-light);
    }

    .header-content {
        flex-direction: column;
        gap: 10px;
    }

    .logo-img {
        width: 60px;
        height: 60px;
    }

    .logo-s {
        font-size: 14px;
        bottom: 4px;
        right: 6px;
    }

    .logo-text h1 {
        font-size: 17px;
    }

    .logo-text p {
        font-size: 11px;
        display: none;
    }

    .header-contact-vertical {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px 12px;
        text-align: center;
    }

    .contact-row {
        font-size: 11px;
        gap: 3px;
    }

    .contact-highlight {
        margin-top: 0;
        padding: 3px 8px;
        font-size: 10px;
    }

    .header-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        background: var(--white);
        border-bottom: 3px solid var(--primary-color);
    }

    .nav-menu {
        display: flex;
        flex-wrap: nowrap;
        min-width: max-content;
    }

    .nav-menu > li {
        flex: 0 0 auto;
        position: relative;
    }

    .nav-menu > li > a {
        padding: 14px 14px;
        font-size: 13px;
        white-space: nowrap;
        color: var(--text-gray);
    }

    .nav-menu > li > a:hover,
    .nav-menu > li > a.active {
        color: #FFFFFF;
        background: #4169E1;
    }

    /* 移动端隐藏下拉箭头 */
    .has-submenu > a::after {
        display: none;
    }

    /* 移动端子菜单样式调整 */
    .submenu {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 140px;
        background: var(--white);
        border: 1px solid #eee;
        border-top: 2px solid var(--primary-color);
        border-radius: 0 0 6px 6px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.12);
        list-style: none;
        padding: 5px 0;
        margin: 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-5px);
        transition: all 0.25s ease;
        z-index: 1000;
    }

    .has-submenu:hover .submenu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .submenu li a {
        display: block;
        padding: 8px 15px;
        font-size: 12px;
        color: var(--text-gray);
        text-decoration: none;
        white-space: nowrap;
        border-bottom: 1px dashed #eee;
    }

    .submenu li:last-child a {
        border-bottom: none;
    }

    .submenu li a:hover {
        color: #FFFFFF;
        background: #4169E1;
    }

    .hero-section {
        margin-top: 175px;
    }

    /* 通用标题 - 不小于40rpx (20px) */
    .section-title {
        font-size: 24px;
        margin-bottom: 35px;
    }

    .section-title::after {
        width: 50px;
        height: 3px;
        margin-top: 12px;
    }

    /* 按钮 - 高度不小于80rpx (40px) */
    .btn {
        padding: 12px 28px;
        font-size: 16px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .btn-large {
        padding: 16px 36px;
        font-size: 17px;
        min-height: 52px;
        width: 100%;
        max-width: 320px;
    }

    .btn-small {
        padding: 10px 20px;
        font-size: 14px;
        min-height: 40px;
    }

    /* ========================================
       模块1：首屏Banner - 移动端
       ======================================== */
    .hero-section {
        height: auto;
        min-height: 500px;
        padding: 50px 0 40px;
        background: linear-gradient(135deg, #0d1f3c 0%, var(--primary-color) 40%, var(--primary-light) 100%);
    }

    .hero-section .container {
        padding-top: 30px;
        padding-bottom: 30px;
    }

    .hero-content {
        text-align: center;
    }

    .hero-title {
        font-size: 26px;
        line-height: 1.4;
        margin-bottom: 15px;
    }

    .hero-title .sub-title {
        font-size: 20px;
    }

    .hero-subtitle {
        font-size: 15px;
        margin-bottom: 30px;
        line-height: 1.7;
    }

    .hero-tags {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 30px;
        justify-content: center;
        align-items: center;
    }

    .tag-item {
        padding: 14px 20px;
        justify-content: center;
    }

    .tag-number {
        font-size: 22px;
    }

    .tag-text {
        font-size: 15px;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 15px;
        justify-content: center;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }

    .hero-notice {
        margin-top: 20px;
        font-size: 14px;
    }

    /* ========================================
       模块2：品牌承诺与定位 - 移动端
       ======================================== */
    .promise-section {
        padding: 60px 0;
    }

    .promise-cards {
        grid-template-columns: 1fr;
        gap: var(--mobile-gap);
    }

    .promise-card {
        padding: 30px 25px;
        border-radius: var(--mobile-radius);
    }

    .promise-icon {
        font-size: 42px;
        margin-bottom: 15px;
    }

    .promise-card h3 {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .promise-card p {
        font-size: 15px;
    }

    .promise-text {
        color: var(--text-gray);
        line-height: 1.7;
    }

    .golden-line {
        color: var(--text-gray);
        line-height: 1.7;
        margin: 0;
    }

    /* ========================================
       模块3：创始人故事 - 移动端
       ======================================== */
    .about-section {
        padding: 60px 0;
    }

    .about-section::before {
        display: none;
    }

    .about-content {
        flex-direction: column;
        gap: 30px;
    }

    .about-left {
        padding-right: 0;
    }

    .about-title {
        font-size: 32px;
        margin-bottom: 25px;
    }

    .about-image {
        margin-bottom: 20px;
    }

    .about-desc {
        font-size: 13px;
        line-height: 1.7;
    }

    .about-bottom-btn {
        padding-top: 30px;
    }

    .about-bottom-btn .about-btn {
        padding: 12px 35px;
        font-size: 14px;
    }

    .about-right {
        padding-left: 0;
        background: var(--white);
        padding: 30px 20px;
        border-radius: var(--mobile-radius);
    }

    .founder-subtitle {
        font-size: 16px;
        margin-bottom: 18px;
        padding: 14px 20px;
    }

    .scope-item {
        padding: 8px 0;
        gap: 6px;
        font-size: 13px;
    }

    .brand-keywords-bar {
        padding: 14px 20px;
        gap: 8px;
        margin-top: 20px;
    }

    .keyword-bar-item {
        font-size: 16px;
    }

    .keyword-bar-dot {
        font-size: 18px;
    }

    .brand-info-list {
        margin-top: 20px;
        padding: 15px;
    }

    .brand-info-item {
        padding: 10px 0;
        gap: 8px;
        font-size: 13px;
    }

    .brand-label {
        min-width: 65px;
    }

    /* ========================================
       模块10：新闻资讯 - 移动端
       ======================================== */
    .news-section {
        padding: 60px 0;
    }

    .news-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .news-column-title {
        font-size: 20px;
        margin-bottom: 20px;
        padding-bottom: 10px;
    }

    .news-featured {
        margin-bottom: 20px;
    }

    .news-featured-image {
        height: 180px;
    }

    .news-featured-content {
        padding: 15px;
    }

    .news-featured-content h4 {
        font-size: 16px;
    }

    .news-featured-content p {
        font-size: 13px;
    }

    .news-list a {
        padding: 12px 0;
        font-size: 14px;
    }

    .news-list-date {
        min-width: 70px;
        font-size: 11px;
    }

    /* ========================================
       模块4：痛点与解决方案 - 移动端
       ======================================== */
    .painpoint-section {
        padding: 60px 0;
    }

    .painpoint-grid {
        grid-template-columns: 1fr;
        gap: var(--mobile-gap);
        margin-bottom: 40px;
    }

    .painpoint-item {
        flex-direction: column;
        padding: 25px 20px;
        gap: 15px;
        text-align: center;
    }

    .painpoint-arrow {
        transform: rotate(90deg);
        font-size: 28px;
    }

    .painpoint-content {
        flex-direction: column;
        gap: 12px;
    }

    .pain {
        font-size: 19px;
        min-width: auto;
    }

    .solution {
        font-size: 15px;
        padding-left: 0;
        padding-top: 12px;
        border-left: none;
        border-top: 2px solid #4169E1;
    }

    .cta-middle {
        margin-top: 40px;
    }

    .cta-middle .btn {
        width: 100%;
        max-width: 320px;
    }

    /* ========================================
       模块5：十大服务模块 - 移动端
       ======================================== */
    .services-section {
        padding: 60px 0;
    }

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

    .service-card {
        padding: 25px 15px;
        border-radius: 14px;
        background: var(--white);
        border: 1px solid #e8ecf4;
    }

    .service-card:hover {
        border-color: #4169E1;
    }

    .service-card.charity {
        background: linear-gradient(135deg, #f8faff, #f0f4ff);
        border-color: #4169E1;
    }

    .service-icon {
        font-size: 32px;
        margin-bottom: 12px;
    }

    .service-card h4 {
        font-size: 17px;
        margin-bottom: 10px;
        color: #1a1a1a;
    }

    .service-card p {
        font-size: 12px;
        color: #5a5a5a;
        line-height: 1.6;
    }

    /* ========================================
       模块6：品牌优势 - 移动端
       ======================================== */
    .advantages-section {
        padding: 60px 0;
    }

    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin-bottom: 35px;
    }

    /* ========================================
       模块3：服务流程 - 移动端
       ======================================== */
    .process-section {
        padding: 60px 0;
    }

    .process-section .process-timeline {
        flex-direction: column;
        gap: 35px;
        margin-bottom: 30px;
    }

    .process-section .process-step {
        padding: 35px 25px;
        border-radius: var(--mobile-radius);
        min-width: auto;
        width: 100%;
        background: rgba(255,255,255,0.1);
    }

    .process-section .step-number {
        width: 45px;
        height: 45px;
        font-size: 18px;
        top: -18px;
    }

    .process-section .process-step h4 {
        font-size: 20px;
        margin: 12px 0 8px;
    }

    .process-section .process-step p {
        font-size: 15px;
    }

    .process-section .process-arrow {
        transform: rotate(90deg);
        font-size: 28px;
    }

    .process-section .process-summary p {
        font-size: 14px;
        padding: 12px 20px;
        border-radius: 14px;
        border: 1px solid #4169E1;
    }

    .charity-notice {
        flex-direction: row;
        gap: 8px;
        padding: 10px 18px;
        text-align: center;
        border-radius: 14px;
    }

    .charity-icon {
        font-size: 20px;
    }

    .charity-notice p {
        font-size: 13px;
    }

    /* ========================================
       模块8：真实案例展示 - 移动端
       ======================================== */
    .cases-section {
        padding: 60px 0;
    }

    .cases-grid {
        grid-template-columns: 1fr;
        gap: var(--mobile-gap);
        margin-bottom: 40px;
    }

    .case-card {
        border-radius: var(--mobile-radius);
    }

    .case-industry {
        padding: 12px 20px;
        font-size: 13px;
    }

    .case-content {
        padding: 25px 20px;
    }

    .case-content h4 {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .case-problem,
    .case-result {
        font-size: 15px;
        padding-left: 12px;
    }

    /* ========================================
       模块9：FAQ常见问题 - 移动端（手风琴折叠）
       ======================================== */
    .faq-section {
        padding: 60px 0;
    }

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

    .faq-item {
        border-radius: 14px;
    }

    .faq-question {
        padding: 15px 18px;
        font-size: 15px;
        border-bottom: 1px solid #e5e7eb;
    }

    .faq-toggle {
        display: none;
    }

    .faq-answer p {
        padding: 12px 18px 15px;
        font-size: 14px;
        line-height: 1.6;
    }

    /* ========================================
       模块10：页脚 - 移动端
       ======================================== */
    .site-footer {
        padding: 30px 0;
    }

    .footer-info {
        margin-bottom: 15px;
        padding-bottom: 15px;
    }

    .footer-info p {
        font-size: 12px;
        line-height: 1.6;
    }

    .footer-quote p {
        font-size: 13px;
        line-height: 1.7;
    }

    /* ========================================
       右侧悬浮客服栏 - 移动端
       ======================================== */
    .side-toolbar {
        right: 0;
        top: auto;
        bottom: 80px;
        transform: none;
        border-radius: 8px 0 0 8px;
    }

    .toolbar-item {
        padding: 10px 12px;
    }

    .toolbar-icon {
        width: 20px;
        height: 20px;
        margin-right: 0;
    }

    .toolbar-label {
        display: none;
    }

    .toolbar-popup {
        right: 100%;
        top: auto;
        bottom: 0;
        transform: translateX(20px);
        margin-right: 10px;
        min-width: 150px;
        padding: 12px;
    }

    .toolbar-item:hover > .toolbar-popup {
        transform: translateX(0);
    }

    .popup-qr {
        width: 100px;
        height: 100px;
    }

    .popup-phone {
        font-size: 16px;
    }

    /* 微信二维码大弹窗 - 移动端 */
    .wechat-popup {
        padding: 8px;
    }

    .popup-qr-large {
        width: 140px;
        height: 140px;
    }

    /* 电话滑出效果 - 移动端 */
    .toolbar-slide {
        padding: 10px 15px;
        margin-right: 8px;
        transform: translateY(-50%) translateX(20px);
    }

    .toolbar-item:hover > .toolbar-slide {
        transform: translateY(-50%) translateX(0);
    }

    .toolbar-slide::after {
        right: -6px;
        border-width: 6px 0 6px 6px;
    }

    .slide-phone {
        font-size: 16px;
    }

    /* 弹窗箭头 - 移动端 */
    .toolbar-popup::after {
        right: -6px;
        border-width: 6px 0 6px 6px;
    }

    /* 返回顶部按钮 - 移动端 */
    .back-to-top {
        right: 15px;
        bottom: 15px;
        width: 45px;
        height: 45px;
    }

}

/* ========================================
   超小屏幕适配（iPhone SE等）
   ======================================== */
@media (max-width: 375px) {
    .section-title {
        font-size: 22px;
    }

    .hero-title {
        font-size: 24px;
    }

    .hero-title .sub-title {
        font-size: 20px;
    }

    .tag-number {
        font-size: 20px;
    }

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

/* ========================================
   平板适配（iPad等）
   ======================================== */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }

    .hero-title {
        font-size: 36px;
    }

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

    .promise-card:last-child {
        grid-column: 1 / -1;
    }

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

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

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

    .cases-grid .case-card:last-child {
        grid-column: 1 / -1;
        max-width: 50%;
        margin: 0 auto;
    }
}

/* ========================================
   横屏模式优化
   ======================================== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: 40px 0;
    }

    .hero-section .container {
        flex-direction: row;
        padding-top: 30px;
        padding-bottom: 30px;
    }

    .hero-content {
        text-align: left;
    }

    .hero-tags {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .hero-image {
        display: block;
        flex: 0 0 200px;
    }

    .founder-image-placeholder {
        width: 180px;
        height: 220px;
    }

    .founder-avatar {
        width: 80px;
        height: 80px;
        font-size: 20px;
        margin-bottom: 15px;
    }

    .work-scene {
        font-size: 24px;
    }
}

/* ========================================
   安全区域适配（iPhone X+刘海屏）
   ======================================== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .floating-bar {
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }
}

/* ========================================
   深色模式支持
   ======================================== */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-light: #1a1a2e;
        --text-dark: #e0e0e0;
        --text-gray: #a0a0a0;
        --white: #16213e;
    }

    body {
        background-color: #0f0f23;
        color: #e0e0e0;
    }

    .promise-card,
    .service-card,
    .painpoint-item,
    .case-card,
    .faq-item {
        background: #1a1a2e;
        color: #e0e0e0;
    }

    .service-card {
        background: #252542;
    }

    .faq-question {
        color: #e0e0e0;
    }

    .faq-question:hover {
        background: #252542;
    }

    .about-right {
        background: #1a1a2e;
    }

    .brand-keywords-bar {
        background: linear-gradient(135deg, #4169E1 0%, #5A7FE8 100%);
    }

    .founder-subtitle {
        color: #e0e0e0;
        background: linear-gradient(135deg, #4169E1 0%, #5A7FE8 100%);
    }

    .scope-label {
        color: #5A7FE8;
    }

    .brand-info-list {
        background: #252542;
    }

    .brand-info-item {
        border-bottom-color: #33334d;
    }

    .brand-label {
        color: #5A7FE8;
    }

    .brand-content {
        color: #e0e0e0;
    }

    .news-featured {
        background: #1a1a2e;
    }

    .news-featured-content h4 {
        color: #e0e0e0;
    }

    .news-list a {
        color: #e0e0e0;
    }

    .news-column-title {
        color: #e0e0e0;
    }

    .site-footer {
        background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 100%);
    }

    .footer-info p,
    .footer-quote p {
        color: rgba(255,255,255,0.8);
    }

    /* 右侧悬浮客服栏 - 深色模式 */
    .side-toolbar {
        background: #1a1a2e;
        box-shadow: -2px 0 10px rgba(0,0,0,0.3);
    }

    .toolbar-item {
        border-bottom-color: #33334d;
    }

    .toolbar-item:hover {
        background: #252542;
    }

    .toolbar-popup {
        background: #1a1a2e;
        box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    }

    .popup-title {
        color: #e0e0e0;
    }

    .popup-qr {
        background: #252542;
    }

    .popup-qr-large {
        background: #252542;
    }

    .popup-desc {
        color: #a0a0a0;
    }

    /* 弹窗箭头 - 深色模式 */
    .toolbar-popup::after {
        border-color: transparent transparent transparent #1a1a2e;
    }
}
