/* Mobile Responsive Fixes for Index Page */

/* General Mobile Improvements */
@media (max-width: 767px) {
    
    /* Improve text sizing for mobile */
    .big-text {
        font-size: 16px !important;
        line-height: 1.5;
    }

    .big-text-20 {
        font-size: 16px !important;
    }

    .small-text {
        font-size: 14px !important;
    }

    /* Button improvements for mobile */
    .btn {
        font-size: 14px !important;
        padding: 12px 20px !important;
        margin-bottom: 15px !important;
        min-height: 44px; /* Touch-friendly */
        line-height: 1.3;
    }

    .btn-lg {
        font-size: 16px !important;
        padding: 14px 24px !important;
        min-height: 48px;
    }

    .btn-round-lg {
        border-radius: 25px;
    }

    .btn-block {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Ensure buttons are visible over background images */
    .pix_startup-intro .btn {
        background: rgba(118, 75, 162, 0.95) !important;
        color: #ffffff !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
        border: 2px solid rgba(255, 255, 255, 0.2);
    }

    .pix_startup-1 .btn,
    .pix_startup-2 .btn {
        background: rgba(118, 75, 162, 0.9) !important;
        color: #ffffff !important;
        border: 2px solid rgba(255, 255, 255, 0.3);
        backdrop-filter: blur(5px);
    }

    /* Fix background image sections with overlays */
    .pix-startup-intro::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.1) 100%);
        z-index: 1;
        pointer-events: none;
    }

    .pix-startup-1::before,
    .pix-startup-2::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.2);
        z-index: 1;
        pointer-events: none;
    }

    /* Ensure content is above overlays */
    .pix-startup-intro .pix-content,
    .pix-startup-1 .pix-content,
    .pix-startup-2 .pix-content {
        position: relative;
        z-index: 2;
    }

    /* Improve headings for mobile */
    h1 {
        font-size: 28px !important;
        line-height: 1.2;
        margin-bottom: 20px !important;
    }

    h2 {
        font-size: 24px !important;
        line-height: 1.3;
        margin-bottom: 20px !important;
    }

    h5 {
        font-size: 16px !important;
    }

    /* Adjust icon sizes */
    .big-icon-120 {
        font-size: 60px !important;
        width: 60px !important;
        height: 60px !important;
    }

    .big-icon-100 {
        font-size: 50px !important;
        width: 50px !important;
        height: 50px !important;
    }

    .big-icon-55 {
        font-size: 30px !important;
        width: 30px !important;
        height: 30px !important;
    }

    /* Improve card layouts */
    .pix-border-box-3 {
        margin-bottom: 20px;
        padding: 30px 15px !important;
    }

    .pix-padding-v-50 {
        padding-top: 30px !important;
        padding-bottom: 30px !important;
    }

    .pix-margin-v-10 {
        margin-top: 15px !important;
        margin-bottom: 15px !important;
    }

    .pix-margin-v-30 {
        margin-top: 20px !important;
        margin-bottom: 20px !important;
    }

    .pix-margin-bottom-20 {
        margin-bottom: 15px !important;
    }

    .pix-margin-bottom-30 {
        margin-bottom: 25px !important;
    }

    .pix-margin-bottom-40 {
        margin-bottom: 30px !important;
    }

    /* Improve spacing between sections */
    .row > div {
        margin-bottom: 30px;
    }

    /* Navigation improvements */
    .navbar-brand img {
        max-height: 40px;
    }

    /* Ensure proper spacing in forms */
    .form-group {
        margin-bottom: 20px;
    }

    /* Fix testimonials carousel for mobile */
    .testimonial-carousel {
        padding: 0 15px;
    }

    .testimonial-text {
        font-size: 14px !important;
        line-height: 1.6;
    }

    .pix-round-shape-120 {
        width: 80px !important;
        height: 80px !important;
    }

    /* Testimonial navigation */
    .testimonial-nav {
        width: 40px !important;
        height: 40px !important;
    }

    /* Improve CTAs */
    .pix-margin-right-10 {
        margin-right: 0 !important;
    }

    .wide {
        width: 100%;
    }

    /* Padding adjustments */
    .pix-padding-h-20 {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

/* Tablet responsive fixes */
@media (max-width: 991px) {
    /* Fix text visibility in background image sections for tablet */
    .pix-startup-1 .pix-black-gray-dark,
    .pix-startup-2 .pix-black-gray-dark {
        color: #ffffff !important;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7) !important;
    }

    .pix-startup-1 .pix-black-gray-light,
    .pix-startup-2 .pix-black-gray-light {
        color: rgba(255, 255, 255, 0.9) !important;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6) !important;
    }

    .pix-startup-1 h2,
    .pix-startup-2 h2 {
        color: #ffffff !important;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
        position: relative;
        z-index: 3;
    }

    .pix-startup-1 p,
    .pix-startup-2 p {
        color: rgba(255, 255, 255, 0.95) !important;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7) !important;
        position: relative;
        z-index: 3;
    }
}

@media (max-width: 480px) {
  
    h1 {
        font-size: 24px !important;
    }

    h2 {
        font-size: 20px !important;
    }

    .big-text {
        font-size: 14px !important;
    }

    .big-text-20 {
        font-size: 14px !important;
    }

    .small-text {
        font-size: 13px !important;
    }

    .btn {
        font-size: 13px !important;
        padding: 10px 15px !important;
        min-height: 42px;
    }

    .btn-lg {
        font-size: 15px !important;
        padding: 12px 18px !important;
        min-height: 46px;
    }

    .big-icon-120 {
        font-size: 50px !important;
        width: 50px !important;
        height: 50px !important;
    }

    .big-icon-100 {
        font-size: 40px !important;
        width: 40px !important;
        height: 40px !important;
    }

    .pix-border-box-3 {
        padding: 25px 10px !important;
    }

    .pix-padding-v-50 {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }

    /* Form improvements for very small screens */
    .form-control {
        padding: 12px 10px !important;
        font-size: 14px !important;
        min-height: 44px;
    }

    select.form-control {
        padding: 12px 10px !important;
        padding-right: 2rem !important;
        min-height: 44px;
        font-size: 14px !important;
    }

    /* Testimonial improvements */
    .pix-round-shape-120 {
        width: 60px !important;
        height: 60px !important;
    }

    .testimonial-text {
        font-size: 13px !important;
        line-height: 1.5;
    }

    .testimonial-nav {
        width: 35px !important;
        height: 35px !important;
        font-size: 12px;
    }
}

/* Improve button visibility and accessibility */
.btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* Ensure proper contrast for accessibility */
@media (max-width: 767px) {
    .pix-white {
        color: #ffffff !important;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    }

    .pix-slight-white {
        color: rgba(255, 255, 255, 0.95) !important;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    }

    .pix-purple {
        color: #764ba2 !important;
        background-color: rgba(255, 255, 255, 0.9) !important;
    }
}

/* Fix background images that interfere with readability */
.pix-startup-intro,
.pix-startup-1,
.pix-startup-2 {
    position: relative;
}

/* Add overlay to improve text readability */
@media (max-width: 767px) {
    .pix-startup-intro::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 100px;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.3), transparent);
        z-index: 1;
        pointer-events: none;
    }

    /* Ensure buttons are above overlays */
    .pix-startup-intro .pix-content {
        position: relative;
        z-index: 3;
    }

    .pix-startup-intro .btn {
        position: relative;
        z-index: 4;
    }

    /* Fix text visibility in background image sections */
    .pix-startup-1 .pix-black-gray-dark,
    .pix-startup-2 .pix-black-gray-dark {
        color: #ffffff !important;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7) !important;
    }

    .pix-startup-1 .pix-black-gray-light,
    .pix-startup-2 .pix-black-gray-light {
        color: rgba(255, 255, 255, 0.9) !important;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6) !important;
    }

    .pix-startup-1 h2,
    .pix-startup-2 h2 {
        color: #ffffff !important;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
        position: relative;
        z-index: 3;
    }

    .pix-startup-1 p,
    .pix-startup-2 p {
        color: rgba(255, 255, 255, 0.95) !important;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7) !important;
        position: relative;
        z-index: 3;
    }

    .pix-startup-1 .btn,
    .pix-startup-2 .btn {
        position: relative;
        z-index: 4;
    }
}

/* Improve contact form mobile experience */
@media (max-width: 767px) {
    .pix-form-style .form-control {
        font-size: 14px !important;
        padding: 14px 12px !important;
        min-height: 48px;
    }

    .pix-form-style select.form-control {
        padding: 14px 12px !important;
        padding-right: 2rem !important;
        min-height: 48px;
        font-size: 14px !important;
    }

    .pix-form-style textarea.form-control {
        min-height: 100px;
        padding: 14px 12px !important;
        font-size: 14px !important;
    }

    .contact-form-btn {
        width: 100% !important;
        margin-bottom: 10px !important;
        min-height: 48px;
        font-size: 14px !important;
    }
}

/* Fix collapsed navbar on mobile */
@media (max-width: 767px) {
    .navbar-collapse {
        background-color: rgba(54, 63, 72, 0.95);
        margin-top: 15px;
        border-radius: 5px;
        padding: 15px;
    }

    .navbar-nav > li > a {
        color: #ffffff !important;
        padding: 10px 0;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .dropdown-menu {
        background-color: rgba(54, 63, 72, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .dropdown-menu > li > a {
        color: #ffffff !important;
        padding: 8px 15px;
    }
    
    /* Portfolio specific button fixes */
    .btn-xl {
        font-size: 16px !important;
        padding: 14px 24px !important;
        min-height: 48px;
        margin-bottom: 15px !important;
    }

    .btn-md {
        font-size: 15px !important;
        padding: 12px 20px !important;
        min-height: 46px;
        margin-bottom: 15px !important;
    }

    .btn-link {
        font-size: 14px !important;
        padding: 10px 15px !important;
        margin-bottom: 10px !important;
        display: inline-block;
    }

    /* Portfolio section adjustments */
    .portfolio-item {
        margin-bottom: 30px;
    }

    .portfolio-overlay {
        padding: 20px !important;
    }

    /* Improve software-1 background image sections */
    .pix-software-1 {
        position: relative;
    }

    .pix-software-1::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.2);
        z-index: 1;
        pointer-events: none;
    }

    .pix-software-1 .pix-content {
        position: relative;
        z-index: 2;
    }

    .pix-software-1 .btn {
        position: relative;
        z-index: 3;
        background: rgba(255, 140, 0, 0.95) !important;
        border: 2px solid rgba(255, 255, 255, 0.3) !important;
    }

    /* Fix text visibility in background image sections for tablet */
    .pix-startup-1 .pix-black-gray-dark,
    .pix-startup-2 .pix-black-gray-dark {
        color: #ffffff !important;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7) !important;
    }

    .pix-startup-1 .pix-black-gray-light,
    .pix-startup-2 .pix-black-gray-light {
        color: rgba(255, 255, 255, 0.9) !important;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6) !important;
    }

    .pix-startup-1 h2,
    .pix-startup-2 h2 {
        color: #ffffff !important;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
        position: relative;
        z-index: 3;
    }

    .pix-startup-1 p,
    .pix-startup-2 p {
        color: rgba(255, 255, 255, 0.95) !important;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7) !important;
        position: relative;
        z-index: 3;
    }

    /* Ensure proper spacing for portfolio navigation */
    .pix-section .row > div {
        margin-bottom: 30px;
    }

    /* Portfolio overlay fixes */
    .portfolio-overlay-content {
        padding: 15px !important;
        font-size: 14px !important;
    }

    .portfolio-overlay h3 {
        font-size: 16px !important;
        margin-bottom: 10px !important;
    }

    .portfolio-overlay p {
        font-size: 13px !important;
        line-height: 1.4;
    }
}

/* Improve footer mobile layout */
@media (max-width: 767px) {
    #contact .row > div {
        margin-bottom: 30px;
        text-align: center;
    }

    #contact .pix-padding-v-10 {
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }

    #contact .big-text {
        font-size: 14px !important;
        line-height: 1.4;
    }

    #contact .pix-margin-right-10 {
        margin-right: 0 !important;
        float: none !important;
    }

    #contact .pix-float-left {
        float: none !important;
        text-align: center;
        display: block;
    }
}