/**
 * USER REQUESTED FIXES
 * 1. Make hero section in desktop version exactly like Tab version
 * 2. Decrease size of 'WhatsApp Now' CTA in footer on mobile to match first CTA
 * 3. Make Comparison section aligned on both sides
 * 4. Increase logo size in header slightly for desktop only
 */

/* ========================================
   FIX 1: Hero Section Desktop = Tablet Layout
======================================== */

/* Desktop (1025px+) should match Tablet (769px-1024px) exactly */
@media (min-width: 1025px) {
    .hero {
        padding: 100px 0 4rem; /* Match tablet padding instead of 120px 0 6rem */
    }

    .hero-content {
        display: grid;
        grid-template-columns: 1fr 1fr; /* Same 2-column layout as tablet */
        gap: 3rem; /* Match tablet gap instead of 4rem */
        align-items: center;
        text-align: left; /* Ensure left alignment like tablet */
    }

    .hero-text {
        order: 0; /* Same order as tablet */
    }

    .hero-visual {
        order: 0; /* Same order as tablet */
    }

    .hero-stats {
        justify-content: flex-start; /* Match tablet alignment */
        gap: var(--space-2xl); /* Keep larger gaps for desktop readability */
    }

    .hero-ctas {
        justify-content: flex-start; /* Match tablet alignment */
        gap: var(--space-lg);
    }

    .video-overlay {
        position: absolute;
        top: 1rem;
        right: 1rem;
        margin: 0;
        max-width: 400px; /* Slightly larger than tablet's 320px for desktop */
    }

    /* Keep desktop-specific text sizes for better readability */
    .hero-title {
        font-size: clamp(2.5rem, 4vw, 4rem); /* Keep desktop font sizes */
        text-align: left; /* Ensure left alignment */
    }

    .hero-description {
        font-size: 1.125rem; /* Keep desktop font size */
        text-align: left; /* Ensure left alignment */
    }

    .hero-badge {
        margin-left: 0;
        margin-right: auto;
        text-align: left; /* Ensure left alignment */
    }

    .stat-number {
        font-size: 2rem; /* Keep desktop font size */
    }
}

/* ========================================
   FIX 2: Footer WhatsApp CTA Size on Mobile
======================================== */

/* Make WhatsApp button match the Call button size on mobile */
@media (max-width: 768px) {
    .cta-buttons {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .cta-buttons .btn {
        width: 100%;
        max-width: 280px;
        padding: 0.75rem 1.5rem; /* Standard button padding */
        font-size: 0.9rem; /* Standard button font size */
        text-align: center;
    }

    /* Ensure both buttons have the same styling */
    .cta-buttons .btn-primary,
    .cta-buttons .btn-secondary {
        padding: 0.75rem 1.5rem !important;
        font-size: 0.9rem !important;
        min-height: auto !important;
    }

    .cta-buttons .btn i {
        font-size: 1rem !important;
        margin-right: 0.5rem;
    }
}

@media (max-width: 480px) {
    .cta-buttons .btn {
        padding: 0.7rem 1.25rem;
        font-size: 0.85rem;
        max-width: 260px;
    }

    .cta-buttons .btn-primary,
    .cta-buttons .btn-secondary {
        padding: 0.7rem 1.25rem !important;
        font-size: 0.85rem !important;
    }
}

/* ========================================
   FIX 3: Comparison Section Alignment
======================================== */

/* Ensure comparison cards are perfectly aligned on both sides */
.comparison-section {
    padding: 4rem 0;
    background: var(--white);
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1200px; /* Increased from 1000px for better balance */
    margin: 0 auto;
    align-items: stretch; /* Ensure both cards have equal height */
}

.comparison-card {
    padding: 2rem;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Distribute content evenly */
    height: 100%; /* Ensure full height */
}

.comparison-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.comparison-costs {
    flex: 1; /* Allow costs section to grow and fill space */
    margin-bottom: 1.5rem;
}

.comparison-problems,
.comparison-benefits {
    margin-top: auto; /* Push to bottom if needed */
}

/* Ensure mobile stacking works properly */
@media (max-width: 768px) {
    .comparison-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 100%;
        margin: 0 auto;
    }

    .comparison-card {
        padding: 1.5rem;
    }
}

/* ========================================
   FIX 4: Increase Logo Size for Desktop Only
======================================== */

/* Desktop only - increase logo/brand size slightly */
@media (min-width: 1025px) {
    .nav-brand {
        font-size: 1.1rem; /* Increased from default for desktop */
    }

    .brand-name {
        font-size: 1.1rem; /* Increased from default for desktop */
        max-width: 200px; /* Allow more space for larger text */
    }

    .nav-icon {
        font-size: 1.2rem; /* Slightly larger icon for desktop */
    }
}

/* Large desktop - even slightly larger */
@media (min-width: 1400px) {
    .nav-brand {
        font-size: 1.15rem;
    }

    .brand-name {
        font-size: 1.15rem;
        max-width: 220px;
    }

    .nav-icon {
        font-size: 1.25rem;
    }
}

/* ========================================
   FIX 5: Shift Hero Section Up by 2 Inches
======================================== */

/* 2 inches = approximately 192px (96px per inch) */

/* Desktop (1025px+) - Adjust hero padding to show Revolutionary AI Technology badge */
@media (min-width: 1025px) {
    .hero {
        padding: 40px 0 4rem !important; /* Adjusted to show the badge properly */
        min-height: calc(100vh - 40px) !important; /* Adjust min-height accordingly */
    }
}

/* Tablet (769px-1024px) - Reduce hero padding by 2 inches */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero {
        padding: calc(100px - 96px) 0 4rem !important; /* Reduced by ~2 inches from 100px */
        min-height: calc(100vh - 96px) !important; /* Adjust min-height accordingly */
    }
}

/* ========================================
   FIX 6: Hero Stats in Single Row on Desktop
======================================== */

/* Desktop - Force hero stats into single row */
@media (min-width: 1025px) {
    .hero-stats {
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-start !important;
        gap: 3rem !important;
        margin-bottom: 2rem !important;
        flex-wrap: nowrap !important;
    }

    .stat-item {
        text-align: center;
        flex: 0 0 auto; /* Don't grow or shrink */
        min-width: 120px;
    }

    .stat-number {
        font-size: 2rem; /* Keep desktop font size */
        font-weight: var(--fw-extrabold);
        color: var(--primary-green);
        line-height: 1;
        display: block;
    }

    .stat-label {
        font-size: 0.9rem;
        color: var(--gray-500);
        font-weight: var(--fw-medium);
    }
}

/* ========================================
   FIX 7: Trust Indicators in Single Row on Desktop
======================================== */

/* Desktop - Force trust badges into single row */
@media (min-width: 1025px) {
    .trust-badges {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important; /* Force 3 columns */
        gap: 1.5rem !important;
        max-width: 1200px;
        margin: 0 auto;
    }

    .trust-badge {
        min-width: 0; /* Allow badges to shrink */
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 1.5rem 1rem;
    }

    .trust-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .trust-title {
        font-size: 1rem;
        text-align: center;
    }

    .trust-subtitle {
        font-size: 0.85rem;
        text-align: center;
    }
}

/* ========================================
   FIX 7: Reduce Space Between Hero CTAs and Trust Section
======================================== */

/* Fix huge space issue in desktop mode on mobile */
.trust-section {
    padding: 2rem 0 !important; /* Reduced from 3rem to 2rem */
    margin-bottom: 1rem !important; /* Reduced margin */
}

/* On larger screens, maintain tighter spacing */
@media (min-width: 769px) {
    .trust-section {
        padding: 1.5rem 0 !important; /* Even tighter spacing for desktop/tablet */
        margin-top: -1rem !important; /* Pull up closer to hero */
        margin-bottom: 1.5rem !important;
    }
}

/* Desktop specific - ensure no excessive spacing */
@media (min-width: 1025px) {
    .hero {
        margin-bottom: 0 !important; /* Remove any bottom margin */
    }

    .trust-section {
        padding: 1.5rem 0 !important;
        margin-top: -0.5rem !important; /* Pull even closer */
    }
}

/* ========================================
   FIX 8: Footer CTAs in Single Row for Tablet and Mobile
======================================== */

/* Tablet and Mobile - CTAs in single row */
@media (max-width: 1024px) {
    .cta-section .cta-buttons {
        display: flex !important;
        flex-direction: row !important; /* Force horizontal layout */
        gap: 1rem !important;
        justify-content: center !important;
        align-items: center !important;
        flex-wrap: nowrap !important; /* Prevent wrapping */
        margin: 2rem auto !important;
        max-width: 600px !important;
    }

    .cta-section .cta-buttons .btn {
        flex: 1 !important; /* Equal width buttons */
        max-width: none !important;
        min-width: 160px !important; /* Minimum width for readability */
        padding: 0.9rem 1.2rem !important;
        font-size: 0.9rem !important;
        text-align: center !important;
        white-space: nowrap !important;
        font-weight: 600 !important;
    }

    .cta-section .cta-buttons .btn i {
        font-size: 1rem !important;
        margin-right: 0.5rem !important;
    }

    /* Ensure buttons look good */
    .cta-section .cta-buttons .btn-primary {
        background: var(--primary-green) !important;
        border: 2px solid var(--primary-green) !important;
    }

    .cta-section .cta-buttons .btn-secondary {
        background: transparent !important;
        border: 2px solid var(--primary-green) !important;
        color: var(--primary-green) !important;
    }
}

/* Mobile - adjust for smaller screens */
@media (max-width: 768px) {
    .cta-section .cta-buttons {
        gap: 0.75rem !important;
        max-width: 500px !important;
    }

    .cta-section .cta-buttons .btn {
        min-width: 140px !important;
        padding: 0.8rem 1rem !important;
        font-size: 0.85rem !important;
    }
}

/* Very small mobile - stack if absolutely necessary */
@media (max-width: 400px) {
    .cta-section .cta-buttons {
        flex-direction: column !important;
        gap: 0.75rem !important;
        max-width: 280px !important;
    }

    .cta-section .cta-buttons .btn {
        max-width: 100% !important;
        flex: none !important;
    }
}

/* ========================================
   FIX 9: Modern Chat Design Enhancement
======================================== */

/* Enhanced chat styling for better visual appeal */
.demo-chat.whatsapp-demo {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: 1px solid rgba(34, 197, 94, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: 16px;
    overflow: hidden;
}

.whatsapp-demo .chat-header {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    padding: 1rem 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.whatsapp-demo .chat-header i {
    font-size: 1.25rem;
    color: white;
}

.whatsapp-demo .chat-header span {
    font-size: 1rem;
    font-weight: 600;
}

.online-indicator {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Enhanced message bubbles */
.message-bubble {
    padding: 0.9rem 1.1rem !important;
    border-radius: 18px 18px 18px 4px;
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.ai-message .message-bubble {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    border-radius: 18px 18px 4px 18px;
    font-weight: 500;
}

.user-message .message-bubble {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #334155;
    border: 1px solid rgba(148, 163, 184, 0.2);
    font-weight: 500;
}

.message-time {
    font-size: 0.75rem !important;
    color: #64748b;
    margin-top: 0.4rem;
    font-weight: 500;
}

.ai-message .message-time {
    color: rgba(255, 255, 255, 0.8);
}

/* Success badge enhancement */
.success-badge {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 16px;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.4);
    margin: 1rem 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.success-badge i {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

/* Typing indicator enhancement */
.typing-indicator .message-bubble {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    padding: 1rem 1.25rem;
}

.typing-dots span {
    background: white;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    opacity: 0.6;
}

/* Mobile responsiveness for chat */
@media (max-width: 768px) {
    .demo-chat.whatsapp-demo {
        margin-top: 1.5rem;
        border-radius: 12px;
    }

    .whatsapp-demo .chat-header {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }

    .message-bubble {
        padding: 0.75rem 0.9rem !important;
        font-size: 0.85rem !important;
        border-radius: 14px 14px 14px 3px;
    }

    .ai-message .message-bubble {
        border-radius: 14px 14px 3px 14px;
    }
}

/* ========================================
   ADDITIONAL REFINEMENTS
======================================== */

/* Ensure hero content is properly aligned on all screen sizes */
@media (min-width: 769px) {
    .hero-badge {
        margin-left: 0 !important;
        margin-right: auto !important;
        text-align: left !important;
    }

    .hero-title {
        text-align: left !important;
    }

    .hero-description {
        text-align: left !important;
    }

    .hero-stats {
        justify-content: flex-start !important;
    }

    .hero-ctas {
        justify-content: flex-start !important;
    }
}

/* Ensure comparison section has proper spacing and alignment */
.comparison-section .section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.comparison-section .section-title {
    text-align: center;
}

/* Fine-tune button alignment in CTA section for mobile */
@media (max-width: 768px) {
    .cta-content {
        text-align: center;
    }

    .cta-buttons {
        justify-content: center;
        align-items: center;
    }
}