/* MOBILE OPTIMIZATION - EXTRA TWEAKS */

/* Evitar zoom automático en inputs (iOS) */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    font-size: 16px !important;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Image optimization */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Prevent text selection issues */
*:not(input):not(textarea) {
    -webkit-user-select: none;
    user-select: none;
}

input, textarea, button, a {
    -webkit-user-select: text;
    user-select: text;
}

/* Safe area insets for notch support */
@supports (padding: max(0px)) {
    body {
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
    }
}

/* Prevent unwanted text sizing */
body {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Better touch targets */
a, button, [role="button"] {
    min-height: 44px;
    min-width: 44px;
}

/* Fix for form inputs */
input, textarea, select {
    width: 100%;
    box-sizing: border-box;
}

/* Remove mobile browser defaults */
input, button {
    border-radius: 0;
}

/* Optimize form appearance */
button {
    -webkit-appearance: none;
    appearance: none;
    border: none;
}

/* Better spacing on touch devices */
@media (max-width: 768px) {
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    button:active {
        opacity: 0.8;
    }
}

/* Prevent horizontal scrolling */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

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

/* Improve touch spacing */
.btn {
    -webkit-touch-callout: none;
}

/* Fix for iOS */
@media (max-width: 768px) {
    input[type="submit"],
    input[type="button"],
    button {
        font-size: 16px;
    }
    
    textarea {
        font-size: 16px;
    }
}
