/* ===================================
   MOBILE-FIRST RESPONSIVE DESIGN
   ================================== */

/* Mobile Base Styles */
@media (max-width: 576px) {
    /* Typography */
    .display-1 { font-size: 2.5rem !important; }
    .display-2 { font-size: 2.2rem !important; }
    .display-3 { font-size: 2rem !important; }
    .display-4 { font-size: 1.8rem !important; }
    .h1, h1 { font-size: 1.8rem !important; }
    .h2, h2 { font-size: 1.6rem !important; }
    .h3, h3 { font-size: 1.4rem !important; }
    .h4, h4 { font-size: 1.2rem !important; }
    .h5, h5 { font-size: 1.1rem !important; }
    .h6, h6 { font-size: 1rem !important; }

    .lead { font-size: 1.1rem !important; }

    /* Container Spacing */
    .container-fluid { padding-left: 15px; padding-right: 15px; }
    .container { padding-left: 15px; padding-right: 15px; }

    /* Section Spacing */
    section { padding: 40px 0 !important; }
    .py-5 { padding-top: 40px !important; padding-bottom: 40px !important; }
    .my-5 { margin-top: 30px !important; margin-bottom: 30px !important; }

    /* Hero Section Mobile */
    .hero {
        padding: 80px 0 !important;
        min-height: auto !important;
    }

    .hero h1, .hero .display-3 {
        font-size: 2rem !important;
        line-height: 1.3 !important;
        margin-bottom: 20px !important;
    }

    .hero .lead {
        font-size: 1.1rem !important;
        line-height: 1.5 !important;
        margin-bottom: 25px !important;
    }

    .hero-buttons {
        text-align: center !important;
        margin-bottom: 30px !important;
    }

    .hero-buttons .btn {
        width: 100% !important;
        margin: 8px 0 !important;
        padding: 12px 20px !important;
        font-size: 1rem !important;
    }

    /* Achievement Grid Mobile */
    .achievement-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
        margin-top: 30px !important;
    }

    .achievement-item {
        padding: 15px !important;
        border-radius: 12px !important;
    }

    .achievement-item h3 {
        font-size: 1.5rem !important;
    }

    .achievement-item p {
        font-size: 0.9rem !important;
    }

    /* Brand Tagline Mobile */
    .brand-tagline {
        margin-bottom: 30px !important;
        text-align: center !important;
    }

    .tagline-container.floating-card {
        padding: 20px 25px !important;
        margin: 0 10px !important;
    }

    .tagline-text {
        font-size: 1.5rem !important;
        line-height: 1.4 !important;
        white-space: normal !important;
        text-align: center !important;
    }

    .logo-text {
        font-size: 1.7rem !important;
        display: block !important;
        margin-top: 5px !important;
        margin-left: 0 !important;
    }

    /* Sticky Features Mobile Fix */
    .sticky-features {
        position: static !important;
        width: 100% !important;
        margin-top: 20px !important;
        transform: none !important;
        flex-direction: row !important;
        justify-content: center !important;
        gap: 15px !important;
    }

    .sticky-feature {
        writing-mode: unset !important;
        text-orientation: unset !important;
        transform: none !important;
        padding: 12px 16px !important;
        border-radius: 12px !important;
        flex: 1 !important;
        max-width: 180px !important;
        text-align: center !important;
    }

    .sticky-feature:hover {
        transform: translateY(-3px) !important;
    }

    .sticky-feature i {
        transform: none !important;
        font-size: 1.2rem !important;
        margin-bottom: 5px !important;
        display: block !important;
    }

    .sticky-feature span {
        transform: none !important;
        font-size: 0.9rem !important;
        display: block !important;
    }

    /* Card Layouts Mobile */
    .service-card,
    .solution-card,
    .feature-card,
    .dynamic-section-card {
        margin-bottom: 20px !important;
        padding: 20px !important;
    }

    .service-icon,
    .solution-icon,
    .feature-icon {
        width: 60px !important;
        height: 60px !important;
        font-size: 1.5rem !important;
    }

    /* Technology Section Mobile */
    .tech-image-card {
        transform: none !important;
        margin-bottom: 30px !important;
    }

    .tech-main-image {
        height: 250px !important;
    }

    .tech-stats-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .tech-stat-item {
        padding: 12px !important;
        gap: 12px !important;
    }

    .stat-icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 1rem !important;
    }

    .stat-number {
        font-size: 1.4rem !important;
    }

    .stat-label {
        font-size: 0.8rem !important;
    }

    /* Services Section Mobile */
    .services-timeline::before {
        left: 20px !important;
    }

    .service-item {
        margin-left: 50px !important;
        flex-direction: column !important;
    }

    .service-content {
        flex-direction: column !important;
        padding: 20px !important;
        gap: 15px !important;
    }

    .service-icon {
        width: 60px !important;
        height: 60px !important;
        font-size: 1.5rem !important;
        margin-bottom: 15px !important;
        align-self: center !important;
    }

    /* Global Presence Mobile */
    .country-flag {
        width: 100px !important;
        height: 100px !important;
        margin: 0 auto 15px !important;
    }

    .country-stats {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .stat .number {
        font-size: 1.5rem !important;
    }

    /* Partners Section Mobile */
    .partner-card {
        height: 150px !important;
        padding: 15px !important;
    }

    .partner-logo {
        max-height: 100px !important;
    }

    /* Testimonials Mobile */
    .testimonial-card {
        padding: 25px !important;
        margin: 10px !important;
    }

    .testimonial-author {
        flex-direction: column !important;
        text-align: center !important;
        gap: 15px !important;
    }

    .testimonial-author img {
        width: 60px !important;
        height: 60px !important;
    }

    /* Contact Section Mobile */
    .contact-method {
        padding: 15px !important;
        flex-direction: column !important;
        text-align: center !important;
        gap: 15px !important;
    }

    .method-icon {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.3rem !important;
    }

    .contact-methods {
        gap: 15px !important;
    }

    /* Form Elements Mobile */
    .form-floating > .form-control,
    .form-floating > .form-select {
        height: calc(3rem + 2px) !important;
        font-size: 1rem !important;
    }

    .form-floating > textarea.form-control {
        height: 120px !important;
    }

    .btn {
        padding: 12px 20px !important;
        font-size: 1rem !important;
        border-radius: 8px !important;
    }

    .btn-lg {
        padding: 15px 30px !important;
        font-size: 1.1rem !important;
    }

    /* Grid Layouts Mobile */
    .row.g-4 > * {
        margin-bottom: 20px !important;
    }

    .row.g-5 > * {
        margin-bottom: 25px !important;
    }

    /* Navigation Mobile Fixes */
    .navbar-toggler {
        border: none !important;
        padding: 6px 10px !important;
        font-size: 1.1rem !important;
    }

    .navbar-toggler:focus {
        box-shadow: none !important;
    }

    .navbar-collapse {
        margin-top: 15px !important;
        padding: 20px 0 !important;
        border-top: 1px solid rgba(0,0,0,0.1) !important;
    }

    .navbar-nav .nav-link {
        padding: 12px 0 !important;
        font-size: 1.1rem !important;
        text-align: center !important;
        border-bottom: 1px solid rgba(0,0,0,0.05) !important;
    }

    /* Modal Mobile */
    .modal-dialog {
        margin: 20px !important;
    }

    .modal-content {
        border-radius: 15px !important;
    }

    .modal-body {
        padding: 20px !important;
    }

    /* Footer Mobile */
    .footer {
        padding: 40px 0 20px !important;
    }

    .footer h5 {
        font-size: 1.1rem !important;
        margin-bottom: 20px !important;
    }

    .footer ul li {
        margin-bottom: 8px !important;
    }

    .footer ul li a {
        font-size: 0.95rem !important;
    }

    .social-links {
        justify-content: center !important;
        margin-top: 20px !important;
    }

    .social-links a {
        width: 45px !important;
        height: 45px !important;
    }
}

/* Tablet Styles */
@media (min-width: 577px) and (max-width: 768px) {
    .hero h1, .hero .display-3 {
        font-size: 2.5rem !important;
    }

    .achievement-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }

    .tagline-text {
        font-size: 1.8rem !important;
    }

    .logo-text {
        font-size: 2rem !important;
    }

    .sticky-features {
        position: static !important;
        width: 100% !important;
        margin-top: 20px !important;
        transform: none !important;
        flex-direction: row !important;
        justify-content: center !important;
        gap: 20px !important;
    }

    .sticky-feature {
        writing-mode: unset !important;
        text-orientation: unset !important;
        transform: none !important;
        padding: 15px 20px !important;
        flex: 1 !important;
        max-width: 200px !important;
        text-align: center !important;
    }

    .service-card,
    .solution-card {
        padding: 30px !important;
    }

    .tech-main-image {
        height: 350px !important;
    }

    .tech-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Large Mobile / Small Tablet */
@media (min-width: 769px) and (max-width: 991px) {
    .hero h1, .hero .display-3 {
        font-size: 3rem !important;
    }

    .achievement-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .sticky-features {
        position: absolute !important;
        top: 50% !important;
        right: -40px !important;
        transform: translateY(-50%) !important;
        flex-direction: column !important;
        gap: 20px !important;
    }

    .sticky-feature {
        writing-mode: vertical-rl !important;
        text-orientation: mixed !important;
        transform: rotate(180deg) !important;
        padding: 12px 18px !important;
    }
}

/* Landscape Mobile Fixes */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 40px 0 !important;
    }

    .hero h1, .hero .display-3 {
        font-size: 1.8rem !important;
        margin-bottom: 15px !important;
    }

    .hero .lead {
        font-size: 1rem !important;
        margin-bottom: 20px !important;
    }

    .achievement-grid {
        margin-top: 20px !important;
    }

    .brand-tagline {
        margin-bottom: 20px !important;
    }

    .sticky-features {
        margin-top: 15px !important;
        gap: 10px !important;
    }

    .sticky-feature {
        padding: 8px 12px !important;
    }
}

/* Fix for very small screens */
@media (max-width: 360px) {
    .container-fluid,
    .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .tagline-container.floating-card {
        padding: 15px 20px !important;
        margin: 0 5px !important;
    }

    .tagline-text {
        font-size: 1.3rem !important;
    }

    .logo-text {
        font-size: 1.5rem !important;
    }

    .hero-buttons .btn {
        padding: 10px 15px !important;
        font-size: 0.95rem !important;
    }

    .sticky-feature {
        padding: 10px 12px !important;
        max-width: 160px !important;
    }

    .sticky-feature span {
        font-size: 0.8rem !important;
    }
}

/* Fix common mobile issues */
@media (max-width: 768px) {
    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden !important;
    }

    /* Fix any elements extending beyond viewport */
    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .col, [class*="col-"] {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    /* Ensure images are responsive */
    img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Fix any fixed positioning issues */
    .position-absolute {
        position: relative !important;
    }

    /* Better touch targets */
    .btn, .nav-link, a[role="button"] {
        min-height: 44px !important;
        min-width: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Improve readability */
    p, .lead, li {
        line-height: 1.6 !important;
    }

    /* Fix any margin issues */
    .mb-5 { margin-bottom: 2rem !important; }
    .mt-5 { margin-top: 2rem !important; }
    .py-5 { padding-top: 2rem !important; padding-bottom: 2rem !important; }
}
