/* 
 * AI Inference & Production Page - Mobile Optimization CSS
 * 针对 ai-inference.html 页面的专属移动端适配
 */

@media screen and (max-width: 1024px) {

  /* ============================================
     Hero Section Override (Horizontal Flow)
     ============================================ */
  .wrapper > section:first-of-type {
    height: auto !important;
    padding: 80px 0 60px 0 !important;
  }

  .wrapper > section:first-of-type .row {
    display: flex;
    flex-direction: column;
  }

  /* Text Content */
  .wrapper > section:first-of-type .col-xs-12.col-sm-12.col-md-7.col-lg-7 {
    margin-bottom: 40px !important;
    text-align: center !important;
  }

  .wrapper > section:first-of-type h1 {
    font-size: 32px !important;
  }

  .wrapper > section:first-of-type div[style*="display: inline-flex"] {
    margin: 0 auto 20px auto !important;
  }

  /* Diagram Container - Change to Horizontal */
  .wrapper > section:first-of-type .col-xs-12.col-sm-12.col-md-5.col-lg-5 > div > div {
    flex-direction: row !important;
    gap: 10px !important;
    width: 100% !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
  }

  /* Diagram Boxes */
  .wrapper > section:first-of-type div[style*="backdrop-filter: blur"] {
    padding: 8px 5px !important;
    font-size: 11px !important;
    width: auto !important;
    flex: 1 1 0 !important; /* Force equal width */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 40px !important;
  }

  /* Hide icons in diagram boxes */
  .wrapper > section:first-of-type div[style*="backdrop-filter: blur"] i {
    display: none !important;
  }

  /* Rotate Arrows */
  .wrapper > section:first-of-type .la-arrow-down {
    transform: rotate(-90deg) !important;
    margin: 0 2px !important;
    font-size: 16px !important;
  }

  /* ============================================
     Four-Step Workflow (2 Rows x 2 Columns)
     ============================================ */
  .wrapper section:nth-of-type(2) {
    padding: 60px 0 !important;
  }

  .wrapper section:nth-of-type(2) .row {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-left: -10px !important;
    margin-right: -10px !important;
  }

  .wrapper section:nth-of-type(2) .col-xs-12 {
    width: 50% !important;
    flex: 0 0 50% !important;
    max-width: 50% !important;
    padding: 0 10px !important;
    margin-bottom: 20px !important;
  }

  /* Card Styling */
  .wrapper section:nth-of-type(2) div[style*="border: 2px solid"] {
    padding: 20px 10px !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important; /* Center align items */
    justify-content: flex-start !important;
  }

  /* Icon Container - HIDDEN */
  .wrapper section:nth-of-type(2) div[style*="width: 70px"] {
    display: none !important;
  }

  /* Text Color Fix */
  .wrapper section:nth-of-type(2) h5 {
    font-size: 14px !important;
    margin-bottom: 5px !important;
    min-height: auto !important;
    display: block !important;
    text-align: center !important;
    color: #333 !important;
  }

  .wrapper section:nth-of-type(2) p {
    font-size: 12px !important;
    line-height: 1.4 !important;
    color: #333 !important; /* Darker text for visibility */
    font-weight: 500 !important;
  }

  /* ============================================
     Simple & Real-time (Unified Layout)
     ============================================ */
  .wrapper section:nth-of-type(3) {
    padding: 40px 0 !important;
  }

  .wrapper section:nth-of-type(3) .row {
    display: flex !important;
    flex-direction: column !important;
    margin-bottom: 40px !important;
    height: auto !important; /* Prevent height collapse */
  }

  /* Reset all inner containers to avoid height issues */
  .wrapper section:nth-of-type(3) .col-xs-12 > div {
    min-height: auto !important;
    height: auto !important;
    padding: 0 !important;
    display: block !important; /* Disable flex center alignment */
  }

  /* Image Container */
  .wrapper section:nth-of-type(3) .col-xs-12.col-sm-12.col-md-5.col-lg-5 {
    order: 1 !important; /* Image first */
    margin-bottom: 15px !important; /* Space between image and text */
    padding: 0 15px !important;
  }

  /* Force image container height */
  .wrapper section:nth-of-type(3) .col-xs-12.col-sm-12.col-md-5.col-lg-5 > div > div {
    height: 200px !important;
    width: 100% !important;
  }

  /* Text Container */
  .wrapper section:nth-of-type(3) .col-xs-12.col-sm-12.col-md-7.col-lg-7 {
    order: 2 !important; /* Text second */
    margin-bottom: 0 !important;
    padding: 0 15px !important;
  }

  /* Deployment/Monitoring Tag */
  .wrapper section:nth-of-type(3) div[style*="display: inline-block"] {
    margin-bottom: 8px !important;
    padding: 4px 12px !important;
    font-size: 10px !important;
  }

  .wrapper section:nth-of-type(3) h4 {
    font-size: 20px !important;
    margin-bottom: 8px !important;
    margin-top: 0 !important;
    line-height: 1.2 !important;
  }

  .wrapper section:nth-of-type(3) p {
    font-size: 13px !important;
    margin-bottom: 12px !important;
    line-height: 1.4 !important;
  }

  /* List Items Optimization */
  .wrapper section:nth-of-type(3) ul li {
    margin-bottom: 8px !important;
    gap: 0 !important;
    display: block !important; /* Stack content vertically if needed, or keep block */
  }

  /* Hide List Icons */
  .wrapper section:nth-of-type(3) ul li i {
    display: none !important;
  }

  .wrapper section:nth-of-type(3) ul li > div {
    padding-left: 0 !important;
  }

  .wrapper section:nth-of-type(3) ul li h6 {
    margin-bottom: 2px !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
  }

  .wrapper section:nth-of-type(3) ul li p {
    font-size: 12px !important;
    margin: 0 !important;
    line-height: 1.3 !important;
    color: #666 !important;
  }

  /* ============================================
     SLA Metrics (3 Cards in 1 Row)
     ============================================ */
  .wrapper section:nth-of-type(4) {
    padding: 40px 0 !important;
  }

  .wrapper section:nth-of-type(4) .row {
    display: flex !important;
    flex-wrap: nowrap !important;
    margin-left: -5px !important;
    margin-right: -5px !important;
    align-items: stretch !important;
  }

  .wrapper section:nth-of-type(4) .col-xs-12 {
    width: 33.33% !important;
    flex: 0 0 33.33% !important;
    max-width: 33.33% !important;
    padding: 0 5px !important;
    margin-bottom: 0 !important;
  }

  /* Card Styling */
  .wrapper section:nth-of-type(4) div[style*="background: white"] {
    padding: 20px 5px !important;
    border-radius: 10px !important;
  }

  /* Ring Container - Scale Down & Hide SVG */
  .wrapper section:nth-of-type(4) div[style*="width: 150px"] {
    width: auto !important;
    height: auto !important;
    margin-bottom: 10px !important;
  }

  .wrapper section:nth-of-type(4) div[style*="width: 150px"] svg {
    display: none !important;
  }

  /* Text inside ring - Reset Position */
  .wrapper section:nth-of-type(4) div[style*="width: 150px"] div {
    position: static !important;
    transform: none !important;
    width: 100% !important;
    text-align: center !important;
  }

  /* Target the H3 specifically to override inline styles */
  .wrapper section:nth-of-type(4) div[style*="width: 150px"] div h3 {
    font-size: 16px !important; /* Reduced from original and previous 20px */
    font-weight: 800 !important;
    margin: 0 !important;
  }

  /* Specific colors for text */
  .wrapper section:nth-of-type(4) .col-xs-12:nth-child(1) div[style*="width: 150px"] div h3 { color: #667eea !important; }
  .wrapper section:nth-of-type(4) .col-xs-12:nth-child(2) div[style*="width: 150px"] div h3 { color: #f5576c !important; }
  .wrapper section:nth-of-type(4) .col-xs-12:nth-child(3) div[style*="width: 150px"] div h3 { color: #4facfe !important; }

  /* Title */
  .wrapper section:nth-of-type(4) h5 {
    font-size: 12px !important;
    margin-bottom: 5px !important;
    min-height: 30px !important;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Description */
  .wrapper section:nth-of-type(4) p {
    font-size: 10px !important;
    line-height: 1.3 !important;
    display: none !important; /* Hide description to save space if needed, or keep it small */
  }
  
  /* Let's try to keep description but very small */
  .wrapper section:nth-of-type(4) p {
    display: block !important;
  }
}
