* {
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: calc(0px + 100vh);
}

/* hamburger css mobile view */
*, 
*::after,
*::before{
    box-sizing: border-box;
}

:root{
    --bar-width: 40px;
    --bar-height:4px;
    --hamburger-gap: 10px;
    /* --hamburger-margin:10px; */
    --animation-timing: 200ms ease-in-out;
    --hamburger-height: calc(var(--bar-height) * 3 + var(--hamburger-gap) * 2)
}

.hamburger-menu{
    display: none;
}

.sidebar{
    display: none;
}

/* Services Dropdown Menu */
.dropdown{
    position: absolute;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    list-style: none;
    padding: 15px 0;
    width: 220px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 100;
}

.nav-item-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
}

.dropdown li a {
    padding: 8px 20px;
    display: block;
    color: var(--gray);
}

.dropdown li a:hover {
    color: var(--primary);
    background: var(--light);
}

.heading{
    margin: auto 0;
    padding-top: 150px;
    padding-left: 100px;
}

body {
    background-color: white;
    font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.menu{
    background: white;
    box-shadow:  0 2px 10 px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2%;
}

/* New mobile header styles */
#mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem;
}

#logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

#company-name {
    flex: 1;  /* Takes available space */
    text-align: center;
    margin: 0 1rem;  /* Spacing on sides */
}

#homeLogo {
    height: 30px;
    width: auto;
}

#logo-container p {
    font-size: 1.1rem;
    color: var(--primary-dark);
    font-weight: bold;
    padding-top: 10px;
}

#logo-container img{
    max-width: 10rem;
}
    
.main {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main li:not(.contact-item) a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.main li:not(.contact-item) a:hover {
    color: var(--primary);
}

.main li:not(.contact-item) a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s;
}

.main li:not(.contact-item) a:hover::after {
    width: 100%;
}

.contact-link::after {
    display: none !important;
}

[data-search-results] {
  /* Modern layout */
  contain: strict; /* Improves rendering performance */
  will-change: transform; /* GPU acceleration */
  backdrop-filter: blur(10px); /* Frosted glass effect */
}

.search-result {
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow:  0 2px 10 px rgba(0, 0, 0, 0.1);
}

.search-result:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.search-container {
    display: flex;
    align-items: center;
    margin-left: 30px;
    margin-right: 50px;
    
}

.search-input{
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    transition: all 0.3s;
    width: 180px;
}
.search-input:focus {
    border-color: var(--primary);
    width: 220px;
}

.search-button {
    background: none;
    border: none;
    margin-left: -35px;
    cursor: pointer;
    color: var(--gray);
    transition: color 0.3s;
}

.search-button:hover {
    color: var(--primary);
}


.search-container {
    position: relative; 
}

.search-container .search-results {
    display: none;
    position: absolute;
    top: 100%; 
    left: 0;
    width: 130%;
    max-width: 300px; 
    margin-top: 5px;
    background: white;
    padding: 6px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1)

}

.search-container.active .search-results,
.search-container input:focus ~ .search-results {
    display: block;
}

.search-container .search-results h4 {
    padding-bottom: 3px;
}

.search-container .search-results p{
    text-decoration: none;
    padding-bottom: 10px;
}

.sidebar-search-container {
    position: relative; 
}

.sidebar-search-container .search-results {
    position: absolute;
    top: calc(100% + 5px); 
    left: 0;
    right: 0;
    width: auto; 
}


.result-item {
    text-decoration: none !important;
    border-bottom: 3px solid red !important; 
    color: var(--primary);

}


.result-item:hover {
    text-decoration: none !important;
    background-color: #f8f9fa; 
    color: var(--primary-dark);
}

.contact-link {
    background: var(--accent);
    color: white !important;
    padding: 8px 15px;
    border-radius: 4px;
    margin-left: 15px;
    transition: background 0.3s;
    text-decoration: none !important;
}

.contact-link:hover {
    background: #e05a2c;
    color: white !important;
    text-decoration: none !important;
}


.nav-wrapper {
    display: flex;
    align-items: center;
}

@media (max-width: 768px) {
    .hamburger-menu{
        --x-width: calc(var(--hamburger-height) * 1.41421356237);
        display: flex;
        flex-direction: column;
        gap: var(--hamburger-gap);
        width: max-content;
        position: absolute;
        right: 10px ;
        z-index: 2;
        cursor: pointer;
        padding-right: 10px;
    }
    .hamburger-menu:has(input:checked) + .sidebar {
        translate: 0;
    }

    .hamburger-menu:has(input:checked){
        --foreground: white;
        --background: #333; /*change colors*/
    }

    .hamburger-menu::before,
    .hamburger-menu::after,
    .hamburger-menu input{
        content: "";
        width: var(--bar-width);
        height: var(--bar-height);
        background-color: var(--dark);
        border-radius: 150px; 
        transform-origin: left center;
        transition: opacity var(--animation-timing), width var(--animation-timing), 
            rotate var(--animation-timing), translate var(--animation-timing),
            background-color var(--animation-timing);
    }

    .hamburger-menu input{
        appearance: none;
        padding: 0;
        margin: 0;
        outline: none;
    }

    /* Initial unchecked state */
    .hamburger-menu::before,
    .hamburger-menu::after,
    .hamburger-menu input {
        transform: rotate(0) translate(0);
        opacity: 1;
    }

    /* Checked state */
    .hamburger-menu:has(input:checked)::before{
        rotate: 45deg;
        width: var(--x-width);
        translate: 0 calc(var(--bar-height) / -2);
    }

    .hamburger-menu:has(input:checked)::after{
        rotate: -45deg;
        width: var(--x-width);
        translate: 0 calc(var(--bar-height) / 2);
    }

    .hamburger-menu input:checked{
        opacity: 0;
        width: 0;
    }

    .main, .search-container{
        display: none;
    }

    .menu{
        display: flex;
        position: sticky;
    }

    #logo-container{
        display: flex;
        flex-direction: column;
        align-items:baseline;
        gap: 0px;
    }

    #logo-container img{
        max-width: 7rem;
    }
   
    /* Sidebar Styles */
    .sidebar {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        transition: translate var(--animation-timing);
        translate: 100%;
        padding: .5rem 1rem;
        padding-top: calc(var(--hamburger-height) + var(--hamburger-margin) + 1rem);
        background-color: var(--primary-dark);
        color: var(--light);
        width: 40rem; 
        min-height: 100vh;
        z-index: 1;
        background: white;
    }

    .sidebar {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        transition: translate var(--animation-timing);
        translate: 100%;
        padding: 1rem 1rem;
        padding-top: calc(var(--hamburger-height) + var(--hamburger-margin) + 1rem);
        background-color: var(--primary-dark);
        color: var(--light);
        width: 40rem; 
        min-height: 100vh;
        z-index: 1;
        background: white;
    }

        /* Sidebar Header Styles */
    .sidebar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
        position: sticky;
        top: 0;
        background: white;
        z-index: 10;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        /* margin-right:  1.5rem; */
        margin-left: 0;
    }


    /* Close Button Styles */

    .sidebar {
        padding-top: 0; 
    }

    .sidebar-menu {
        height: calc(100vh - var(--sidebar-header-height, 70px));
        overflow-y: auto;
        padding-top: 1.5rem;
        
    }

    .sidebar-menu {
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    /* Main Links - Modern Style */
    .sidebar-main {
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        padding: 0 1.5rem;
    }

    .sidebar-item {
        position: relative;
        overflow: hidden;
    }

    .sidebar-item a {
        display: flex;
        align-items: center;
        padding: 1rem 1.25rem;
        color: #2c3e50;
        text-decoration: none;
        font-weight: 500;
        font-size: 1.05rem;
        border-radius: 8px;
        transition: all 0.3s ease;
        background: transparent;
    }

    .sidebar-item a:hover {
        background: rgba(0, 123, 255, 0.08);
        color: #007bff;
        transform: translateX(3px);
    }

    .sidebar-item a::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        height: 100%;
        width: 3px;
        background: #007bff;
        transform: scaleY(0);
        transition: transform 0.3s ease;
    }

    .sidebar-item a:hover::before {
        transform: scaleY(1);
    }

    /* Dropdown - Enhanced */
    .sidebar-dropdown {
        list-style: none;
        padding-left: 1rem;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .sidebar-item-dropdown.active .sidebar-dropdown {
        max-height: 500px; 
        padding-top: 0.5rem;
    }

    .sidebar-dropdown li a {
        padding: 0.8rem 1.25rem;
        font-size: 0.95rem;
        color: #5a6a7e;
        border-radius: 6px;
        margin: 0.15rem 0;
        text-decoration: none;
    }

    .sidebar-dropdown li a:hover {
        color: #007bff;
        background: rgba(0, 123, 255, 0.05);
    }

    .services-toggle {
        display: flex;
        align-items: center;
        padding: 1rem 1.25rem;
        color: #2c3e50;
        text-decoration: none;
        font-weight: 500;
        font-size: 1.05rem;
        border-radius: 8px;
        transition: all 0.3s ease;
        background: transparent;
    }

    .services-toggle::after {
        content: '▸';
        font-size: 0.9em;
        transition: transform 0.3s ease;
    }

    .sidebar-item-dropdown.active .services-toggle::after {
        transform: rotate(90deg);
    }

    /* Search - Modern */
    .sidebar-search-container {
        padding: 13px 1.5rem;
        margin: 1.5rem 0;
        position: relative;
    }

    .sidebar-search-input {
        width: 40%;
        padding: 1rem 1.25rem; 
        border: none;
        border-radius: 8px;
        background: white;
        box-shadow: 0 2px 10px rgba(25, 12, 0, 0.2);
        font-size: 0.95rem;
        transition: all 0.3s ease;
    }

    .sidebar-search-button {
        position: absolute;
        right: calc(60% + 0.5rem); 
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        color: #7e8a9a;
        cursor: pointer;
        transition: color 0.3s ease;
    }

    
    .sidebar-search-input:focus {
        box-shadow: 0 4px 15px rgba(0, 123, 255, 0.15);
        outline: none;
    }

    .sidebar-search-button:hover {
        color: #007bff;
    }

    .search-results {
        position: fixed;
        top: calc(var(--header-height, 60px) + 10px) !important;
        padding: 10px 130px;
        left: -100px !important;
        right: 10px !important;
        width: calc(100% - 20px) !important;
        max-height: 60vh;
        /* border-radius: 12px; */
        /* box-shadow: 0 5px 25px rgba(0,0,0,0.15); */
        z-index: 1000;
    }

    .search-result {
        padding: 14px 16px;
    }

    .search-result h3 {
        font-size: 1rem;
    }

    .search-result p {
        font-size: 0.85rem;
    }

    /* Active State */
    .sidebar-active {
        left: 0;
    }

    /* Overlay */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .sidebar-overlay-active {
        opacity: 1;
        visibility: visible;
    }


}