/* Mobile fixes for iPhone Safari compatibility */

/* Fix for mobile navigation being hidden behind button by increasing z-index */
.mobile-nav {
    z-index: 1100 !important; /* Ensure it's above everything */
    width: auto;
    min-width: 250px; /* Minimum width for readability */
    max-width: 80%; /* Don't take full width on larger screens */
    right: 0; /* Position from right side for better UX */
    left: auto;
    transform: translateX(100%); /* Start off-screen to the right */
}

.mobile-nav.active {
    transform: translateX(0); /* Slide in from right */
}

/* Fix mobile menu button positioning to ensure it's clickable */
.mobile-menu-toggle {
    position: relative;
    z-index: 1001;
    margin-left: auto;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Make header elements responsive based on orientation and screen size */
@media (max-width: 992px) {
    /* Always hide desktop navigation on mobile/tablet */
    .nav-list {
        display: none;
    }
    
    /* Always hide consultation button on mobile/tablet header */
    .header .btn-primary {
        display: none;
    }
    
    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: block;
    }
    
    .header-inner {
        justify-content: space-between;
    }
}

/* Specifically handle iPad sizes - both orientations */
@media only screen and 
(min-device-width: 768px) and 
(max-device-width: 1024px) {
    /* Ensure header is properly spaced */
    .header-inner {
        padding: 1rem 2rem;
    }

    /* Adjust mobile menu button for better visibility */
    .mobile-menu-toggle {
        font-size: 1.8rem;
        padding: 0.5rem;
    }
}

/* Add sticky CTA tab on the right side of mobile screens */
.sticky-cta-tab {
    display: block;
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--primary-purple);
    color: white;
    padding: 1rem 0.5rem;
    border-radius: 8px 0 0 8px;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
}

.sticky-cta-tab i {
    font-size: 1.5rem;
}

.sticky-cta {
    position: fixed;
    right: -280px; /* Start off-screen */
    top: 50%;
    transform: translateY(-50%);
    width: 280px;
    background-color: white;
    border-radius: 8px 0 0 8px;
    box-shadow: -2px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: right 0.3s ease;
}

.sticky-cta.active {
    right: 0;
}

.sticky-cta-content {
    padding: 1.5rem;
}

.sticky-cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.sticky-cta-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    color: var(--dark-purple);
}
