/* Calendly Mobile Responsiveness Fix */

/* Hide the redundant premium-nav section that creates empty space */
.premium-nav {
    display: none !important;
}

/* Eliminate any remaining space between header and hero section */
.header {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.luxury-hero {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Ensure no body margin/padding affects layout */
body {
    margin: 0 !important;
    padding: 0 !important;
}

/* Desktop: Ensure proper layout is preserved */
@media (min-width: 769px) {
    /* Preserve desktop hero section layout */
    .hero-content-split {
        display: flex;
        flex-direction: row;
        gap: 60px;
        padding: 120px 0;
    }
    
    .hero-left {
        flex: 1;
        order: 1;
    }
    
    .hero-right {
        flex: 1;
        order: 2;
        max-width: 50%;
    }
    
    /* Ensure desktop Calendly widget works properly */
    .calendly-inline-widget {
        min-width: 320px;
        width: 100%;
        height: 400px;
    }
}

/* Mobile: Fix responsive issues */
@media (max-width: 768px) {
    /* Fix hero section layout for mobile */
    .hero-content-split {
        display: flex !important;
        flex-direction: column !important;
        gap: 30px !important;
        padding: 60px 0 !important;
    }
    
    .hero-left {
        order: 1 !important;
        width: 100% !important;
        text-align: center !important;
        flex: none !important;
    }
    
    .hero-right {
        order: 2 !important;
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
    }
    
    /* Fix Calendly widget container */
    .hero-form-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
    }
    
    /* Critical fix for Calendly widget */
    .calendly-inline-widget {
        min-width: 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 350px !important;
        box-sizing: border-box !important;
    }
    
    /* Ensure Calendly iframe is responsive */
    .calendly-inline-widget iframe {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Prevent horizontal overflow on the entire page */
    body {
        overflow-x: hidden !important;
    }
    
    .container {
        max-width: 100% !important;
        padding: 0 15px !important;
        box-sizing: border-box !important;
    }
    
    /* Fix hero section to prevent overflow */
    .luxury-hero {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
    
    /* Ensure mobile menu stays in correct position */
    .mobile-toggle {
        position: fixed !important;
        top: 20px !important;
        right: 20px !important;
        z-index: 99999999 !important;
    }
    
    /* Adjust form header for mobile */
    .premium-form-header {
        padding: 20px 15px !important;
    }
    
    .premium-form-header h3 {
        font-size: 1.3rem !important;
        margin-bottom: 8px !important;
    }
    
    .premium-form-header p {
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
    }
    
    /* Adjust form icon for mobile */
    .form-header-icon {
        width: 60px !important;
        height: 60px !important;
        font-size: 1.5rem !important;
        margin: -15px auto 10px !important;
    }
    
    /* Compact hero content for mobile */
    .compact-hero-content h1 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
        margin-bottom: 15px !important;
    }
    
    .hero-left p {
        font-size: 1rem !important;
        padding-left: 15px !important;
        margin: 20px 0 30px !important;
    }
    
    /* Adjust CTA buttons for mobile */
    .hero-cta-buttons {
        flex-direction: column !important;
        gap: 15px !important;
        align-items: center !important;
    }
    
    .hero-primary-btn,
    .hero-secondary-btn {
        width: 100% !important;
        max-width: 280px !important;
        text-align: center !important;
        justify-content: center !important;
    }
}

/* Additional fix for very small screens */
@media (max-width: 480px) {
    .calendly-inline-widget {
        height: 300px !important;
    }
    
    .hero-content-split {
        padding: 40px 0 !important;
    }
    
    .container {
        padding: 0 10px !important;
    }
    
    .premium-form-header {
        padding: 15px 10px !important;
    }
    
    .compact-hero-content h1 {
        font-size: 1.8rem !important;
    }
}

/* Mobile-only: Ensure no elements cause horizontal scroll */
@media (max-width: 768px) {
    * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Override any fixed widths that might cause issues */
    .calendly-inline-widget,
    .calendly-inline-widget * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}