/* Estilos para as categorias de serviço */

/* Menu de categorias - Desktop */
.categories-menu {
    background: #fff;
    padding: 15px 0;
    position: relative;
    z-index: 1000;
}

.categories-menu .container {
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 10px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 20px;
    align-items: center;
    justify-items: center;
}

.category-name {
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    line-height: 1.2;
    max-width: 80px;
    height: 32px; /* altura fixa */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.category-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-height: 80px;
    justify-content: center;
    z-index: 1; /* <- z-index baixo por padrão */
}

.category-item:hover {
    background-color: #f8f9fa;
    transform: translateY(-2px);
}

.category-icon {
    width: 40px;
    height: 40px;
    background: #fd5c63;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.category-icon i {
    color: white;
    font-size: 18px;
}

.category-item:hover .category-icon {
    background: #6d28d9;
    transform: scale(1.1);
}

.category-name {
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    line-height: 1.2;
    max-width: 80px;
}

/* Dropdown */
.category-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 20px;
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1001;
    margin-top: 10px;
}

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

.dropdown-content h4 {
    color: #7c3aed;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #7c3aed;
}

.dropdown-content a {
    display: block;
    color: #374151;
    text-decoration: none;
    padding: 8px 0;
    font-size: 14px;
    transition: color 0.3s ease;
    border-bottom: 1px solid #f3f4f6;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    color: #7c3aed;
    padding-left: 5px;
}

/* Responsividade */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

/* Tablet */
@media (max-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 15px;
    }
    
    .category-name {
        font-size: 11px;
    }
    
    .category-icon {
        width: 35px;
        height: 35px;
    }
    
    .category-icon i {
        font-size: 16px;
    }
    
    .dropdown-content {
        min-width: 250px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .desktop-only {
        display: none;
    }
    
    .mobile-only {
        display: block;
    }
}

/* Menu de categorias - Mobile */
.categories-mobile {
    background: #fff;
    padding: 20px 0;
    border-top: 1px solid #e5e5e5;
    margin-top: 20px;
}

.categories-mobile-title {
    font-size: 20px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 20px;
    text-align: center;
    margin-top: 10px;
}

.categories-mobile-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.category-mobile-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px 10px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.category-mobile-item:hover,
.category-mobile-item.active {
    border-color: #7c3aed;
    background: #f8f9fa;
}

.category-mobile-icon {
    width: 35px;
    height: 35px;
    background: #7c3aed;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.category-mobile-icon i {
    color: white;
    font-size: 16px;
}

.category-mobile-name {
    font-size: 11px;
    font-weight: 500;
    color: #374151;
    line-height: 1.2;
}

.category-mobile-services {
    display: none;
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.category-mobile-services.active {
    display: block;
}

.category-mobile-services h4 {
    color: #7c3aed;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
}

.services-mobile-list {
    display: grid;
    gap: 10px;
}

.services-mobile-list a {
    display: block;
    color: #374151;
    text-decoration: none;
    padding: 12px 15px;
    background: white;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid #e5e5e5;
}

.services-mobile-list a:hover {
    color: #7c3aed;
    border-color: #7c3aed;
    background: #faf5ff;
}

/* Ajustes para telas muito pequenas */
@media (max-width: 480px) {
    .categories-mobile-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .category-mobile-item {
        padding: 12px 8px;
    }
    
    .category-mobile-icon {
        width: 30px;
        height: 30px;
    }
    
    .category-mobile-icon i {
        font-size: 14px;
    }
    
    .category-mobile-name {
        font-size: 10px;
    }
}




.category-item:hover {
    z-index: 9999 !important; /* <- Sobe o item em hover acima de todos */
}

.category-dropdown {
    z-index: 9998 !important; /* <- dropdown aparece acima dos ícones, mas abaixo do item em hover */
}
