/* Mobile-specific optimizations for Pulse AI */

/* Mobile-first approach with progressive enhancement */

/* Navbar logo management for all pages */
.navbar .navbar-brand img {
    transition: all 0.3s ease;
}

/* Base mobile styles */
@media (max-width: 768px) {
    /* Typography optimizations */
    body {
        font-size: 16px; /* Prevent zoom on iOS */
        line-height: 1.5;
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
        /* Prevent word hyphenation on mobile */
        -webkit-hyphens: none;
        -moz-hyphens: none;
        -ms-hyphens: none;
        hyphens: none;
        word-wrap: normal;
        overflow-wrap: normal;
    }
    
    /* Prevent hyphenation for all text elements on mobile */
    h1, h2, h3, h4, h5, h6, p, span, div, a, li, td, th, label, button, input, textarea, select {
        -webkit-hyphens: none;
        -moz-hyphens: none;
        -ms-hyphens: none;
        hyphens: none;
        word-wrap: normal;
        overflow-wrap: normal;
    }
    
    /* Ensure titles and headings don't break */
    .hero-title, .display-1, .display-2, .display-3, .display-4, .display-5, .display-6,
    .section-title, .differentiator-title, .service-card h5, .case-study-content h4,
    .testimonial-author h5, .author-info h5, .comparison-text h5, .feature-card h5 {
        -webkit-hyphens: none;
        -moz-hyphens: none;
        -ms-hyphens: none;
        hyphens: none;
        word-wrap: normal;
        overflow-wrap: normal;
        white-space: normal;
    }
    
    /* Container adjustments */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
        max-width: 100%;
    }
    
    /* Hero section mobile optimizations */
    .hero-section {
        text-align: center;
        padding-top: 120px; /* Account for fixed navbar */
        padding: 4.5rem 0 3.6rem;
        min-height: 100vh;
        display: flex;
        align-items: center;
    }
    
    .video-background video {
        object-position: center 25%;
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.1;
        margin-bottom: 1.5rem;
        padding-top: 0 !important;
        word-wrap: normal;
        -webkit-hyphens: none;
        -moz-hyphens: none;
        -ms-hyphens: none;
        hyphens: none;
        overflow-wrap: normal;
    }
    
    .hero-section .row {
        align-items: flex-start !important;
    }
    
    .hero-section .lead {
        font-size: 1.1rem;
        line-height: 1.4;
        margin-bottom: 2rem;
    }
    
    /* Mobile button stack */
    .hero-section .d-flex {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        justify-content: center;
    }
    
    .hero-section .btn {
        width: 100%;
        max-width: 300px;
        padding: 1rem 2rem;
        font-size: 1rem;
        font-weight: 600;
        border-radius: 50px;
        min-height: 50px;
    }
    
    /* Display text adjustments */
    .display-4 {
        font-size: 2.25rem;
    }
    
    .display-5 {
        font-size: 1.8rem;
    }
    
    /* ROI Calculator mobile improvements */
    .roi-calculator {
        margin-top: 2rem;
        padding: 1.5rem;
        border-radius: 20px;
    }
    
    .calculator-header h4 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .calculator-form .form-select {
        padding: 0.8rem 1rem;
        font-size: 16px;
        border-radius: 10px;
        margin-bottom: 1rem;
    }
    
    .result-item {
        padding: 1rem;
        margin-bottom: 1rem;
        border-radius: 12px;
    }
    
    .result-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .result-value {
        font-size: 1.4rem;
        font-weight: 700;
    }
    
    .result-label {
        font-size: 0.8rem;
    }
    
    /* Case study cards mobile layout */
    .case-study-card {
        margin-bottom: 2rem;
        border-radius: 20px;
        overflow: hidden;
    }
    
    .case-study-image {
        height: 200px;
    }
    
    .case-study-content {
        padding: 1.5rem;
    }
    
    .case-study-content h4 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }
    
    .case-study-content p {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 1.5rem;
    }
    
    .case-study-stats {
        flex-direction: column;
        gap: 1rem;
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }
    
    .stat {
        padding: 1rem;
        background: rgba(0, 194, 255, 0.05);
        border-radius: 12px;
        border: 1px solid rgba(0, 194, 255, 0.1);
    }
    
    .stat-number {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
        font-weight: 600;
    }
    
    /* Differentiator cards mobile layout */
    .differentiator-card {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1.5rem;
        margin-bottom: 2rem;
        border-radius: 20px;
    }
    
    .differentiator-icon {
        margin-right: 0;
        margin-bottom: 1.5rem;
        align-self: center;
        width: 80px;
        height: 80px;
    }
    
    .differentiator-title {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }
    
    .differentiator-description {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 1.5rem;
    }
    
    .differentiator-metric {
        justify-content: center;
        gap: 1rem;
    }
    
    .metric-number {
        font-size: 2.2rem;
    }
    
    .metric-label {
        font-size: 0.8rem;
    }
    
    /* Testimonials mobile layout */
    .testimonials-container {
        padding: 0 1rem;
    }
    
    .testimonial {
        padding: 2rem 1.5rem;
        margin: 0;
        border-radius: 20px;
    }
    
    .testimonial-quote p {
        font-size: 1.1rem;
        line-height: 1.6;
        margin-bottom: 2rem;
    }
    
    .testimonial-controls {
        margin-top: 2rem;
        gap: 0.75rem;
    }
    
    .testimonial-dot {
        width: 12px;
        height: 12px;
        border-radius: 50%;
    }
    
    /* Services section mobile layout */
    .service-card {
        padding: 2rem 1.5rem !important;
        margin-bottom: 2rem;
        border-radius: 20px;
        text-align: center;
    }
    
    .service-icon {
        font-size: 3rem !important;
        margin-bottom: 1.5rem;
    }
    
    .service-card h5 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }
    
    .service-card p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    /* Contact form mobile layout */
    .card-body {
        padding: 2rem 1.5rem;
    }
    
    .contact-info {
        margin-bottom: 2rem;
        text-align: center;
    }
    
    .contact-info .d-flex {
        justify-content: center;
        margin-bottom: 1rem;
    }
    
    .form-control {
        padding: 1rem;
        font-size: 16px;
        border-radius: 12px;
        border: 2px solid #e9ecef;
        margin-bottom: 1rem;
    }
    
    .form-control:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(0, 194, 255, 0.1);
    }
    
    textarea.form-control {
        min-height: 120px;
        resize: vertical;
    }
    
    /* Footer mobile layout */
    footer {
        text-align: center;
        padding: 2rem 0;
    }
    
    footer .row {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    footer .social-links {
        justify-content: center;
        gap: 1rem;
    }
    
    footer .social-links a {
        font-size: 1.5rem;
        padding: 0.5rem;
    }
    
    /* Mobile navigation improvements */
    .navbar-brand {
        margin-right: 0;
    }
    
    .navbar-logo {
        height: 50px !important;
    }
    
    /* Mobile section spacing */
    section {
        padding: 150px 0 50px 0 !important;
    }
    
    .py-5 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    /* Mobile-specific focus styles */
    .btn:focus,
    .form-control:focus,
    .nav-link:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(0, 194, 255, 0.3);
    }
}

/* Extra small mobile devices */
@media (max-width: 576px) {
    /* Prevent word hyphenation on extra small mobile */
    body, h1, h2, h3, h4, h5, h6, p, span, div, a, li, td, th, label, button, input, textarea, select {
        -webkit-hyphens: none;
        -moz-hyphens: none;
        -ms-hyphens: none;
        hyphens: none;
        word-wrap: normal;
        overflow-wrap: normal;
    }
    
    /* Ensure titles and headings don't break on extra small screens */
    .hero-title, .display-1, .display-2, .display-3, .display-4, .display-5, .display-6,
    .section-title, .differentiator-title, .service-card h5, .case-study-content h4 {
        -webkit-hyphens: none;
        -moz-hyphens: none;
        -ms-hyphens: none;
        hyphens: none;
        word-wrap: normal;
        overflow-wrap: normal;
        white-space: normal;
    }
    
    .hero-section {
        padding: 2rem 0;
        padding-top: 100px;
        padding: 3.6rem 0 2.7rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .hero-section .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .display-4 {
        font-size: 1.98rem;
    }
    
    .display-5 {
        font-size: 1.62rem;
    }
    
    .roi-calculator {
        padding: 1.2rem;
    }
    
    .calculator-header h4 {
        font-size: 1rem;
    }
    
    .result-item {
        padding: 0.8rem;
    }
    
    .result-value {
        font-size: 1.2rem;
    }
    
    .case-study-content {
        padding: 1.2rem;
    }
    
    .case-study-content h4 {
        font-size: 1.2rem;
    }
    
    .case-study-image {
        height: 180px;
    }
    
    .case-study-content p {
        font-size: 0.85rem;
    }
    
    .differentiator-card {
        padding: 1.5rem 1.2rem;
    }
    
    .differentiator-icon {
        width: 60px;
        height: 60px;
    }
    
    .differentiator-title {
        font-size: 1.2rem;
    }
    
    .differentiator-description {
        font-size: 0.8rem;
    }
    
    .testimonial {
        padding: 1.5rem 1.2rem;
    }
    
    .testimonial-quote p {
        font-size: 1rem;
    }
    
    .service-card {
        padding: 1.5rem 1.2rem !important;
    }
    
    .service-icon {
        font-size: 2.5rem !important;
    }
    
    .card-body {
        padding: 1.5rem 1.2rem;
    }
    
    /* Extra small mobile optimizations */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .hero-section .d-flex .btn:last-child {
        margin-bottom: 0;
    }
    
    /* Footer mobile centering */
    footer .row {
        text-align: center !important;
    }
    
    footer .col-md-6:first-child {
        margin-bottom: 1.35rem;
    }
    
    footer .col-md-6:last-child {
        text-align: center !important;
    }
}

/* Landscape mobile optimizations */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        min-height: 100vh;
        padding: 1rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-section .lead {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .roi-calculator {
        margin-top: 1rem;
        padding: 1rem;
    }
    
    .case-study-card {
        margin-bottom: 1rem;
    }
    
    .differentiator-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .service-card {
        padding: 1.5rem !important;
        margin-bottom: 1rem;
    }
}

/* Touch device specific optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects */
    .case-study-card:hover,
    .differentiator-card:hover,
    .service-card:hover,
    .product-card:hover,
    .card:hover,
    .btn:hover {
        transform: none;
        box-shadow: none;
    }
    
    /* Add active states for touch feedback */
    .case-study-card:active,
    .differentiator-card:active,
    .service-card:active,
    .product-card:active,
    .card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    .btn:active {
        transform: scale(0.95);
    }
    
    /* Improve touch targets */
    .nav-link,
    .btn,
    .testimonial-dot,
    .form-select {
        min-height: 44px;
        min-width: 44px;
    }
    
    .testimonial-dot {
        width: 44px;
        height: 44px;
    }
    
    /* Remove tap highlight */
    * {
        -webkit-tap-highlight-color: transparent;
    }
}

/* High DPI display optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .navbar-logo,
    .case-study-image img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Dark mode support for mobile */
@media (prefers-color-scheme: dark) {
    .navbar.scrolled {
        background: rgba(0, 0, 0, 0.95) !important;
    }
    
    .navbar.scrolled .nav-link {
        color: var(--primary-color) !important
    }
    
    .form-control {
        color: white;
    }
    
    .form-control:focus {
        background-color: #34495e;
        border-color: var(--primary-color);
    }
}

/* Mobile-specific animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Mobile loading states */
.mobile-loading {
    animation: slideInUp 0.6s ease forwards;
}

.mobile-fade-in {
    animation: fadeInScale 0.5s ease forwards;
}

/* Mobile-specific utility classes */
.mobile-text-center {
    text-align: center !important;
}

.mobile-mb-3 {
    margin-bottom: 1rem !important;
}

.mobile-p-3 {
    padding: 1rem !important;
}

.mobile-rounded {
    border-radius: 15px !important;
}

/* Mobile navigation improvements */
.mobile-nav {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(0, 0, 0, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Mobile form improvements */
.mobile-form-group {
    margin-bottom: 1.5rem;
}

.mobile-form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.mobile-form-control {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.mobile-form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 194, 255, 0.1);
    outline: none;
}

/* Mobile button improvements */
.mobile-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 50px;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.mobile-btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 194, 255, 0.3);
}

.mobile-btn-primary:active {
    transform: scale(0.95);
    box-shadow: 0 2px 10px rgba(0, 194, 255, 0.3);
}

.mobile-btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.mobile-btn-outline:active {
    background: var(--primary-color);
    color: white;
    transform: scale(0.95);
} 