
/* Mobile-specific fixes for overlapping and alignment issues */

/* Prevent horizontal scrolling */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
    margin: 0;
    padding: 0;
}

/* Reset and base styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
}

/* Ensure proper content flow */
main {
    position: relative;
    z-index: 1;
    margin-top: 0;
    padding-top: 0;
}

/* Fix header positioning on mobile */
@media (max-width: 768px) {
    .top-header {
        position: relative;
        z-index: 1002;
    }

    .nav {
        position: relative;
        top: 0;
        z-index: 1001;
    }

    /* Ensure main content starts after header */
    .header {
        margin-top: 0;
        padding-top: 80px;
    }

    /* Fix overlapping sections */
    section {
        position: relative;
        z-index: 1;
        margin-bottom: 0;
        clear: both;
    }

    /* Container fixes */
    .container {
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Grid fixes */
    .grid {
        display: grid;
        gap: 15px;
        width: 100%;
    }

    .grid-cols-1,
    .md\:grid-cols-2,
    .lg\:grid-cols-3,
    .lg\:grid-cols-4 {
        grid-template-columns: 1fr;
    }

    /* Flex fixes */
    .flex {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }

    .flex-col {
        flex-direction: column;
    }

    .md\:flex-row {
        flex-direction: column;
    }

    /* Width fixes */
    .md\:w-1\/2,
    .lg\:w-1\/3,
    .w-full {
        width: 100%;
        max-width: 100%;
    }

    /* Text alignment */
    .text-center {
        text-align: center;
    }

    /* Button fixes */
    .cta-button,
    .animated-button,
    .btn,
    button,
    a[class*="bg-"] {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 12px 20px;
        margin: 8px auto;
        min-height: 44px;
        text-align: center;
        word-wrap: break-word;
        white-space: normal;
        box-sizing: border-box;
    }

    .block {
        display: block !important;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

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

    /* Card padding fixes */
    .p-6 {
        padding: 15px !important;
    }

    .p-4 {
        padding: 12px !important;
    }

    .py-16 {
        padding-top: 40px !important;
        padding-bottom: 40px !important;
    }

    .py-12 {
        padding-top: 30px !important;
        padding-bottom: 30px !important;
    }

    /* Margin fixes */
    .mb-16 {
        margin-bottom: 25px !important;
    }

    .mb-12 {
        margin-bottom: 20px !important;
    }

    .mb-8 {
        margin-bottom: 15px !important;
    }

    .mb-6 {
        margin-bottom: 12px !important;
    }

    /* Text size fixes */
    .text-4xl {
        font-size: 1.8rem !important;
        line-height: 1.2;
    }

    .text-3xl {
        font-size: 1.5rem !important;
        line-height: 1.2;
    }

    .text-2xl {
        font-size: 1.3rem !important;
        line-height: 1.3;
    }

    .text-xl {
        font-size: 1.1rem !important;
        line-height: 1.3;
    }

    .text-lg {
        font-size: 1rem !important;
        line-height: 1.4;
    }

    /* Spacing fixes */
    .space-y-3 > :not([hidden]) ~ :not([hidden]) {
        margin-top: 8px !important;
    }

    .space-y-6 > :not([hidden]) ~ :not([hidden]) {
        margin-top: 15px !important;
    }

    .space-x-4 > :not([hidden]) ~ :not([hidden]) {
        margin-left: 0 !important;
        margin-top: 10px !important;
    }

    .gap-8 {
        gap: 15px !important;
    }

    .gap-10 {
        gap: 20px !important;
    }

    .gap-12 {
        gap: 25px !important;
    }

    /* Partner logo fixes */
    .partner-logo-container {
        width: auto;
        min-width: 80px;
        margin: 5px;
        padding: 8px;
        text-align: center;
    }

    .partner-logo-container img {
        max-height: 35px;
        width: auto;
        margin: 0 auto;
    }

    .partner-logo-container p {
        font-size: 9px;
        margin-top: 4px;
        line-height: 1.2;
    }

    /* Fix features section */
    .features {
        position: static !important;
        flex-direction: column;
        gap: 15px;
        margin-top: 20px;
        padding: 0 15px;
        bottom: auto;
    }

    .feature {
        background: rgba(0, 0, 0, 0.3);
        padding: 12px;
        border-radius: 8px;
        backdrop-filter: blur(10px);
        margin-bottom: 10px;
    }

    .feature i {
        font-size: 20px;
        margin-bottom: 5px;
    }

    .feature span {
        font-size: 11px;
        display: block;
        margin-top: 5px;
    }

    /* Fix testimonial cards */
    .testimonial-card {
        padding: 20px 15px;
        margin-bottom: 15px;
    }

    .testimonial-card .flex {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .w-12.h-12 {
        width: 40px;
        height: 40px;
        margin: 0 auto;
    }
}

/* Extra small screens */
@media (max-width: 375px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .service-card,
    .package-card,
    .benefit-card,
    .testimonial-card {
        padding: 15px 10px;
    }

    .text-4xl {
        font-size: 1.6rem !important;
    }

    .text-3xl {
        font-size: 1.4rem !important;
    }

    .cta-button {
        padding: 10px 16px;
        font-size: 14px;
    }
}

/* Landscape mobile fix */
@media (max-height: 500px) and (max-width: 768px) {
    .header {
        min-height: 400px;
        padding: 60px 0 40px;
    }

    .hero {
        min-height: 400px;
        height: 70vh;
    }
}
