/* Responsive Design */
@media (max-width: 992px) {
    .main-menu {
        gap: 1.5rem;
    }
    .hero-content h1 {
        font-size: 3em;
    }
    .content-section h2 {
        font-size: 2.5em;
    }
    /* Adjust for nested service menus on smaller screens if they become too wide */
    .service-submenu-level-1 {
        min-width: 180px;
    }
    .service-submenu-level-2 {
        min-width: 250px;
    }

    .header-logo {
        height: 100px; /* Slightly smaller on tablets */
        margin-left: 1.5rem;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: row; /* Keep logo and hamburger on one row */
        justify-content: space-between;
        padding: 1rem 1.5rem;
    }

    .hamburger-menu {
        display: flex; /* Show hamburger on mobile */
    }

    .main-menu {
        display: none; /* Hide main menu by default */
        flex-direction: column;
        position: absolute;
        top: 60px; /* Below the header */
        left: 0;
        width: 100%;
        background-color: var(--soft-white);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        padding: 1rem 0;
        border-top: 1px solid var(--border-color);
        max-height: calc(100vh - 60px); /* Full height minus header */
        overflow-y: auto; /* Scroll if content exceeds height */
        z-index: 999;
        align-items: center; /* Center main menu items */
    }

    .main-menu.active {
        display: flex; /* Show menu when active */
    }

    .main-menu > li {
        width: 90%; /* Make main menu items wider */
        text-align: center;
        margin-bottom: 0.5rem;
        border-bottom: 1px solid var(--border-color); /* Separator for main items */
        padding-bottom: 0.5rem;
    }

    .main-menu > li:last-child {
        border-bottom: none;
    }

    .main-menu > li > a {
        font-size: 1.2em; /* Larger font for readability */
        padding: 0.8rem 0;
        color: var(--earthy-brown);
    }

    .main-menu > li > a::after {
        display: none; /* No underline effect on mobile */
    }

    .submenu {
        position: static; /* Stack submenus vertically */
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        min-width: unset;
        padding: 0;
        margin-top: 0.5rem;
        max-height: 0; /* Initially collapsed */
        overflow: hidden;
        transition: max-height 0.3s ease-out;
        background-color: #f5f5f5; /* Slightly different background for submenus */
    }

    /* Expand submenu when parent has 'open' class */
    .has-submenu.open > .submenu {
        max-height: 500px; /* A value larger than expected content height */
        padding-bottom: 0.5rem;
        border-top: 1px dashed var(--border-color); /* Subtle separator */
    }

    .submenu li a {
        padding: 0.6rem 1rem;
        font-size: 1.1em;
        color: var(--text-color-dark);
    }

    /* Service submenus specific adjustments */
    .service-submenu-level-1 {
        min-width: unset;
        background-color: transparent; /* No extra background for level 1 parent */
        box-shadow: none;
        padding: 0;
    }

    .service-submenu-level-1 .has-submenu {
        width: 100%;
        text-align: center;
        border-bottom: none; /* No extra border for these parents */
        margin-bottom: 0;
    }

    .service-submenu-level-1 .has-submenu > a {
        padding: 0.6rem 1rem;
        background-color: transparent;
        border-bottom: none;
        color: var(--earthy-brown);
        font-weight: 500;
    }

    .service-submenu-level-1 .has-submenu.open > .service-submenu-level-2 {
        max-height: 500px; /* Expand inner service submenu */
    }

    .service-submenu-level-2 {
        position: static;
        min-width: unset;
        border-left: none;
        padding: 0;
        background-color: #eee; /* Lightest background for level 2 */
        max-height: 0; /* Collapsed by default */
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }

    .service-submenu-level-2 li a {
        font-size: 1em;
        padding: 0.5rem 1.5rem; /* Indent slightly */
        color: var(--text-color-light);
    }
    
    .hero-section {
        height: 80vh; /* Allow more vertical space for content */
        align-items: center; /* Center content vertically */
        padding-top: 0; /* Remove top padding to allow full vertical centering */
    }
    .hero-content {
        padding: 1rem; /* Reduce overall padding for more space */
        max-width: 90%; /* Allow content to take more width */
        margin-top: -10vh; /* Move content upwards by adjusting top margin */
    }
    .hero-content h1 {
        font-size: 1.8em; /* Adjusted for better fit on mobile */
        margin-bottom: 0.8em; /* Adjusted spacing */
        line-height: 1.3;
        margin-top: calc(5vh + 0.9em); /* Pushed down slightly to be visible at the top */
    }
    .hero-content .hero-buttons {
        flex-direction: column;
        gap: 0.8rem; /* Reduced gap between buttons */
        margin-bottom: 1em; /* Adjusted margin */
    }
    .hero-content .hero-description-text { /* Targeting the specific paragraph */
        font-size: 0.9em; /* Adjusted for better fit on mobile */
        margin-bottom: 1em; /* Adjusted margin */
        line-height: 1.5;
    }
    .btn {
        padding: 0.7rem 1.2rem; /* Smaller padding for buttons */
        font-size: 0.85em; /* Smaller font for buttons */
    }
    .content-section {
        padding: 3rem 0;
    }
    .content-section h2 {
        font-size: 2em;
        margin-bottom: 1.5em;
    }
    .process-steps {
        flex-direction: column;
        gap: 2rem;
    }

    .process-row {
        flex-direction: column; /* Stack steps vertically within a row on smaller screens */
        gap: 2rem;
    }
    .step {
        padding: 2rem;
        max-width: unset; /* Remove max-width on smaller screens */
    }

    .header-right {
        display: flex; /* Use flex to align logo and hamburger */
        align-items: center;
        gap: 1.5rem; /* Space between logo and hamburger */
    }

    .header-logo {
        height: 90px; /* Smaller on mobile */
        margin-left: 0; /* Remove left margin as it's handled by gap now */
    }
}

    /* Partners submenu mobile styling */
    .main-menu > li.has-submenu > .partners-submenu-level-1 li {
        margin-bottom: 0.5rem;
    }

    .main-menu > li.has-submenu > .partners-submenu-level-1 li a {
        padding: 0.8rem 1.5rem;
        font-weight: 600;
        color: var(--earthy-brown);
        background-color: #f0f0f0;
        border-bottom: 1px solid var(--border-color);
    }

    .main-menu > li.has-submenu > .partners-submenu-level-1 li a:hover {
        background-color: #e0e0e0;
        color: var(--champagne-gold);
    }
}							
							
@media (max-width: 480px) {
    .logo {
        font-size: 1.8em;
    }
    .hero-section {
        height: 70vh; /* Allow more vertical space for content */
    }
    .hero-content {
        margin-top: -8vh; /* Further move content upwards for very small screens */
    }
    .hero-content h1 {
        font-size: 1.4em; /* Further adjusted for very small screens */
        margin-bottom: 0.6em;
        margin-top: calc(5vh + 0.9em); /* Pushed down slightly to be visible at the top */
    }
    .hero-content .hero-description-text {
        font-size: 0.8em; /* Further adjusted for very small screens */
        margin-bottom: 0.8em;
    }
    .hero-content .hero-buttons {
        gap: 0.6rem;
        margin-bottom: 0.8em;
    }
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.8em;
    }
    .content-section h2 {
        font-size: 1.8em;
    }
    .service-item, .contact-form-container {
        padding: 1.5rem;
    }
    .form-group input, .form-group textarea {
        padding: 0.7rem;
    }

    .header-logo {
        height: 80px; /* Even smaller on very small phones */
    }
}

/* Contact Us submenu spacing fix - Mobile */
@media (max-width: 768px) {
    .main-menu > li.has-submenu > .contact-submenu-level-1 .has-submenu {
        margin-bottom: 0.7rem; /* Added vertical spacing between submenus */
    }

    /* Style for the submenu links */
    .main-menu > li.has-submenu > .contact-submenu-level-1 .has-submenu > a {
        padding: 0.8rem 1.5rem; /* Consistent padding with service submenus */
        font-weight: 600;
        color: var(--earthy-brown);
        background-color: #f0f0f0; /* Match background with service submenu parents */
        border-bottom: 1px solid var(--border-color);
    }

    .main-menu > li.has-submenu > .contact-submenu-level-1 .has-submenu > a:hover {
        background-color: #e0e0e0;
        color: var(--champagne-gold);
    }

    /* Ensure the parent 'Contact Us' submenu expands */
    .main-menu > li.has-submenu:has(.contact-submenu-level-1).open > .contact-submenu-level-1 {
        max-height: 500px; /* Expand it */
        padding-bottom: 0.5rem;
    }

    /* Adjust specific elements for the new 'Visit Us' section to maintain consistency */
    #contact-us-visit {
        margin-bottom: 3rem; /* Spacing below the new section, similar to 'Call Us' */
    }
}