/**
 * SalesCloud - Mobile Enhanced CSS
 * Version: 1.0.0
 * Responsive optimizations for perfect mobile display
 */

/* ============================================
   NAVBAR MOBILE ENHANCEMENTS
   ============================================ */

/* Mobile CTA wrapper inside menu */
.navbar-mobile-cta {
    display: none;
}

@media (max-width: 768px) {
    /* Show mobile CTA in menu */
    .navbar-mobile-cta {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        max-width: 280px;
        margin-top: 2rem;
        padding-top: 2rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .navbar-mobile-cta .btn {
        width: 100%;
        justify-content: center;
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    .navbar-mobile-cta .lang-switcher {
        justify-content: center;
        margin-top: 0.5rem;
    }

    .navbar-mobile-cta .lang-btn {
        min-width: 60px;
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }

    /* Navbar padding adjustment */
    .navbar .container {
        padding: 0 1rem;
    }

    /* Mobile menu overlay improvements */
    .navbar-nav {
        background: linear-gradient(180deg, var(--dark-950) 0%, var(--dark-900) 100%);
        padding: 6rem 2rem 3rem;
    }

    .navbar-nav a {
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.08);
    }

    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
    }
}

/* ============================================
   HERO SECTION MOBILE
   ============================================ */

@media (max-width: 768px) {
    .hero-section {
        padding: 100px 0 50px !important;
        min-height: auto !important;
    }

    .hero-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2rem !important;
        line-height: 1.15 !important;
    }

    .hero-text h1 span.gradient-text {
        font-size: inherit;
    }

    .hero-description {
        font-size: 1rem !important;
        margin-bottom: 1.5rem !important;
    }

    .hero-badge {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    /* Hero images - show simplified on mobile */
    .hero-images {
        grid-template-columns: 1fr !important;
        gap: 0.75rem;
        max-width: 100% !important;
        margin: 0 auto;
    }

    .hero-image {
        border-radius: 12px !important;
    }

    .hero-image img {
        height: 150px !important;
    }

    .hero-image.large {
        grid-column: span 1 !important;
    }

    .hero-image.large img {
        height: 180px !important;
    }

    /* Hide third image on mobile */
    .hero-images .hero-image:nth-child(3) {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 90px 0 40px !important;
    }

    .hero-text h1 {
        font-size: 1.75rem !important;
    }

    .hero-image img {
        height: 130px !important;
    }

    .hero-image.large img {
        height: 150px !important;
    }
}

/* ============================================
   STATS BAR MOBILE
   ============================================ */

@media (max-width: 992px) {
    .stats-bar {
        padding: 2rem 0 !important;
    }

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

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

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

@media (max-width: 768px) {
    .stats-bar {
        padding: 1.5rem 0 !important;
    }

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

    .stat-item {
        padding: 0.75rem 0.5rem !important;
    }

    .stat-number {
        font-size: 1.75rem !important;
        margin-bottom: 0.25rem !important;
    }

    .stat-label {
        font-size: 0.65rem !important;
        letter-spacing: 0.5px !important;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

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

    /* Hide 5th stat on very small screens for even grid */
    .stats-grid .stat-item:nth-child(5) {
        display: none;
    }
}

/* ============================================
   SERVICES GRID MOBILE
   ============================================ */

@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }

    .service-card {
        padding: 1.5rem !important;
        border-radius: 20px !important;
    }

    .service-icon {
        width: 56px !important;
        height: 56px !important;
        border-radius: 14px !important;
        margin-bottom: 1rem !important;
    }

    .service-icon svg {
        width: 26px !important;
        height: 26px !important;
    }

    .service-card h3 {
        font-size: 1.2rem !important;
    }

    .service-card p {
        font-size: 0.9rem !important;
    }

    .service-price {
        padding: 0.875rem !important;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .service-price .amount {
        font-size: 1.75rem !important;
    }

    .service-price .note {
        width: 100%;
        margin-left: 0 !important;
        margin-top: 0.25rem;
    }

    .service-features li {
        font-size: 0.85rem !important;
        padding: 0.4rem 0 !important;
    }
}

/* ============================================
   WHY CHOOSE US GRID MOBILE
   ============================================ */

@media (max-width: 992px) {
    .why-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }
}

@media (max-width: 768px) {
    .why-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }

    .why-card {
        padding: 1.25rem !important;
    }

    .why-icon {
        width: 56px !important;
        height: 56px !important;
        margin-bottom: 1rem !important;
    }

    .why-icon svg {
        width: 26px !important;
        height: 26px !important;
    }

    .why-card h4 {
        font-size: 1rem !important;
        margin-bottom: 0.5rem !important;
    }

    .why-card p {
        font-size: 0.8rem !important;
        line-height: 1.5 !important;
    }
}

@media (max-width: 480px) {
    .why-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .why-card {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        gap: 1rem !important;
        text-align: left !important;
        padding: 1.25rem !important;
    }

    .why-icon {
        margin: 0 !important;
        flex-shrink: 0;
    }

    .why-card > div {
        flex: 1;
    }
}

/* ============================================
   TESTIMONIALS MOBILE
   ============================================ */

@media (max-width: 992px) {
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }
}

@media (max-width: 768px) {
    .testimonials-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }

    .testimonial-card {
        padding: 1.5rem !important;
        border-radius: 16px !important;
    }

    .testimonial-card::before {
        font-size: 2.5rem !important;
        top: 1rem !important;
        right: 1.25rem !important;
    }

    .testimonial-content {
        font-size: 0.95rem !important;
        margin-bottom: 1.25rem !important;
        line-height: 1.6 !important;
    }

    .testimonial-author {
        gap: 0.75rem !important;
    }

    .testimonial-avatar {
        width: 48px !important;
        height: 48px !important;
        border-width: 2px !important;
    }

    .testimonial-info h5 {
        font-size: 0.95rem !important;
    }

    .testimonial-info span {
        font-size: 0.8rem !important;
    }

    .testimonial-rating svg {
        width: 14px !important;
        height: 14px !important;
    }
}

/* ============================================
   CLIENTS LOGOS MOBILE
   ============================================ */

@media (max-width: 992px) {
    .clients-section {
        padding: 3rem 0 !important;
    }

    .clients-logos {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 2rem !important;
    }
}

@media (max-width: 768px) {
    .clients-section {
        padding: 2.5rem 0 !important;
    }

    .clients-logos {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1.5rem 1rem !important;
    }

    .client-logo {
        font-size: 0.75rem !important;
    }

    .client-logo-icon {
        width: 56px !important;
        height: 56px !important;
        border-radius: 12px !important;
    }

    .client-logo span {
        margin-top: 0.5rem;
    }
}

@media (max-width: 480px) {
    .clients-logos {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem 1rem !important;
    }

    /* Hide last client on very small screens for even grid */
    .clients-logos .client-logo:nth-child(5) {
        display: none;
    }
}

/* ============================================
   PROCESS GRID MOBILE
   ============================================ */

@media (max-width: 992px) {
    .process-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 2rem 1.5rem !important;
    }

    .process-grid::before {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .process-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem 1rem !important;
    }

    .process-number {
        width: 48px !important;
        height: 48px !important;
        font-size: 1.1rem !important;
        margin-bottom: 1rem !important;
    }

    .process-step h4 {
        font-size: 1rem !important;
        margin-bottom: 0.5rem !important;
    }

    .process-step p {
        font-size: 0.8rem !important;
        line-height: 1.5 !important;
    }
}

@media (max-width: 480px) {
    .process-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }

    .process-step {
        display: flex !important;
        align-items: flex-start !important;
        gap: 1rem !important;
        text-align: left !important;
    }

    .process-number {
        margin: 0 !important;
        flex-shrink: 0;
    }

    .process-step > div {
        flex: 1;
    }
}

/* ============================================
   MODULES GRID MOBILE
   ============================================ */

@media (max-width: 768px) {
    .modules-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }

    .module-card {
        border-radius: 16px !important;
    }

    .module-image {
        height: 160px !important;
    }

    .module-badge {
        top: 12px !important;
        right: 12px !important;
        padding: 3px 10px !important;
        font-size: 0.7rem !important;
    }

    .module-content {
        padding: 1.25rem !important;
    }

    .module-content h3 {
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem !important;
    }

    .module-content p {
        font-size: 0.85rem !important;
        margin-bottom: 1.25rem !important;
        line-height: 1.5 !important;
    }

    .module-actions {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    .module-actions .btn {
        flex: none !important;
        width: 100% !important;
    }
}

/* ============================================
   FAQ MOBILE
   ============================================ */

@media (max-width: 768px) {
    .faq-grid {
        max-width: 100% !important;
    }

    .faq-item {
        border-radius: 12px !important;
        margin-bottom: 0.75rem !important;
    }

    .faq-question {
        padding: 1.25rem !important;
        font-size: 0.95rem !important;
        gap: 1rem;
    }

    .faq-question svg {
        width: 18px !important;
        height: 18px !important;
        flex-shrink: 0;
    }

    .faq-answer p {
        padding: 0 1.25rem 1.25rem !important;
        font-size: 0.9rem !important;
        line-height: 1.6 !important;
    }
}

/* ============================================
   CONTACT SECTION MOBILE
   ============================================ */

@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr !important;
        gap: 2.5rem !important;
    }

    .contact-info {
        text-align: center;
    }

    .contact-info h3 {
        font-size: 1.5rem !important;
    }

    .contact-methods {
        max-width: 300px;
        margin: 1.5rem auto 0;
    }

    .contact-method {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .contact-form {
        padding: 1.5rem !important;
        border-radius: 18px !important;
    }

    .contact-form h4 {
        font-size: 1.25rem !important;
    }

    .contact-form .form-subtitle {
        font-size: 0.9rem !important;
        margin-bottom: 1.5rem !important;
    }

    .form-row {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }

    .form-group {
        margin-bottom: 1.25rem !important;
    }

    .form-group label {
        font-size: 0.85rem !important;
        margin-bottom: 0.4rem !important;
    }

    /* Prevent zoom on iOS - use 16px minimum */
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px !important;
        padding: 0.875rem 1rem !important;
        border-radius: 10px !important;
    }

    .form-group textarea {
        min-height: 100px !important;
    }

    .form-submit .btn {
        padding: 1rem 1.5rem !important;
        font-size: 1rem !important;
    }

    .form-note {
        font-size: 0.75rem !important;
        margin-top: 0.75rem !important;
    }

    /* Form success state */
    .form-success svg {
        width: 48px !important;
        height: 48px !important;
    }

    .form-success h4 {
        font-size: 1.25rem !important;
    }
}

/* ============================================
   FOOTER MOBILE
   ============================================ */

@media (max-width: 992px) {
    .footer {
        padding: 4rem 0 1.5rem !important;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 2rem !important;
    }

    .footer-brand {
        grid-column: span 2;
        text-align: center;
        margin-bottom: 1rem;
    }

    .footer-brand p {
        margin: 1rem auto 0 !important;
    }
}

@media (max-width: 768px) {
    .footer {
        padding: 3rem 0 1.5rem !important;
    }

    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        text-align: center;
    }

    .footer-brand {
        grid-column: span 1;
    }

    .footer-brand img {
        margin: 0 auto;
    }

    .footer-brand p {
        max-width: 280px !important;
        font-size: 0.9rem !important;
    }

    .footer-column h4 {
        font-size: 0.8rem !important;
        margin-bottom: 1rem !important;
    }

    .footer-column ul li {
        margin-bottom: 0.5rem !important;
    }

    .footer-column a {
        font-size: 0.85rem !important;
    }

    .footer-bottom {
        flex-direction: column !important;
        gap: 1rem !important;
        text-align: center;
        padding-top: 1.5rem !important;
    }

    .footer-bottom > div {
        margin-left: 0 !important;
        justify-content: center;
    }

    .footer-bottom p {
        font-size: 0.85rem !important;
    }

    .footer-bottom .lang-switcher {
        margin-top: 0.5rem;
    }
}

/* ============================================
   SECTION HEADERS MOBILE
   ============================================ */

@media (max-width: 768px) {
    .section {
        padding: 3.5rem 0 !important;
    }

    .section-header {
        margin-bottom: 2.5rem !important;
    }

    .section-badge {
        font-size: 0.7rem !important;
        padding: 0.4rem 1rem !important;
        margin-bottom: 1rem !important;
    }

    .section-header h2 {
        font-size: 1.65rem !important;
        margin-bottom: 0.75rem !important;
    }

    .section-header p {
        font-size: 0.95rem !important;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 3rem 0 !important;
    }

    .section-header h2 {
        font-size: 1.5rem !important;
    }
}

/* ============================================
   FLOATING BUTTONS MOBILE ADJUSTMENT
   ============================================ */

@media (max-width: 768px) {
    .back-to-top {
        bottom: 90px !important;
        right: 16px !important;
        width: 44px !important;
        height: 44px !important;
    }

    .floating-contact {
        right: 16px !important;
        bottom: 16px !important;
    }

    .floating-contact-toggle {
        width: 52px !important;
        height: 52px !important;
    }

    .floating-option {
        width: 44px !important;
        height: 44px !important;
    }

    .floating-contact-options {
        bottom: 62px !important;
        gap: 10px !important;
    }
}

/* ============================================
   GENERAL MOBILE IMPROVEMENTS
   ============================================ */

@media (max-width: 768px) {
    /* Container padding */
    .container {
        padding: 0 1rem !important;
    }

    /* Better tap targets */
    a, button {
        -webkit-tap-highlight-color: rgba(99, 102, 241, 0.2);
    }

    /* Smoother scrolling */
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    /* Hide orbs on mobile for better performance */
    .orb {
        display: none;
    }

    /* Gradient text fix for mobile */
    .gradient-text,
    .text-gradient {
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
}

/* ============================================
   LANDSCAPE MOBILE ORIENTATION
   ============================================ */

@media (max-width: 812px) and (orientation: landscape) {
    .hero-section {
        padding: 80px 0 40px !important;
        min-height: auto !important;
    }

    .hero-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 2rem !important;
        text-align: left;
    }

    .hero-images {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    .hero-image img {
        height: 120px !important;
    }

    .hero-buttons {
        flex-direction: row;
        justify-content: flex-start;
    }

    .hero-buttons .btn {
        width: auto;
        max-width: none;
    }

    .stats-bar {
        padding: 1rem 0 !important;
    }

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

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

/* ============================================
   SAFE AREA INSETS (iPhone X and newer)
   ============================================ */

@supports (padding: max(0px)) {
    @media (max-width: 768px) {
        .container {
            padding-left: max(1rem, env(safe-area-inset-left)) !important;
            padding-right: max(1rem, env(safe-area-inset-right)) !important;
        }

        .navbar {
            padding-left: max(1rem, env(safe-area-inset-left));
            padding-right: max(1rem, env(safe-area-inset-right));
        }

        .footer {
            padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
        }

        .floating-contact {
            right: max(16px, env(safe-area-inset-right));
            bottom: max(16px, env(safe-area-inset-bottom));
        }

        .back-to-top {
            right: max(16px, env(safe-area-inset-right));
            bottom: calc(max(16px, env(safe-area-inset-bottom)) + 70px);
        }
    }
}

/* ============================================
   REDUCED MOTION PREFERENCE
   ============================================ */

@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;
    }
}

/* ============================================
   DARK MODE OPTIMIZATIONS
   ============================================ */

@media (prefers-color-scheme: dark) {
    /* Already dark theme, ensure proper contrast */
    .form-group input::placeholder,
    .form-group textarea::placeholder {
        color: rgba(255, 255, 255, 0.4);
    }
}

/* ============================================
   HIGH CONTRAST MODE
   ============================================ */

@media (prefers-contrast: high) {
    .btn-primary {
        border: 2px solid white;
    }

    .service-card,
    .testimonial-card,
    .module-card,
    .faq-item {
        border-width: 2px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        border-width: 2px;
    }
}
