/* Enhanced Mobile Responsiveness */

/* Full-width section support for mobile */
.full-width-section {
  width: 100%;
  max-width: none;
  padding: 20px;
}

@media screen and (max-width: 767px) {
  .full-width-section {
    padding: 15px 10px;
  }
  
  /* Support for full-width token creator section */
  .solana-token-creator,
  .solana-token-creator .container,
  .solana-token-creator .container-fluid {
    width: 100% !important;
    max-width: none !important;
    padding: 15px !important;
  }
  
  /* Responsive grid layouts */
  .token-creator-form .form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  /* Token creator card fixes */
  .token-creator-card {
    padding: 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden;
    border-radius: 10px;
  }
  
  /* Token creator steps - horizontal on mobile */
  .token-creator-steps {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
  }
  
  .step-item {
    margin: 5px 10px;
  }
  
  /* Form group heading adjustments */
  .form-group-heading {
    align-items: center;
    margin-bottom: 15px;
  }
  
  .form-group-heading h3 {
    font-size: 18px !important;
    margin: 0 !important;
  }
  
  /* Enhanced form elements spacing */
  .form-group {
    margin-bottom: 15px;
  }
  
  @media screen and (min-width: 480px) {
    .token-creator-form .form-row {
      grid-template-columns: repeat(2, 1fr);
    }
  }
}

/* Global Mobile Adjustments */
@media screen and (max-width: 767px) {
  /* Container sizing and spacing */
  .container {
    padding: 0 15px;
    width: 100%;
    max-width: 100%;
  }
  
  section {
    padding: 40px 0;
  }
  
  /* Typography adjustments */
  h1, .h1 {
    font-size: 32px !important;
    line-height: 1.2 !important;
  }
  
  h2, .h2 {
    font-size: 28px !important;
    line-height: 1.3 !important;
  }
  
  h3, .h3 {
    font-size: 22px !important;
  }
  
  p, .body-text {
    font-size: 16px !important;
    line-height: 1.5 !important;
  }
  
  /* Buttons and interactive elements */
  .button, .btn {
    padding: 10px 20px !important;
    height: auto !important;
    min-height: 44px !important; /* Comfortable tap target */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  /* Navbar fixes */
  .header {
    padding: 10px 0;
  }
  
  .header .logo {
    font-size: 20px;
  }
  
  /* Fix mobile menu */
  .nav ul li a {
    font-size: 18px;
    padding: 12px 15px;
    display: block;
    width: 100%;
  }
  
  /* Card elements and boxes */
  .card, .box, .feature-item, .audit-item, .testimonial-card {
    padding: 15px !important;
    margin-bottom: 20px !important;
    width: 100% !important;
  }
  
  /* Fix form elements */
  input, select, textarea {
    font-size: 16px !important; /* Prevent iOS zoom */
    padding: 12px !important;
    width: 100% !important;
    margin-bottom: 15px !important;
  }
  
  label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px !important;
  }
  
  /* Improve form layouts */
  .form-group, .form-row {
    flex-direction: column !important;
  }
  
  /* Ensure icons and emojis are sized properly */
  .icon, .emoji, i[class*="fa-"] {
    font-size: 20px !important;
    width: auto !important;
    height: auto !important;
  }
  
  /* Fix grid systems */
  .grid, .grid-container, .features-grid, .row {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
  }
  
  .grid > *, .grid-container > *, .features-grid > *, .row > * {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  
  /* Hero section adjustments */
  .hero {
    padding: 40px 0 !important;
    text-align: center !important;
  }
  
  .hero-content {
    width: 100% !important;
  }
  
  /* Fix token dashboard on mobile */
  .token-creator-dashboard {
    padding: 15px !important;
  }
  
  .token-creator-dashboard .token-symbol-bg {
    width: 60px !important;
    height: 60px !important;
  }
  
  .token-creator-dashboard .token-logo-preview {
    font-size: 24px !important;
  }
  
  .token-creator-dashboard .token-metrics {
    padding: 10px !important;
  }
  
  .token-creator-dashboard .token-metric-item {
    min-width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 10px !important;
  }
  
  .token-creator-dashboard .metric-icon {
    width: 30px !important;
    height: 30px !important;
  }
  
  /* Fix particles and animations that might slow down mobile */
  .particle, .glow-effect, .animated-bg {
    opacity: 0.5 !important;
  }
  
  /* Improve footer layout */
  footer {
    padding: 30px 0 !important;
    text-align: center !important;
  }
  
  footer .footer-col {
    width: 100% !important;
    margin-bottom: 20px !important;
  }
  
  footer .social-icons {
    justify-content: center !important;
  }
  
  /* Fix partner logos */
  .partner-logos {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 15px !important;
  }
  
  .partner-logo {
    width: 80px !important;
    height: auto !important;
  }
}

/* Extra small devices - Under 480px */
@media screen and (max-width: 480px) {
  /* Further reduce sizes */
  h1, .h1 {
    font-size: 28px !important;
  }
  
  h2, .h2 {
    font-size: 24px !important;
  }
  
  h3, .h3 {
    font-size: 20px !important;
  }
  
  .container {
    padding: 0 10px !important;
  }
  
  section {
    padding: 30px 0 !important;
  }
  
  /* Ensure smaller buttons */
  .button, .btn {
    padding: 8px 16px !important;
    font-size: 14px !important;
  }
  
  /* Make token dashboard elements more compact */
  .token-creator-dashboard .token-symbol-bg {
    width: 50px !important;
    height: 50px !important;
  }
  
  .token-creator-dashboard .token-logo-preview {
    font-size: 20px !important;
  }
  
  /* Further optimize tap targets */
  .nav ul li a {
    padding: 15px !important;
  }
  
  /* Improve card padding for very small screens */
  .card, .box, .feature-item {
    padding: 12px !important;
  }
}

/* Ensure proper tap targets for touch devices */
@media (hover: none) {
  a, button, input[type="button"], input[type="submit"] {
    min-height: 44px !important;
    min-width: 44px !important;
  }
  
  /* Remove hover effects that might look strange on touch */
  a:hover, button:hover, .nav-link:hover, .btn:hover {
    transition: none !important;
  }
  
  /* Ensure form elements are large enough */
  input, select, textarea, label {
    min-height: 44px !important;
    line-height: 44px !important;
  }
  
  /* Optimize checkboxes and radio buttons */
  input[type="checkbox"], input[type="radio"] {
    min-height: 24px !important;
    min-width: 24px !important;
  }
}

/* Fix orientation changes */
@media screen and (orientation: portrait) {
  .container {
    max-width: 100% !important;
  }
}

@media screen and (orientation: landscape) and (max-height: 500px) {
  .header {
    padding: 5px 0 !important;
  }
  
  .hero {
    min-height: auto !important;
    padding: 20px 0 !important;
  }
}
