/* Mobile Responsive Styles */

/* Mobile menu header - hidden on desktop */
.mobile-menu-header {
    display: none;
}

/* Mobile close button styling */
.mobile-menu-close {
    display: none; /* Hidden by default */
    position: fixed;
    right: 15px;
    top: 15px;
    font-size: 32px;
    cursor: pointer;
    color: #333;
    z-index: 1001;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
}

/* Body styles when mobile menu is active */
body.menu-open {
    overflow: hidden;
}

/* Ensure mobile menu doesn't interfere with page content */
body {
    transition: all 0.3s ease;
}

/* Base mobile adjustments */
@media (max-width: 992px) {
    .nav-actions {
        margin-left: 20px;
    }
}

@media (max-width: 768px) {
    .header .container {
        justify-content: space-between;
        gap: 0;
    }
    
    /* Hide desktop nav actions and show mobile ones in the hamburger menu */
    .header .nav-actions {
        display: none !important; /* Force hide the desktop buttons on mobile with !important */
        visibility: hidden;
        position: absolute;
        width: 0;
        height: 0;
        overflow: hidden;
        opacity: 0;
    }
    
    /* Show mobile menu header on mobile */
    .mobile-menu-header {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        padding: 15px 0;
        border-bottom: 1px solid #eee;
    }
    
    .mobile-menu-header .logo {
        font-size: 24px;
        font-weight: var(--font-weight-bold);
        color: var(--secondary-color);
        position: relative;
    }
    
    /* Style the mobile nav actions */
    .nav-actions-mobile {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
        margin-top: 20px;
        padding: 20px;
    }
    
    .nav-actions-mobile .btn {
        width: calc(100% - 40px);
        max-width: 300px;
        text-align: center;
        font-size: 1rem;
        padding: 15px 20px;
        border-radius: 50px;
    }
    
    .nav-actions-mobile .btn-outline {
        background-color: white;
        border: 1px solid #ddd;
        color: #333;
    }
    
    .nav-actions-mobile .btn-primary {
        background-color: var(--primary-color);
        color: white;
    }
    
    /* Mobile navigation menu adjustments */
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background-color: white;
        transition: all 0.3s ease;
        z-index: 999;
        display: block;
        overflow-y: auto;
        padding: 80px 0 0 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu ul {
        flex-direction: column;
        padding: 0;
        margin: 0;
    }
    
    .nav-menu ul li {
        margin: 0;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }
    
    .nav-menu ul li a {
        font-size: 1.1rem;
        display: block;
        padding: 20px 0;
        color: #333;
    }
    
    /* Make hamburger menu visible and style it */
    .hamburger {
        display: block;
        z-index: 1000;
        margin-left: 15px;
    }
    
    .hamburger span {
        transition: all 0.3s ease;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
}

/* Extra small devices */
@media (max-width: 576px) {
    /* Further adjust header for very small screens */
    .logo a {
        font-size: 24px;
    }
    
    .header .container {
        padding: 0 10px;
    }
    
    /* Adjust navigation buttons for very small screens */
    .nav-actions {
        display: flex;
        flex-wrap: nowrap;
    }
    
    .nav-actions .btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    /* Fix hero section for mobile */
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1.2rem;
    }
    
    /* Adjust grid layouts for mobile */
    .solutions-cards {
        grid-template-columns: 1fr;
        max-height: none;
        gap: 20px;
    }
    
    .solution-card {
        height: auto;
        min-height: auto;
        margin-bottom: 15px;
    }
    
    /* Fix for solutions CTA button overlapping with cards */
    .solutions-wrapper {
        margin-bottom: 70px; /* Add space after the wrapper */
    }
    
    .solutions-cta {
        position: relative;
        margin-top: 30px;
        z-index: 5; /* Ensure button appears above cards */
        clear: both;
        margin-bottom: 60px; /* adjust value as needed */
    }
    
    /* Fix product grid for mobile */
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-features li {
        font-size: 0.9rem;
    }
    
    /* Fix testimonials section for mobile */
    .testimonial {
        padding: 20px;
    }
    
    .testimonial-author img {
        width: 40px;
        height: 40px;
    }
    
    /* Fix footer for mobile */
    .footer-grid {
        gap: 20px;
        padding-bottom: 30px;
    }
    
    .footer-links h4, .footer-newsletter h4 {
        margin-bottom: 15px;
    }
}

/* Fix for very small screens */
@media (max-width: 360px) {
    .hamburger {
        margin-left: 10px;
    }
    
    .nav-actions-mobile .btn {
        font-size: 0.9rem;
        padding: 10px 15px;
    }
}