/* ========================================
   COMPREHENSIVE RESPONSIVE FIXES
   For Production-Ready Deployment
   ======================================== */

/* ========================================
   1. GLOBAL FIXES
   ======================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    width: 100%;
}

body {
    overflow-x: hidden !important;
    min-height: 100vh;
    width: 100%;
    position: relative;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Prevent horizontal scroll */
.container {
    max-width: 100%;
    overflow-x: hidden;
    width: 100%;
}

/* Force all sections to respect viewport width */
section {
    max-width: 100vw;
    overflow-x: hidden;
    width: 100%;
}

/* ========================================
   2. NAVIGATION FIXES
   ======================================== */

@media (max-width: 1024px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 60px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        z-index: 999;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 0;
        padding: 20px 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .hamburger {
        display: flex !important;
    }
}

/* ========================================
   3. HERO SECTION RESPONSIVE FIXES
   ======================================== */

@media (max-width: 1200px) {
    .hero-title {
        font-size: 42px !important;
    }

    .hero-description {
        font-size: 16px !important;
    }
}

@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr !important;
        gap: 40px;
    }

    .hero-text {
        text-align: center;
        order: 1;
    }

    .form-container {
        order: 2;
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 100px 20px 60px !important;
        max-width: 100vw;
        overflow-x: hidden;
        width: 100%;
    }

    .hero-title {
        font-size: 32px !important;
        line-height: 1.3 !important;
    }

    .hero-description {
        font-size: 15px !important;
        line-height: 1.6 !important;
    }

    .btn-get-started {
        padding: 14px 32px !important;
        font-size: 15px !important;
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px !important;
    }

    .hero-description {
        font-size: 14px !important;
    }

    .form-container {
        padding: 30px 20px !important;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .btn-get-started {
        width: 100%;
        max-width: 100%;
    }
}

/* ========================================
   4. FORM RESPONSIVE FIXES
   ======================================== */

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .checkbox-label span {
        font-size: 13px !important;
    }
}

@media (max-width: 480px) {
    .services-grid {
        grid-template-columns: 1fr !important;
    }

    .phone-input .country-code,
    .budget-input .currency {
        padding: 15px 12px !important;
        font-size: 14px !important;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"] {
        padding: 15px 18px !important;
        font-size: 14px !important;
    }
}

/* ========================================
   5. STATS SECTION RESPONSIVE FIXES
   ======================================== */

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 30px !important;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 25px !important;
    }

    .stat-number {
        font-size: 36px !important;
    }

    .stat-label {
        font-size: 13px !important;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .stat-item {
        padding: 25px 20px !important;
    }
}

/* ========================================
   6. SERVICES CARDS RESPONSIVE FIXES
   ======================================== */

@media (max-width: 1200px) {
    .services-cards-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .service-tabs {
        flex-wrap: wrap !important;
        gap: 10px !important;
    }

    .tab-btn {
        padding: 10px 16px !important;
        font-size: 13px !important;
        flex: 1 1 calc(50% - 5px);
        min-width: 140px;
    }

    .services-cards-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .service-card-title {
        font-size: 20px !important;
    }

    .service-card-description {
        font-size: 14px !important;
    }
}

@media (max-width: 480px) {
    .tab-btn {
        flex: 1 1 100%;
        font-size: 12px !important;
    }

    .service-card {
        padding: 25px 20px !important;
    }
}

/* ========================================
   7. CASE STUDIES SLIDER FIXES
   ======================================== */

/* Desktop - Show 2 cards side by side with proper spacing */
.case-study-card {
    min-width: calc(48% - 15px) !important;
    max-width: calc(48% - 15px) !important;
    box-sizing: border-box;
    flex-shrink: 0;
}

.case-study-inner {
    background-color: white;
    padding: 40px 30px;
    border-radius: 18px;
    text-align: center;
    height: 100%;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
}

.case-study-title {
    font-size: 26px !important;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 18px;
    letter-spacing: 1.5px;
    line-height: 1.3;
}

.case-study-text {
    font-size: 15px !important;
    color: #666;
    line-height: 1.7;
    margin-bottom: 22px;
    flex-grow: 1;
}

.case-study-link {
    color: #6366f1;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.case-study-link:hover {
    color: #4f46e5;
    transform: translateX(5px);
}





@media (max-width: 375px) {
    .testimonial-card {
        width: 90% !important;
        min-width: 90% !important;
        max-width: 90% !important;
        padding: 18px 14px !important;
    }
}

/* ========================================
   CASE STUDIES SECTION RESPONSIVE
   ======================================== */

@media (max-width: 1200px) {
    .case-studies-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
        max-width: 100%;
    }
    
    .case-study-content {
        padding: 24px 20px;
    }
    
    .case-study-title {
        font-size: 20px;
    }
    
    .metric-value {
        font-size: 28px;
    }
}

@media (max-width: 1024px) {
    .case-studies-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .case-studies-section {
        padding: 80px 0;
    }
    
    .section-header {
        margin-bottom: 50px;
    }
    
    .case-studies-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-top: 40px;
    }
    
    .case-study-card {
        border-radius: 16px;
        max-width: 500px;
        margin: 0 auto;
        width: 100%;
    }
    
    .case-study-image {
        height: 160px;
    }
    
    .case-study-icon {
        width: 60px;
        height: 60px;
    }
    
    .case-study-content {
        padding: 24px 20px;
    }
    
    .case-study-title {
        font-size: 20px;
    }
    
    .case-study-description {
        font-size: 14px;
    }
    
    .case-study-metrics {
        gap: 16px;
        padding: 16px 0;
    }
    
    .metric-value {
        font-size: 28px;
    }
    
    .metric-label {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .case-studies-section {
        padding: 60px 0;
    }
    
    .case-study-card {
        max-width: 100%;
    }
    
    .case-study-content {
        padding: 20px 18px;
    }
    
    .case-study-image {
        height: 140px;
    }
    
    .case-study-icon {
        width: 50px;
        height: 50px;
    }
    
    .case-study-title {
        font-size: 18px;
    }
    
    .case-study-description {
        font-size: 13px;
    }
    
    .case-study-metrics {
        gap: 12px;
        padding: 14px 0;
    }
    
    .metric {
        text-align: left;
    }
    
    .metric-value {
        font-size: 24px;
    }
    
    .metric-label {
        font-size: 10px;
    }
}

/* ========================================
   TESTIMONIALS SECTION RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .testimonials-section {
        padding: 80px 0;
    }
    
    .testimonials-container {
        max-width: 100%;
    }
    
    .testimonial-card {
        padding: 32px 24px;
        border-radius: 20px;
    }
    
    .quote-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 20px;
    }
    
    .testimonial-text {
        font-size: 16px;
        margin-bottom: 24px;
    }
    
    .testimonial-rating {
        margin-bottom: 24px;
        padding-bottom: 20px;
    }
    
    .testimonial-author {
        gap: 16px;
    }
    
    .author-avatar {
        width: 50px;
        height: 50px;
    }
    
    .author-name {
        font-size: 16px;
    }
    
    .author-position {
        font-size: 13px;
    }
    
    .testimonials-navigation {
        margin-top: 32px;
        gap: 20px;
    }
    
    .nav-btn {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 480px) {
    .testimonials-section {
        padding: 60px 0;
    }
    
    .testimonial-card {
        padding: 24px 20px;
        border-radius: 16px;
    }
    
    .quote-icon {
        width: 44px;
        height: 44px;
        margin-bottom: 16px;
    }
    
    .testimonial-text {
        font-size: 15px;
        margin-bottom: 20px;
    }
    
    .testimonial-rating {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 20px;
        padding-bottom: 16px;
    }
    
    .stars {
        gap: 2px;
    }
    
    .star {
        font-size: 18px;
    }
    
    .testimonial-author {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .author-avatar {
        width: 44px;
        height: 44px;
    }
    
    .author-name {
        font-size: 15px;
    }
    
    .author-position {
        font-size: 12px;
    }
    
    .testimonials-navigation {
        margin-top: 24px;
        gap: 16px;
    }
    
    .nav-btn {
        width: 40px;
        height: 40px;
    }
    
    .dot {
        width: 10px;
        height: 10px;
    }
}

/* ========================================
   ANIMATION ENHANCEMENTS
   ======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.case-study-card {
    animation: fadeInUp 0.6s ease-out;
}

.testimonial-card.active {
    animation: slideIn 0.6s ease-out;
}

.quote-icon {
    animation: pulse 2s infinite;
}

/* Reduce animations on mobile for better performance */
@media (max-width: 768px) and (prefers-reduced-motion: no-preference) {
    .case-study-card,
    .testimonial-card,
    .quote-icon {
        animation-duration: 0.3s;
    }
}

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .case-study-card,
    .testimonial-card,
    .quote-icon {
        animation: none;
    }
    
    .case-study-card:hover {
        transform: none;
    }
    
    .testimonial-card {
        transform: none;
    }
}

/* ========================================
   9. FAQ SECTION RESPONSIVE FIXES
   ======================================== */

.faq-section {
    max-width: 100vw;
    overflow-x: hidden;
    width: 100%;
}

.faq-accordion {
    width: 100%;
    max-width: 950px;
}

@media (max-width: 768px) {
    .faq-section {
        max-width: 100vw;
        overflow-x: hidden;
        width: 100%;
    }
    
    .faq-accordion {
        width: 100%;
        padding: 0;
    }
    
    .faq-title {
        font-size: 28px !important;
    }

    .faq-subtitle {
        font-size: 14px !important;
    }

    .faq-question {
        font-size: 15px !important;
        padding: 18px 20px !important;
        width: 100%;
        box-sizing: border-box;
    }

    .faq-answer p {
        font-size: 13px !important;
        padding: 15px 20px !important;
    }
}

@media (max-width: 480px) {
    .faq-title {
        font-size: 24px !important;
    }

    .faq-question {
        font-size: 14px !important;
        padding: 15px 18px !important;
    }

    .faq-answer p {
        font-size: 12px !important;
    }
}

/* ========================================
   10. FOOTER RESPONSIVE FIXES
   ======================================== */

.footer {
    max-width: 100vw;
    overflow-x: hidden;
    width: 100%;
}

.footer-container {
    width: 100%;
    max-width: 1400px;
}

@media (max-width: 1024px) {
    .footer-container {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 40px !important;
        width: 100%;
    }

    .footer-left {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .footer {
        max-width: 100vw;
        overflow-x: hidden;
        width: 100%;
    }
    
    .footer-container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 30px !important;
        width: 100%;
        padding: 0 20px !important;
    }

    .footer-heading {
        font-size: 13px !important;
    }

    .footer-links a {
        font-size: 13px !important;
    }

    .footer-description {
        font-size: 13px !important;
    }
}

@media (max-width: 480px) {
    .footer-container {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
        text-align: center;
        width: 100%;
        padding: 0 15px !important;
    }

    .footer-left {
        text-align: center;
    }

    .footer-logo {
        justify-content: center;
    }

    .footer-social-icons {
        justify-content: center !important;
    }
}

/* ========================================
   11. CONTACT PAGE RESPONSIVE FIXES
   ======================================== */

@media (max-width: 768px) {
    .contact-section {
        padding: 60px 15px !important;
    }

    .contact-form-container {
        padding: 35px 25px !important;
    }

    .contact-form .form-row {
        grid-template-columns: 1fr !important;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .contact-form-container {
        padding: 25px 20px !important;
    }

    .services-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ========================================
   12. CASE STUDIES PAGE RESPONSIVE FIXES
   ======================================== */

@media (max-width: 1024px) {
    .case-studies-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .case-studies-hero .hero-title {
        font-size: 42px !important;
    }
}

@media (max-width: 768px) {
    .case-studies-hero {
        padding: 100px 20px 60px !important;
    }

    .case-studies-hero .hero-title {
        font-size: 32px !important;
    }

    .case-studies-hero .hero-description {
        font-size: 15px !important;
    }

    .case-studies-grid {
        grid-template-columns: 1fr !important;
    }

    .case-study-company {
        font-size: 18px !important;
    }

    .case-study-description {
        font-size: 14px !important;
    }
}

@media (max-width: 480px) {
    .case-studies-hero .hero-title {
        font-size: 28px !important;
    }

    .case-study-card-inner {
        padding: 25px 20px !important;
    }

    .case-study-logo {
        width: 70px !important;
        height: 70px !important;
    }
}

/* ========================================
   13. SLIDER CONTROLS RESPONSIVE FIXES
   ======================================== */

@media (max-width: 768px) {
    .slider-controls {
        gap: 15px !important;
    }

    .slider-btn {
        width: 45px !important;
        height: 45px !important;
    }

    .slider-btn svg {
        width: 18px !important;
        height: 18px !important;
    }
}

@media (max-width: 480px) {
    .slider-btn {
        width: 40px !important;
        height: 40px !important;
    }
}

/* ========================================
   14. TYPOGRAPHY RESPONSIVE FIXES
   ======================================== */

@media (max-width: 768px) {
    h1 {
        font-size: 32px !important;
    }

    h2 {
        font-size: 28px !important;
    }

    h3 {
        font-size: 22px !important;
    }

    p {
        font-size: 15px !important;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 28px !important;
    }

    h2 {
        font-size: 24px !important;
    }

    h3 {
        font-size: 20px !important;
    }

    p {
        font-size: 14px !important;
    }
}

/* ========================================
   15. BUTTON RESPONSIVE FIXES
   ======================================== */

@media (max-width: 768px) {
    .btn-submit,
    .btn-get-started,
    .btn-inquire,
    .btn-quote {
        padding: 14px 32px !important;
        font-size: 15px !important;
    }
}

@media (max-width: 480px) {
    .btn-submit,
    .btn-get-started,
    .btn-inquire,
    .btn-quote {
        padding: 12px 28px !important;
        font-size: 14px !important;
    }
}

/* ========================================
   16. SECTION PADDING RESPONSIVE FIXES
   ======================================== */

@media (max-width: 768px) {
    section {
        padding: 60px 20px !important;
        max-width: 100vw;
        overflow-x: hidden;
        width: 100%;
    }
    
    .container {
        padding: 0 20px !important;
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 480px) {
    section {
        padding: 40px 15px !important;
        max-width: 100vw;
        overflow-x: hidden;
        width: 100%;
    }
    
    .container {
        padding: 0 15px !important;
        max-width: 100%;
        width: 100%;
    }
}

/* ========================================
   17. PERFORMANCE OPTIMIZATIONS
   ======================================== */

/* Reduce animations on mobile for better performance */
@media (max-width: 768px) and (prefers-reduced-motion: no-preference) {
    * {
        animation-duration: 0.5s !important;
        transition-duration: 0.3s !important;
    }
}

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ========================================
   18. ACCESSIBILITY FIXES
   ======================================== */

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-to-main {
    position: absolute;
    left: -9999px;
    z-index: 999;
}

.skip-to-main:focus {
    left: 50%;
    transform: translateX(-50%);
    top: 10px;
    background: #6366f1;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
}

/* ========================================
   19. PRINT STYLES
   ======================================== */

@media print {
    .navbar,
    .hamburger,
    .slider-controls,
    .btn-submit,
    .btn-get-started,
    .btn-inquire,
    .footer-social-icons {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    a {
        text-decoration: underline;
    }
}

/* ========================================
   20. LANDSCAPE ORIENTATION FIXES
   ======================================== */

@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        padding: 60px 20px 40px !important;
    }

    .nav-menu {
        max-height: calc(100vh - 60px);
    }
}

/* ========================================
   21. CRITICAL MOBILE OVERFLOW FIXES
   ======================================== */

@media (max-width: 768px) {
    /* Force all elements to respect viewport width */
    * {
        max-width: 100vw;
    }
    
    /* Specific fixes for common overflow culprits */
    .hero-section,
    .why-section,
    .stats-section,
    .services-section-main,
    .faq-section,
    .footer {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        width: 100% !important;
    }
    
    .container {
        overflow-x: hidden !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* Ensure images don't cause overflow */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Fix for any grid layouts */
    .services-cards-grid,
    .stats-grid,
    .footer-container {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Ensure buttons don't overflow */
    button,
    .btn-submit,
    .btn-get-started,
    .btn-quote {
        max-width: 100% !important;
    }
    
    /* Fix form elements */
    input,
    textarea,
    select {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .form-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}


/* ========================================
   22. CRITICAL BUG FIXES - MARCH 2026
   ======================================== */

/* Fix: Ensure all interactive elements have proper touch targets (44x44px minimum) */
@media (max-width: 768px) {
    button,
    .btn-submit,
    .btn-get-started,
    .btn-quote,
    .btn-primary,
    .btn-secondary,
    .hamburger,
    .slider-btn,
    .tab-btn,
    .faq-question {
        min-height: 44px !important;
        min-width: 44px !important;
        padding: 12px 20px !important;
    }
    
    /* Fix: Ensure form inputs are properly sized */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    textarea,
    select {
        min-height: 44px !important;
        font-size: 16px !important; /* Prevents zoom on iOS */
        padding: 12px 16px !important;
    }
    
    /* Fix: Checkbox and radio buttons */
    input[type="checkbox"],
    input[type="radio"] {
        min-width: 24px !important;
        min-height: 24px !important;
        margin-right: 10px !important;
    }
}

/* Fix: Prevent text selection on buttons and interactive elements */
button,
.btn-submit,
.btn-get-started,
.btn-quote,
.btn-primary,
.btn-secondary,
.hamburger,
.slider-btn,
.tab-btn,
.faq-question {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Fix: Improve focus visibility for accessibility */
*:focus-visible {
    outline: 3px solid #6366f1 !important;
    outline-offset: 3px !important;
    border-radius: 4px;
}

/* Fix: Remove default focus outline but keep for keyboard users */
*:focus:not(:focus-visible) {
    outline: none;
}

/* Fix: Ensure images don't break layout */
img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    object-fit: contain;
}

/* Fix: Prevent layout shift from images */
img[width][height] {
    aspect-ratio: attr(width) / attr(height);
}

/* Fix: Smooth scrolling with reduced motion support */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/* Fix: Ensure proper stacking context */
.navbar {
    z-index: 1000 !important;
}

.nav-menu {
    z-index: 999 !important;
}

.hamburger {
    z-index: 1001 !important;
}

.floating-shapes {
    z-index: 0 !important;
}

/* Fix: Prevent content jumping during animations */
.case-studies-wrapper {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Fix: Improve slider performance */
.case-study-card,
.testimonial-card {
    will-change: auto;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Fix: Ensure proper text wrapping */
h1, h2, h3, h4, h5, h6 {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

p, li, span {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Fix: Prevent orphans and widows in text */
p {
    orphans: 3;
    widows: 3;
}

/* Fix: Improve button states */
button:disabled,
.btn-submit:disabled,
.btn-get-started:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* Fix: Ensure proper form validation styles */
input:invalid:not(:placeholder-shown) {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

input:valid:not(:placeholder-shown) {
    border-color: #10b981 !important;
}

/* Fix: Loading state for buttons */
button.loading,
.btn-submit.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

button.loading::after,
.btn-submit.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

/* Fix: Improve mobile menu animation */
@media (max-width: 768px) {
    .nav-menu {
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
    
    .nav-menu.active {
        left: 0 !important;
    }
}

/* Fix: Prevent double-tap zoom on iOS */
@media (max-width: 768px) {
    button,
    a,
    input,
    textarea,
    select {
        touch-action: manipulation;
    }
}

/* Fix: Improve contrast for better readability */
.hero-description,
.section-description,
.service-card-description,
.case-study-text,
.testimonial-text,
.faq-answer p,
.feature-content p,
.step-content p {
    color: #374151 !important;
    line-height: 1.7 !important;
}

/* Fix: Ensure proper spacing on mobile */
@media (max-width: 768px) {
    section {
        padding-top: 60px !important;
        padding-bottom: 60px !important;
    }
    
    .section-header {
        margin-bottom: 40px !important;
    }
    
    .hero-section {
        padding-top: 120px !important;
        padding-bottom: 60px !important;
    }
}

/* Fix: Improve FAQ accordion animation */
.faq-answer {
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease !important;
    opacity: 0;
}

.faq-item.active .faq-answer {
    opacity: 1;
}

/* Fix: Ensure proper grid gaps on mobile */
@media (max-width: 768px) {
    .benefits-grid,
    .services-cards-grid,
    .stats-grid {
        gap: 20px !important;
    }
}

/* Fix: Improve slider button visibility */
.slider-btn {
    background-color: white !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.3s ease !important;
}

.slider-btn:hover:not(:disabled) {
    background-color: #ff6b35 !important;
    transform: scale(1.1) !important;
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.3) !important;
}

.slider-btn:disabled {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}

/* Fix: Ensure proper footer spacing */
.footer {
    margin-top: 0 !important;
}

.footer-container {
    padding-top: 60px !important;
    padding-bottom: 30px !important;
}

/* Fix: Improve form error messages */
.form-error {
    color: #ef4444;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.form-error.show {
    display: block;
    animation: fadeInUp 0.3s ease;
}

/* Fix: Ensure proper line-height for readability */
body {
    line-height: 1.6 !important;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.3 !important;
}

/* Fix: Improve button hover states */
.btn-primary:hover,
.btn-secondary:hover,
.btn-submit:hover,
.btn-get-started:hover {
    transform: translateY(-3px) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Fix: Ensure proper card shadows */
.benefit-card,
.service-card,
.case-study-card,
.testimonial-card,
.feature-item {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.3s ease !important;
}

.benefit-card:hover,
.service-card:hover,
.case-study-card:hover,
.testimonial-card:hover,
.feature-item:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12) !important;
}

/* Fix: Improve mobile navigation */
@media (max-width: 768px) {
    .nav-container {
        padding: 12px 20px !important;
    }
    
    .logo img {
        max-width: 180px !important;
    }
    
    .hamburger {
        padding: 8px !important;
    }
}

/* Fix: Ensure proper z-index for modals and overlays */
.modal,
.overlay {
    z-index: 9999 !important;
}

/* Fix: Improve print styles */
@media print {
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    a, a:visited {
        text-decoration: underline !important;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
    
    abbr[title]:after {
        content: " (" attr(title) ")";
    }
    
    .navbar,
    .footer,
    .hamburger,
    .slider-controls,
    button {
        display: none !important;
    }
    
    @page {
        margin: 2cm;
    }
    
    h2, h3 {
        page-break-after: avoid;
    }
    
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }
}

/* ========================================
   23. PERFORMANCE OPTIMIZATIONS
   ======================================== */

/* Use CSS containment for better performance */
.benefit-card,
.service-card,
.case-study-card,
.testimonial-card {
    contain: layout style paint;
}

/* Optimize animations */
@media (prefers-reduced-motion: no-preference) {
    .benefit-card,
    .service-card,
    .feature-item {
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

/* Improve scroll performance */
.case-studies-wrapper {
    overflow-x: hidden;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

/* Optimize font rendering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ========================================
   24. FINAL POLISH
   ======================================== */

/* Ensure consistent border-radius */
.btn-primary,
.btn-secondary,
.btn-submit,
.btn-get-started,
.form-container,
.benefit-card,
.service-card,
.case-study-card,
.testimonial-card,
.feature-item,
.faq-item {
    border-radius: 12px !important;
}

/* Ensure consistent transitions */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Improve overall spacing consistency */
.container {
    padding-left: clamp(20px, 5vw, 40px) !important;
    padding-right: clamp(20px, 5vw, 40px) !important;
}

/* Final mobile polish */
@media (max-width: 480px) {
    * {
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }
}

