/* Universal Mobile Responsive Fixes for All Pages */

/* Apply to all pages on mobile */
@media screen and (max-width: 768px) {
    /* Prevent horizontal scroll */
    html {
        overflow-x: hidden !important;
        width: 100% !important;
    }
    
    body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
    
    /* Force all grid layouts to stack */
    *[style*="display: grid"],
    *[style*="grid-template-columns"] {
        display: block !important;
        grid-template-columns: 1fr !important;
    }
    
    /* Ensure all containers are full width */
    .container,
    *[class*="container"] {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    /* Fix all images */
    img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    /* Header and Logo Images */
    .logo img,
    .logo-image {
        max-width: 150px !important;
        width: auto !important;
        height: auto !important;
    }
    
    /* Content Images */
    section img,
    .intro-images img,
    .services-images img,
    .why-need-images img,
    .documents-images img,
    .benefits-images img {
        width: 100% !important;
        height: auto !important;
        object-fit: cover !important;
        border-radius: 8px !important;
    }
    
    /* Hero Section Images */
    .hero img,
    .agent-hero img,
    .compliance-hero img,
    .documents-hero img,
    .ip-hero img,
    .mnc-hero img {
        width: 100% !important;
        height: auto !important;
        max-height: 300px !important;
        object-fit: cover !important;
    }
    
    /* Partnership Hero */
    .partnership-hero {
        min-height: 350px !important;
        padding: 60px 20px !important;
        background-attachment: scroll !important;
    }
    
    .partnership-hero h1 {
        font-size: 42px !important;
        letter-spacing: 1px !important;
    }
    
    /* Card Images */
    .service-card img,
    .benefit-item img,
    .reason-card img,
    .document-card img,
    .requirement-card img,
    .type-card img {
        width: 100% !important;
        height: auto !important;
        max-height: 200px !important;
        object-fit: cover !important;
    }
    
    /* Team/Profile Images */
    .team-member-card img,
    .member-image img,
    .profile-image img {
        width: 100% !important;
        max-width: 300px !important;
        height: auto !important;
        margin: 0 auto !important;
    }
    
    /* Responsive typography */
    h1, h1[style] {
        font-size: 28px !important;
        line-height: 1.2 !important;
    }
    
    h2, h2[style] {
        font-size: 24px !important;
        line-height: 1.3 !important;
    }
    
    h3, h3[style] {
        font-size: 20px !important;
        line-height: 1.3 !important;
    }
    
    h4, h4[style] {
        font-size: 18px !important;
    }
    
    p, li, span {
        font-size: 15px !important;
        line-height: 1.6 !important;
    }
    
    /* Section padding */
    section,
    section[style*="padding"] {
        padding: 30px 0 !important;
    }
    
    /* Fix white boxes and cards */
    *[style*="background: white"],
    *[style*="background: #fff"],
    *[style*="background: #ffffff"] {
        padding: 20px !important;
        margin: 10px 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Remove max-width constraints */
    *[style*="max-width"] {
        max-width: 100% !important;
    }
    
    /* Fix gaps */
    *[style*="gap"] {
        gap: 20px !important;
    }
    
    /* Buttons full width */
    button,
    .btn,
    a.btn,
    *[style*="background"][style*="padding"][style*="border-radius"] {
        width: 100% !important;
        display: block !important;
        text-align: center !important;
        padding: 15px 20px !important;
    }
}

/* Extra small screens */
@media screen and (max-width: 480px) {
    h1, h1[style] {
        font-size: 24px !important;
    }
    
    h2, h2[style] {
        font-size: 20px !important;
    }
    
    h3, h3[style] {
        font-size: 18px !important;
    }
    
    section {
        padding: 20px 0 !important;
    }
    
    .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    
    /* Extra small logo */
    .logo img,
    .logo-image {
        max-width: 110px !important;
    }
    
    /* Smaller content images on very small screens */
    .hero img,
    .agent-hero img,
    .compliance-hero img,
    .documents-hero img,
    .ip-hero img,
    .mnc-hero img {
        max-height: 250px !important;
    }
    
    .service-card img,
    .benefit-item img,
    .reason-card img,
    .document-card img {
        max-height: 180px !important;
    }
    
    /* Partnership Hero Extra Small */
    .partnership-hero {
        min-height: 300px !important;
        padding: 40px 15px !important;
    }
    
    .partnership-hero h1 {
        font-size: 32px !important;
        letter-spacing: 0.5px !important;
    }
}
