/* Responsive fixes for Vasudaika Website */

/* General responsive improvements */
@media (max-width: 991px) {
    /* Improve navbar on mobile */
    .navbar-collapse {
        background-color: var(--primary-blue-dark);
        padding: 15px;
        border-radius: 0 0 8px 8px;
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
        margin-top: 10px;
    }
    
    /* Ensure dropdown menus are visible on mobile */
    .dropdown-menu {
        background-color: rgba(255, 255, 255, 0.95) !important;
        border: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        display: none;
        position: static !important;
        width: 100%;
        margin-top: 5px !important;
        margin-bottom: 10px !important;
        padding: 10px !important;
    }
    
    /* Make dropdown items more visible */
    .dropdown-item {
        color: var(--primary-blue-dark) !important;
        font-weight: 500 !important;
        padding: 8px 15px !important;
        border-radius: 4px;
    }
    
    .dropdown-item:hover, .dropdown-item:focus, .dropdown-item.active {
        background-color: rgba(0, 86, 179, 0.1) !important;
        color: var(--primary-blue) !important;
    }
    
    /* Ensure dropdown toggle works properly */
    .dropdown-toggle::after {
        float: right;
        margin-top: 10px;
    }
    
    /* Show dropdown when clicked */
    .dropdown.show .dropdown-menu {
        display: block !important;
    }
    
    /* Fix spacing for mobile navigation */
    .navbar-nav .nav-item {
        margin-bottom: 8px;
    }
    
    /* Ensure text is visible in navbar */
    .navbar-nav .nav-link {
        color: #ffffff !important;
        padding: 8px 15px;
    }
    
    /* Make the Get a Quote button full width on mobile */
    .navbar-nav .btn {
        display: block;
        width: 100%;
        margin-top: 10px;
        margin-left: 0 !important;
    }
    
    /* Improve footer on mobile */
    footer .col-lg-2, 
    footer .col-lg-3, 
    footer .col-lg-4 {
        text-align: center !important;
        margin-bottom: 20px;
    }
    
    footer .social-icons {
        justify-content: center !important;
        margin-top: 15px;
    }
}

/* Show company name next to logo on mobile devices */
@media (max-width: 767px) {
    .navbar-brand .d-none.d-md-inline {
        display: inline !important;
        font-size: 0.9rem;
        max-width: 200px;
        white-space: normal;
        line-height: 1.2;
    }
    
    /* Adjust logo size on very small screens */
    @media (max-width: 480px) {
        .navbar-brand img {
            height: 40px !important;
        }
        
        .navbar-brand .d-none.d-md-inline {
            font-size: 0.8rem;
            max-width: 150px;
        }
    }
}

/* Small mobile devices */
@media (max-width: 576px) {
    /* Adjust section padding */
    section {
        padding-top: 40px !important;
        padding-bottom: 40px !important;
    }
    
    /* Make headings more readable on small screens */
    h1 {
        font-size: 1.8rem !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
    }
    
    /* Adjust card spacing */
    .card {
        margin-bottom: 20px;
    }
    
    /* Ensure form elements are properly sized */
    .form-control, .btn {
        font-size: 16px; /* Prevents iOS zoom on focus */
    }
}

/* Fix for dropdown menus on touch devices */
@media (hover: none) {
    .dropdown:hover .dropdown-menu {
        display: none;
    }
    
    .dropdown.show .dropdown-menu {
        display: block !important;
    }
}

/* Ensure active nav items are properly highlighted */
.nav-link.active {
    font-weight: 600;
    position: relative;
}

.nav-link.active:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15%;
    width: 70%;
    height: 2px;
    background-color: #ffffff;
}

/* Fix for dropdown toggle on mobile */
.dropdown-toggle::after {
    display: inline-block;
    margin-left: 0.255em;
    vertical-align: 0.255em;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
}
