/* Mobile Responsive Styles */

/* Navigation Mobile */
@media (max-width: 768px) {
  .stat-item {
    text-align: center !important;
  }
  .navbar {
    position: fixed !important;
    top: 10px !important;
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    max-width: none !important;
    transform: none !important;
    padding: 8px !important;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }

  .navbar .container {
    padding: 8px 16px;
    position: relative;
    width: 100%;
  }

  .navbar-box {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .nav-brand h2 {
    font-size: 1.4rem;
    margin-right: 1rem;
  }

  .nav-brand img {
    width: 120px;
  }

  /* 汉堡菜单样式优化 */
  .nav-toggle {
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    cursor: pointer;
    z-index: 1001;
    padding: 2px;
    gap: 3px;
  }

  .nav-toggle span {
    width: 100%;
    height: 3px;
    background: var(--primary-red);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
    display: block;
  }

  /* 移动端菜单容器 */
  .nav-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px !important;
    border: 1px solid rgba(255, 107, 53, 0.1) !important;
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.1);
    padding: 20px !important;
    display: none;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
  }

  .nav-menu.active {
    display: flex !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
  }

  /* 移动端菜单项样式 */
  .nav-link {
    padding: 14px 20px !important;
    text-align: center;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: 500;
    margin: 2px 0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
  }

  /* CTA按钮特殊样式 */
  .nav-link.cta-button {
    background: var(--gradient-primary);
    color: rgb(255, 255, 255);
    margin: 10px 0 5px 0;
    order: -1;
    font-weight: 600;
  }

  /* 隐藏桌面端额外功能 */
  .nav-extras {
    display: none;
  }

  /* 菜单遮罩层 */
  .nav-menu.active::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
  }
  .nav-link.active {
    color: var(--primary-red);
    background: none;
    font-weight: 600;
  }
}

/* 菜单遮罩动画 */
@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* 小屏幕优化 */
@media (max-width: 480px) {
  .navbar {
    margin: 5px;
    top: 5px;
    left: 5px;
    right: 5px;
    border-radius: 10px;
  }

  .nav-brand img {
    width: 100px;
  }

  .nav-brand h2 {
    font-size: 1.2rem;
  }

  .nav-menu {
    padding: 16px;
    border-radius: 15px;
  }

  .nav-link {
    padding: 12px 16px;
    font-size: 0.95rem;
  }

  .nav-toggle {
    width: 24px;
    height: 18px;
  }
}

/* 导航栏滚动状态优化 */
@media (max-width: 768px) {
  .navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.15);
  }

  /* 增加菜单项动画延迟 */
  .nav-menu.active .nav-link {
    animation: slideInLeft 0.3s ease forwards;
    opacity: 0;
    transform: translateX(-20px);
  }

  .nav-menu.active .nav-link:nth-child(1) {
    animation-delay: 0.1s;
  }
  .nav-menu.active .nav-link:nth-child(2) {
    animation-delay: 0.15s;
  }
  .nav-menu.active .nav-link:nth-child(3) {
    animation-delay: 0.2s;
  }
  .nav-menu.active .nav-link:nth-child(4) {
    animation-delay: 0.25s;
  }
  .nav-menu.active .nav-link:nth-child(5) {
    animation-delay: 0.3s;
  }
  .nav-menu.active .nav-link:nth-child(6) {
    animation-delay: 0.35s;
  }
  .nav-menu.active .nav-link:nth-child(7) {
    animation-delay: 0.4s;
  }
  .nav-menu.active .nav-link:nth-child(8) {
    animation-delay: 0.45s;
  }
}

@keyframes slideInLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Hero Mobile */
@media (max-width: 768px) {
  .hero .container {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-stats {
    gap: 1rem;
  }
  .stat-number {
    font-size: 1rem;
  }

  .visual-sphere {
    width: 300px;
    height: 300px;
  }
}

/* About Mobile */
@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .zhengnan {
    display: none;
  }

  .founder-profile {
    padding: 2rem;
  }

  .mission-title {
    font-size: 1.5rem;
  }

  .mission-content {
    font-size: 1rem;
  }

  .value-item {
    flex-direction: column;
    text-align: center;
    gap: 0.8rem;
    padding: 1.2rem;
  }

  .value-content h4 {
    justify-content: center;
  }

  .founder-highlights {
    text-align: left;
  }

  .highlight-item {
    flex-direction: column;
    text-align: center;
    gap: 0.8rem;
    padding: 1rem;
  }

  .highlight-content {
    text-align: center;
  }

  .experience-timeline {
    padding-left: 1.5rem;
  }
}

/* Target Clients Mobile */
@media (max-width: 768px) {
  .client-profile {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .profile-icon {
    margin: 0 auto;
  }

  .detail-item {
    flex-direction: column;
    text-align: center;
    gap: 0.25rem;
  }

  .detail-label {
    min-width: auto;
    font-weight: 700;
  }
}

/* Services Mobile */
@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  .pricing-card.featured {
    transform: none;
  }
}

/* Guide Mobile */
@media (max-width: 768px) {
  .risk-grid {
    grid-template-columns: 1fr;
  }

  .compliance-grid {
    grid-template-columns: 1fr;
  }
}

/* Team Mobile */
@media (max-width: 768px) {
  .team-grid {
    grid-template-columns: 1fr;
  }

  .experience-item {
    justify-content: center;
  }
}

/* Advantages Mobile */
@media (max-width: 768px) {
  .advantages-grid {
    grid-template-columns: 1fr;
  }

  .comparison-header,
  .comparison-row {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .comparison-item {
    border-right: none;
    border-bottom: 1px solid rgba(255, 107, 53, 0.1);
    text-align: left;
  }

  .comparison-item:last-child {
    border-bottom: none;
  }

  .advantage-stats {
    flex-direction: column;
    gap: 1rem;
  }
}

  .zhengnan {
    display: block;
    max-width: 120px;
    left: 10px;
  }

/* Contact Mobile */
@media (max-width: 768px) {
  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact-info h2 {
    font-size: 2rem !important;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .qr-code-section {
    text-align: center;
  }
}

/* General Mobile Adjustments */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }
  .expert-intro h2 {
    font-size: 1.5rem;
  }

  section {
    padding: 60px 0;
  }

  .section-title {
    font-size: 1.8rem !important;
  }

  .section-subtitle {
    font-size: 1rem !important;
  }

  .btn {
    padding: 14px 28px;
    font-size: 0.9rem;
  }
  .zhengnan {
    display: none;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
    line-height: 1.2;
  }

  .hero-actions {
    flex-direction: column;
    gap: 1rem;
  }

  .btn {
    max-width: 280px;
    margin: 0 auto;
  }
  .hero-btn-desc {
    font-size: 0.9rem !important;
    margin: 0 auto !important;
  }

  .contact-form {
    padding: 1rem !important;
  }
  .expert-profile {
    padding: 1.2rem !important;
  }

  .zhengnan {
    display: none;
  }
}

/* 请统一添加ipad 平板端的样式 */
/* iPad / Tablet styles: target widths between 769px and 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
  /* container padding slightly larger than mobile */
  .container {
    padding: 0 28px;
    max-width: 980px;
    margin: 0 auto;
  }

  /* Navbar adjustments for tablet */
  .navbar {
    width: 100%;
  }

  .nav-brand img {
    width: 100px;
  }

  .hero {
    min-height: 55vh;
  }

  /* Hero layout: two columns on tablet */
  .hero .container {
    grid-template-columns: 1fr 420px !important;
    align-items: center;
    gap: 0 !important;
    text-align: left;
  }

  .hero-title {
    font-size: 2.8rem;
    line-height: 1.08;
  }

  .hero-subtitle {
    font-size: 1.05rem;
  }

  .visual-sphere {
    width: 360px;
    height: 360px;
    margin: 0 auto;
  }

  .hero-actions {
    justify-content: flex-start;
    gap: 1rem;
  }

  /* About / grids: prefer two columns */
  .about-grid,
  .services-grid,
  .team-grid,
  .advantages-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .founder-profile,
  .feature-card,
  .service-card,
  .team-member,
  .advantage-card {
    padding: 1.6rem;
  }

  /* Contact form and other form rows */
  .contact-wrapper {
    grid-template-columns: 1fr 420px;
    gap: 2rem;
  }

  .contact-info h2 {
    font-size: 2.2rem !important;
  }

  .btn {
    padding: 12px 26px;
    font-size: 0.95rem;
  }

  /* Adjust stat numbers and hero stats */
  .stat-number {
    font-size: 1.2rem !important;
  }

  /* Slightly increase spacing for readability on tablets */
  section {
    padding: 90px 0;
  }

  .section-title {
    font-size: 2.2rem !important;
  }

  /* Keep zhengnan image visible on tablets */
  .zhengnan {
    display: block;
    max-width: 100px;
    left: 0px;
  }

  /* Ensure pricing grid looks good on tablet */
  .pricing-grid {
    grid-template-columns: 1fr 1fr;
    max-width: 820px;
    margin: 0 auto;
  }

  /* Slight tweaks for readability */
  .mission-content,
  .founder-highlights,
  .highlight-content {
    font-size: 1rem;
  }

  /* .service-card.featured 占据两个 */
  .service-card.featured {
    grid-column: span 2;
  }

  /* risk-grid 最后一个risk-card 占据两个 */
  .risk-grid .risk-card:last-child {
    grid-column: span 2;
  }

  /* compliance-grid 的 最后一个compliance-item 占据三个 */
  .compliance-grid .compliance-item:last-child {
    grid-column: span 3;
  }

  /* advantages-grid 的 最后一个 advantage-card 占据两个 */
  .advantages-grid .advantage-card:last-child {
    grid-column: span 2;
  }
}
