/* Custom Dropdown Styles */
.custom-dropdown {
    position: relative;
}

.custom-dropdown .dropdown-trigger {
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
}

.custom-dropdown .dropdown-arrow {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
    margin-left: 0.35rem;
}

.custom-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* Larger navigation */
.navbar-dark .navbar-nav .nav-link {
    padding: 1.2rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.custom-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1050;
    display: none;
    min-width: 10rem;
    padding: 1rem;
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    text-align: left;
    list-style: none;
    background-color: var(--secondary-light);
    background-clip: padding-box;
    border-top: 3px solid var(--primary-color);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    visibility: hidden;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.custom-dropdown-menu.show {
    display: block;
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

/* Large Dropdown Menu with Grid */
.custom-dropdown-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    width: 850px;
    max-width: 90vw;
}

.brand-category ul li a {
    font-size: 0.95rem;
    padding: 0.4rem 0;
}

.brand-category h6 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-family: var(--heading-font);
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.brand-category h6::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 2px;
    background-color: var(--primary-color);
}

.brand-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.brand-category ul li {
    margin-bottom: 0.6rem;
}

.brand-category ul li a {
    color: rgba(255, 255, 255, 0.85);
    transition: var(--transition);
    position: relative;
    display: block;
    padding: 0.3rem 0;
    font-size: 0.95rem;
}

.brand-category ul li a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.brand-category ul li a.view-all {
    color: var(--primary-color);
    font-weight: 600;
    margin-top: 0.3rem;
}

/* Smaller Dropdown Menu (Services) */
.dropdown-menu-smaller {
    width: 250px;
}

.services-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.services-menu li {
    margin-bottom: 0.6rem;
}

.services-menu li a {
    color: rgba(255, 255, 255, 0.85);
    transition: var(--transition);
    position: relative;
    display: block;
    padding: 0.5rem 0;
    font-size: 0.85rem;
}

.services-menu li a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.services-menu li a.view-all {
    color: var(--primary-color);
    font-weight: 600;
    margin-top: 0.3rem;
}

/* Mobile Styles */
@media (max-width: 991.98px) {
    .custom-dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        border-top: none;
        background-color: rgba(0, 0, 0, 0.1);
        border-radius: 0;
        padding: 0.5rem 0 0.5rem 1.5rem;
        margin-top: 0;
        max-width: 100%;
        width: 100%;
    }
    
    .custom-dropdown-grid {
        display: block;
        width: 100%;
        max-width: 100%;
    }
    
    .brand-category {
        margin-bottom: 1.5rem;
    }
    
    .brand-category:last-child {
        margin-bottom: 0;
    }
    
    .dropdown-menu-smaller {
        width: 100%;
    }
}

/* Enhanced Search Bar Styling */
.search-form {
    max-width: 220px;
}

.search-input {
    font-size: 0.95rem;
    height: 38px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    border-radius: var(--border-radius-pill) 0 0 var(--border-radius-pill);
    padding-left: 0.9rem;
    transition: var(--transition);
}

.search-input:focus {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
    color: white;
    outline: none;
    box-shadow: none;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
}

.search-btn {
    height: 38px;
    line-height: 1;
    background: var(--primary-gradient);
    border: none;
    padding: 0 1rem;
    border-radius: 0 var(--border-radius-pill) var(--border-radius-pill) 0;
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
}

.search-btn:hover {
    background: var(--primary-color);
    transform: none;
}

/* Navbar size adjustments - fixes spacing */
.navbar {
    padding: 0.5rem 1.5rem !important;
    height: 70px !important;
}

.navbar-brand {
    font-size: 2.2rem !important;
    padding: 0.2rem 0;
}

body {
    padding-top: 70px !important; /* Fixed spacing */
}

/* Adjust container sizing for navbar */
@media (min-width: 992px) {
    .navbar > .container {
        max-width: 1320px;
        padding: 0 1.5rem;
    }
}

/* Animation for dropdown menus */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-dropdown-menu.show {
    animation: fadeInDown 0.3s ease forwards;
}

/* Desktop dropdown positioning */
@media (min-width: 992px) {
    .custom-dropdown {
        position: relative;
    }
    
    /* Special handling for brands dropdown */
    .brands-dropdown .custom-dropdown-menu {
        left: 0;
    }
    
    /* Services dropdown positioning */
    .services-dropdown .custom-dropdown-menu {
        left: 0;
    }
    
    /* Fix hero section spacing */
    .hero-section {
        margin-top: 0 !important;
    }
}

/* Mobile adjustments for search */
@media (max-width: 991.98px) {
    .search-form {
        max-width: none;
        margin-top: 0.75rem;
    }
}
