/* Enhanced Mobile Responsive Design for VoltChain */

/* Mobile-First Base Styles */
@media (max-width: 768px) {
  
  /* Container and Layout */
  .container {
    padding: 16px 12px;
  }
  
  body {
    font-size: 16px; /* Prevent zoom on iOS */
    -webkit-text-size-adjust: 100%;
  }
  
  /* Enhanced Navigation */
  .nav {
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 1000;
  }
  
  .nav .brand {
    font-size: 1.1rem;
  }
  
  .mobile-nav-toggle {
    display: block;
    padding: 12px;
    margin: -8px -12px -8px 0;
    border-radius: 8px;
    transition: background-color 0.2s;
  }
  
  .mobile-nav-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }
  
  /* Mobile Navigation Dropdown */
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0;
  }
  
  .nav-links.nav-open {
    max-height: 400px;
    opacity: 1;
  }
  
  .nav-link {
    display: block;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    font-size: 16px;
    transition: background-color 0.2s;
  }
  
  .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
  }
  
  .nav-link:last-child {
    border-bottom: none;
  }
  
  .nav-text {
    padding: 12px 20px;
    color: var(--text-secondary);
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
  }
  
  #fiatForm {
    padding: 16px 20px;
    margin: 0;
  }
  
  #vsSelect {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-primary);
  }
  
  /* Page Headers */
  .page-header h1 {
    font-size: 1.8rem;
    line-height: 1.2;
    margin-bottom: 12px;
  }
  
  /* Pricing Page Mobile Enhancements */
  .pricing-hero h1 {
    font-size: 1.8rem;
    margin-bottom: 16px;
  }
  
  .pricing-hero .lead {
    font-size: 1rem;
    margin-bottom: 24px;
  }
  
  .pricing-card {
    margin-bottom: 24px;
    border-radius: 16px;
    padding: 24px;
  }
  
  .price .amount {
    font-size: 2.2rem;
  }
  
  .price .period {
    font-size: 1rem;
  }
  
  /* Mobile-Optimized Payment Buttons */
  .btn-block {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    touch-action: manipulation;
    -webkit-appearance: none;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    line-height: 1.4;
    min-height: 48px; /* iOS accessibility minimum */
  }
  
  .btn-primary {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
  }
  
  .btn-primary:hover,
  .btn-primary:focus {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
    color: white;
    text-decoration: none;
  }
  
  .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
  }
  
  /* Tables Mobile Responsive */
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    margin-bottom: 20px;
  }
  
  .table {
    min-width: 600px; /* Ensure table doesn't compress too much */
    font-size: 14px;
  }
  
  .table th,
  .table td {
    padding: 12px 8px;
    white-space: nowrap;
  }
  
  /* Comparison Table Mobile */
  .comparison-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -12px;
    padding: 0 12px;
  }
  
  .comparison-table .table {
    min-width: 500px;
  }
  
  /* Form Elements Mobile */
  .form-control,
  input[type="email"],
  input[type="password"],
  input[type="text"],
  select {
    font-size: 16px; /* Prevent zoom on iOS */
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--surface-elevated);
    color: var(--text-primary);
    min-height: 48px;
    -webkit-appearance: none;
  }
  
  /* Alert Messages */
  .alert {
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    font-size: 14px;
  }
  
  /* Feature Lists */
  .feature-list {
    padding-left: 0;
  }
  
  .feature-list li {
    padding: 8px 0;
    font-size: 14px;
  }
  
  /* Search Form */
  .search-form .input-group {
    flex-direction: column;
    gap: 12px;
  }
  
  .search-form .form-control {
    border-radius: 12px;
  }
  
  .search-form .btn {
    border-radius: 12px;
    padding: 12px 20px;
  }
  
  /* Cards and Content Blocks */
  .card,
  .pricing-card,
  .alert {
    border-radius: 16px;
    margin-bottom: 20px;
  }
  
  /* Touch-Friendly Links */
  a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    touch-action: manipulation;
  }
  
  /* Loading States for Buttons */
  .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
  }
  
  /* SEO Pages Mobile */
  .seo-page .hero-section {
    padding: 40px 0;
  }
  
  .seo-page .hero-section h1 {
    font-size: 1.8rem;
    line-height: 1.2;
  }
  
  .seo-page .hero-section .lead {
    font-size: 1rem;
  }
  
  .seo-page .cta-section {
    padding: 30px 20px;
    margin: 0 -12px;
  }
}

/* Extra Small Mobile Devices */
@media (max-width: 480px) {
  
  .container {
    padding: 12px 8px;
  }
  
  .nav {
    padding: 10px 12px;
  }
  
  .page-header h1 {
    font-size: 1.5rem;
  }
  
  .pricing-hero h1 {
    font-size: 1.6rem;
  }
  
  .price .amount {
    font-size: 2rem;
  }
  
  .pricing-card {
    padding: 20px;
    margin-bottom: 20px;
  }
  
  .comparison-table {
    margin: 0 -8px;
    padding: 0 8px;
  }
  
  .seo-page .hero-section h1 {
    font-size: 1.6rem;
  }
  
  .btn-block {
    padding: 14px 20px;
    font-size: 15px;
  }
}

/* iOS Safari Specific Fixes */
@supports (-webkit-touch-callout: none) {
  .btn-block {
    -webkit-appearance: none;
    border-radius: 12px;
  }
  
  input, select, textarea {
    -webkit-appearance: none;
    border-radius: 8px;
  }
}

/* Android Chrome Specific Fixes */
@media screen and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: 0.001dpcm) {
  .btn-primary {
    border: none;
    outline: none;
  }
}

/* High-DPI Displays */
@media (min-resolution: 192dpi), (min-resolution: 2dppx) {
  .btn-primary {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    border: none;
  }
}