/* ============================================
   Final Improvements - All Fixes
   ============================================ */

/* Hero Section - Return Canvas Pattern */
.hero {
    background: var(--brand-gradient) !important;
    position: relative;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    animation: pattern-move 20s linear infinite;
    pointer-events: none;
}

@keyframes pattern-move {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(60px, 60px);
    }
}

.hero .container {
    position: relative;
    z-index: 1;
}

/* Calendar Legend - Update Colors */
.calendar-legend {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
    font-size: 0.875rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid var(--border-light);
}

.legend-color.available {
    background: #FFFFFF;
    border: 2px solid var(--robo-blue);
}

.legend-color.booked {
    background: #FEE2E2;
    border-color: #EF4444;
}

.legend-color.selected {
    background: var(--robo-blue);
    border-color: var(--robo-blue);
}

.legend-text {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Calendar Day States - Update Colors */
.calendar-day {
    background: #FFFFFF;
    border: 1px solid var(--border-light);
    color: var(--text-primary);
}

.calendar-day.available {
    background: #FFFFFF;
    border: 1px solid var(--robo-blue);
    color: var(--robo-blue);
    font-weight: 500;
}

.calendar-day.booked {
    background: #FEE2E2 !important;
    color: #DC2626 !important;
    border-color: #FCA5A5 !important;
    cursor: not-allowed;
    opacity: 0.7;
}

.calendar-day.selected {
    background: var(--robo-blue) !important;
    color: #FFFFFF !important;
    border-color: var(--robo-blue) !important;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(37, 115, 209, 0.3);
}

/* Footer - Soft Blue Background */
footer,
.footer {
    background: linear-gradient(180deg, #F0F6FF 0%, #E8F1FF 100%) !important;
    color: var(--text-primary) !important;
    padding: 60px 0 30px;
    position: relative;
    margin-top: 0;
    border-top: 1px solid rgba(37, 115, 209, 0.1);
}

footer h3,
footer .footer-title {
    color: var(--text-primary) !important;
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

footer p,
footer .footer-text {
    color: var(--text-secondary) !important;
    line-height: 1.8;
}

footer a {
    color: #4B5563 !important;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

footer a:hover {
    color: var(--robo-blue) !important;
    transform: translateX(2px);
}

footer .logo {
    color: var(--robo-blue) !important;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

footer .logo span {
    color: var(--text-primary) !important;
}

/* Footer Social Icons */
.footer-socials a,
.social-links a {
    width: 40px;
    height: 40px;
    background: #FFFFFF;
    border: 1px solid rgba(37, 115, 209, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--robo-blue) !important;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.footer-socials a:hover,
.social-links a:hover {
    background: var(--robo-blue);
    border-color: var(--robo-blue);
    color: #FFFFFF !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 115, 209, 0.3);
}

/* Footer Bottom */
.footer-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(37, 115, 209, 0.1);
}

.footer-bottom p,
.footer-copyright {
    color: #6B7280 !important;
    font-size: 0.875rem;
}

.footer-links a {
    color: #6B7280 !important;
    font-size: 0.875rem;
}

.footer-links a:hover {
    color: var(--robo-blue) !important;
}

/* Mobile App-like Design */
@media (max-width: 768px) {
    /* Mobile Navigation - App Style */
    .navbar {
        background: #FFFFFF !important;
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08) !important;
        padding: 0.75rem 0;
        position: fixed;
        width: 100%;
        top: 0;
        z-index: 9999;
    }
    
    body {
        padding-top: 60px;
    }
    
    .nav-wrapper {
        padding: 0 1rem;
    }
    
    .logo {
        font-size: 1.25rem;
    }
    
    .menu-toggle {
        width: 36px;
        height: 36px;
        background: var(--bg-secondary);
        border-radius: 50%;
        border: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 0;
    }
    
    .menu-toggle span {
        width: 18px;
        height: 2px;
        background: var(--text-primary);
        border-radius: 2px;
        transition: all 0.3s ease;
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    /* Mobile Menu - Full Screen App Style */
    .nav-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        background: #FFFFFF;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        padding: 2rem 1rem;
        overflow-y: auto;
        z-index: 9998;
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .nav-link {
        display: block;
        padding: 1rem;
        margin: 0.5rem 0;
        background: var(--bg-secondary);
        border-radius: 12px;
        font-size: 1rem;
        font-weight: 500;
        color: var(--text-primary) !important;
        text-align: left;
        transition: all 0.3s ease;
    }
    
    .nav-link:active {
        background: var(--robo-blue);
        color: #FFFFFF !important;
        transform: scale(0.98);
    }
    
    /* Hero Section - Mobile App Style */
    .hero {
        padding: 60px 0 40px;
    }
    
    .hero h1 {
        font-size: 1.75rem;
        line-height: 1.3;
        margin-bottom: 1rem;
    }
    
    .hero p {
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 1.5rem;
    }
    
    /* Buttons - Mobile App Style */
    .btn {
        width: 100%;
        padding: 14px 24px !important;
        border-radius: 12px !important;
        font-size: 1rem !important;
        font-weight: 600 !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    .btn:active {
        transform: scale(0.98);
    }
    
    /* Cards - Mobile App Style */
    .feature-card,
    .robot-card,
    .pricing-card {
        border-radius: 20px !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
        margin-bottom: 1rem;
        padding: 1.5rem !important;
    }
    
    .feature-card:active,
    .robot-card:active,
    .pricing-card:active {
        transform: scale(0.98);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    }
    
    /* Section Spacing - Mobile */
    section {
        padding: 40px 0;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    /* Stats - Mobile App Style */
    .stats-item {
        background: #FFFFFF;
        border-radius: 16px;
        padding: 1.5rem;
        margin-bottom: 1rem;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    }
    
    .stats-number {
        font-size: 2rem;
    }
    
    /* Form Inputs - Mobile App Style */
    input,
    textarea,
    select {
        padding: 14px 16px !important;
        border-radius: 12px !important;
        font-size: 16px !important; /* Prevents zoom on iOS */
        background: var(--bg-secondary) !important;
        border: 1px solid transparent !important;
    }
    
    input:focus,
    textarea:focus,
    select:focus {
        background: #FFFFFF !important;
        border-color: var(--robo-blue) !important;
        box-shadow: 0 0 0 4px rgba(37, 115, 209, 0.1) !important;
    }
    
    /* Footer - Mobile App Style */
    footer {
        padding: 40px 0 20px;
        text-align: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: left;
    }
    
    .footer-socials {
        justify-content: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    /* Modal - Mobile App Style */
    .booking-modal-content {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }
    
    .modal-header {
        padding: 1rem;
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    .modal-body {
        flex: 1;
        overflow-y: auto;
        padding: 1rem;
        -webkit-overflow-scrolling: touch;
    }
    
    .booking-layout {
        grid-template-columns: 1fr;
    }
    
    .calendar-section {
        order: 2;
    }
    
    .robot-selection-compact {
        order: 1;
        position: sticky;
        top: 0;
        background: #FFFFFF;
        z-index: 5;
        padding-bottom: 1rem;
        border-bottom: 1px solid var(--border-light);
    }
    
    /* Bottom Navigation Bar Style (Optional) */
    .mobile-nav-bottom {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #FFFFFF;
        border-top: 1px solid var(--border-light);
        display: flex;
        justify-content: space-around;
        padding: 0.5rem 0;
        z-index: 1000;
        box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.08);
    }
    
    .mobile-nav-bottom a {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
        padding: 0.5rem;
        color: var(--text-secondary);
        font-size: 0.75rem;
        text-decoration: none;
        transition: all 0.3s ease;
    }
    
    .mobile-nav-bottom a.active {
        color: var(--robo-blue);
    }
    
    .mobile-nav-bottom a i {
        font-size: 1.25rem;
    }
    
    /* Floating elements - hide on mobile */
    .conversion-card,
    .floating-card {
        position: static !important;
        margin: 1rem auto;
        transform: none !important;
        max-width: 100%;
    }
    
    /* Smooth scrolling */
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Tap highlight */
    * {
        -webkit-tap-highlight-color: rgba(37, 115, 209, 0.1);
    }
    
    /* Safe area insets for iPhone X+ */
    .navbar,
    .mobile-nav-bottom {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
    
    .mobile-nav-bottom {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Tablet Specific Adjustments */
@media (min-width: 768px) and (max-width: 1024px) {
    .container {
        max-width: 768px;
    }
    
    .feature-grid,
    .robot-grid,
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small Mobile Adjustments */
@media (max-width: 375px) {
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 12px 20px !important;
        font-size: 0.95rem !important;
    }
}