/* iOS Safari Double-Tap Fix */
/* This file fixes the common iOS Safari issue where links require two taps */

/* Remove tap highlight and set touch action */
*, *:before, *:after {
  -webkit-tap-highlight-color: transparent !important;
  touch-action: manipulation;
}

/* Remove hover effects on touch devices to prevent hover states from sticky */
@media (hover: none) and (pointer: coarse) {
  /* Buttons */
  .button:hover,
  .btn:hover,
  button:hover,
  a:hover {
    transform: none !important;
    box-shadow: initial !important;
    background: initial !important;
    opacity: initial !important;
    color: initial !important;
    border-color: initial !important;
  }
  
  /* Cards and interactive elements */
  .card:hover,
  .pricing-card:hover,
  .feature-card:hover,
  .faq-item:hover {
    transform: none !important;
    box-shadow: initial !important;
    background: initial !important;
    opacity: initial !important;
  }
  
  /* Navigation items */
  .navbar-item:hover,
  .nav-item:hover,
  .menu-item:hover {
    background: initial !important;
    color: initial !important;
    opacity: initial !important;
  }
  
  /* List items */
  li:hover,
  .list-item:hover {
    background: initial !important;
    transform: none !important;
    color: initial !important;
  }
  
  /* Links and interactive text */
  a:hover,
  .link:hover {
    color: initial !important;
    text-decoration: initial !important;
    opacity: initial !important;
  }
}

/* Ensure clickable elements are accessible on touch devices */
@media (hover: none) and (pointer: coarse) {
  /* Make clickable areas larger for touch */
  .button,
  .btn,
  button,
  a[href] {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Remove outline focus on touch devices */
  .button:focus,
  .btn:focus,
  button:focus,
  a:focus {
    outline: none;
  }
}

/* Fallback for older iOS versions */
@supports (-webkit-touch-callout: none) {
  * {
    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
  }
  
  /* Re-enable text selection for content areas */
  p, h1, h2, h3, h4, h5, h6, span, div, article, section {
    -webkit-user-select: text;
    user-select: text;
  }
  
  /* Re-enable selection for input fields */
  input, textarea, select {
    -webkit-user-select: text;
    user-select: text;
  }
}