/* VPATH AI Mobile Responsive CSS
   Target: max-width 768px for mobile devices
   Special consideration for Google Pixel 9 Pro (412px viewport)
   ========================================================= */

/* Base Mobile Reset and Improvements */
@media (max-width: 768px) {
  /* Prevent horizontal scrolling */
  html, body {
    overflow-x: hidden;
    width: 100%;
  }

  /* Ensure all containers respect viewport */
  * {
    max-width: 100vw;
  }

  /* Fix box-sizing for all elements */
  *, *::before, *::after {
    box-sizing: border-box;
  }
}

/* Header and Navigation Mobile Fixes */
@media (max-width: 768px) {
  /* Center header text and improve mobile layout */
  .header {
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: #000000;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
  }

  /* Fix navigation container */
  .nav {
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
  }

  /* Logo adjustments for mobile */
  .nav__logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 1001;
  }

  .nav__logo img {
    height: 40px;
    width: auto;
  }

  .logo-text {
    font-size: 1.25rem;
    font-weight: 600;
  }

  /* Mobile menu overlay - Dark theme */
  .nav__menu {
    position: fixed !important;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: #0a0a0a !important;
    padding: 80px 2rem 2rem;
    transition: right 0.3s ease;
    overflow-y: auto;
    z-index: 999;
    display: block !important;
    border-left: 1px solid rgba(0, 212, 255, 0.2);
  }

  .nav__menu.active {
    right: 0;
  }

  /* Mobile navigation list */
  .nav__list {
    flex-direction: column;
    gap: 0;
    width: 100%;
  }

  .nav__item {
    width: 100%;
    margin: 0;
  }

  /* Touch-friendly navigation links (min 44px height) */
  .nav__link {
    display: block;
    padding: 1rem 0;
    font-size: 1.125rem;
    text-align: center;
    min-height: 44px;
    width: 100%;
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
    color: #ffffff !important;
    transition: all 0.3s ease;
  }
  
  .nav__link:hover,
  .nav__link:active {
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff !important;
  }
  
  .nav__link--active {
    color: #00d4ff !important;
  }
  
  .nav__link--cta {
    background: #00d4ff !important;
    color: #000000 !important;
    margin: 1rem 0;
    border-radius: 8px;
    font-weight: 600;
  }
  
  .nav__link--cta:hover {
    background: #00a8cc !important;
  }

  /* Mobile menu toggle button (hamburger) */
  .nav__toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    cursor: pointer;
    z-index: 1001;
    background: none;
    border: none;
    padding: 0;
  }

  .nav__toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: #00d4ff;
    margin: 4px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
  }

  /* Hamburger animation */
  .nav__toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav__toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav__toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
}

/* Main Content Area Fixes */
@media (max-width: 768px) {
  /* Account for fixed header */
  main, .main-content {
    margin-top: 60px;
    padding: 0 1rem;
  }

  /* Container width optimization */
  .container {
    width: 100%;
    max-width: 100%;
    padding: 0 1rem;
  }

  /* Section spacing */
  section {
    padding: 3rem 0;
  }

  /* Center all text content by default */
  .text-center-mobile {
    text-align: center;
  }
}

/* Typography Optimization for Mobile */
@media (max-width: 768px) {
  /* Heading sizes for better readability */
  h1, .h1 {
    font-size: 2rem;
    line-height: 1.2;
    text-align: center;
    margin-bottom: 1rem;
  }

  h2, .h2 {
    font-size: 1.75rem;
    line-height: 1.3;
    text-align: center;
    margin-bottom: 1rem;
  }

  h3, .h3 {
    font-size: 1.5rem;
    line-height: 1.3;
    margin-bottom: 0.75rem;
  }

  h4, .h4 {
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
  }

  /* Body text optimization */
  p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
  }

  /* Prevent text overflow */
  p, li, span {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}

/* Button and Touch Target Optimization */
@media (max-width: 768px) {
  /* All buttons must be at least 44px tall */
  .btn, 
  button, 
  input[type="submit"], 
  input[type="button"],
  a.btn {
    min-height: 44px;
    min-width: 44px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
  }

  /* Button groups */
  .btn__group, .button-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
  }

  .btn__group .btn, 
  .button-group button {
    width: 100%;
  }

  /* CTA buttons */
  .cta-button, .btn--primary, .btn--cta {
    font-size: 1.125rem;
    padding: 1rem 2rem;
    min-height: 48px;
  }
}

/* Form Input Optimization */
@media (max-width: 768px) {
  /* Touch-friendly form inputs */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="password"],
  input[type="search"],
  textarea,
  select {
    min-height: 44px;
    padding: 0.75rem 1rem;
    font-size: 16px; /* Prevents zoom on iOS */
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 1rem;
  }

  /* Form labels */
  label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
  }

  /* Form groups */
  .form-group, .input-group {
    margin-bottom: 1.5rem;
  }

  /* Contact form specific */
  .contact-form {
    max-width: 100%;
    padding: 1.5rem;
  }

  /* Make submit buttons full width on mobile */
  form .btn, 
  form button[type="submit"] {
    width: 100%;
  }
}

/* Image and Media Optimization */
@media (max-width: 768px) {
  /* Prevent images from breaking layout */
  img {
    max-width: 100%;
    height: auto;
    display: block;
  }

  /* Figure and picture elements */
  figure, picture {
    max-width: 100%;
    margin: 1rem 0;
  }

  /* Video responsive */
  video, iframe {
    max-width: 100%;
    height: auto;
  }

  /* Aspect ratio box for videos */
  .video-wrapper, .embed-responsive {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
  }

  .video-wrapper iframe,
  .embed-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
}

/* Grid and Flexbox Mobile Layouts */
@media (max-width: 768px) {
  /* Convert multi-column layouts to single column */
  .grid, .grid-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Flexbox mobile optimization */
  .flex-container {
    flex-direction: column;
    align-items: center;
  }

  /* Card layouts */
  .card-grid, .feature-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .card {
    width: 100%;
    margin-bottom: 1rem;
  }
}

/* Hero Section Mobile Optimization */
@media (max-width: 768px) {
  .hero, .hero-section {
    padding: 2rem 0;
    text-align: center;
  }

  .hero__content {
    max-width: 100%;
    padding: 0 1rem;
  }

  .hero__title {
    font-size: 2rem;
    margin-bottom: 1rem;
  }

  .hero__subtitle {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
  }

  /* Hero buttons */
  .hero .btn__group {
    margin-top: 2rem;
  }
}

/* Footer Mobile Optimization */
@media (max-width: 768px) {
  footer, .footer {
    padding: 2rem 0;
  }

  .footer__content {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }

  .footer__links {
    flex-direction: column;
    gap: 1rem;
  }

  .footer__link {
    display: inline-block;
    padding: 0.5rem 1rem;
    min-height: 44px;
  }
}

/* Specific Fixes for Common Issues */
@media (max-width: 768px) {
  /* Fix horizontal scrolling causes */
  .row {
    margin-left: 0;
    margin-right: 0;
  }

  [class*="col-"] {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Remove negative margins that cause overflow */
  .no-gutters {
    margin-left: 0;
    margin-right: 0;
  }

  /* Fix pre and code blocks */
  pre, code {
    overflow-x: auto;
    max-width: 100%;
    word-wrap: break-word;
  }

  /* Tables responsive */
  table {
    display: block;
    overflow-x: auto;
    width: 100%;
  }
}

/* Google Pixel 9 Pro Specific (412px viewport) */
@media (max-width: 412px) {
  /* Fine-tune for Pixel 9 Pro */
  .container {
    padding: 0 0.75rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .btn {
    font-size: 0.9375rem;
    padding: 0.625rem 1.25rem;
  }

  /* Smaller spacing for narrow viewport */
  section {
    padding: 2.5rem 0;
  }
}

/* Utility Classes for Mobile */
@media (max-width: 768px) {
  /* Hide on mobile */
  .mobile-hide, .d-none-mobile {
    display: none !important;
  }

  /* Show only on mobile */
  .mobile-only, .d-block-mobile {
    display: block !important;
  }

  /* Text alignment utilities */
  .text-center-mobile {
    text-align: center !important;
  }

  .text-left-mobile {
    text-align: left !important;
  }

  /* Spacing utilities */
  .mt-mobile-1 { margin-top: 0.5rem !important; }
  .mt-mobile-2 { margin-top: 1rem !important; }
  .mt-mobile-3 { margin-top: 1.5rem !important; }
  .mb-mobile-1 { margin-bottom: 0.5rem !important; }
  .mb-mobile-2 { margin-bottom: 1rem !important; }
  .mb-mobile-3 { margin-bottom: 1.5rem !important; }
  
  /* Padding utilities */
  .p-mobile-1 { padding: 0.5rem !important; }
  .p-mobile-2 { padding: 1rem !important; }
  .p-mobile-3 { padding: 1.5rem !important; }
}

/* Performance Optimizations */
@media (max-width: 768px) {
  /* Disable hover effects on touch devices */
  @media (hover: none) {
    a:hover,
    button:hover {
      opacity: 1;
      transform: none;
    }
  }

  /* Optimize animations for mobile */
  * {
    animation-duration: 0.3s !important;
    transition-duration: 0.3s !important;
  }

  /* Disable parallax on mobile for performance */
  .parallax {
    background-attachment: scroll !important;
  }
}


/* Feature/Stat Boxes Centering for Mobile */
@media (max-width: 768px) {
  /* Hero stats boxes */
  .hero__stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
  }

  /* Mini stat cards (80% schneller, 100% compliant, etc.) */
  .stat-card--mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
  }

  .stat-value {
    text-align: center;
  }

  .stat-label {
    text-align: center;
  }

  /* General stat cards */
  .stat-card {
    margin: 0 auto;
    text-align: center;
  }

  /* Feature boxes */
  .feature-box,
  .feature-card,
  .value-card,
  .benefit-card {
    margin: 0 auto 1rem;
    text-align: center;
    max-width: 100%;
  }

  /* Pain points boxes */
  .pain-points {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .pain-point {
    text-align: center;
    max-width: 300px;
    margin: 0 auto;
  }

  /* Any grid that contains feature/stat boxes */
  .stats-grid,
  .features-grid,
  .benefits-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* Ensure all box-type elements are centered */
  [class*="stat-"],
  [class*="feature-"],
  [class*="benefit-"],
  [class*="value-"] {
    margin-left: auto;
    margin-right: auto;
  }
}

/* Industry/Branchen Boxes Fix */
@media (max-width: 768px) {
  /* Fix industry cards width and remove bullets */
  .industry-card,
  .solution-card {
    width: 100% !important;
    max-width: 100% !important;
    padding: 1.5rem !important;
    margin: 0 0 1rem 0 !important;
    box-sizing: border-box !important;
  }
  
  /* Grid layout for mobile */
  .industries-grid {
    display: block !important;
    padding: 0 !important;
  }
  
  /* Fix card header layout */
  .industry-card__header {
    flex-direction: column !important;
    text-align: center !important;
    gap: 1rem !important;
  }
  
  /* Industry content styling */
  .industry-card__content {
    text-align: left !important;
  }
  
  /* Remove bullet points on mobile - More specific */
  .industry-card ul li::before,
  .solution-card ul li::before,
  .industry-challenges li::before,
  .industry-solutions li::before,
  .challenge-list li::before,
  .industry-card .challenge-list li::before {
    display: none !important;
    content: none !important;
  }
  
  /* Adjust list padding without bullets */
  .industry-card ul,
  .solution-card ul,
  .industry-challenges,
  .industry-solutions,
  .challenge-list {
    padding-left: 0 !important;
    list-style: none !important;
  }
  
  .industry-card li,
  .solution-card li,
  .industry-challenges li,
  .industry-solutions li,
  .challenge-list li {
    padding-left: 0 !important;
    margin-left: 0 !important;
    list-style: none !important;
    margin-bottom: 0.75rem !important;
  }
  
  /* Metrics layout */
  .industry-metrics {
    flex-direction: column !important;
    gap: 1rem !important;
  }
  
  .metric {
    width: 100% !important;
    text-align: center !important;
  }
}

/* Engineering Agents Circle Layout Fix - Compact Mobile Version */
@media (max-width: 768px) {
  /* Keep wheel layout but make it compact */
  .agenten-wheel {
    position: relative !important;
    width: 320px !important;
    height: 320px !important;
    margin: 2rem auto !important;
  }
  
  /* Center logo - smaller */
  .wheel-center {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 80px !important;
    height: 80px !important;
    z-index: 10;
  }
  
  .wheel-center .wheel-logo {
    width: 80px !important;
    height: 80px !important;
  }
  
  /* Wheel items in circle - smaller radius */
  .wheel-item {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 70px !important;
    height: 70px !important;
    transform: translate(-50%, -50%) rotate(var(--rotation)) translateX(110px) rotate(calc(-1 * var(--rotation))) !important;
  }
  
  /* Compact wheel cards */
  .wheel-card {
    width: 70px !important;
    height: 70px !important;
    padding: 0.3rem !important;
    background: rgba(0, 212, 255, 0.1) !important;
    border: 2px solid #00d4ff !important;
    border-radius: 50% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
  }
  
  .wheel-card:hover,
  .wheel-card:active,
  .wheel-card.active {
    background: rgba(0, 212, 255, 0.3) !important;
    transform: scale(1.1) !important;
  }
  
  /* Hide icons on mobile */
  .wheel-card i {
    display: none !important;
  }
  
  /* Hide original span text */
  .wheel-card span {
    display: none !important;
  }
  
  /* Show only abbreviations */
  .wheel-card::after {
    content: "";
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    text-align: center !important;
    line-height: 1 !important;
  }
  
  /* Mobile-specific abbreviations */
  .wheel-item[data-agent="project"] .wheel-card::after {
    content: "PM" !important;
  }
  
  .wheel-item[data-agent="agile"] .wheel-card::after {
    content: "Agile" !important;
    font-size: 0.9rem !important;
  }
  
  .wheel-item[data-agent="requirements"] .wheel-card::after {
    content: "Req" !important;
  }
  
  .wheel-item[data-agent="architecture"] .wheel-card::after {
    content: "Arch" !important;
  }
  
  .wheel-item[data-agent="safety"] .wheel-card::after {
    content: "Safe" !important;
  }
  
  .wheel-item[data-agent="security"] .wheel-card::after {
    content: "Sec" !important;
  }
  
  .wheel-item[data-agent="testing"] .wheel-card::after {
    content: "Test" !important;
  }
  
  .wheel-item[data-agent="documentation"] .wheel-card::after {
    content: "Docs" !important;
  }
  
  
  /* Hide decorative elements */
  .wheel-glow,
  .wheel-pulse {
    display: none !important;
  }
  
  /* Agent details section - make it more compact */
  .agent-details-section {
    margin-top: 2rem !important;
    padding: 1rem !important;
  }
  
  .agent-details {
    padding: 1rem !important;
  }
  
  .details-header {
    font-size: 1.2rem !important;
    margin-bottom: 1rem !important;
  }
  
  .details-intro {
    font-size: 0.9rem !important;
    margin-bottom: 1rem !important;
  }
  
  .details-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
  
  .detail-card {
    padding: 1rem !important;
  }
  
  .detail-card h4 {
    font-size: 1rem !important;
  }
  
  .detail-card p {
    font-size: 0.85rem !important;
  }
}

/* Expertise Cards Mobile Optimization */
@media (max-width: 768px) {
    .expertise-card {
        min-height: auto;
        padding: 1.5rem;
    }
    
    .expertise-card__icon {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }
    
    .expertise-card__title {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }
    
    .expertise-card__description {
        font-size: 0.9rem;
    }
}

/* Founder Section Mobile Optimization */
@media (max-width: 768px) {
    .founder-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
    
    .founder-avatar-wrapper {
        margin-bottom: 1rem;
    }
    
    .founder-info {
        margin-bottom: 2rem;
    }
    
    .column-title {
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .skills-column {
        text-align: center !important;
    }
    
    .philosophy-item {
        text-align: left;
        max-width: 280px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Privacy Checkbox Mobile Styles */
@media (max-width: 768px) {
    .form__group--privacy {
        margin-bottom: 1.5rem;
    }
    
    .privacy-label {
        font-size: 0.8rem;
    }
    
    .privacy-label input[type="checkbox"] {
        min-width: 18px;
        height: 18px;
        margin-right: 0.5rem;
    }
    
    .privacy-text {
        line-height: 1.4;
    }
}

/* Print styles for mobile */
@media print {
  .nav__toggle,
  .mobile-only {
    display: none !important;
  }
}