/* Mobile-specific responsive improvements */

/* Use the CSS variable for consistent vh on mobile */
.hero {
    height: 100vh; /* Fallback */
    height: calc(var(--vh, 1vh) * 100);
}

/* Improve responsive form layout */
@media screen and (max-width: 576px) {
    .form-fields {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-group {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .shipping-modes {
        flex-wrap: wrap;
        justify-content: space-between;
    }
    
    .mode-option {
        flex: 0 0 48%;
        margin-bottom: 12px;
    }
    
    /* More readable fonts on small screens */
    p, .info-text, .form-field label {
        font-size: 14px;
        line-height: 1.5;
    }
    
    /* Make buttons easier to tap on mobile */
    .btn, .quote-btn, .quote-submit-btn, .directions-btn {
        padding: 15px 20px;
        min-height: 54px;
        font-size: 16px;
    }
    
    /* Reduce header size for better spacing */
    header {
        padding: 10px 0;
    }
    
    .logo img {
        max-height: 50px;
    }
    
    /* Add extra spacing before sections to account for fixed header */
    section {
        scroll-margin-top: 70px;
    }
    
    /* Make footer columns stack better on mobile */
    .footer-columns {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    /* Improve mobile menu readability */
    .mobile-menu nav ul li a {
        font-size: 18px;
        padding: 15px 0;
    }
    
    /* Make sure form inputs are easy to tap */
    input, select, textarea, .form-field input, .form-field select {
        font-size: 16px; /* Prevents iOS zoom on focus */
        padding: 15px;
        min-height: 54px;
        border-radius: 8px;
    }
    
    /* Freight quote section improvements */
    .freight-quote-section {
        padding: 40px 15px;
    }
    
    .quote-container {
        padding: 20px 15px;
    }
    
    /* Improve custom quote form layout */
    .custom-quote-form {
        padding: 20px 15px;
    }
    
    .form-row {
        margin-bottom: 18px;
    }
    
    /* Space out testimonials better */
    .testimonial {
        padding: 15px;
        margin: 0 auto 20px;
    }
    
    /* Make sure career section content is readable */
    .careers-card {
        padding: 20px 15px;
    }
    
    /* Better wrapping for social icons */
    .social-icons {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    /* Improve touch area for checkbox labels */
    .mode-option label, .consent-field label {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
    }
    
    /* Fix for focus states on form elements for accessibility */
    input:focus, select:focus, textarea:focus, button:focus {
        outline: 2px solid #0C2C52;
        outline-offset: 2px;
    }
    
    /* Better button styling for mobile */
    .quote-submit-btn {
        font-size: 16px;
        padding: 16px 20px;
        margin-top: 25px;
        background-image: linear-gradient(to right, var(--secondary-color), #d42731);
        border-radius: 8px;
        box-shadow: 0 6px 12px rgba(177, 32, 39, 0.3);
        letter-spacing: 1.5px;
    }
    
    /* Custom spacing for form fields on mobile */
    .form-field {
        margin-bottom: 5px;
    }
    
    .form-field label {
        margin-bottom: 8px;
        font-weight: 600;
    }
    
    /* Add a soft pulsing animation to draw more attention to the button */
    @keyframes softPulse {
        0% {
            transform: scale(1);
            box-shadow: 0 5px 15px rgba(177, 32, 39, 0.2);
        }
        50% {
            transform: scale(1.03);
            box-shadow: 0 8px 20px rgba(177, 32, 39, 0.3);
        }
        100% {
            transform: scale(1);
            box-shadow: 0 5px 15px rgba(177, 32, 39, 0.2);
        }
    }
    
    .quote-submit-btn:hover {
        animation: softPulse 1.5s infinite;
    }
    
    /* Fix for map container on mobile */
    .map-wrapper {
        flex-direction: column;
    }
    
    .map-area {
        height: 300px;
        margin-bottom: 20px;
        border-radius: 8px;
        overflow: hidden;
    }
    
    .contact-card {
        position: relative;
        width: 100%;
        max-width: 100%;
        top: 0;
        right: 0;
        transform: none;
        border-radius: 8px;
    }
    
    /* Form container improvements */
    .form-container {
        padding: 20px 15px;
        border-radius: 8px;
    }
    
    /* Make phone links more touch-friendly */
    .info-text a[href^="tel:"],
    .contact-info li a[href^="tel:"] {
        font-size: 16px;
        font-weight: 600;
        padding: 8px 0;
        margin: 4px 0;
        display: inline-block;
        color: var(--secondary-color);
    }
    
    /* Add a subtle touch hint */
    .info-text a[href^="tel:"]::before,
    .contact-info li a[href^="tel:"]::before {
        content: '\f095'; /* Phone icon */
        font-family: 'Font Awesome 5 Free';
        font-weight: 900;
        margin-right: 5px;
        font-size: 14px;
        opacity: 0.7;
    }
    
    /* Feedback on tap */
    .info-text a:active,
    .contact-info li a:active {
        transform: scale(0.98);
        opacity: 0.8;
    }
}

/* Tablet improvements */
@media screen and (min-width: 577px) and (max-width: 991px) {
    /* Improve grid layouts */
    .services-grid-large {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Ensure enough padding around content */
    .container {
        padding: 0 20px;
    }
    
    /* Better spacing for form fields on tablets */
    .form-row {
        margin-bottom: 20px;
    }
    
    /* Improve freight quote section on tablets */
    .form-fields {
        flex-wrap: wrap;
    }
    
    .form-group {
        flex: 0 0 48%;
        margin-bottom: 15px;
    }
}

/* Fix for Safari border issues */
input, button, textarea, select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 4px;
}

/* Ensure tappable areas are large enough */
.service-btn, .cookie-btn, .directions-btn {
    min-height: 44px;
}

/* Fix touch target size for mobile navigation */
.mobile-menu-toggle, .mobile-menu-close {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* On larger screens, the mobile menu toggle should be hidden completely */
@media screen and (min-width: 993px) {
    .mobile-menu-toggle {
        display: none !important;
    }
}

/* Improve readability of testimonials on mobile */
@media screen and (max-width: 576px) {
    .testimonial-content p {
        font-size: 15px;
        line-height: 1.5;
    }
    
    .testimonial-author img {
        width: 50px;
        height: 50px;
    }
}

/* Fix for Cookie Consent on mobile */
@media screen and (max-width: 576px) {
    .cookie-content {
        flex-direction: column;
        padding: 15px;
    }
    
    .cookie-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .cookie-btn {
        width: 100%;
    }
}

/* Fix font size scaling */
html {
    -webkit-text-size-adjust: 100%;
}

/* Improved Experience Section on mobile */
@media screen and (max-width: 767px) {
    .experience-stats {
        flex-direction: column;
        gap: 30px;
    }
    
    .stat-column {
        width: 100%;
        padding: 20px 15px;
    }
}

/* Better button styling for all screens */
.quote-submit-btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Add ripple effect for modern interactivity */
.quote-submit-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    z-index: -1;
    transition: width 0.5s, height 0.5s, opacity 0.5s;
}

.quote-submit-btn:active::after {
    width: 200%;
    height: 200%;
    opacity: 1;
    transition: 0s;
}

/* Scroll to top button */
#scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

#scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#scroll-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

@media screen and (min-width: 992px) {
    #scroll-to-top {
        bottom: 30px;
        right: 30px;
    }
}

/* Medium-sized mobile devices */
@media screen and (min-width: 400px) and (max-width: 576px) {
    .shipping-modes {
        justify-content: space-around;
    }
    
    .mode-option {
        flex: 0 0 45%;
    }
    
    .quote-submit-btn {
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Additional tablet improvements */
@media screen and (min-width: 577px) and (max-width: 991px) {
    /* Better button styling on tablets */
    .quote-submit-btn {
        max-width: 80%;
        margin: 30px auto 0;
        padding: 15px;
        font-size: 1.1rem;
        background-image: linear-gradient(to right, var(--secondary-color), #d42731);
        box-shadow: 0 5px 15px rgba(177, 32, 39, 0.25);
    }
    
    .form-container {
        padding: 25px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        border-radius: 10px;
    }
    
    /* Better form layout on tablets */
    .form-field input, .form-field select {
        border-radius: 6px;
        padding: 14px;
    }
    
    /* More touch-friendly shipping mode options */
    .shipping-modes {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }
    
    .mode-option {
        flex: 0 0 auto;
    }
    
    .mode-option label {
        padding: 10px 18px;
        border-radius: 6px;
    }
}

/* Landscape orientation fixes for mobile */
@media screen and (max-width: 767px) and (orientation: landscape) {
    .shipping-modes {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .mode-option {
        flex: 0 0 auto;
        margin: 0 5px 10px;
    }
    
    .form-row {
        margin-bottom: 15px;
    }
    
    .quote-submit-btn {
        margin-top: 20px;
        padding: 12px 20px;
    }
} 