/* Responsive fixes for the website */

/* Ensure all images scale properly */
img {
    max-width: 100%;
    height: auto;
}

/* Fix for banner background image on mobile */
@media (max-width: 768px) {
    /* We'll handle the mobile background with JavaScript */
    .banner {
        background-size: cover !important;
        background-position: center !important;
    }
}

/* Fix text overflow issues */
.text-overflow-fix {
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

/* Tablet and medium-sized screens (between 880px and 1193px) */
@media (min-width: 881px) and (max-width: 1193px) {
    /* Adjust layout for this specific range */
    .navbar-brand img {
        max-width: 180px !important;
        height: auto !important;
    }
    
    /* Improve spacing for this resolution range */
    .container {
        padding-left: 25px;
        padding-right: 25px;
        width: 100% !important;
        max-width: 95% !important;
    }
    
    /* Adjust font sizes for better readability */
    h1, .h1 {
        font-size: 2.5rem !important;
        line-height: 1.2 !important;
    }
    
    h2, .h2 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }
    
    /* Fix spacing between navbar and banner heading */
    .banner .row {
        padding-top: 70px !important;
    }
    
    /* Fix margin for the specific h1 heading */
    .ld-fh-element.mb-0\/15em.lqd-highlight-custom {
        margin-top: 30px !important;
    }
    
    /* Fix banner layout for this resolution */
    .banner {
        background-position: center center !important;
    }
    
    .banner .container {
        max-width: 90% !important;
    }
    
    /* Improve navigation spacing */
    .navbar-collapse .navbar-nav > li {
        margin-right: 15px !important;
    }
    
    /* Adjust padding for sections */
    .py-150 {
        padding-top: 100px !important;
        padding-bottom: 100px !important;
    }
    
    /* Fix grid layout issues */
    .row {
        margin-left: -15px !important;
        margin-right: -15px !important;
    }
    
    .row > [class*='col-'] {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    /* Adjust spacing for better appearance */
    .mb-30 {
        margin-bottom: 20px !important;
    }
    
    /* Fix image scaling */
    img.img-fluid {
        max-width: 100% !important;
        height: auto !important;
    }
}

/* Mobile specific adjustments */
@media (max-width: 768px) {
    /* Fix for mobile logo */
    .navbar-brand img {
        height: 40px !important;
        width: auto !important;
        max-width: 150px !important;
        display: block !important;
    }
    .mobile-text-center {
        text-align: center !important;
    }
    
    /* Adjust client logos for mobile */
    .clients img {
        max-height: 75px;
        width: auto;
    }
    
    /* Adjust padding for better mobile spacing */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Reduce vertical spacing on mobile */
    .py-150 {
        padding-top: 80px !important;
        padding-bottom: 80px !important;
    }
    
    /* Adjust font sizes for mobile */
    h1, .h1 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }
    
    h2, .h2 {
        font-size: 1.75rem !important;
        line-height: 1.2 !important;
    }
    
    h3, .h3 {
        font-size: 1.5rem !important;
        line-height: 1.2 !important;
    }
    
    /* Improve button display on mobile */
    .btn {
        display: inline-flex;
        justify-content: center;
        align-items: center;
        text-align: center;
        white-space: normal;
        height: auto;
        padding: 10px 20px;
    }
    
    /* Fix carousel navigation on mobile */
    .carousel-nav-left .flickity-prev-next-button.previous {
        left: 0;
    }
    
    .carousel-nav-left .flickity-prev-next-button.next {
        right: 0;
    }
    
    /* Improve form elements on mobile */
    input, select, textarea {
        font-size: 16px !important; /* Prevents iOS zoom on focus */
    }
}

/* Small mobile devices */
@media (max-width: 576px) {
    /* Further reduce spacing */
    .py-150 {
        padding-top: 60px !important;
        padding-bottom: 60px !important;
    }
    
    /* Adjust column widths for very small screens */
    .sm\:w-full {
        width: 100% !important;
    }
    
    /* Smaller headings on very small screens */
    h1, .h1 {
        font-size: 1.75rem !important;
    }
    
    h2, .h2 {
        font-size: 1.5rem !important;
    }
}